From 9ce061f065d4b242ca9ecf4f5bf061961d57a6f5 Mon Sep 17 00:00:00 2001 From: Smaug123 <3138005+Smaug123@users.noreply.github.com> Date: Thu, 3 Oct 2024 15:59:27 +0100 Subject: [PATCH 1/4] Use Whippet --- ConsumePlugin/ConsumePlugin.fsproj | 2 +- ConsumePlugin/Generated2SwaggerGitea.fs | 1 - ConsumePlugin/GeneratedArgs.fs | 1 - ConsumePlugin/GeneratedCatamorphism.fs | 1 - ConsumePlugin/GeneratedFileSystem.fs | 1 - ConsumePlugin/GeneratedJson.fs | 1 - ConsumePlugin/GeneratedMock.fs | 1 - ConsumePlugin/GeneratedMockNoAttributes.fs | 1 - ConsumePlugin/GeneratedPureGymDto.fs | 1 - ConsumePlugin/GeneratedRecord.fs | 28 ----------- ConsumePlugin/GeneratedRestClient.fs | 1 - ConsumePlugin/GeneratedSerde.fs | 1 - ConsumePlugin/GeneratedSwaggerGitea.fs | 1 - ConsumePlugin/GeneratedVault.fs | 1 - ConsumePlugin/ListCata.fs | 1 - WoofWare.Myriad.Plugins/AstHelper.fs | 17 +------ .../RemoveOptionsGenerator.fs | 49 ++++++++++++++++--- WoofWare.Myriad.Plugins/SynExpr/SynType.fs | 16 ++++++ .../WoofWare.Myriad.Plugins.fsproj | 2 + WoofWare.Myriad.sln | 6 +++ 20 files changed, 67 insertions(+), 66 deletions(-) diff --git a/ConsumePlugin/ConsumePlugin.fsproj b/ConsumePlugin/ConsumePlugin.fsproj index d509e3b..6026957 100644 --- a/ConsumePlugin/ConsumePlugin.fsproj +++ b/ConsumePlugin/ConsumePlugin.fsproj @@ -14,7 +14,7 @@ - RecordFile.fs + RecordFile.fs diff --git a/ConsumePlugin/Generated2SwaggerGitea.fs b/ConsumePlugin/Generated2SwaggerGitea.fs index 48126fd..c5f38cf 100644 --- a/ConsumePlugin/Generated2SwaggerGitea.fs +++ b/ConsumePlugin/Generated2SwaggerGitea.fs @@ -3,7 +3,6 @@ // Changes to this file will be lost when the code is regenerated. //------------------------------------------------------------------------------ - namespace Gitea open WoofWare.Myriad.Plugins diff --git a/ConsumePlugin/GeneratedArgs.fs b/ConsumePlugin/GeneratedArgs.fs index 7a0752f..309fdc0 100644 --- a/ConsumePlugin/GeneratedArgs.fs +++ b/ConsumePlugin/GeneratedArgs.fs @@ -7,7 +7,6 @@ - namespace ConsumePlugin open System diff --git a/ConsumePlugin/GeneratedCatamorphism.fs b/ConsumePlugin/GeneratedCatamorphism.fs index 4d280ee..a3144eb 100644 --- a/ConsumePlugin/GeneratedCatamorphism.fs +++ b/ConsumePlugin/GeneratedCatamorphism.fs @@ -6,7 +6,6 @@ - namespace ConsumePlugin open WoofWare.Myriad.Plugins diff --git a/ConsumePlugin/GeneratedFileSystem.fs b/ConsumePlugin/GeneratedFileSystem.fs index 4a2fff9..d2d4dfa 100644 --- a/ConsumePlugin/GeneratedFileSystem.fs +++ b/ConsumePlugin/GeneratedFileSystem.fs @@ -6,7 +6,6 @@ - namespace ConsumePlugin open WoofWare.Myriad.Plugins diff --git a/ConsumePlugin/GeneratedJson.fs b/ConsumePlugin/GeneratedJson.fs index 956fb22..d1dd965 100644 --- a/ConsumePlugin/GeneratedJson.fs +++ b/ConsumePlugin/GeneratedJson.fs @@ -3,7 +3,6 @@ // Changes to this file will be lost when the code is regenerated. //------------------------------------------------------------------------------ - namespace ConsumePlugin open System.Text.Json.Serialization diff --git a/ConsumePlugin/GeneratedMock.fs b/ConsumePlugin/GeneratedMock.fs index a1c02a3..bd68a1a 100644 --- a/ConsumePlugin/GeneratedMock.fs +++ b/ConsumePlugin/GeneratedMock.fs @@ -2,7 +2,6 @@ // This code was generated by myriad. // Changes to this file will be lost when the code is regenerated. //------------------------------------------------------------------------------ - namespace SomeNamespace open System diff --git a/ConsumePlugin/GeneratedMockNoAttributes.fs b/ConsumePlugin/GeneratedMockNoAttributes.fs index f9ea47c..443e714 100644 --- a/ConsumePlugin/GeneratedMockNoAttributes.fs +++ b/ConsumePlugin/GeneratedMockNoAttributes.fs @@ -2,7 +2,6 @@ // This code was generated by myriad. // Changes to this file will be lost when the code is regenerated. //------------------------------------------------------------------------------ - namespace SomeNamespace open System diff --git a/ConsumePlugin/GeneratedPureGymDto.fs b/ConsumePlugin/GeneratedPureGymDto.fs index 4930adb..c9b0c7c 100644 --- a/ConsumePlugin/GeneratedPureGymDto.fs +++ b/ConsumePlugin/GeneratedPureGymDto.fs @@ -3,7 +3,6 @@ // Changes to this file will be lost when the code is regenerated. //------------------------------------------------------------------------------ - namespace PureGym open System diff --git a/ConsumePlugin/GeneratedRecord.fs b/ConsumePlugin/GeneratedRecord.fs index d979a10..e69de29 100644 --- a/ConsumePlugin/GeneratedRecord.fs +++ b/ConsumePlugin/GeneratedRecord.fs @@ -1,28 +0,0 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ -namespace ConsumePlugin - -/// Module containing an option-truncated version of the RecordType type -[] -[] -module RecordType = - /// My whatnot - type Short = - { - /// A thing! - A : int - /// Another thing! - B : string - /// Yet another thing! - C : float list - } - - /// Remove the optional members of the input. - let shorten (input : RecordType) : Short = - { - A = input.A |> Option.defaultWith RecordType.DefaultA - B = input.B - C = input.C - } diff --git a/ConsumePlugin/GeneratedRestClient.fs b/ConsumePlugin/GeneratedRestClient.fs index d4adb02..fbbd0ec 100644 --- a/ConsumePlugin/GeneratedRestClient.fs +++ b/ConsumePlugin/GeneratedRestClient.fs @@ -5,7 +5,6 @@ - namespace PureGym open System diff --git a/ConsumePlugin/GeneratedSerde.fs b/ConsumePlugin/GeneratedSerde.fs index 7a1d8c5..7febc5c 100644 --- a/ConsumePlugin/GeneratedSerde.fs +++ b/ConsumePlugin/GeneratedSerde.fs @@ -3,7 +3,6 @@ // Changes to this file will be lost when the code is regenerated. //------------------------------------------------------------------------------ - namespace ConsumePlugin open System diff --git a/ConsumePlugin/GeneratedSwaggerGitea.fs b/ConsumePlugin/GeneratedSwaggerGitea.fs index 2f2d0b1..7937cd6 100644 --- a/ConsumePlugin/GeneratedSwaggerGitea.fs +++ b/ConsumePlugin/GeneratedSwaggerGitea.fs @@ -8,7 +8,6 @@ - namespace Gitea open WoofWare.Myriad.Plugins diff --git a/ConsumePlugin/GeneratedVault.fs b/ConsumePlugin/GeneratedVault.fs index eb0e69d..e89dc74 100644 --- a/ConsumePlugin/GeneratedVault.fs +++ b/ConsumePlugin/GeneratedVault.fs @@ -4,7 +4,6 @@ //------------------------------------------------------------------------------ - namespace ConsumePlugin /// Module containing JSON parsing methods for the JwtVaultAuthResponse type diff --git a/ConsumePlugin/ListCata.fs b/ConsumePlugin/ListCata.fs index a6e3e84..9c2d250 100644 --- a/ConsumePlugin/ListCata.fs +++ b/ConsumePlugin/ListCata.fs @@ -6,7 +6,6 @@ - namespace ConsumePlugin open WoofWare.Myriad.Plugins diff --git a/WoofWare.Myriad.Plugins/AstHelper.fs b/WoofWare.Myriad.Plugins/AstHelper.fs index d82a23b..94da94d 100644 --- a/WoofWare.Myriad.Plugins/AstHelper.fs +++ b/WoofWare.Myriad.Plugins/AstHelper.fs @@ -294,21 +294,6 @@ module internal AstHelper = } | _ -> failwithf "Didn't have alternating type-and-star in interface member definition: %+A" tupleType - /// Returns the args (where these are tuple types if curried) in order, and the return type. - let rec getType (ty : SynType) : (SynType * bool) list * SynType = - match ty with - | SynType.Paren (ty, _) -> getType ty - | SynType.Fun (argType, returnType, _, _) -> - let args, ret = getType returnType - // TODO this code is clearly wrong - let (inputArgs, inputRet), hasParen = - match argType with - | SynType.Paren (argType, _) -> getType argType, true - | _ -> getType argType, false - - ((SynType.toFun (List.map fst inputArgs) inputRet), hasParen) :: args, ret - | _ -> [], ty - let private parseMember (slotSig : SynValSig) (flags : SynMemberFlags) : Choice = if not flags.IsInstance then failwith "member was not an instance member" @@ -341,7 +326,7 @@ module internal AstHelper = let attrs = attrs |> List.collect _.Attributes - let args, ret = getType synType + let args, ret = SynType.getType synType let args = args diff --git a/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs b/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs index 94d8f94..cfa80ea 100644 --- a/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs +++ b/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs @@ -1,6 +1,9 @@ namespace WoofWare.Myriad.Plugins +open System +open System.Text open Fantomas.FCS.Syntax +open Fantomas.FCS.SyntaxTrivia open Fantomas.FCS.Xml [] @@ -131,21 +134,26 @@ module internal RemoveOptionsGenerator = |> List.singleton |> SynModuleOrNamespace.createNamespace namespaceId -open Myriad.Core +open WoofWare.Whippet.Core /// Myriad generator that stamps out a record with option types stripped /// from the fields at the top level. -[] +[] type RemoveOptionsGenerator () = - interface IMyriadGenerator with - member _.ValidInputExtensions = [ ".fs" ] + interface IGenerateRawFromRaw with + + member _.GenerateRawFromRaw (args : RawSourceGenerationArgs) : string = + if not (args.FilePath.EndsWith (".fs", StringComparison.OrdinalIgnoreCase)) then + null + else - member _.Generate (context : GeneratorContext) = let ast, _ = - Ast.fromFilename context.InputFilename |> Async.RunSynchronously |> Array.head + Fantomas.Core.CodeFormatter.ParseAsync (false, Encoding.UTF8.GetString args.FileContents) + |> Async.RunSynchronously + |> Array.head - let records = Ast.extractRecords ast + let records = Myriad.Core.Ast.extractRecords ast let namespaceAndRecords = records @@ -185,4 +193,29 @@ type RemoveOptionsGenerator () = ) ) - Output.Ast modules + if modules.IsEmpty then + null + else + + let parseTree = + ParsedInput.ImplFile ( + ParsedImplFileInput.ParsedImplFileInput ( + "file.fs", + false, + QualifiedNameOfFile.QualifiedNameOfFile (Ident.create "file"), + [], + [], + modules, + (false, false), + { + ParsedImplFileInputTrivia.CodeComments = [] + ConditionalDirectives = [] + }, + Set.empty + ) + ) + + let cfg = Fantomas.Core.FormatConfig.Default + + Fantomas.Core.CodeFormatter.FormatASTAsync (parseTree, cfg) + |> Async.RunSynchronously diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynType.fs b/WoofWare.Myriad.Plugins/SynExpr/SynType.fs index 3fb417d..47f00db 100644 --- a/WoofWare.Myriad.Plugins/SynExpr/SynType.fs +++ b/WoofWare.Myriad.Plugins/SynExpr/SynType.fs @@ -285,6 +285,7 @@ module internal SynTypePatterns = [] module internal SynType = + let rec stripOptionalParen (ty : SynType) : SynType = match ty with | SynType.Paren (ty, _) -> stripOptionalParen ty @@ -537,3 +538,18 @@ module internal SynType = let ident2 = ident2 |> List.map _.idText ident1 = ident2 | _, _ -> false + + /// Returns the args (where these are tuple types if curried) in order, and the return type. + let rec getType (ty : SynType) : (SynType * bool) list * SynType = + match ty with + | SynType.Paren (ty, _) -> getType ty + | SynType.Fun (argType, returnType, _, _) -> + let args, ret = getType returnType + // TODO this code is clearly wrong + let (inputArgs, inputRet), hasParen = + match argType with + | SynType.Paren (argType, _) -> getType argType, true + | _ -> getType argType, false + + ((toFun (List.map fst inputArgs) inputRet), hasParen) :: args, ret + | _ -> [], ty diff --git a/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj b/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj index 1f04d67..cdeb938 100644 --- a/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj +++ b/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj @@ -18,6 +18,7 @@ + @@ -81,6 +82,7 @@ + diff --git a/WoofWare.Myriad.sln b/WoofWare.Myriad.sln index 61d3d2b..296ec81 100644 --- a/WoofWare.Myriad.sln +++ b/WoofWare.Myriad.sln @@ -10,6 +10,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Myriad.Plugins.Att EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Myriad.Plugins.Attributes.Test", "WoofWare.Myriad.Plugins.Attributes\Test\WoofWare.Myriad.Plugins.Attributes.Test.fsproj", "{26DC0C94-85F2-45B4-8FA1-1B27201F7AFB}" EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Whippet.Core", "..\WoofWare.Whippet\WoofWare.Whippet.Core\WoofWare.Whippet.Core.fsproj", "{0831FDF4-9BCB-4595-8432-E90111AB98A2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -36,5 +38,9 @@ Global {26DC0C94-85F2-45B4-8FA1-1B27201F7AFB}.Debug|Any CPU.Build.0 = Debug|Any CPU {26DC0C94-85F2-45B4-8FA1-1B27201F7AFB}.Release|Any CPU.ActiveCfg = Release|Any CPU {26DC0C94-85F2-45B4-8FA1-1B27201F7AFB}.Release|Any CPU.Build.0 = Release|Any CPU + {0831FDF4-9BCB-4595-8432-E90111AB98A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0831FDF4-9BCB-4595-8432-E90111AB98A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0831FDF4-9BCB-4595-8432-E90111AB98A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0831FDF4-9BCB-4595-8432-E90111AB98A2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal From 98aa0305685dbcc01267427cfbb31143113bb5e7 Mon Sep 17 00:00:00 2001 From: Smaug123 <3138005+Smaug123@users.noreply.github.com> Date: Sun, 6 Oct 2024 20:49:45 +0100 Subject: [PATCH 2/4] WIP --- ConsumePlugin/ConsumePlugin.fsproj | 60 +- ConsumePlugin/Generated2SwaggerGitea.fs | 24893 ++++++++-------- ConsumePlugin/GeneratedArgs.fs | 1690 +- ConsumePlugin/GeneratedCatamorphism.fs | 189 +- ConsumePlugin/GeneratedFileSystem.fs | 256 +- ConsumePlugin/GeneratedJson.fs | 234 +- ConsumePlugin/GeneratedMock.fs | 172 +- ConsumePlugin/GeneratedMockNoAttributes.fs | 172 +- ConsumePlugin/GeneratedPureGymDto.fs | 527 +- ConsumePlugin/GeneratedRecord.fs | 24 + ConsumePlugin/GeneratedRestClient.fs | 901 +- ConsumePlugin/GeneratedSerde.fs | 508 +- ConsumePlugin/GeneratedSwaggerGitea.fs | 8480 +++--- ConsumePlugin/GeneratedVault.fs | 390 +- ConsumePlugin/ListCata.fs | 127 +- NuGet.Config | 17 + .../WoofWare.Myriad.Plugins.Test.fsproj | 1 + WoofWare.Myriad.Plugins/ArgParserGenerator.fs | 24 +- WoofWare.Myriad.Plugins/AstHelper.fs | 417 - WoofWare.Myriad.Plugins/CataGenerator.fs | 45 +- .../HttpClientGenerator.fs | 31 +- .../InterfaceMockGenerator.fs | 30 +- WoofWare.Myriad.Plugins/JsonParseGenerator.fs | 36 +- .../JsonSerializeGenerator.fs | 36 +- WoofWare.Myriad.Plugins/Measure.fs | 1 + WoofWare.Myriad.Plugins/MyriadParamParser.fs | 64 - WoofWare.Myriad.Plugins/Parameters.fs | 23 + WoofWare.Myriad.Plugins/Primitives.fs | 32 - .../RemoveOptionsGenerator.fs | 88 +- .../SwaggerClientGenerator.fs | 34 +- WoofWare.Myriad.Plugins/SynExpr/CompExpr.fs | 49 - WoofWare.Myriad.Plugins/SynExpr/Ident.fs | 65 - WoofWare.Myriad.Plugins/SynExpr/PreXmlDoc.fs | 17 - WoofWare.Myriad.Plugins/SynExpr/SynArgInfo.fs | 7 - WoofWare.Myriad.Plugins/SynExpr/SynArgPats.fs | 30 - .../SynExpr/SynAttribute.fs | 27 - .../SynExpr/SynAttributes.fs | 15 - WoofWare.Myriad.Plugins/SynExpr/SynBinding.fs | 233 - .../SynExpr/SynComponentInfo.fs | 50 - WoofWare.Myriad.Plugins/SynExpr/SynConst.fs | 10 - WoofWare.Myriad.Plugins/SynExpr/SynExpr.fs | 365 - .../SynExpr/SynExprLetOrUseTrivia.fs | 10 - WoofWare.Myriad.Plugins/SynExpr/SynField.fs | 76 - WoofWare.Myriad.Plugins/SynExpr/SynIdent.fs | 10 - .../SynExpr/SynLongIdent.fs | 140 - .../SynExpr/SynMatchClause.fs | 24 - .../SynExpr/SynMemberDefn.fs | 71 - .../SynExpr/SynModuleDecl.fs | 30 - .../SynExpr/SynModuleOrNamespace.fs | 24 - WoofWare.Myriad.Plugins/SynExpr/SynPat.fs | 54 - .../SynExpr/SynSimplePat.fs | 10 - .../SynExpr/SynSimplePats.fs | 12 - WoofWare.Myriad.Plugins/SynExpr/SynType.fs | 555 - .../SynExpr/SynTypeDefn.fs | 46 - .../SynExpr/SynTypeDefnRepr.fs | 24 - .../SynExpr/SynUnionCase.fs | 55 - WoofWare.Myriad.Plugins/SynExpr/SynValInfo.fs | 7 - .../WoofWare.Myriad.Plugins.fsproj | 35 +- WoofWare.Myriad.sln | 6 + 59 files changed, 18665 insertions(+), 22894 deletions(-) create mode 100644 NuGet.Config delete mode 100644 WoofWare.Myriad.Plugins/MyriadParamParser.fs create mode 100644 WoofWare.Myriad.Plugins/Parameters.fs delete mode 100644 WoofWare.Myriad.Plugins/Primitives.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/CompExpr.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/Ident.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/PreXmlDoc.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynArgInfo.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynArgPats.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynAttribute.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynAttributes.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynBinding.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynComponentInfo.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynConst.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynExpr.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynExprLetOrUseTrivia.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynField.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynIdent.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynLongIdent.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynMatchClause.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynMemberDefn.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynModuleDecl.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynModuleOrNamespace.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynPat.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynSimplePat.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynSimplePats.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynType.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynTypeDefn.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynTypeDefnRepr.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynUnionCase.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynValInfo.fs diff --git a/ConsumePlugin/ConsumePlugin.fsproj b/ConsumePlugin/ConsumePlugin.fsproj index 6026957..7c79079 100644 --- a/ConsumePlugin/ConsumePlugin.fsproj +++ b/ConsumePlugin/ConsumePlugin.fsproj @@ -6,11 +6,6 @@ --reflectionfree $(OtherFlags) - - - - - @@ -18,76 +13,73 @@ - JsonRecord.fs + JsonRecord.fs - PureGymDto.fs + PureGymDto.fs - RestApiExample.fs + RestApiExample.fs - MockExample.fs + MockExample.fs - MockExampleNoAttributes.fs - - GenerateMock - GenerateMock(false) - GenerateMock - GenerateMock - GenerateMock(false) - GenerateMock - GenerateMock - GenerateMock - + MockExampleNoAttributes.fs + GenerateMock + GenerateMock + GenerateMock(false) + GenerateMock + GenerateMock + GenerateMock(false) + GenerateMock + GenerateMock + GenerateMock - Vault.fs + Vault.fs - SerializationAndDeserialization.fs + SerializationAndDeserialization.fs - Catamorphism.fs + Catamorphism.fs - FSharpForFunAndProfitCata.fs + FSharpForFunAndProfitCata.fs - List.fs + List.fs - Args.fs + Args.fs - swagger-gitea.json - - true - Gitea - + swagger-gitea.json + true + Gitea - GeneratedSwaggerGitea.fs + GeneratedSwaggerGitea.fs - - + + diff --git a/ConsumePlugin/Generated2SwaggerGitea.fs b/ConsumePlugin/Generated2SwaggerGitea.fs index bd51fda..fc922de 100644 --- a/ConsumePlugin/Generated2SwaggerGitea.fs +++ b/ConsumePlugin/Generated2SwaggerGitea.fs @@ -1,8 +1,4 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ - +// Source generated by Whippet. Changes will be overwritten on next build. namespace Gitea open WoofWare.Myriad.Plugins @@ -14,33 +10,31 @@ module APIErrorJsonSerializeExtension = type APIError with /// Serialize to a JSON node - static member toJsonNode (input : APIError) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: APIError) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -55,36 +49,34 @@ module AccessTokenJsonSerializeExtension = type AccessToken with /// Serialize to a JSON node - static member toJsonNode (input : AccessToken) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: AccessToken) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "scopes", (input.Scopes |> (fun field -> @@ -92,38 +84,34 @@ module AccessTokenJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sha1", (input.Sha1 |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "token_last_eight", (input.TokenLastEight |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -138,22 +126,21 @@ module ActivityPubJsonSerializeExtension = type ActivityPub with /// Serialize to a JSON node - static member toJsonNode (input : ActivityPub) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: ActivityPub) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "@context", (input.Context |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -168,22 +155,21 @@ module AddCollaboratorOptionJsonSerializeExtension = type AddCollaboratorOption with /// Serialize to a JSON node - static member toJsonNode (input : AddCollaboratorOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: AddCollaboratorOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "permission", (input.Permission |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -198,35 +184,33 @@ module AddTimeOptionJsonSerializeExtension = type AddTimeOption with /// Serialize to a JSON node - static member toJsonNode (input : AddTimeOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: AddTimeOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "created", (input.Created |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("time", (input.Time |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("time", (input.Time |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "user_name", (input.UserName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -241,44 +225,41 @@ module AnnotatedTagObjectJsonSerializeExtension = type AnnotatedTagObject with /// Serialize to a JSON node - static member toJsonNode (input : AnnotatedTagObject) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: AnnotatedTagObject) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "sha", (input.Sha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "type", (input.Type |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -293,88 +274,81 @@ module AttachmentJsonSerializeExtension = type Attachment with /// Serialize to a JSON node - static member toJsonNode (input : Attachment) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Attachment) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "browser_download_url", (input.BrowserDownloadUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "download_count", (input.DownloadCount |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "size", (input.Size |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "uuid", (input.Uuid |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -389,14 +363,14 @@ module BranchProtectionJsonSerializeExtension = type BranchProtection with /// Serialize to a JSON node - static member toJsonNode (input : BranchProtection) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: BranchProtection) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "approvals_whitelist_teams", (input.ApprovalsWhitelistTeams |> (fun field -> @@ -404,19 +378,17 @@ module BranchProtectionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "approvals_whitelist_username", (input.ApprovalsWhitelistUsername |> (fun field -> @@ -424,140 +396,127 @@ module BranchProtectionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "block_on_official_review_requests", (input.BlockOnOfficialReviewRequests |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "block_on_outdated_branch", (input.BlockOnOutdatedBranch |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "block_on_rejected_reviews", (input.BlockOnRejectedReviews |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "branch_name", (input.BranchName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "dismiss_stale_approvals", (input.DismissStaleApprovals |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_approvals_whitelist", (input.EnableApprovalsWhitelist |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_merge_whitelist", (input.EnableMergeWhitelist |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_push", (input.EnablePush |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_push_whitelist", (input.EnablePushWhitelist |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_status_check", (input.EnableStatusCheck |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "merge_whitelist_teams", (input.MergeWhitelistTeams |> (fun field -> @@ -565,19 +524,17 @@ module BranchProtectionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "merge_whitelist_usernames", (input.MergeWhitelistUsernames |> (fun field -> @@ -585,41 +542,37 @@ module BranchProtectionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "protected_file_patterns", (input.ProtectedFilePatterns |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "push_whitelist_deploy_keys", (input.PushWhitelistDeployKeys |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "push_whitelist_teams", (input.PushWhitelistTeams |> (fun field -> @@ -627,19 +580,17 @@ module BranchProtectionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "push_whitelist_usernames", (input.PushWhitelistUsernames |> (fun field -> @@ -647,52 +598,47 @@ module BranchProtectionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "require_signed_commits", (input.RequireSignedCommits |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "required_approvals", (input.RequiredApprovals |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "rule_name", (input.RuleName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "status_check_contexts", (input.StatusCheckContexts |> (fun field -> @@ -700,38 +646,34 @@ module BranchProtectionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "unprotected_file_patterns", (input.UnprotectedFilePatterns |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "updated_at", (input.UpdatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -746,110 +688,101 @@ module ChangedFileJsonSerializeExtension = type ChangedFile with /// Serialize to a JSON node - static member toJsonNode (input : ChangedFile) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: ChangedFile) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "additions", (input.Additions |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "changes", (input.Changes |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "contents_url", (input.ContentsUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "deletions", (input.Deletions |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "filename", (input.Filename |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "previous_filename", (input.PreviousFilename |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "raw_url", (input.RawUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "status", (input.Status |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -864,22 +797,21 @@ module CommitAffectedFilesJsonSerializeExtension = type CommitAffectedFiles with /// Serialize to a JSON node - static member toJsonNode (input : CommitAffectedFiles) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CommitAffectedFiles) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "filename", (input.Filename |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -894,33 +826,31 @@ module CommitDateOptionsJsonSerializeExtension = type CommitDateOptions with /// Serialize to a JSON node - static member toJsonNode (input : CommitDateOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CommitDateOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "author", (input.Author |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "committer", (input.Committer |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -935,44 +865,41 @@ module CommitMetaJsonSerializeExtension = type CommitMeta with /// Serialize to a JSON node - static member toJsonNode (input : CommitMeta) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CommitMeta) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "created", (input.Created |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sha", (input.Sha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -987,44 +914,41 @@ module CommitStatsJsonSerializeExtension = type CommitStats with /// Serialize to a JSON node - static member toJsonNode (input : CommitStats) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CommitStats) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "additions", (input.Additions |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "deletions", (input.Deletions |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "total", (input.Total |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -1039,44 +963,41 @@ module CommitUserJsonSerializeExtension = type CommitUser with /// Serialize to a JSON node - static member toJsonNode (input : CommitUser) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CommitUser) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "date", (input.Date |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "email", (input.Email |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -1091,16 +1012,16 @@ module CreateAccessTokenOptionJsonSerializeExtension = type CreateAccessTokenOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateAccessTokenOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateAccessTokenOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "scopes", (input.Scopes |> (fun field -> @@ -1108,16 +1029,14 @@ module CreateAccessTokenOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -1132,14 +1051,14 @@ module CreateBranchProtectionOptionJsonSerializeExtension = type CreateBranchProtectionOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateBranchProtectionOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateBranchProtectionOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "approvals_whitelist_teams", (input.ApprovalsWhitelistTeams |> (fun field -> @@ -1147,19 +1066,17 @@ module CreateBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "approvals_whitelist_username", (input.ApprovalsWhitelistUsername |> (fun field -> @@ -1167,129 +1084,117 @@ module CreateBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "block_on_official_review_requests", (input.BlockOnOfficialReviewRequests |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "block_on_outdated_branch", (input.BlockOnOutdatedBranch |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "block_on_rejected_reviews", (input.BlockOnRejectedReviews |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "branch_name", (input.BranchName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "dismiss_stale_approvals", (input.DismissStaleApprovals |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_approvals_whitelist", (input.EnableApprovalsWhitelist |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_merge_whitelist", (input.EnableMergeWhitelist |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_push", (input.EnablePush |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_push_whitelist", (input.EnablePushWhitelist |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_status_check", (input.EnableStatusCheck |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "merge_whitelist_teams", (input.MergeWhitelistTeams |> (fun field -> @@ -1297,19 +1202,17 @@ module CreateBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "merge_whitelist_usernames", (input.MergeWhitelistUsernames |> (fun field -> @@ -1317,41 +1220,37 @@ module CreateBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "protected_file_patterns", (input.ProtectedFilePatterns |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "push_whitelist_deploy_keys", (input.PushWhitelistDeployKeys |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "push_whitelist_teams", (input.PushWhitelistTeams |> (fun field -> @@ -1359,19 +1258,17 @@ module CreateBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "push_whitelist_usernames", (input.PushWhitelistUsernames |> (fun field -> @@ -1379,52 +1276,47 @@ module CreateBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "require_signed_commits", (input.RequireSignedCommits |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "required_approvals", (input.RequiredApprovals |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "rule_name", (input.RuleName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "status_check_contexts", (input.StatusCheckContexts |> (fun field -> @@ -1432,27 +1324,24 @@ module CreateBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "unprotected_file_patterns", (input.UnprotectedFilePatterns |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -1467,24 +1356,23 @@ module CreateBranchRepoOptionJsonSerializeExtension = type CreateBranchRepoOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateBranchRepoOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateBranchRepoOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ("new_branch_name", (input.NewBranchName |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("new_branch_name", (input.NewBranchName |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "old_branch_name", (input.OldBranchName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -1499,14 +1387,14 @@ module CreateEmailOptionJsonSerializeExtension = type CreateEmailOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateEmailOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateEmailOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "emails", (input.Emails |> (fun field -> @@ -1514,16 +1402,14 @@ module CreateEmailOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -1538,33 +1424,31 @@ module CreateForkOptionJsonSerializeExtension = type CreateForkOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateForkOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateForkOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "organization", (input.Organization |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -1579,27 +1463,26 @@ module CreateGPGKeyOptionJsonSerializeExtension = type CreateGPGKeyOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateGPGKeyOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateGPGKeyOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "armored_public_key", (input.ArmoredPublicKey |> System.Text.Json.Nodes.JsonValue.Create) ) - node.Add ( + node.Add( "armored_signature", (input.ArmoredSignature |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -1614,12 +1497,12 @@ module CreateHookOptionConfigJsonSerializeExtension = type CreateHookOptionConfig with /// Serialize to a JSON node - static member toJsonNode (input : CreateHookOptionConfig) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateHookOptionConfig) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, System.Text.Json.Nodes.JsonValue.Create value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, System.Text.Json.Nodes.JsonValue.Create value) node :> _ namespace Gitea @@ -1633,14 +1516,14 @@ module CreateIssueCommentOptionJsonSerializeExtension = type CreateIssueCommentOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateIssueCommentOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateIssueCommentOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ("body", (input.Body |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("body", (input.Body |> System.Text.Json.Nodes.JsonValue.Create)) node :> _ namespace Gitea @@ -1654,25 +1537,24 @@ module CreateIssueOptionJsonSerializeExtension = type CreateIssueOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateIssueOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateIssueOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "assignee", (input.Assignee |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "assignees", (input.Assignees |> (fun field -> @@ -1680,52 +1562,47 @@ module CreateIssueOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "closed", (input.Closed |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "due_date", (input.DueDate |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "labels", (input.Labels |> (fun field -> @@ -1733,41 +1610,37 @@ module CreateIssueOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "milestone", (input.Milestone |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "ref", (input.Ref |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("title", (input.Title |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("title", (input.Title |> System.Text.Json.Nodes.JsonValue.Create)) node :> _ namespace Gitea @@ -1781,27 +1654,26 @@ module CreateKeyOptionJsonSerializeExtension = type CreateKeyOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateKeyOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateKeyOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ("key", (input.Key |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("key", (input.Key |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "read_only", (input.ReadOnly |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("title", (input.Title |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("title", (input.Title |> System.Text.Json.Nodes.JsonValue.Create)) node :> _ namespace Gitea @@ -1815,38 +1687,36 @@ module CreateLabelOptionJsonSerializeExtension = type CreateLabelOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateLabelOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateLabelOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ("color", (input.Color |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("color", (input.Color |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "exclusive", (input.Exclusive |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create)) node :> _ namespace Gitea @@ -1860,55 +1730,51 @@ module CreateMilestoneOptionJsonSerializeExtension = type CreateMilestoneOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateMilestoneOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateMilestoneOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "due_on", (input.DueOn |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "state", (input.State |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -1923,36 +1789,34 @@ module CreateOAuth2ApplicationOptionsJsonSerializeExtension = type CreateOAuth2ApplicationOptions with /// Serialize to a JSON node - static member toJsonNode (input : CreateOAuth2ApplicationOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateOAuth2ApplicationOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "confidential_client", (input.ConfidentialClient |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "redirect_uris", (input.RedirectUris |> (fun field -> @@ -1960,16 +1824,14 @@ module CreateOAuth2ApplicationOptionsJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -1984,79 +1846,73 @@ module CreateOrgOptionJsonSerializeExtension = type CreateOrgOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateOrgOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateOrgOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "full_name", (input.FullName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "location", (input.Location |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repo_admin_change_team_access", (input.RepoAdminChangeTeamAccess |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("username", (input.Username |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("username", (input.Username |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "visibility", (input.Visibility |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "website", (input.Website |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -2071,25 +1927,24 @@ module CreatePullRequestOptionJsonSerializeExtension = type CreatePullRequestOption with /// Serialize to a JSON node - static member toJsonNode (input : CreatePullRequestOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreatePullRequestOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "assignee", (input.Assignee |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "assignees", (input.Assignees |> (fun field -> @@ -2097,63 +1952,57 @@ module CreatePullRequestOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "base", (input.Base |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "due_date", (input.DueDate |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "head", (input.Head |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "labels", (input.Labels |> (fun field -> @@ -2161,38 +2010,34 @@ module CreatePullRequestOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "milestone", (input.Milestone |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -2207,55 +2052,51 @@ module CreatePullReviewCommentJsonSerializeExtension = type CreatePullReviewComment with /// Serialize to a JSON node - static member toJsonNode (input : CreatePullReviewComment) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreatePullReviewComment) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "new_position", (input.NewPosition |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "old_position", (input.OldPosition |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "path", (input.Path |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -2270,66 +2111,61 @@ module CreatePushMirrorOptionJsonSerializeExtension = type CreatePushMirrorOption with /// Serialize to a JSON node - static member toJsonNode (input : CreatePushMirrorOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreatePushMirrorOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "interval", (input.Interval |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "remote_address", (input.RemoteAddress |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "remote_password", (input.RemotePassword |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "remote_username", (input.RemoteUsername |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sync_on_commit", (input.SyncOnCommit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -2344,68 +2180,63 @@ module CreateReleaseOptionJsonSerializeExtension = type CreateReleaseOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateReleaseOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateReleaseOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "draft", (input.Draft |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "prerelease", (input.Prerelease |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("tag_name", (input.TagName |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("tag_name", (input.TagName |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "target_commitish", (input.TargetCommitish |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -2420,123 +2251,113 @@ module CreateRepoOptionJsonSerializeExtension = type CreateRepoOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateRepoOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateRepoOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "auto_init", (input.AutoInit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "default_branch", (input.DefaultBranch |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "gitignores", (input.Gitignores |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "issue_labels", (input.IssueLabels |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "license", (input.License |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "private", (input.Private |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "readme", (input.Readme |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "template", (input.Template |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "trust_model", (input.TrustModel |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -2551,55 +2372,51 @@ module CreateStatusOptionJsonSerializeExtension = type CreateStatusOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateStatusOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateStatusOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "context", (input.Context |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "state", (input.State |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "target_url", (input.TargetUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -2614,35 +2431,33 @@ module CreateTagOptionJsonSerializeExtension = type CreateTagOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateTagOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateTagOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("tag_name", (input.TagName |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("tag_name", (input.TagName |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "target", (input.Target |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -2657,12 +2472,12 @@ module Type1JsonSerializeExtension = type Type1 with /// Serialize to a JSON node - static member toJsonNode (input : Type1) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Type1) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, System.Text.Json.Nodes.JsonValue.Create value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, System.Text.Json.Nodes.JsonValue.Create value) node :> _ namespace Gitea @@ -2676,60 +2491,56 @@ module CreateTeamOptionJsonSerializeExtension = type CreateTeamOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateTeamOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateTeamOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "can_create_org_repo", (input.CanCreateOrgRepo |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "includes_all_repositories", (input.IncludesAllRepositories |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "permission", (input.Permission |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "units", (input.Units |> (fun field -> @@ -2737,26 +2548,23 @@ module CreateTeamOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "units_map", (input.UnitsMap |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Type1.toJsonNode field - )) + | Some field -> Type1.toJsonNode field)) ) node :> _ @@ -2771,105 +2579,97 @@ module CreateUserOptionJsonSerializeExtension = type CreateUserOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateUserOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateUserOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("email", (input.Email |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("email", (input.Email |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "full_name", (input.FullName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "login_name", (input.LoginName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "must_change_password", (input.MustChangePassword |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("password", (input.Password |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("password", (input.Password |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "restricted", (input.Restricted |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "send_notify", (input.SendNotify |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "source_id", (input.SourceId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("username", (input.Username |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("username", (input.Username |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "visibility", (input.Visibility |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -2884,44 +2684,41 @@ module CreateWikiPageOptionsJsonSerializeExtension = type CreateWikiPageOptions with /// Serialize to a JSON node - static member toJsonNode (input : CreateWikiPageOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateWikiPageOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "content_base64", (input.ContentBase64 |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -2936,66 +2733,61 @@ module CronJsonSerializeExtension = type Cron with /// Serialize to a JSON node - static member toJsonNode (input : Cron) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Cron) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "exec_times", (input.ExecTimes |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "next", (input.Next |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "prev", (input.Prev |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "schedule", (input.Schedule |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -3010,14 +2802,14 @@ module DeleteEmailOptionJsonSerializeExtension = type DeleteEmailOption with /// Serialize to a JSON node - static member toJsonNode (input : DeleteEmailOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: DeleteEmailOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "emails", (input.Emails |> (fun field -> @@ -3025,16 +2817,14 @@ module DeleteEmailOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -3049,33 +2839,31 @@ module DismissPullReviewOptionsJsonSerializeExtension = type DismissPullReviewOptions with /// Serialize to a JSON node - static member toJsonNode (input : DismissPullReviewOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: DismissPullReviewOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "priors", (input.Priors |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -3090,22 +2878,21 @@ module EditAttachmentOptionsJsonSerializeExtension = type EditAttachmentOptions with /// Serialize to a JSON node - static member toJsonNode (input : EditAttachmentOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditAttachmentOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -3120,14 +2907,14 @@ module EditBranchProtectionOptionJsonSerializeExtension = type EditBranchProtectionOption with /// Serialize to a JSON node - static member toJsonNode (input : EditBranchProtectionOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditBranchProtectionOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "approvals_whitelist_teams", (input.ApprovalsWhitelistTeams |> (fun field -> @@ -3135,19 +2922,17 @@ module EditBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "approvals_whitelist_username", (input.ApprovalsWhitelistUsername |> (fun field -> @@ -3155,118 +2940,107 @@ module EditBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "block_on_official_review_requests", (input.BlockOnOfficialReviewRequests |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "block_on_outdated_branch", (input.BlockOnOutdatedBranch |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "block_on_rejected_reviews", (input.BlockOnRejectedReviews |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "dismiss_stale_approvals", (input.DismissStaleApprovals |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_approvals_whitelist", (input.EnableApprovalsWhitelist |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_merge_whitelist", (input.EnableMergeWhitelist |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_push", (input.EnablePush |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_push_whitelist", (input.EnablePushWhitelist |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_status_check", (input.EnableStatusCheck |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "merge_whitelist_teams", (input.MergeWhitelistTeams |> (fun field -> @@ -3274,19 +3048,17 @@ module EditBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "merge_whitelist_usernames", (input.MergeWhitelistUsernames |> (fun field -> @@ -3294,41 +3066,37 @@ module EditBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "protected_file_patterns", (input.ProtectedFilePatterns |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "push_whitelist_deploy_keys", (input.PushWhitelistDeployKeys |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "push_whitelist_teams", (input.PushWhitelistTeams |> (fun field -> @@ -3336,19 +3104,17 @@ module EditBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "push_whitelist_usernames", (input.PushWhitelistUsernames |> (fun field -> @@ -3356,41 +3122,37 @@ module EditBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "require_signed_commits", (input.RequireSignedCommits |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "required_approvals", (input.RequiredApprovals |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "status_check_contexts", (input.StatusCheckContexts |> (fun field -> @@ -3398,27 +3160,24 @@ module EditBranchProtectionOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "unprotected_file_patterns", (input.UnprotectedFilePatterns |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -3433,14 +3192,14 @@ module EditDeadlineOptionJsonSerializeExtension = type EditDeadlineOption with /// Serialize to a JSON node - static member toJsonNode (input : EditDeadlineOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditDeadlineOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ("due_date", (input.DueDate |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("due_date", (input.DueDate |> System.Text.Json.Nodes.JsonValue.Create)) node :> _ namespace Gitea @@ -3454,22 +3213,21 @@ module EditGitHookOptionJsonSerializeExtension = type EditGitHookOption with /// Serialize to a JSON node - static member toJsonNode (input : EditGitHookOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditGitHookOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "content", (input.Content |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -3484,12 +3242,12 @@ module Type2JsonSerializeExtension = type Type2 with /// Serialize to a JSON node - static member toJsonNode (input : Type2) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Type2) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, System.Text.Json.Nodes.JsonValue.Create value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, System.Text.Json.Nodes.JsonValue.Create value) node :> _ namespace Gitea @@ -3503,57 +3261,53 @@ module EditHookOptionJsonSerializeExtension = type EditHookOption with /// Serialize to a JSON node - static member toJsonNode (input : EditHookOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditHookOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "active", (input.Active |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "authorization_header", (input.AuthorizationHeader |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "branch_filter", (input.BranchFilter |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "config", (input.Config |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Type2.toJsonNode field - )) + | Some field -> Type2.toJsonNode field)) ) - node.Add ( + node.Add( "events", (input.Events |> (fun field -> @@ -3561,16 +3315,14 @@ module EditHookOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -3585,14 +3337,14 @@ module EditIssueCommentOptionJsonSerializeExtension = type EditIssueCommentOption with /// Serialize to a JSON node - static member toJsonNode (input : EditIssueCommentOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditIssueCommentOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ("body", (input.Body |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("body", (input.Body |> System.Text.Json.Nodes.JsonValue.Create)) node :> _ namespace Gitea @@ -3606,25 +3358,24 @@ module EditIssueOptionJsonSerializeExtension = type EditIssueOption with /// Serialize to a JSON node - static member toJsonNode (input : EditIssueOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditIssueOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "assignee", (input.Assignee |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "assignees", (input.Assignees |> (fun field -> @@ -3632,93 +3383,84 @@ module EditIssueOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "due_date", (input.DueDate |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "milestone", (input.Milestone |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "ref", (input.Ref |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "state", (input.State |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "unset_due_date", (input.UnsetDueDate |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -3733,55 +3475,51 @@ module EditLabelOptionJsonSerializeExtension = type EditLabelOption with /// Serialize to a JSON node - static member toJsonNode (input : EditLabelOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditLabelOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "color", (input.Color |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "exclusive", (input.Exclusive |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -3796,55 +3534,51 @@ module EditMilestoneOptionJsonSerializeExtension = type EditMilestoneOption with /// Serialize to a JSON node - static member toJsonNode (input : EditMilestoneOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditMilestoneOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "due_on", (input.DueOn |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "state", (input.State |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -3859,77 +3593,71 @@ module EditOrgOptionJsonSerializeExtension = type EditOrgOption with /// Serialize to a JSON node - static member toJsonNode (input : EditOrgOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditOrgOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "full_name", (input.FullName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "location", (input.Location |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repo_admin_change_team_access", (input.RepoAdminChangeTeamAccess |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "visibility", (input.Visibility |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "website", (input.Website |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -3944,36 +3672,34 @@ module EditPullRequestOptionJsonSerializeExtension = type EditPullRequestOption with /// Serialize to a JSON node - static member toJsonNode (input : EditPullRequestOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditPullRequestOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "allow_maintainer_edit", (input.AllowMaintainerEdit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "assignee", (input.Assignee |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "assignees", (input.Assignees |> (fun field -> @@ -3981,52 +3707,47 @@ module EditPullRequestOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "base", (input.Base |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "due_date", (input.DueDate |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "labels", (input.Labels |> (fun field -> @@ -4034,60 +3755,54 @@ module EditPullRequestOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "milestone", (input.Milestone |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "state", (input.State |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "unset_due_date", (input.UnsetDueDate |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -4102,22 +3817,21 @@ module EditReactionOptionJsonSerializeExtension = type EditReactionOption with /// Serialize to a JSON node - static member toJsonNode (input : EditReactionOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditReactionOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "content", (input.Content |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -4132,77 +3846,71 @@ module EditReleaseOptionJsonSerializeExtension = type EditReleaseOption with /// Serialize to a JSON node - static member toJsonNode (input : EditReleaseOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditReleaseOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "draft", (input.Draft |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "prerelease", (input.Prerelease |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "tag_name", (input.TagName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "target_commitish", (input.TargetCommitish |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -4217,12 +3925,12 @@ module Type3JsonSerializeExtension = type Type3 with /// Serialize to a JSON node - static member toJsonNode (input : Type3) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Type3) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, System.Text.Json.Nodes.JsonValue.Create value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, System.Text.Json.Nodes.JsonValue.Create value) node :> _ namespace Gitea @@ -4236,60 +3944,56 @@ module EditTeamOptionJsonSerializeExtension = type EditTeamOption with /// Serialize to a JSON node - static member toJsonNode (input : EditTeamOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditTeamOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "can_create_org_repo", (input.CanCreateOrgRepo |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "includes_all_repositories", (input.IncludesAllRepositories |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "permission", (input.Permission |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "units", (input.Units |> (fun field -> @@ -4297,26 +4001,23 @@ module EditTeamOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "units_map", (input.UnitsMap |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Type3.toJsonNode field - )) + | Some field -> Type3.toJsonNode field)) ) node :> _ @@ -4331,191 +4032,175 @@ module EditUserOptionJsonSerializeExtension = type EditUserOption with /// Serialize to a JSON node - static member toJsonNode (input : EditUserOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditUserOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "active", (input.Active |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "admin", (input.Admin |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "allow_create_organization", (input.AllowCreateOrganization |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "allow_git_hook", (input.AllowGitHook |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "allow_import_local", (input.AllowImportLocal |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "email", (input.Email |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "full_name", (input.FullName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "location", (input.Location |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("login_name", (input.LoginName |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("login_name", (input.LoginName |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "max_repo_creation", (input.MaxRepoCreation |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "must_change_password", (input.MustChangePassword |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "password", (input.Password |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "prohibit_login", (input.ProhibitLogin |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "restricted", (input.Restricted |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("source_id", (input.SourceId |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("source_id", (input.SourceId |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "visibility", (input.Visibility |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "website", (input.Website |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -4530,44 +4215,41 @@ module EmailJsonSerializeExtension = type Email with /// Serialize to a JSON node - static member toJsonNode (input : Email) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Email) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "email", (input.Email |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "primary", (input.Primary |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "verified", (input.Verified |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -4582,55 +4264,51 @@ module ExternalTrackerJsonSerializeExtension = type ExternalTracker with /// Serialize to a JSON node - static member toJsonNode (input : ExternalTracker) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: ExternalTracker) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "external_tracker_format", (input.ExternalTrackerFormat |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "external_tracker_regexp_pattern", (input.ExternalTrackerRegexpPattern |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "external_tracker_style", (input.ExternalTrackerStyle |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "external_tracker_url", (input.ExternalTrackerUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -4645,22 +4323,21 @@ module ExternalWikiJsonSerializeExtension = type ExternalWiki with /// Serialize to a JSON node - static member toJsonNode (input : ExternalWiki) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: ExternalWiki) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "external_wiki_url", (input.ExternalWikiUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -4675,67 +4352,62 @@ module FileCommitResponseJsonSerializeExtension = type FileCommitResponse with /// Serialize to a JSON node - static member toJsonNode (input : FileCommitResponse) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: FileCommitResponse) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "author", (input.Author |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitUser.toJsonNode field - )) + | Some field -> CommitUser.toJsonNode field)) ) - node.Add ( + node.Add( "committer", (input.Committer |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitUser.toJsonNode field - )) + | Some field -> CommitUser.toJsonNode field)) ) - node.Add ( + node.Add( "created", (input.Created |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "parents", (input.Parents |> (fun field -> @@ -4743,48 +4415,43 @@ module FileCommitResponseJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (CommitMeta.toJsonNode mem) + arr.Add(CommitMeta.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sha", (input.Sha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "tree", (input.Tree |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitMeta.toJsonNode field - )) + | Some field -> CommitMeta.toJsonNode field)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -4799,44 +4466,41 @@ module FileLinksResponseJsonSerializeExtension = type FileLinksResponse with /// Serialize to a JSON node - static member toJsonNode (input : FileLinksResponse) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: FileLinksResponse) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "git", (input.Git |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "html", (input.Html |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "self", (input.Self |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -4851,33 +4515,31 @@ module GPGKeyEmailJsonSerializeExtension = type GPGKeyEmail with /// Serialize to a JSON node - static member toJsonNode (input : GPGKeyEmail) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: GPGKeyEmail) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "email", (input.Email |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "verified", (input.Verified |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -4892,55 +4554,51 @@ module GeneralAPISettingsJsonSerializeExtension = type GeneralAPISettings with /// Serialize to a JSON node - static member toJsonNode (input : GeneralAPISettings) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: GeneralAPISettings) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "default_git_trees_per_page", (input.DefaultGitTreesPerPage |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "default_max_blob_size", (input.DefaultMaxBlobSize |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "default_paging_num", (input.DefaultPagingNum |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "max_response_items", (input.MaxResponseItems |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -4955,55 +4613,51 @@ module GeneralAttachmentSettingsJsonSerializeExtension = type GeneralAttachmentSettings with /// Serialize to a JSON node - static member toJsonNode (input : GeneralAttachmentSettings) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: GeneralAttachmentSettings) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "allowed_types", (input.AllowedTypes |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enabled", (input.Enabled |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "max_files", (input.MaxFiles |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "max_size", (input.MaxSize |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5018,77 +4672,71 @@ module GeneralRepoSettingsJsonSerializeExtension = type GeneralRepoSettings with /// Serialize to a JSON node - static member toJsonNode (input : GeneralRepoSettings) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: GeneralRepoSettings) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "http_git_disabled", (input.HttpGitDisabled |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "lfs_disabled", (input.LfsDisabled |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "migrations_disabled", (input.MigrationsDisabled |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "mirrors_disabled", (input.MirrorsDisabled |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "stars_disabled", (input.StarsDisabled |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "time_tracking_disabled", (input.TimeTrackingDisabled |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5103,14 +4751,14 @@ module GeneralUISettingsJsonSerializeExtension = type GeneralUISettings with /// Serialize to a JSON node - static member toJsonNode (input : GeneralUISettings) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: GeneralUISettings) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "allowed_reactions", (input.AllowedReactions |> (fun field -> @@ -5118,19 +4766,17 @@ module GeneralUISettingsJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "custom_emojis", (input.CustomEmojis |> (fun field -> @@ -5138,27 +4784,24 @@ module GeneralUISettingsJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "default_theme", (input.DefaultTheme |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5173,113 +4816,104 @@ module GenerateRepoOptionJsonSerializeExtension = type GenerateRepoOption with /// Serialize to a JSON node - static member toJsonNode (input : GenerateRepoOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: GenerateRepoOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "avatar", (input.Avatar |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "default_branch", (input.DefaultBranch |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "git_content", (input.GitContent |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "git_hooks", (input.GitHooks |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "labels", (input.Labels |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("owner", (input.Owner |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("name", (input.Name |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("owner", (input.Owner |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "private", (input.Private |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "topics", (input.Topics |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "webhooks", (input.Webhooks |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5294,66 +4928,61 @@ module GitBlobResponseJsonSerializeExtension = type GitBlobResponse with /// Serialize to a JSON node - static member toJsonNode (input : GitBlobResponse) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: GitBlobResponse) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "content", (input.Content |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "encoding", (input.Encoding |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sha", (input.Sha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "size", (input.Size |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5368,77 +4997,71 @@ module GitEntryJsonSerializeExtension = type GitEntry with /// Serialize to a JSON node - static member toJsonNode (input : GitEntry) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: GitEntry) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "mode", (input.Mode |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "path", (input.Path |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sha", (input.Sha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "size", (input.Size |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "type", (input.Type |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5453,44 +5076,41 @@ module GitHookJsonSerializeExtension = type GitHook with /// Serialize to a JSON node - static member toJsonNode (input : GitHook) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: GitHook) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "content", (input.Content |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "is_active", (input.IsActive |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5505,44 +5125,41 @@ module GitObjectJsonSerializeExtension = type GitObject with /// Serialize to a JSON node - static member toJsonNode (input : GitObject) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: GitObject) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "sha", (input.Sha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "type", (input.Type |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5557,47 +5174,44 @@ module GitTreeResponseJsonSerializeExtension = type GitTreeResponse with /// Serialize to a JSON node - static member toJsonNode (input : GitTreeResponse) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: GitTreeResponse) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "page", (input.Page |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sha", (input.Sha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "total_count", (input.TotalCount |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "tree", (input.Tree |> (fun field -> @@ -5605,38 +5219,34 @@ module GitTreeResponseJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (GitEntry.toJsonNode mem) + arr.Add(GitEntry.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "truncated", (input.Truncated |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5651,12 +5261,12 @@ module Type4JsonSerializeExtension = type Type4 with /// Serialize to a JSON node - static member toJsonNode (input : Type4) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Type4) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, System.Text.Json.Nodes.JsonValue.Create value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, System.Text.Json.Nodes.JsonValue.Create value) node :> _ namespace Gitea @@ -5670,57 +5280,53 @@ module HookJsonSerializeExtension = type Hook with /// Serialize to a JSON node - static member toJsonNode (input : Hook) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Hook) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "active", (input.Active |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "authorization_header", (input.AuthorizationHeader |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "config", (input.Config |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Type4.toJsonNode field - )) + | Some field -> Type4.toJsonNode field)) ) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "events", (input.Events |> (fun field -> @@ -5728,49 +5334,44 @@ module HookJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "type", (input.Type |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "updated_at", (input.UpdatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5785,33 +5386,31 @@ module IdentityJsonSerializeExtension = type Identity with /// Serialize to a JSON node - static member toJsonNode (input : Identity) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Identity) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "email", (input.Email |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5826,44 +5425,41 @@ module InternalTrackerJsonSerializeExtension = type InternalTracker with /// Serialize to a JSON node - static member toJsonNode (input : InternalTracker) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: InternalTracker) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "allow_only_contributors_to_track_time", (input.AllowOnlyContributorsToTrackTime |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_issue_dependencies", (input.EnableIssueDependencies |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_time_tracker", (input.EnableTimeTracker |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5878,22 +5474,21 @@ module IssueDeadlineJsonSerializeExtension = type IssueDeadline with /// Serialize to a JSON node - static member toJsonNode (input : IssueDeadline) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: IssueDeadline) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "due_date", (input.DueDate |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5908,12 +5503,12 @@ module Type5JsonSerializeExtension = type Type5 with /// Serialize to a JSON node - static member toJsonNode (input : Type5) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Type5) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, (fun value -> System.Text.Json.Nodes.JsonObject ()) value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, (fun value -> System.Text.Json.Nodes.JsonObject()) value) node :> _ namespace Gitea @@ -5927,12 +5522,12 @@ module Type6JsonSerializeExtension = type Type6 with /// Serialize to a JSON node - static member toJsonNode (input : Type6) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Type6) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, (fun value -> System.Text.Json.Nodes.JsonObject ()) value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, (fun value -> System.Text.Json.Nodes.JsonObject()) value) node :> _ namespace Gitea @@ -5946,14 +5541,14 @@ module IssueLabelsOptionJsonSerializeExtension = type IssueLabelsOption with /// Serialize to a JSON node - static member toJsonNode (input : IssueLabelsOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: IssueLabelsOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "labels", (input.Labels |> (fun field -> @@ -5961,16 +5556,14 @@ module IssueLabelsOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -5985,77 +5578,71 @@ module LabelJsonSerializeExtension = type Label with /// Serialize to a JSON node - static member toJsonNode (input : Label) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Label) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "color", (input.Color |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "exclusive", (input.Exclusive |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -6070,55 +5657,51 @@ module MarkdownOptionJsonSerializeExtension = type MarkdownOption with /// Serialize to a JSON node - static member toJsonNode (input : MarkdownOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: MarkdownOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "Context", (input.Context |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "Mode", (input.Mode |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "Text", (input.Text |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "Wiki", (input.Wiki |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -6133,90 +5716,83 @@ module MergePullRequestOptionJsonSerializeExtension = type MergePullRequestOption with /// Serialize to a JSON node - static member toJsonNode (input : MergePullRequestOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: MergePullRequestOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ("Do", (input.Do |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("Do", (input.Do |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "MergeCommitID", (input.MergeCommitID |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "MergeMessageField", (input.MergeMessageField |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "MergeTitleField", (input.MergeTitleField |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "delete_branch_after_merge", (input.DeleteBranchAfterMerge |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "force_merge", (input.ForceMerge |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "head_commit_id", (input.HeadCommitId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "merge_when_checks_succeed", (input.MergeWhenChecksSucceed |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -6231,213 +5807,195 @@ module MigrateRepoOptionsJsonSerializeExtension = type MigrateRepoOptions with /// Serialize to a JSON node - static member toJsonNode (input : MigrateRepoOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: MigrateRepoOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "auth_password", (input.AuthPassword |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "auth_token", (input.AuthToken |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "auth_username", (input.AuthUsername |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("clone_addr", (input.CloneAddr |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("clone_addr", (input.CloneAddr |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "issues", (input.Issues |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "labels", (input.Labels |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "lfs", (input.Lfs |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "lfs_endpoint", (input.LfsEndpoint |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "milestones", (input.Milestones |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "mirror", (input.Mirror |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "mirror_interval", (input.MirrorInterval |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "private", (input.Private |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "pull_requests", (input.PullRequests |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "releases", (input.Releases |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("repo_name", (input.RepoName |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("repo_name", (input.RepoName |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "repo_owner", (input.RepoOwner |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "service", (input.Service |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "uid", (input.Uid |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "wiki", (input.Wiki |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -6452,12 +6010,12 @@ module Type7JsonSerializeExtension = type Type7 with /// Serialize to a JSON node - static member toJsonNode (input : Type7) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Type7) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) node :> _ namespace Gitea @@ -6471,14 +6029,14 @@ module NodeInfoServicesJsonSerializeExtension = type NodeInfoServices with /// Serialize to a JSON node - static member toJsonNode (input : NodeInfoServices) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: NodeInfoServices) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "inbound", (input.Inbound |> (fun field -> @@ -6486,19 +6044,17 @@ module NodeInfoServicesJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "outbound", (input.Outbound |> (fun field -> @@ -6506,16 +6062,14 @@ module NodeInfoServicesJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -6530,55 +6084,51 @@ module NodeInfoSoftwareJsonSerializeExtension = type NodeInfoSoftware with /// Serialize to a JSON node - static member toJsonNode (input : NodeInfoSoftware) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: NodeInfoSoftware) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "homepage", (input.Homepage |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repository", (input.Repository |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "version", (input.Version |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -6593,44 +6143,41 @@ module NodeInfoUsageUsersJsonSerializeExtension = type NodeInfoUsageUsers with /// Serialize to a JSON node - static member toJsonNode (input : NodeInfoUsageUsers) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: NodeInfoUsageUsers) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "activeHalfyear", (input.ActiveHalfyear |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "activeMonth", (input.ActiveMonth |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "total", (input.Total |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -6645,22 +6192,21 @@ module NotificationCountJsonSerializeExtension = type NotificationCount with /// Serialize to a JSON node - static member toJsonNode (input : NotificationCount) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: NotificationCount) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "new", (input.New |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -6675,80 +6221,74 @@ module OAuth2ApplicationJsonSerializeExtension = type OAuth2Application with /// Serialize to a JSON node - static member toJsonNode (input : OAuth2Application) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: OAuth2Application) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "client_id", (input.ClientId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "client_secret", (input.ClientSecret |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "confidential_client", (input.ConfidentialClient |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created", (input.Created |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "redirect_uris", (input.RedirectUris |> (fun field -> @@ -6756,16 +6296,14 @@ module OAuth2ApplicationJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -6780,121 +6318,111 @@ module OrganizationJsonSerializeExtension = type Organization with /// Serialize to a JSON node - static member toJsonNode (input : Organization) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Organization) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "avatar_url", (input.AvatarUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "full_name", (input.FullName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "location", (input.Location |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repo_admin_change_team_access", (input.RepoAdminChangeTeamAccess |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "username", (input.Username |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "visibility", (input.Visibility |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "website", (input.Website |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -6909,66 +6437,61 @@ module OrganizationPermissionsJsonSerializeExtension = type OrganizationPermissions with /// Serialize to a JSON node - static member toJsonNode (input : OrganizationPermissions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: OrganizationPermissions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "can_create_repository", (input.CanCreateRepository |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "can_read", (input.CanRead |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "can_write", (input.CanWrite |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "is_admin", (input.IsAdmin |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "is_owner", (input.IsOwner |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -6983,88 +6506,81 @@ module PackageFileJsonSerializeExtension = type PackageFile with /// Serialize to a JSON node - static member toJsonNode (input : PackageFile) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: PackageFile) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "Size", (input.Size |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "md5", (input.Md5 |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sha1", (input.Sha1 |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sha256", (input.Sha256 |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sha512", (input.Sha512 |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7079,44 +6595,41 @@ module PayloadUserJsonSerializeExtension = type PayloadUser with /// Serialize to a JSON node - static member toJsonNode (input : PayloadUser) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: PayloadUser) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "email", (input.Email |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "username", (input.Username |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7131,44 +6644,41 @@ module PermissionJsonSerializeExtension = type Permission with /// Serialize to a JSON node - static member toJsonNode (input : Permission) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Permission) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "admin", (input.Admin |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "pull", (input.Pull |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "push", (input.Push |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7183,33 +6693,31 @@ module PullRequestMetaJsonSerializeExtension = type PullRequestMeta with /// Serialize to a JSON node - static member toJsonNode (input : PullRequestMeta) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: PullRequestMeta) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "merged", (input.Merged |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "merged_at", (input.MergedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7224,14 +6732,14 @@ module PullReviewRequestOptionsJsonSerializeExtension = type PullReviewRequestOptions with /// Serialize to a JSON node - static member toJsonNode (input : PullReviewRequestOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: PullReviewRequestOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "reviewers", (input.Reviewers |> (fun field -> @@ -7239,19 +6747,17 @@ module PullReviewRequestOptionsJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "team_reviewers", (input.TeamReviewers |> (fun field -> @@ -7259,16 +6765,14 @@ module PullReviewRequestOptionsJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7283,99 +6787,91 @@ module PushMirrorJsonSerializeExtension = type PushMirror with /// Serialize to a JSON node - static member toJsonNode (input : PushMirror) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: PushMirror) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "created", (input.Created |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "interval", (input.Interval |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "last_error", (input.LastError |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "last_update", (input.LastUpdate |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "remote_address", (input.RemoteAddress |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "remote_name", (input.RemoteName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repo_name", (input.RepoName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sync_on_commit", (input.SyncOnCommit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7390,43 +6886,40 @@ module ReferenceJsonSerializeExtension = type Reference with /// Serialize to a JSON node - static member toJsonNode (input : Reference) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Reference) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "object", (input.Object |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> GitObject.toJsonNode field - )) + | Some field -> GitObject.toJsonNode field)) ) - node.Add ( + node.Add( "ref", (input.Ref |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7441,14 +6934,14 @@ module RepoTopicOptionsJsonSerializeExtension = type RepoTopicOptions with /// Serialize to a JSON node - static member toJsonNode (input : RepoTopicOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: RepoTopicOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "topics", (input.Topics |> (fun field -> @@ -7456,16 +6949,14 @@ module RepoTopicOptionsJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7480,55 +6971,51 @@ module RepositoryMetaJsonSerializeExtension = type RepositoryMeta with /// Serialize to a JSON node - static member toJsonNode (input : RepositoryMeta) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: RepositoryMeta) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "full_name", (input.FullName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "owner", (input.Owner |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7543,22 +7030,21 @@ module ServerVersionJsonSerializeExtension = type ServerVersion with /// Serialize to a JSON node - static member toJsonNode (input : ServerVersion) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: ServerVersion) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "version", (input.Version |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7573,88 +7059,81 @@ module StopWatchJsonSerializeExtension = type StopWatch with /// Serialize to a JSON node - static member toJsonNode (input : StopWatch) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: StopWatch) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "created", (input.Created |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "duration", (input.Duration |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "issue_index", (input.IssueIndex |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "issue_title", (input.IssueTitle |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repo_name", (input.RepoName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repo_owner_name", (input.RepoOwnerName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "seconds", (input.Seconds |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7669,33 +7148,31 @@ module SubmitPullReviewOptionsJsonSerializeExtension = type SubmitPullReviewOptions with /// Serialize to a JSON node - static member toJsonNode (input : SubmitPullReviewOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: SubmitPullReviewOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "event", (input.Event |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7710,76 +7187,70 @@ module TagJsonSerializeExtension = type Tag with /// Serialize to a JSON node - static member toJsonNode (input : Tag) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Tag) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "commit", (input.Commit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitMeta.toJsonNode field - )) + | Some field -> CommitMeta.toJsonNode field)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "tarball_url", (input.TarballUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "zipball_url", (input.ZipballUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7794,12 +7265,12 @@ module Type8JsonSerializeExtension = type Type8 with /// Serialize to a JSON node - static member toJsonNode (input : Type8) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Type8) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, System.Text.Json.Nodes.JsonValue.Create value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, System.Text.Json.Nodes.JsonValue.Create value) node :> _ namespace Gitea @@ -7813,90 +7284,83 @@ module TeamJsonSerializeExtension = type Team with /// Serialize to a JSON node - static member toJsonNode (input : Team) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Team) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "can_create_org_repo", (input.CanCreateOrgRepo |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "includes_all_repositories", (input.IncludesAllRepositories |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "organization", (input.Organization |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Organization.toJsonNode field - )) + | Some field -> Organization.toJsonNode field)) ) - node.Add ( + node.Add( "permission", (input.Permission |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "units", (input.Units |> (fun field -> @@ -7904,26 +7368,23 @@ module TeamJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "units_map", (input.UnitsMap |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Type8.toJsonNode field - )) + | Some field -> Type8.toJsonNode field)) ) node :> _ @@ -7938,14 +7399,14 @@ module TopicNameJsonSerializeExtension = type TopicName with /// Serialize to a JSON node - static member toJsonNode (input : TopicName) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: TopicName) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "topics", (input.Topics |> (fun field -> @@ -7953,16 +7414,14 @@ module TopicNameJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -7977,66 +7436,61 @@ module TopicResponseJsonSerializeExtension = type TopicResponse with /// Serialize to a JSON node - static member toJsonNode (input : TopicResponse) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: TopicResponse) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "created", (input.Created |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repo_count", (input.RepoCount |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "topic_name", (input.TopicName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "updated", (input.Updated |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -8051,16 +7505,16 @@ module TransferRepoOptionJsonSerializeExtension = type TransferRepoOption with /// Serialize to a JSON node - static member toJsonNode (input : TransferRepoOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: TransferRepoOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ("new_owner", (input.NewOwner |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("new_owner", (input.NewOwner |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "team_ids", (input.TeamIds |> (fun field -> @@ -8068,16 +7522,14 @@ module TransferRepoOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -8092,100 +7544,92 @@ module UpdateFileOptionsJsonSerializeExtension = type UpdateFileOptions with /// Serialize to a JSON node - static member toJsonNode (input : UpdateFileOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: UpdateFileOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "author", (input.Author |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Identity.toJsonNode field - )) + | Some field -> Identity.toJsonNode field)) ) - node.Add ( + node.Add( "branch", (input.Branch |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "committer", (input.Committer |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Identity.toJsonNode field - )) + | Some field -> Identity.toJsonNode field)) ) - node.Add ("content", (input.Content |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("content", (input.Content |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "dates", (input.Dates |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitDateOptions.toJsonNode field - )) + | Some field -> CommitDateOptions.toJsonNode field)) ) - node.Add ( + node.Add( "from_path", (input.FromPath |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "new_branch", (input.NewBranch |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("sha", (input.Sha |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("sha", (input.Sha |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "signoff", (input.Signoff |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -8200,231 +7644,211 @@ module UserJsonSerializeExtension = type User with /// Serialize to a JSON node - static member toJsonNode (input : User) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: User) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "active", (input.Active |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "avatar_url", (input.AvatarUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created", (input.Created |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "email", (input.Email |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "followers_count", (input.FollowersCount |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "following_count", (input.FollowingCount |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "full_name", (input.FullName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "is_admin", (input.IsAdmin |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "language", (input.Language |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "last_login", (input.LastLogin |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "location", (input.Location |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "login", (input.Login |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "login_name", (input.LoginName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "prohibit_login", (input.ProhibitLogin |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "restricted", (input.Restricted |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "starred_repos_count", (input.StarredReposCount |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "visibility", (input.Visibility |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "website", (input.Website |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -8439,33 +7863,31 @@ module UserHeatmapDataJsonSerializeExtension = type UserHeatmapData with /// Serialize to a JSON node - static member toJsonNode (input : UserHeatmapData) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: UserHeatmapData) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "contributions", (input.Contributions |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "timestamp", (input.Timestamp |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -8480,110 +7902,101 @@ module UserSettingsJsonSerializeExtension = type UserSettings with /// Serialize to a JSON node - static member toJsonNode (input : UserSettings) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: UserSettings) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "diff_view_style", (input.DiffViewStyle |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "full_name", (input.FullName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "hide_activity", (input.HideActivity |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "hide_email", (input.HideEmail |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "language", (input.Language |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "location", (input.Location |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "theme", (input.Theme |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "website", (input.Website |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -8598,110 +8011,101 @@ module UserSettingsOptionsJsonSerializeExtension = type UserSettingsOptions with /// Serialize to a JSON node - static member toJsonNode (input : UserSettingsOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: UserSettingsOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "diff_view_style", (input.DiffViewStyle |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "full_name", (input.FullName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "hide_activity", (input.HideActivity |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "hide_email", (input.HideEmail |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "language", (input.Language |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "location", (input.Location |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "theme", (input.Theme |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "website", (input.Website |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -8716,78 +8120,72 @@ module WatchInfoJsonSerializeExtension = type WatchInfo with /// Serialize to a JSON node - static member toJsonNode (input : WatchInfo) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: WatchInfo) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "ignored", (input.Ignored |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "reason", (input.Reason |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - ((fun value -> System.Text.Json.Nodes.JsonObject ()) field) - :> System.Text.Json.Nodes.JsonNode - )) + ((fun value -> System.Text.Json.Nodes.JsonObject()) field) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repository_url", (input.RepositoryUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "subscribed", (input.Subscribed |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -8802,53 +8200,49 @@ module WikiCommitJsonSerializeExtension = type WikiCommit with /// Serialize to a JSON node - static member toJsonNode (input : WikiCommit) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: WikiCommit) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "author", (input.Author |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitUser.toJsonNode field - )) + | Some field -> CommitUser.toJsonNode field)) ) - node.Add ( + node.Add( "commiter", (input.Commiter |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitUser.toJsonNode field - )) + | Some field -> CommitUser.toJsonNode field)) ) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sha", (input.Sha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -8863,14 +8257,14 @@ module WikiCommitListJsonSerializeExtension = type WikiCommitList with /// Serialize to a JSON node - static member toJsonNode (input : WikiCommitList) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: WikiCommitList) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "commits", (input.Commits |> (fun field -> @@ -8878,27 +8272,24 @@ module WikiCommitListJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (WikiCommit.toJsonNode mem) + arr.Add(WikiCommit.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "count", (input.Count |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -8913,98 +8304,90 @@ module WikiPageJsonSerializeExtension = type WikiPage with /// Serialize to a JSON node - static member toJsonNode (input : WikiPage) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: WikiPage) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "commit_count", (input.CommitCount |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "content_base64", (input.ContentBase64 |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "footer", (input.Footer |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "last_commit", (input.LastCommit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> WikiCommit.toJsonNode field - )) + | Some field -> WikiCommit.toJsonNode field)) ) - node.Add ( + node.Add( "sidebar", (input.Sidebar |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sub_url", (input.SubUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -9019,54 +8402,50 @@ module WikiPageMetaDataJsonSerializeExtension = type WikiPageMetaData with /// Serialize to a JSON node - static member toJsonNode (input : WikiPageMetaData) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: WikiPageMetaData) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "last_commit", (input.LastCommit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> WikiCommit.toJsonNode field - )) + | Some field -> WikiCommit.toJsonNode field)) ) - node.Add ( + node.Add( "sub_url", (input.SubUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -9081,14 +8460,14 @@ module CommentJsonSerializeExtension = type Comment with /// Serialize to a JSON node - static member toJsonNode (input : Comment) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Comment) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "assets", (input.Assets |> (fun field -> @@ -9096,125 +8475,113 @@ module CommentJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (Attachment.toJsonNode mem) + arr.Add(Attachment.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "issue_url", (input.IssueUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "original_author", (input.OriginalAuthor |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "original_author_id", (input.OriginalAuthorId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "pull_request_url", (input.PullRequestUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "updated_at", (input.UpdatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "user", (input.User |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) node :> _ @@ -9229,109 +8596,100 @@ module CommitStatusJsonSerializeExtension = type CommitStatus with /// Serialize to a JSON node - static member toJsonNode (input : CommitStatus) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CommitStatus) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "context", (input.Context |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "creator", (input.Creator |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "status", (input.Status |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "target_url", (input.TargetUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "updated_at", (input.UpdatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -9346,175 +8704,160 @@ module ContentsResponseJsonSerializeExtension = type ContentsResponse with /// Serialize to a JSON node - static member toJsonNode (input : ContentsResponse) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: ContentsResponse) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "_links", (input.Links |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> FileLinksResponse.toJsonNode field - )) + | Some field -> FileLinksResponse.toJsonNode field)) ) - node.Add ( + node.Add( "content", (input.Content |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "download_url", (input.DownloadUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "encoding", (input.Encoding |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "git_url", (input.GitUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "last_commit_sha", (input.LastCommitSha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "path", (input.Path |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sha", (input.Sha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "size", (input.Size |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "submodule_git_url", (input.SubmoduleGitUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "target", (input.Target |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "type", (input.Type |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -9529,87 +8872,80 @@ module CreateFileOptionsJsonSerializeExtension = type CreateFileOptions with /// Serialize to a JSON node - static member toJsonNode (input : CreateFileOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateFileOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "author", (input.Author |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Identity.toJsonNode field - )) + | Some field -> Identity.toJsonNode field)) ) - node.Add ( + node.Add( "branch", (input.Branch |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "committer", (input.Committer |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Identity.toJsonNode field - )) + | Some field -> Identity.toJsonNode field)) ) - node.Add ("content", (input.Content |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("content", (input.Content |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "dates", (input.Dates |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitDateOptions.toJsonNode field - )) + | Some field -> CommitDateOptions.toJsonNode field)) ) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "new_branch", (input.NewBranch |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "signoff", (input.Signoff |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -9624,49 +8960,46 @@ module CreateHookOptionJsonSerializeExtension = type CreateHookOption with /// Serialize to a JSON node - static member toJsonNode (input : CreateHookOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreateHookOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "active", (input.Active |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "authorization_header", (input.AuthorizationHeader |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "branch_filter", (input.BranchFilter |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("config", (input.Config |> CreateHookOptionConfig.toJsonNode)) + node.Add("config", (input.Config |> CreateHookOptionConfig.toJsonNode)) - node.Add ( + node.Add( "events", (input.Events |> (fun field -> @@ -9674,19 +9007,17 @@ module CreateHookOptionJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("type", (input.Type |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("type", (input.Type |> System.Text.Json.Nodes.JsonValue.Create)) node :> _ namespace Gitea @@ -9700,25 +9031,24 @@ module CreatePullReviewOptionsJsonSerializeExtension = type CreatePullReviewOptions with /// Serialize to a JSON node - static member toJsonNode (input : CreatePullReviewOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CreatePullReviewOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "comments", (input.Comments |> (fun field -> @@ -9726,38 +9056,34 @@ module CreatePullReviewOptionsJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (CreatePullReviewComment.toJsonNode mem) + arr.Add(CreatePullReviewComment.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "commit_id", (input.CommitId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "event", (input.Event |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -9772,87 +9098,80 @@ module DeleteFileOptionsJsonSerializeExtension = type DeleteFileOptions with /// Serialize to a JSON node - static member toJsonNode (input : DeleteFileOptions) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: DeleteFileOptions) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "author", (input.Author |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Identity.toJsonNode field - )) + | Some field -> Identity.toJsonNode field)) ) - node.Add ( + node.Add( "branch", (input.Branch |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "committer", (input.Committer |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Identity.toJsonNode field - )) + | Some field -> Identity.toJsonNode field)) ) - node.Add ( + node.Add( "dates", (input.Dates |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitDateOptions.toJsonNode field - )) + | Some field -> CommitDateOptions.toJsonNode field)) ) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "new_branch", (input.NewBranch |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("sha", (input.Sha |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("sha", (input.Sha |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "signoff", (input.Signoff |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -9867,305 +9186,278 @@ module EditRepoOptionJsonSerializeExtension = type EditRepoOption with /// Serialize to a JSON node - static member toJsonNode (input : EditRepoOption) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: EditRepoOption) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "allow_manual_merge", (input.AllowManualMerge |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "allow_merge_commits", (input.AllowMergeCommits |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "allow_rebase", (input.AllowRebase |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "allow_rebase_explicit", (input.AllowRebaseExplicit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "allow_rebase_update", (input.AllowRebaseUpdate |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "allow_squash_merge", (input.AllowSquashMerge |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "archived", (input.Archived |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "autodetect_manual_merge", (input.AutodetectManualMerge |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "default_allow_maintainer_edit", (input.DefaultAllowMaintainerEdit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "default_branch", (input.DefaultBranch |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "default_delete_branch_after_merge", (input.DefaultDeleteBranchAfterMerge |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "default_merge_style", (input.DefaultMergeStyle |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_prune", (input.EnablePrune |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "external_tracker", (input.ExternalTracker |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> ExternalTracker.toJsonNode field - )) + | Some field -> ExternalTracker.toJsonNode field)) ) - node.Add ( + node.Add( "external_wiki", (input.ExternalWiki |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> ExternalWiki.toJsonNode field - )) + | Some field -> ExternalWiki.toJsonNode field)) ) - node.Add ( + node.Add( "has_issues", (input.HasIssues |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "has_projects", (input.HasProjects |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "has_pull_requests", (input.HasPullRequests |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "has_wiki", (input.HasWiki |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "ignore_whitespace_conflicts", (input.IgnoreWhitespaceConflicts |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "internal_tracker", (input.InternalTracker |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> InternalTracker.toJsonNode field - )) + | Some field -> InternalTracker.toJsonNode field)) ) - node.Add ( + node.Add( "mirror_interval", (input.MirrorInterval |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "private", (input.Private |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "template", (input.Template |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "website", (input.Website |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -10180,53 +9472,49 @@ module IssueFormFieldJsonSerializeExtension = type IssueFormField with /// Serialize to a JSON node - static member toJsonNode (input : IssueFormField) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: IssueFormField) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "attributes", (input.Attributes |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Type5.toJsonNode field - )) + | Some field -> Type5.toJsonNode field)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "type", (input.Type |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "validations", (input.Validations |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Type6.toJsonNode field - )) + | Some field -> Type6.toJsonNode field)) ) node :> _ @@ -10241,25 +9529,24 @@ module IssueTemplateJsonSerializeExtension = type IssueTemplate with /// Serialize to a JSON node - static member toJsonNode (input : IssueTemplate) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: IssueTemplate) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "about", (input.About |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> @@ -10267,41 +9554,37 @@ module IssueTemplateJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (IssueFormField.toJsonNode mem) + arr.Add(IssueFormField.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "content", (input.Content |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "file_name", (input.FileName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "labels", (input.Labels |> (fun field -> @@ -10309,49 +9592,44 @@ module IssueTemplateJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "ref", (input.Ref |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -10366,121 +9644,111 @@ module MilestoneJsonSerializeExtension = type Milestone with /// Serialize to a JSON node - static member toJsonNode (input : Milestone) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Milestone) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "closed_at", (input.ClosedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "closed_issues", (input.ClosedIssues |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "due_on", (input.DueOn |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "open_issues", (input.OpenIssues |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "state", (input.State |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "updated_at", (input.UpdatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -10495,43 +9763,40 @@ module NodeInfoUsageJsonSerializeExtension = type NodeInfoUsage with /// Serialize to a JSON node - static member toJsonNode (input : NodeInfoUsage) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: NodeInfoUsage) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "localComments", (input.LocalComments |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "localPosts", (input.LocalPosts |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "users", (input.Users |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> NodeInfoUsageUsers.toJsonNode field - )) + | Some field -> NodeInfoUsageUsers.toJsonNode field)) ) node :> _ @@ -10546,88 +9811,81 @@ module NotificationSubjectJsonSerializeExtension = type NotificationSubject with /// Serialize to a JSON node - static member toJsonNode (input : NotificationSubject) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: NotificationSubject) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "latest_comment_html_url", (input.LatestCommentHtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "latest_comment_url", (input.LatestCommentUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "state", (input.State |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "type", (input.Type |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -10642,65 +9900,60 @@ module PayloadCommitVerificationJsonSerializeExtension = type PayloadCommitVerification with /// Serialize to a JSON node - static member toJsonNode (input : PayloadCommitVerification) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: PayloadCommitVerification) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "payload", (input.Payload |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "reason", (input.Reason |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "signature", (input.Signature |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "signer", (input.Signer |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> PayloadUser.toJsonNode field - )) + | Some field -> PayloadUser.toJsonNode field)) ) - node.Add ( + node.Add( "verified", (input.Verified |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -10715,109 +9968,100 @@ module PublicKeyJsonSerializeExtension = type PublicKey with /// Serialize to a JSON node - static member toJsonNode (input : PublicKey) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: PublicKey) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "fingerprint", (input.Fingerprint |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "key", (input.Key |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "key_type", (input.KeyType |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "read_only", (input.ReadOnly |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "user", (input.User |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) node :> _ @@ -10832,163 +10076,149 @@ module PullReviewJsonSerializeExtension = type PullReview with /// Serialize to a JSON node - static member toJsonNode (input : PullReview) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: PullReview) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "comments_count", (input.CommentsCount |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "commit_id", (input.CommitId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "dismissed", (input.Dismissed |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "official", (input.Official |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "pull_request_url", (input.PullRequestUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "stale", (input.Stale |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "state", (input.State |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "submitted_at", (input.SubmittedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "team", (input.Team |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Team.toJsonNode field - )) + | Some field -> Team.toJsonNode field)) ) - node.Add ( + node.Add( "updated_at", (input.UpdatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "user", (input.User |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) node :> _ @@ -11003,174 +10233,159 @@ module PullReviewCommentJsonSerializeExtension = type PullReviewComment with /// Serialize to a JSON node - static member toJsonNode (input : PullReviewComment) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: PullReviewComment) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "commit_id", (input.CommitId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "diff_hunk", (input.DiffHunk |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "original_commit_id", (input.OriginalCommitId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "original_position", (input.OriginalPosition |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "path", (input.Path |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "position", (input.Position |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "pull_request_review_id", (input.PullRequestReviewId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "pull_request_url", (input.PullRequestUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "resolver", (input.Resolver |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "updated_at", (input.UpdatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "user", (input.User |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) node :> _ @@ -11185,43 +10400,40 @@ module ReactionJsonSerializeExtension = type Reaction with /// Serialize to a JSON node - static member toJsonNode (input : Reaction) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Reaction) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "content", (input.Content |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "user", (input.User |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) node :> _ @@ -11236,14 +10448,14 @@ module ReleaseJsonSerializeExtension = type Release with /// Serialize to a JSON node - static member toJsonNode (input : Release) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Release) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "assets", (input.Assets |> (fun field -> @@ -11251,169 +10463,153 @@ module ReleaseJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (Attachment.toJsonNode mem) + arr.Add(Attachment.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "author", (input.Author |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "draft", (input.Draft |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "prerelease", (input.Prerelease |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "published_at", (input.PublishedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "tag_name", (input.TagName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "tarball_url", (input.TarballUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "target_commitish", (input.TargetCommitish |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "zipball_url", (input.ZipballUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -11428,43 +10624,40 @@ module RepoCollaboratorPermissionJsonSerializeExtension = type RepoCollaboratorPermission with /// Serialize to a JSON node - static member toJsonNode (input : RepoCollaboratorPermission) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: RepoCollaboratorPermission) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "permission", (input.Permission |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "role_name", (input.RoleName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "user", (input.User |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) node :> _ @@ -11479,73 +10672,67 @@ module RepoCommitJsonSerializeExtension = type RepoCommit with /// Serialize to a JSON node - static member toJsonNode (input : RepoCommit) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: RepoCommit) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "author", (input.Author |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitUser.toJsonNode field - )) + | Some field -> CommitUser.toJsonNode field)) ) - node.Add ( + node.Add( "committer", (input.Committer |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitUser.toJsonNode field - )) + | Some field -> CommitUser.toJsonNode field)) ) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "tree", (input.Tree |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitMeta.toJsonNode field - )) + | Some field -> CommitMeta.toJsonNode field)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "verification", (input.Verification |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> PayloadCommitVerification.toJsonNode field - )) + | Some field -> PayloadCommitVerification.toJsonNode field)) ) node :> _ @@ -11560,34 +10747,32 @@ module RepoTransferJsonSerializeExtension = type RepoTransfer with /// Serialize to a JSON node - static member toJsonNode (input : RepoTransfer) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: RepoTransfer) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "doer", (input.Doer |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "recipient", (input.Recipient |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "teams", (input.Teams |> (fun field -> @@ -11595,16 +10780,14 @@ module RepoTransferJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (Team.toJsonNode mem) + arr.Add(Team.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -11619,576 +10802,524 @@ module RepositoryJsonSerializeExtension = type Repository with /// Serialize to a JSON node - static member toJsonNode (input : Repository) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Repository) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "allow_merge_commits", (input.AllowMergeCommits |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "allow_rebase", (input.AllowRebase |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "allow_rebase_explicit", (input.AllowRebaseExplicit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "allow_rebase_update", (input.AllowRebaseUpdate |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "allow_squash_merge", (input.AllowSquashMerge |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "archived", (input.Archived |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "avatar_url", (input.AvatarUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "clone_url", (input.CloneUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "default_allow_maintainer_edit", (input.DefaultAllowMaintainerEdit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "default_branch", (input.DefaultBranch |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "default_delete_branch_after_merge", (input.DefaultDeleteBranchAfterMerge |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "default_merge_style", (input.DefaultMergeStyle |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "description", (input.Description |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "empty", (input.Empty |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "external_tracker", (input.ExternalTracker |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> ExternalTracker.toJsonNode field - )) + | Some field -> ExternalTracker.toJsonNode field)) ) - node.Add ( + node.Add( "external_wiki", (input.ExternalWiki |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> ExternalWiki.toJsonNode field - )) + | Some field -> ExternalWiki.toJsonNode field)) ) - node.Add ( + node.Add( "fork", (input.Fork |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "forks_count", (input.ForksCount |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "full_name", (input.FullName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "has_issues", (input.HasIssues |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "has_projects", (input.HasProjects |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "has_pull_requests", (input.HasPullRequests |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "has_wiki", (input.HasWiki |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "ignore_whitespace_conflicts", (input.IgnoreWhitespaceConflicts |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "internal", (input.Internal |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "internal_tracker", (input.InternalTracker |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> InternalTracker.toJsonNode field - )) + | Some field -> InternalTracker.toJsonNode field)) ) - node.Add ( + node.Add( "language", (input.Language |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "languages_url", (input.LanguagesUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "link", (input.Link |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "mirror", (input.Mirror |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "mirror_interval", (input.MirrorInterval |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "mirror_updated", (input.MirrorUpdated |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "open_issues_count", (input.OpenIssuesCount |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "open_pr_counter", (input.OpenPrCounter |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "original_url", (input.OriginalUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "owner", (input.Owner |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "parent", (input.Parent |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Repository.toJsonNode field - )) + | Some field -> Repository.toJsonNode field)) ) - node.Add ( + node.Add( "permissions", (input.Permissions |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Permission.toJsonNode field - )) + | Some field -> Permission.toJsonNode field)) ) - node.Add ( + node.Add( "private", (input.Private |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "release_counter", (input.ReleaseCounter |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repo_transfer", (input.RepoTransfer |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> RepoTransfer.toJsonNode field - )) + | Some field -> RepoTransfer.toJsonNode field)) ) - node.Add ( + node.Add( "size", (input.Size |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "ssh_url", (input.SshUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "stars_count", (input.StarsCount |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "template", (input.Template |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "updated_at", (input.UpdatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "watchers_count", (input.WatchersCount |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "website", (input.Website |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -12203,14 +11334,14 @@ module SearchResultsJsonSerializeExtension = type SearchResults with /// Serialize to a JSON node - static member toJsonNode (input : SearchResults) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: SearchResults) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "data", (input.Data |> (fun field -> @@ -12218,27 +11349,24 @@ module SearchResultsJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (Repository.toJsonNode mem) + arr.Add(Repository.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "ok", (input.Ok |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -12253,85 +11381,78 @@ module AnnotatedTagJsonSerializeExtension = type AnnotatedTag with /// Serialize to a JSON node - static member toJsonNode (input : AnnotatedTag) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: AnnotatedTag) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "object", (input.Object |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> AnnotatedTagObject.toJsonNode field - )) + | Some field -> AnnotatedTagObject.toJsonNode field)) ) - node.Add ( + node.Add( "sha", (input.Sha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "tag", (input.Tag |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "tagger", (input.Tagger |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitUser.toJsonNode field - )) + | Some field -> CommitUser.toJsonNode field)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "verification", (input.Verification |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> PayloadCommitVerification.toJsonNode field - )) + | Some field -> PayloadCommitVerification.toJsonNode field)) ) node :> _ @@ -12346,57 +11467,53 @@ module CombinedStatusJsonSerializeExtension = type CombinedStatus with /// Serialize to a JSON node - static member toJsonNode (input : CombinedStatus) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CombinedStatus) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "commit_url", (input.CommitUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repository", (input.Repository |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Repository.toJsonNode field - )) + | Some field -> Repository.toJsonNode field)) ) - node.Add ( + node.Add( "sha", (input.Sha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "state", (input.State |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "statuses", (input.Statuses |> (fun field -> @@ -12404,38 +11521,34 @@ module CombinedStatusJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (CommitStatus.toJsonNode mem) + arr.Add(CommitStatus.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "total_count", (input.TotalCount |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -12450,55 +11563,51 @@ module CommitJsonSerializeExtension = type Commit with /// Serialize to a JSON node - static member toJsonNode (input : Commit) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Commit) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "author", (input.Author |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "commit", (input.Commit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> RepoCommit.toJsonNode field - )) + | Some field -> RepoCommit.toJsonNode field)) ) - node.Add ( + node.Add( "committer", (input.Committer |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "created", (input.Created |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "files", (input.Files |> (fun field -> @@ -12506,30 +11615,27 @@ module CommitJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (CommitAffectedFiles.toJsonNode mem) + arr.Add(CommitAffectedFiles.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "parents", (input.Parents |> (fun field -> @@ -12537,48 +11643,43 @@ module CommitJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (CommitMeta.toJsonNode mem) + arr.Add(CommitMeta.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sha", (input.Sha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "stats", (input.Stats |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> CommitStats.toJsonNode field - )) + | Some field -> CommitStats.toJsonNode field)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -12593,109 +11694,100 @@ module DeployKeyJsonSerializeExtension = type DeployKey with /// Serialize to a JSON node - static member toJsonNode (input : DeployKey) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: DeployKey) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "fingerprint", (input.Fingerprint |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "key", (input.Key |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "key_id", (input.KeyId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "read_only", (input.ReadOnly |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repository", (input.Repository |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Repository.toJsonNode field - )) + | Some field -> Repository.toJsonNode field)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -12710,43 +11802,40 @@ module FileDeleteResponseJsonSerializeExtension = type FileDeleteResponse with /// Serialize to a JSON node - static member toJsonNode (input : FileDeleteResponse) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: FileDeleteResponse) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "commit", (input.Commit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> FileCommitResponse.toJsonNode field - )) + | Some field -> FileCommitResponse.toJsonNode field)) ) - node.Add ( + node.Add( "content", (input.Content |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - ((fun value -> System.Text.Json.Nodes.JsonObject ()) field) - :> System.Text.Json.Nodes.JsonNode - )) + ((fun value -> System.Text.Json.Nodes.JsonObject()) field) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "verification", (input.Verification |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> PayloadCommitVerification.toJsonNode field - )) + | Some field -> PayloadCommitVerification.toJsonNode field)) ) node :> _ @@ -12761,41 +11850,38 @@ module FileResponseJsonSerializeExtension = type FileResponse with /// Serialize to a JSON node - static member toJsonNode (input : FileResponse) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: FileResponse) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "commit", (input.Commit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> FileCommitResponse.toJsonNode field - )) + | Some field -> FileCommitResponse.toJsonNode field)) ) - node.Add ( + node.Add( "content", (input.Content |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> ContentsResponse.toJsonNode field - )) + | Some field -> ContentsResponse.toJsonNode field)) ) - node.Add ( + node.Add( "verification", (input.Verification |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> PayloadCommitVerification.toJsonNode field - )) + | Some field -> PayloadCommitVerification.toJsonNode field)) ) node :> _ @@ -12810,14 +11896,14 @@ module IssueJsonSerializeExtension = type Issue with /// Serialize to a JSON node - static member toJsonNode (input : Issue) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Issue) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "assets", (input.Assets |> (fun field -> @@ -12825,29 +11911,26 @@ module IssueJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (Attachment.toJsonNode mem) + arr.Add(Attachment.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "assignee", (input.Assignee |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "assignees", (input.Assignees |> (fun field -> @@ -12855,107 +11938,97 @@ module IssueJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (User.toJsonNode mem) + arr.Add(User.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "closed_at", (input.ClosedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "comments", (input.Comments |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "due_date", (input.DueDate |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "is_locked", (input.IsLocked |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "labels", (input.Labels |> (fun field -> @@ -12963,144 +12036,130 @@ module IssueJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (Label.toJsonNode mem) + arr.Add(Label.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "milestone", (input.Milestone |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Milestone.toJsonNode field - )) + | Some field -> Milestone.toJsonNode field)) ) - node.Add ( + node.Add( "number", (input.Number |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "original_author", (input.OriginalAuthor |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "original_author_id", (input.OriginalAuthorId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "pull_request", (input.PullRequest |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> PullRequestMeta.toJsonNode field - )) + | Some field -> PullRequestMeta.toJsonNode field)) ) - node.Add ( + node.Add( "ref", (input.Ref |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repository", (input.Repository |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> RepositoryMeta.toJsonNode field - )) + | Some field -> RepositoryMeta.toJsonNode field)) ) - node.Add ( + node.Add( "state", (input.State |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "updated_at", (input.UpdatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "user", (input.User |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) node :> _ @@ -13115,35 +12174,33 @@ module NodeInfoJsonSerializeExtension = type NodeInfo with /// Serialize to a JSON node - static member toJsonNode (input : NodeInfo) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: NodeInfo) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "metadata", (input.Metadata |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Type7.toJsonNode field - )) + | Some field -> Type7.toJsonNode field)) ) - node.Add ( + node.Add( "openRegistrations", (input.OpenRegistrations |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "protocols", (input.Protocols |> (fun field -> @@ -13151,57 +12208,51 @@ module NodeInfoJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "services", (input.Services |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> NodeInfoServices.toJsonNode field - )) + | Some field -> NodeInfoServices.toJsonNode field)) ) - node.Add ( + node.Add( "software", (input.Software |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> NodeInfoSoftware.toJsonNode field - )) + | Some field -> NodeInfoSoftware.toJsonNode field)) ) - node.Add ( + node.Add( "usage", (input.Usage |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> NodeInfoUsage.toJsonNode field - )) + | Some field -> NodeInfoUsage.toJsonNode field)) ) - node.Add ( + node.Add( "version", (input.Version |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -13216,32 +12267,30 @@ module NoteJsonSerializeExtension = type Note with /// Serialize to a JSON node - static member toJsonNode (input : Note) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Note) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "commit", (input.Commit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Commit.toJsonNode field - )) + | Some field -> Commit.toJsonNode field)) ) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -13256,86 +12305,79 @@ module NotificationThreadJsonSerializeExtension = type NotificationThread with /// Serialize to a JSON node - static member toJsonNode (input : NotificationThread) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: NotificationThread) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "pinned", (input.Pinned |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repository", (input.Repository |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Repository.toJsonNode field - )) + | Some field -> Repository.toJsonNode field)) ) - node.Add ( + node.Add( "subject", (input.Subject |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> NotificationSubject.toJsonNode field - )) + | Some field -> NotificationSubject.toJsonNode field)) ) - node.Add ( + node.Add( "unread", (input.Unread |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "updated_at", (input.UpdatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -13350,65 +12392,60 @@ module PRBranchInfoJsonSerializeExtension = type PRBranchInfo with /// Serialize to a JSON node - static member toJsonNode (input : PRBranchInfo) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: PRBranchInfo) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "label", (input.Label |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "ref", (input.Ref |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "repo", (input.Repo |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Repository.toJsonNode field - )) + | Some field -> Repository.toJsonNode field)) ) - node.Add ( + node.Add( "repo_id", (input.RepoId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "sha", (input.Sha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -13423,96 +12460,88 @@ module PackageJsonSerializeExtension = type Package with /// Serialize to a JSON node - static member toJsonNode (input : Package) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Package) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "creator", (input.Creator |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "owner", (input.Owner |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "repository", (input.Repository |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Repository.toJsonNode field - )) + | Some field -> Repository.toJsonNode field)) ) - node.Add ( + node.Add( "type", (input.Type |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "version", (input.Version |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -13527,14 +12556,14 @@ module PayloadCommitJsonSerializeExtension = type PayloadCommit with /// Serialize to a JSON node - static member toJsonNode (input : PayloadCommit) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: PayloadCommit) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "added", (input.Added |> (fun field -> @@ -13542,61 +12571,55 @@ module PayloadCommitJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "author", (input.Author |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> PayloadUser.toJsonNode field - )) + | Some field -> PayloadUser.toJsonNode field)) ) - node.Add ( + node.Add( "committer", (input.Committer |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> PayloadUser.toJsonNode field - )) + | Some field -> PayloadUser.toJsonNode field)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "modified", (input.Modified |> (fun field -> @@ -13604,19 +12627,17 @@ module PayloadCommitJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "removed", (input.Removed |> (fun field -> @@ -13624,48 +12645,43 @@ module PayloadCommitJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "timestamp", (input.Timestamp |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "verification", (input.Verification |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> PayloadCommitVerification.toJsonNode field - )) + | Some field -> PayloadCommitVerification.toJsonNode field)) ) node :> _ @@ -13680,35 +12696,33 @@ module PullRequestJsonSerializeExtension = type PullRequest with /// Serialize to a JSON node - static member toJsonNode (input : PullRequest) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: PullRequest) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "allow_maintainer_edit", (input.AllowMaintainerEdit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "assignee", (input.Assignee |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "assignees", (input.Assignees |> (fun field -> @@ -13716,138 +12730,125 @@ module PullRequestJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (User.toJsonNode mem) + arr.Add(User.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "base", (input.Base |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> PRBranchInfo.toJsonNode field - )) + | Some field -> PRBranchInfo.toJsonNode field)) ) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "closed_at", (input.ClosedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "comments", (input.Comments |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "diff_url", (input.DiffUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "due_date", (input.DueDate |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "head", (input.Head |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> PRBranchInfo.toJsonNode field - )) + | Some field -> PRBranchInfo.toJsonNode field)) ) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "is_locked", (input.IsLocked |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "labels", (input.Labels |> (fun field -> @@ -13855,167 +12856,151 @@ module PullRequestJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (Label.toJsonNode mem) + arr.Add(Label.toJsonNode mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "merge_base", (input.MergeBase |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "merge_commit_sha", (input.MergeCommitSha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "mergeable", (input.Mergeable |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "merged", (input.Merged |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "merged_at", (input.MergedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "merged_by", (input.MergedBy |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "milestone", (input.Milestone |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Milestone.toJsonNode field - )) + | Some field -> Milestone.toJsonNode field)) ) - node.Add ( + node.Add( "number", (input.Number |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "patch_url", (input.PatchUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "state", (input.State |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "title", (input.Title |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "updated_at", (input.UpdatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "url", (input.Url |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "user", (input.User |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) node :> _ @@ -14030,87 +13015,80 @@ module TrackedTimeJsonSerializeExtension = type TrackedTime with /// Serialize to a JSON node - static member toJsonNode (input : TrackedTime) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: TrackedTime) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "created", (input.Created |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "issue", (input.Issue |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Issue.toJsonNode field - )) + | Some field -> Issue.toJsonNode field)) ) - node.Add ( + node.Add( "issue_id", (input.IssueId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "time", (input.Time |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "user_id", (input.UserId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "user_name", (input.UserName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -14125,79 +13103,73 @@ module BranchJsonSerializeExtension = type Branch with /// Serialize to a JSON node - static member toJsonNode (input : Branch) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Branch) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "commit", (input.Commit |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> PayloadCommit.toJsonNode field - )) + | Some field -> PayloadCommit.toJsonNode field)) ) - node.Add ( + node.Add( "effective_branch_protection_name", (input.EffectiveBranchProtectionName |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "enable_status_check", (input.EnableStatusCheck |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "name", (input.Name |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "protected", (input.Protected |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "required_approvals", (input.RequiredApprovals |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "status_check_contexts", (input.StatusCheckContexts |> (fun field -> @@ -14205,38 +13177,34 @@ module BranchJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "user_can_merge", (input.UserCanMerge |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "user_can_push", (input.UserCanPush |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) node :> _ @@ -14251,319 +13219,290 @@ module TimelineCommentJsonSerializeExtension = type TimelineComment with /// Serialize to a JSON node - static member toJsonNode (input : TimelineComment) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: TimelineComment) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, id value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, id value) - node.Add ( + node.Add( "assignee", (input.Assignee |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "assignee_team", (input.AssigneeTeam |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Team.toJsonNode field - )) + | Some field -> Team.toJsonNode field)) ) - node.Add ( + node.Add( "body", (input.Body |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "created_at", (input.CreatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "dependent_issue", (input.DependentIssue |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Issue.toJsonNode field - )) + | Some field -> Issue.toJsonNode field)) ) - node.Add ( + node.Add( "html_url", (input.HtmlUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "id", (input.Id |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "issue_url", (input.IssueUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "label", (input.Label |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Label.toJsonNode field - )) + | Some field -> Label.toJsonNode field)) ) - node.Add ( + node.Add( "milestone", (input.Milestone |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Milestone.toJsonNode field - )) + | Some field -> Milestone.toJsonNode field)) ) - node.Add ( + node.Add( "new_ref", (input.NewRef |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "new_title", (input.NewTitle |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "old_milestone", (input.OldMilestone |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Milestone.toJsonNode field - )) + | Some field -> Milestone.toJsonNode field)) ) - node.Add ( + node.Add( "old_project_id", (input.OldProjectId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "old_ref", (input.OldRef |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "old_title", (input.OldTitle |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "project_id", (input.ProjectId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "pull_request_url", (input.PullRequestUrl |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "ref_action", (input.RefAction |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "ref_comment", (input.RefComment |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Comment.toJsonNode field - )) + | Some field -> Comment.toJsonNode field)) ) - node.Add ( + node.Add( "ref_commit_sha", (input.RefCommitSha |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "ref_issue", (input.RefIssue |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> Issue.toJsonNode field - )) + | Some field -> Issue.toJsonNode field)) ) - node.Add ( + node.Add( "removed_assignee", (input.RemovedAssignee |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "resolve_doer", (input.ResolveDoer |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) - node.Add ( + node.Add( "review_id", (input.ReviewId |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "tracked_time", (input.TrackedTime |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> TrackedTime.toJsonNode field - )) + | Some field -> TrackedTime.toJsonNode field)) ) - node.Add ( + node.Add( "type", (input.Type |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "updated_at", (input.UpdatedAt |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> - (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode - )) + (System.Text.Json.Nodes.JsonValue.Create field) :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "user", (input.User |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> User.toJsonNode field - )) + | Some field -> User.toJsonNode field)) ) node :> _ @@ -14578,15 +13517,16 @@ module LanguageStatisticsJsonSerializeExtension = type LanguageStatistics with /// Serialize to a JSON node - static member toJsonNode (input : LanguageStatistics) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: LanguageStatistics) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.AdditionalProperties do - node.Add (key, System.Text.Json.Nodes.JsonValue.Create value) + for KeyValue(key, value) in input.AdditionalProperties do + node.Add(key, System.Text.Json.Nodes.JsonValue.Create value) node :> _ +// Source generated by Whippet. Changes will be overwritten on next build. namespace Gitea /// Module containing JSON parsing extension members for the APIError type @@ -14596,36 +13536,34 @@ module APIErrorJsonParseExtension = type APIError with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : APIError = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : APIError = let arg_2 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "message" || key = "url" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Message = arg_1 - Url = arg_2 - } + { AdditionalProperties = arg_0 + Message = arg_1 + Url = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the AccessToken type @@ -14635,43 +13573,43 @@ module AccessTokenJsonParseExtension = type AccessToken with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : AccessToken = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : AccessToken = let arg_5 = match node.["token_last_eight"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["sha1"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["scopes"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_2 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "id" || key = "name" @@ -14681,18 +13619,16 @@ module AccessTokenJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Id = arg_1 - Name = arg_2 - Scopes = arg_3 - Sha1 = arg_4 - TokenLastEight = arg_5 - } + { AdditionalProperties = arg_0 + Id = arg_1 + Name = arg_2 + Scopes = arg_3 + Sha1 = arg_4 + TokenLastEight = arg_5 } namespace Gitea /// Module containing JSON parsing extension members for the ActivityPub type @@ -14702,30 +13638,25 @@ module ActivityPubJsonParseExtension = type ActivityPub with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : ActivityPub = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : ActivityPub = let arg_1 = match node.["@context"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "@context" then - () - else - result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "@context" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Context = arg_1 - } + { AdditionalProperties = arg_0 + Context = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the AddCollaboratorOption type @@ -14735,30 +13666,28 @@ module AddCollaboratorOptionJsonParseExtension = type AddCollaboratorOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : AddCollaboratorOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : AddCollaboratorOption = let arg_1 = match node.["permission"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "permission" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Permission = arg_1 - } + { AdditionalProperties = arg_0 + Permission = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the AddTimeOption type @@ -14768,49 +13697,47 @@ module AddTimeOptionJsonParseExtension = type AddTimeOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : AddTimeOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : AddTimeOption = let arg_3 = match node.["user_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = (match node.["time"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("time") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_1 = match node.["created"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "created" || key = "time" || key = "user_name" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Created = arg_1 - Time = arg_2 - UserName = arg_3 - } + { AdditionalProperties = arg_0 + Created = arg_1 + Time = arg_2 + UserName = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the AnnotatedTagObject type @@ -14820,42 +13747,40 @@ module AnnotatedTagObjectJsonParseExtension = type AnnotatedTagObject with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : AnnotatedTagObject = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : AnnotatedTagObject = let arg_3 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["type"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "sha" || key = "type" || key = "url" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Sha = arg_1 - Type = arg_2 - Url = arg_3 - } + { AdditionalProperties = arg_0 + Sha = arg_1 + Type = arg_2 + Url = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the Attachment type @@ -14865,49 +13790,49 @@ module AttachmentJsonParseExtension = type Attachment with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Attachment = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Attachment = let arg_7 = match node.["uuid"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["size"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["download_count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["browser_download_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "browser_download_url" || key = "created_at" @@ -14919,20 +13844,18 @@ module AttachmentJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - BrowserDownloadUrl = arg_1 - CreatedAt = arg_2 - DownloadCount = arg_3 - Id = arg_4 - Name = arg_5 - Size = arg_6 - Uuid = arg_7 - } + { AdditionalProperties = arg_0 + BrowserDownloadUrl = arg_1 + CreatedAt = arg_2 + DownloadCount = arg_3 + Id = arg_4 + Name = arg_5 + Size = arg_6 + Uuid = arg_7 } namespace Gitea /// Module containing JSON parsing extension members for the BranchProtection type @@ -14942,47 +13865,47 @@ module BranchProtectionJsonParseExtension = type BranchProtection with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : BranchProtection = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : BranchProtection = let arg_25 = match node.["updated_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_24 = match node.["unprotected_file_patterns"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_23 = match node.["status_check_contexts"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_22 = match node.["rule_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_21 = match node.["required_approvals"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_20 = match node.["require_signed_commits"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_19 = match node.["push_whitelist_usernames"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -14990,27 +13913,27 @@ module BranchProtectionJsonParseExtension = match node.["push_whitelist_teams"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_17 = match node.["push_whitelist_deploy_keys"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_16 = match node.["protected_file_patterns"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_15 = match node.["merge_whitelist_usernames"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -15018,72 +13941,72 @@ module BranchProtectionJsonParseExtension = match node.["merge_whitelist_teams"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_13 = match node.["enable_status_check"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_12 = match node.["enable_push_whitelist"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_11 = match node.["enable_push"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["enable_merge_whitelist"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["enable_approvals_whitelist"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["dismiss_stale_approvals"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["branch_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["block_on_rejected_reviews"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["block_on_outdated_branch"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["block_on_official_review_requests"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["approvals_whitelist_username"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -15091,18 +14014,18 @@ module BranchProtectionJsonParseExtension = match node.["approvals_whitelist_teams"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "approvals_whitelist_teams" || key = "approvals_whitelist_username" @@ -15132,38 +14055,36 @@ module BranchProtectionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - ApprovalsWhitelistTeams = arg_1 - ApprovalsWhitelistUsername = arg_2 - BlockOnOfficialReviewRequests = arg_3 - BlockOnOutdatedBranch = arg_4 - BlockOnRejectedReviews = arg_5 - BranchName = arg_6 - CreatedAt = arg_7 - DismissStaleApprovals = arg_8 - EnableApprovalsWhitelist = arg_9 - EnableMergeWhitelist = arg_10 - EnablePush = arg_11 - EnablePushWhitelist = arg_12 - EnableStatusCheck = arg_13 - MergeWhitelistTeams = arg_14 - MergeWhitelistUsernames = arg_15 - ProtectedFilePatterns = arg_16 - PushWhitelistDeployKeys = arg_17 - PushWhitelistTeams = arg_18 - PushWhitelistUsernames = arg_19 - RequireSignedCommits = arg_20 - RequiredApprovals = arg_21 - RuleName = arg_22 - StatusCheckContexts = arg_23 - UnprotectedFilePatterns = arg_24 - UpdatedAt = arg_25 - } + { AdditionalProperties = arg_0 + ApprovalsWhitelistTeams = arg_1 + ApprovalsWhitelistUsername = arg_2 + BlockOnOfficialReviewRequests = arg_3 + BlockOnOutdatedBranch = arg_4 + BlockOnRejectedReviews = arg_5 + BranchName = arg_6 + CreatedAt = arg_7 + DismissStaleApprovals = arg_8 + EnableApprovalsWhitelist = arg_9 + EnableMergeWhitelist = arg_10 + EnablePush = arg_11 + EnablePushWhitelist = arg_12 + EnableStatusCheck = arg_13 + MergeWhitelistTeams = arg_14 + MergeWhitelistUsernames = arg_15 + ProtectedFilePatterns = arg_16 + PushWhitelistDeployKeys = arg_17 + PushWhitelistTeams = arg_18 + PushWhitelistUsernames = arg_19 + RequireSignedCommits = arg_20 + RequiredApprovals = arg_21 + RuleName = arg_22 + StatusCheckContexts = arg_23 + UnprotectedFilePatterns = arg_24 + UpdatedAt = arg_25 } namespace Gitea /// Module containing JSON parsing extension members for the ChangedFile type @@ -15173,59 +14094,59 @@ module ChangedFileJsonParseExtension = type ChangedFile with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : ChangedFile = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : ChangedFile = let arg_9 = match node.["status"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["raw_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["previous_filename"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["filename"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["deletions"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["contents_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["changes"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["additions"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "additions" || key = "changes" @@ -15239,22 +14160,20 @@ module ChangedFileJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Additions = arg_1 - Changes = arg_2 - ContentsUrl = arg_3 - Deletions = arg_4 - Filename = arg_5 - HtmlUrl = arg_6 - PreviousFilename = arg_7 - RawUrl = arg_8 - Status = arg_9 - } + { AdditionalProperties = arg_0 + Additions = arg_1 + Changes = arg_2 + ContentsUrl = arg_3 + Deletions = arg_4 + Filename = arg_5 + HtmlUrl = arg_6 + PreviousFilename = arg_7 + RawUrl = arg_8 + Status = arg_9 } namespace Gitea /// Module containing JSON parsing extension members for the CommitAffectedFiles type @@ -15264,30 +14183,25 @@ module CommitAffectedFilesJsonParseExtension = type CommitAffectedFiles with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CommitAffectedFiles = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CommitAffectedFiles = let arg_1 = match node.["filename"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "filename" then - () - else - result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "filename" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Filename = arg_1 - } + { AdditionalProperties = arg_0 + Filename = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the CommitDateOptions type @@ -15297,36 +14211,34 @@ module CommitDateOptionsJsonParseExtension = type CommitDateOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CommitDateOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CommitDateOptions = let arg_2 = match node.["committer"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["author"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "author" || key = "committer" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Author = arg_1 - Committer = arg_2 - } + { AdditionalProperties = arg_0 + Author = arg_1 + Committer = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the CommitMeta type @@ -15336,42 +14248,40 @@ module CommitMetaJsonParseExtension = type CommitMeta with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CommitMeta = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CommitMeta = let arg_3 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["created"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "created" || key = "sha" || key = "url" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Created = arg_1 - Sha = arg_2 - Url = arg_3 - } + { AdditionalProperties = arg_0 + Created = arg_1 + Sha = arg_2 + Url = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the CommitStats type @@ -15381,42 +14291,40 @@ module CommitStatsJsonParseExtension = type CommitStats with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CommitStats = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CommitStats = let arg_3 = match node.["total"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["deletions"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["additions"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "additions" || key = "deletions" || key = "total" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Additions = arg_1 - Deletions = arg_2 - Total = arg_3 - } + { AdditionalProperties = arg_0 + Additions = arg_1 + Deletions = arg_2 + Total = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the CommitUser type @@ -15426,42 +14334,40 @@ module CommitUserJsonParseExtension = type CommitUser with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CommitUser = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CommitUser = let arg_3 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["email"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["date"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "date" || key = "email" || key = "name" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Date = arg_1 - Email = arg_2 - Name = arg_3 - } + { AdditionalProperties = arg_0 + Date = arg_1 + Email = arg_2 + Name = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the CreateAccessTokenOption type @@ -15471,13 +14377,13 @@ module CreateAccessTokenOptionJsonParseExtension = type CreateAccessTokenOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateAccessTokenOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateAccessTokenOption = let arg_2 = match node.["scopes"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -15485,33 +14391,31 @@ module CreateAccessTokenOptionJsonParseExtension = (match node.["name"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("name") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "name" || key = "scopes" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Name = arg_1 - Scopes = arg_2 - } + { AdditionalProperties = arg_0 + Name = arg_1 + Scopes = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the CreateBranchProtectionOption type @@ -15521,42 +14425,42 @@ module CreateBranchProtectionOptionJsonParseExtension = type CreateBranchProtectionOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateBranchProtectionOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateBranchProtectionOption = let arg_23 = match node.["unprotected_file_patterns"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_22 = match node.["status_check_contexts"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_21 = match node.["rule_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_20 = match node.["required_approvals"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_19 = match node.["require_signed_commits"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_18 = match node.["push_whitelist_usernames"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -15564,27 +14468,27 @@ module CreateBranchProtectionOptionJsonParseExtension = match node.["push_whitelist_teams"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_16 = match node.["push_whitelist_deploy_keys"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_15 = match node.["protected_file_patterns"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_14 = match node.["merge_whitelist_usernames"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -15592,67 +14496,67 @@ module CreateBranchProtectionOptionJsonParseExtension = match node.["merge_whitelist_teams"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_12 = match node.["enable_status_check"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_11 = match node.["enable_push_whitelist"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["enable_push"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["enable_merge_whitelist"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["enable_approvals_whitelist"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["dismiss_stale_approvals"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["branch_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["block_on_rejected_reviews"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["block_on_outdated_branch"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["block_on_official_review_requests"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["approvals_whitelist_username"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -15660,18 +14564,18 @@ module CreateBranchProtectionOptionJsonParseExtension = match node.["approvals_whitelist_teams"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "approvals_whitelist_teams" || key = "approvals_whitelist_username" @@ -15699,36 +14603,34 @@ module CreateBranchProtectionOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - ApprovalsWhitelistTeams = arg_1 - ApprovalsWhitelistUsername = arg_2 - BlockOnOfficialReviewRequests = arg_3 - BlockOnOutdatedBranch = arg_4 - BlockOnRejectedReviews = arg_5 - BranchName = arg_6 - DismissStaleApprovals = arg_7 - EnableApprovalsWhitelist = arg_8 - EnableMergeWhitelist = arg_9 - EnablePush = arg_10 - EnablePushWhitelist = arg_11 - EnableStatusCheck = arg_12 - MergeWhitelistTeams = arg_13 - MergeWhitelistUsernames = arg_14 - ProtectedFilePatterns = arg_15 - PushWhitelistDeployKeys = arg_16 - PushWhitelistTeams = arg_17 - PushWhitelistUsernames = arg_18 - RequireSignedCommits = arg_19 - RequiredApprovals = arg_20 - RuleName = arg_21 - StatusCheckContexts = arg_22 - UnprotectedFilePatterns = arg_23 - } + { AdditionalProperties = arg_0 + ApprovalsWhitelistTeams = arg_1 + ApprovalsWhitelistUsername = arg_2 + BlockOnOfficialReviewRequests = arg_3 + BlockOnOutdatedBranch = arg_4 + BlockOnRejectedReviews = arg_5 + BranchName = arg_6 + DismissStaleApprovals = arg_7 + EnableApprovalsWhitelist = arg_8 + EnableMergeWhitelist = arg_9 + EnablePush = arg_10 + EnablePushWhitelist = arg_11 + EnableStatusCheck = arg_12 + MergeWhitelistTeams = arg_13 + MergeWhitelistUsernames = arg_14 + ProtectedFilePatterns = arg_15 + PushWhitelistDeployKeys = arg_16 + PushWhitelistTeams = arg_17 + PushWhitelistUsernames = arg_18 + RequireSignedCommits = arg_19 + RequiredApprovals = arg_20 + RuleName = arg_21 + StatusCheckContexts = arg_22 + UnprotectedFilePatterns = arg_23 } namespace Gitea /// Module containing JSON parsing extension members for the CreateBranchRepoOption type @@ -15738,43 +14640,41 @@ module CreateBranchRepoOptionJsonParseExtension = type CreateBranchRepoOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateBranchRepoOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateBranchRepoOption = let arg_2 = match node.["old_branch_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = (match node.["new_branch_name"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("new_branch_name") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "new_branch_name" || key = "old_branch_name" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - NewBranchName = arg_1 - OldBranchName = arg_2 - } + { AdditionalProperties = arg_0 + NewBranchName = arg_1 + OldBranchName = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the CreateEmailOption type @@ -15784,31 +14684,29 @@ module CreateEmailOptionJsonParseExtension = type CreateEmailOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateEmailOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateEmailOption = let arg_1 = match node.["emails"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "emails" then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "emails" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Emails = arg_1 - } + { AdditionalProperties = arg_0 + Emails = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the CreateForkOption type @@ -15818,36 +14716,34 @@ module CreateForkOptionJsonParseExtension = type CreateForkOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateForkOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateForkOption = let arg_2 = match node.["organization"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "name" || key = "organization" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Name = arg_1 - Organization = arg_2 - } + { AdditionalProperties = arg_0 + Name = arg_1 + Organization = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the CreateGPGKeyOption type @@ -15857,43 +14753,41 @@ module CreateGPGKeyOptionJsonParseExtension = type CreateGPGKeyOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateGPGKeyOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateGPGKeyOption = let arg_2 = match node.["armored_signature"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = (match node.["armored_public_key"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("armored_public_key") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "armored_public_key" || key = "armored_signature" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - ArmoredPublicKey = arg_1 - ArmoredSignature = arg_2 - } + { AdditionalProperties = arg_0 + ArmoredPublicKey = arg_1 + ArmoredSignature = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the CreateHookOptionConfig type @@ -15903,34 +14797,33 @@ module CreateHookOptionConfigJsonParseExtension = type CreateHookOptionConfig with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateHookOptionConfig = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateHookOptionConfig = let arg_0 = - let result = System.Collections.Generic.Dictionary () - let node = node.AsObject () + let result = System.Collections.Generic.Dictionary() + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if false then () else - result.Add ( - key, - (match node.[key] with - | null -> - raise ( - System.Collections.Generic.KeyNotFoundException ( - sprintf "Required key '%s' not found on JSON object" (key) + result + .Add( + key, + (match node.[key] with + | null -> + raise ( + System.Collections.Generic.KeyNotFoundException( + sprintf "Required key '%s' not found on JSON object" (key) + ) ) - ) - | v -> v) - .AsValue() - .GetValue () - ) + | v -> v) + .AsValue() + .GetValue() + ) result - { - AdditionalProperties = arg_0 - } + { AdditionalProperties = arg_0 } namespace Gitea /// Module containing JSON parsing extension members for the CreateIssueCommentOption type @@ -15940,34 +14833,32 @@ module CreateIssueCommentOptionJsonParseExtension = type CreateIssueCommentOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateIssueCommentOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateIssueCommentOption = let arg_1 = (match node.["body"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("body") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "body" then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "body" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Body = arg_1 - } + { AdditionalProperties = arg_0 + Body = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the CreateIssueOption type @@ -15977,74 +14868,74 @@ module CreateIssueOptionJsonParseExtension = type CreateIssueOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateIssueOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateIssueOption = let arg_9 = (match node.["title"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("title") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_8 = match node.["ref"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["milestone"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["labels"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_5 = match node.["due_date"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["closed"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["assignees"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_1 = match node.["assignee"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "assignee" || key = "assignees" @@ -16058,22 +14949,20 @@ module CreateIssueOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Assignee = arg_1 - Assignees = arg_2 - Body = arg_3 - Closed = arg_4 - DueDate = arg_5 - Labels = arg_6 - Milestone = arg_7 - Ref = arg_8 - Title = arg_9 - } + { AdditionalProperties = arg_0 + Assignee = arg_1 + Assignees = arg_2 + Body = arg_3 + Closed = arg_4 + DueDate = arg_5 + Labels = arg_6 + Milestone = arg_7 + Ref = arg_8 + Title = arg_9 } namespace Gitea /// Module containing JSON parsing extension members for the CreateKeyOption type @@ -16083,56 +14972,54 @@ module CreateKeyOptionJsonParseExtension = type CreateKeyOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateKeyOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateKeyOption = let arg_3 = (match node.["title"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("title") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_2 = match node.["read_only"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = (match node.["key"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("key") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "key" || key = "read_only" || key = "title" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Key = arg_1 - ReadOnly = arg_2 - Title = arg_3 - } + { AdditionalProperties = arg_0 + Key = arg_1 + ReadOnly = arg_2 + Title = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the CreateLabelOption type @@ -16142,62 +15029,60 @@ module CreateLabelOptionJsonParseExtension = type CreateLabelOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateLabelOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateLabelOption = let arg_4 = (match node.["name"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("name") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_3 = match node.["exclusive"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = (match node.["color"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("color") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "color" || key = "description" || key = "exclusive" || key = "name" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Color = arg_1 - Description = arg_2 - Exclusive = arg_3 - Name = arg_4 - } + { AdditionalProperties = arg_0 + Color = arg_1 + Description = arg_2 + Exclusive = arg_3 + Name = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the CreateMilestoneOption type @@ -16207,48 +15092,46 @@ module CreateMilestoneOptionJsonParseExtension = type CreateMilestoneOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateMilestoneOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateMilestoneOption = let arg_4 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["state"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["due_on"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "description" || key = "due_on" || key = "state" || key = "title" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Description = arg_1 - DueOn = arg_2 - State = arg_3 - Title = arg_4 - } + { AdditionalProperties = arg_0 + Description = arg_1 + DueOn = arg_2 + State = arg_3 + Title = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the CreateOAuth2ApplicationOptions type @@ -16258,46 +15141,44 @@ module CreateOAuth2ApplicationOptionsJsonParseExtension = type CreateOAuth2ApplicationOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateOAuth2ApplicationOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateOAuth2ApplicationOptions = let arg_3 = match node.["redirect_uris"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_2 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["confidential_client"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "confidential_client" || key = "name" || key = "redirect_uris" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - ConfidentialClient = arg_1 - Name = arg_2 - RedirectUris = arg_3 - } + { AdditionalProperties = arg_0 + ConfidentialClient = arg_1 + Name = arg_2 + RedirectUris = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the CreateOrgOption type @@ -16307,56 +15188,56 @@ module CreateOrgOptionJsonParseExtension = type CreateOrgOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateOrgOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateOrgOption = let arg_7 = match node.["website"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["visibility"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = (match node.["username"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("username") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_4 = match node.["repo_admin_change_team_access"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["location"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["full_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "description" || key = "full_name" @@ -16368,20 +15249,18 @@ module CreateOrgOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Description = arg_1 - FullName = arg_2 - Location = arg_3 - RepoAdminChangeTeamAccess = arg_4 - Username = arg_5 - Visibility = arg_6 - Website = arg_7 - } + { AdditionalProperties = arg_0 + Description = arg_1 + FullName = arg_2 + Location = arg_3 + RepoAdminChangeTeamAccess = arg_4 + Username = arg_5 + Visibility = arg_6 + Website = arg_7 } namespace Gitea /// Module containing JSON parsing extension members for the CreatePullRequestOption type @@ -16391,67 +15270,67 @@ module CreatePullRequestOptionJsonParseExtension = type CreatePullRequestOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreatePullRequestOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreatePullRequestOption = let arg_9 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["milestone"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["labels"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_6 = match node.["head"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["due_date"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["base"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["assignees"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_1 = match node.["assignee"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "assignee" || key = "assignees" @@ -16465,22 +15344,20 @@ module CreatePullRequestOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Assignee = arg_1 - Assignees = arg_2 - Base = arg_3 - Body = arg_4 - DueDate = arg_5 - Head = arg_6 - Labels = arg_7 - Milestone = arg_8 - Title = arg_9 - } + { AdditionalProperties = arg_0 + Assignee = arg_1 + Assignees = arg_2 + Base = arg_3 + Body = arg_4 + DueDate = arg_5 + Head = arg_6 + Labels = arg_7 + Milestone = arg_8 + Title = arg_9 } namespace Gitea /// Module containing JSON parsing extension members for the CreatePullReviewComment type @@ -16490,48 +15367,46 @@ module CreatePullReviewCommentJsonParseExtension = type CreatePullReviewComment with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreatePullReviewComment = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreatePullReviewComment = let arg_4 = match node.["path"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["old_position"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["new_position"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "body" || key = "new_position" || key = "old_position" || key = "path" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Body = arg_1 - NewPosition = arg_2 - OldPosition = arg_3 - Path = arg_4 - } + { AdditionalProperties = arg_0 + Body = arg_1 + NewPosition = arg_2 + OldPosition = arg_3 + Path = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the CreatePushMirrorOption type @@ -16541,39 +15416,39 @@ module CreatePushMirrorOptionJsonParseExtension = type CreatePushMirrorOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreatePushMirrorOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreatePushMirrorOption = let arg_5 = match node.["sync_on_commit"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["remote_username"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["remote_password"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["remote_address"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["interval"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "interval" || key = "remote_address" @@ -16583,18 +15458,16 @@ module CreatePushMirrorOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Interval = arg_1 - RemoteAddress = arg_2 - RemotePassword = arg_3 - RemoteUsername = arg_4 - SyncOnCommit = arg_5 - } + { AdditionalProperties = arg_0 + Interval = arg_1 + RemoteAddress = arg_2 + RemotePassword = arg_3 + RemoteUsername = arg_4 + SyncOnCommit = arg_5 } namespace Gitea /// Module containing JSON parsing extension members for the CreateReleaseOption type @@ -16604,51 +15477,51 @@ module CreateReleaseOptionJsonParseExtension = type CreateReleaseOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateReleaseOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateReleaseOption = let arg_6 = match node.["target_commitish"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = (match node.["tag_name"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("tag_name") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_4 = match node.["prerelease"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["draft"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "body" || key = "draft" @@ -16659,19 +15532,17 @@ module CreateReleaseOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Body = arg_1 - Draft = arg_2 - Name = arg_3 - Prerelease = arg_4 - TagName = arg_5 - TargetCommitish = arg_6 - } + { AdditionalProperties = arg_0 + Body = arg_1 + Draft = arg_2 + Name = arg_3 + Prerelease = arg_4 + TagName = arg_5 + TargetCommitish = arg_6 } namespace Gitea /// Module containing JSON parsing extension members for the CreateRepoOption type @@ -16681,76 +15552,76 @@ module CreateRepoOptionJsonParseExtension = type CreateRepoOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateRepoOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateRepoOption = let arg_11 = match node.["trust_model"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["template"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["readme"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["private"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = (match node.["name"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("name") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_6 = match node.["license"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["issue_labels"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["gitignores"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["default_branch"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["auto_init"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "auto_init" || key = "default_branch" @@ -16766,24 +15637,22 @@ module CreateRepoOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - AutoInit = arg_1 - DefaultBranch = arg_2 - Description = arg_3 - Gitignores = arg_4 - IssueLabels = arg_5 - License = arg_6 - Name = arg_7 - Private = arg_8 - Readme = arg_9 - Template = arg_10 - TrustModel = arg_11 - } + { AdditionalProperties = arg_0 + AutoInit = arg_1 + DefaultBranch = arg_2 + Description = arg_3 + Gitignores = arg_4 + IssueLabels = arg_5 + License = arg_6 + Name = arg_7 + Private = arg_8 + Readme = arg_9 + Template = arg_10 + TrustModel = arg_11 } namespace Gitea /// Module containing JSON parsing extension members for the CreateStatusOption type @@ -16793,48 +15662,46 @@ module CreateStatusOptionJsonParseExtension = type CreateStatusOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateStatusOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateStatusOption = let arg_4 = match node.["target_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["state"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["context"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "context" || key = "description" || key = "state" || key = "target_url" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Context = arg_1 - Description = arg_2 - State = arg_3 - TargetUrl = arg_4 - } + { AdditionalProperties = arg_0 + Context = arg_1 + Description = arg_2 + State = arg_3 + TargetUrl = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the CreateTagOption type @@ -16844,49 +15711,47 @@ module CreateTagOptionJsonParseExtension = type CreateTagOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateTagOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateTagOption = let arg_3 = match node.["target"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = (match node.["tag_name"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("tag_name") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_1 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "message" || key = "tag_name" || key = "target" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Message = arg_1 - TagName = arg_2 - Target = arg_3 - } + { AdditionalProperties = arg_0 + Message = arg_1 + TagName = arg_2 + Target = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the Type1 type @@ -16896,34 +15761,33 @@ module Type1JsonParseExtension = type Type1 with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Type1 = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Type1 = let arg_0 = - let result = System.Collections.Generic.Dictionary () - let node = node.AsObject () + let result = System.Collections.Generic.Dictionary() + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if false then () else - result.Add ( - key, - (match node.[key] with - | null -> - raise ( - System.Collections.Generic.KeyNotFoundException ( - sprintf "Required key '%s' not found on JSON object" (key) + result + .Add( + key, + (match node.[key] with + | null -> + raise ( + System.Collections.Generic.KeyNotFoundException( + sprintf "Required key '%s' not found on JSON object" (key) + ) ) - ) - | v -> v) - .AsValue() - .GetValue () - ) + | v -> v) + .AsValue() + .GetValue() + ) result - { - AdditionalProperties = arg_0 - } + { AdditionalProperties = arg_0 } namespace Gitea /// Module containing JSON parsing extension members for the CreateTeamOption type @@ -16933,7 +15797,7 @@ module CreateTeamOptionJsonParseExtension = type CreateTeamOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateTeamOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateTeamOption = let arg_7 = match node.["units_map"] with | null -> None @@ -16943,50 +15807,50 @@ module CreateTeamOptionJsonParseExtension = match node.["units"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_5 = match node.["permission"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = (match node.["name"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("name") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_3 = match node.["includes_all_repositories"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["can_create_org_repo"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "can_create_org_repo" || key = "description" @@ -16998,20 +15862,18 @@ module CreateTeamOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - CanCreateOrgRepo = arg_1 - Description = arg_2 - IncludesAllRepositories = arg_3 - Name = arg_4 - Permission = arg_5 - Units = arg_6 - UnitsMap = arg_7 - } + { AdditionalProperties = arg_0 + CanCreateOrgRepo = arg_1 + Description = arg_2 + IncludesAllRepositories = arg_3 + Name = arg_4 + Permission = arg_5 + Units = arg_6 + UnitsMap = arg_7 } namespace Gitea /// Module containing JSON parsing extension members for the CreateUserOption type @@ -17021,90 +15883,90 @@ module CreateUserOptionJsonParseExtension = type CreateUserOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateUserOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateUserOption = let arg_11 = match node.["visibility"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = (match node.["username"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("username") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_9 = match node.["source_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["send_notify"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["restricted"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = (match node.["password"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("password") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_5 = match node.["must_change_password"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["login_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["full_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = (match node.["email"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("email") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_1 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "created_at" || key = "email" @@ -17120,24 +15982,22 @@ module CreateUserOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - CreatedAt = arg_1 - Email = arg_2 - FullName = arg_3 - LoginName = arg_4 - MustChangePassword = arg_5 - Password = arg_6 - Restricted = arg_7 - SendNotify = arg_8 - SourceId = arg_9 - Username = arg_10 - Visibility = arg_11 - } + { AdditionalProperties = arg_0 + CreatedAt = arg_1 + Email = arg_2 + FullName = arg_3 + LoginName = arg_4 + MustChangePassword = arg_5 + Password = arg_6 + Restricted = arg_7 + SendNotify = arg_8 + SourceId = arg_9 + Username = arg_10 + Visibility = arg_11 } namespace Gitea /// Module containing JSON parsing extension members for the CreateWikiPageOptions type @@ -17147,42 +16007,40 @@ module CreateWikiPageOptionsJsonParseExtension = type CreateWikiPageOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateWikiPageOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateWikiPageOptions = let arg_3 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["content_base64"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "content_base64" || key = "message" || key = "title" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - ContentBase64 = arg_1 - Message = arg_2 - Title = arg_3 - } + { AdditionalProperties = arg_0 + ContentBase64 = arg_1 + Message = arg_2 + Title = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the Cron type @@ -17192,39 +16050,39 @@ module CronJsonParseExtension = type Cron with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Cron = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Cron = let arg_5 = match node.["schedule"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["prev"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["next"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["exec_times"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "exec_times" || key = "name" @@ -17234,18 +16092,16 @@ module CronJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - ExecTimes = arg_1 - Name = arg_2 - Next = arg_3 - Prev = arg_4 - Schedule = arg_5 - } + { AdditionalProperties = arg_0 + ExecTimes = arg_1 + Name = arg_2 + Next = arg_3 + Prev = arg_4 + Schedule = arg_5 } namespace Gitea /// Module containing JSON parsing extension members for the DeleteEmailOption type @@ -17255,31 +16111,29 @@ module DeleteEmailOptionJsonParseExtension = type DeleteEmailOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : DeleteEmailOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : DeleteEmailOption = let arg_1 = match node.["emails"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "emails" then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "emails" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Emails = arg_1 - } + { AdditionalProperties = arg_0 + Emails = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the DismissPullReviewOptions type @@ -17289,36 +16143,34 @@ module DismissPullReviewOptionsJsonParseExtension = type DismissPullReviewOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : DismissPullReviewOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : DismissPullReviewOptions = let arg_2 = match node.["priors"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "message" || key = "priors" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Message = arg_1 - Priors = arg_2 - } + { AdditionalProperties = arg_0 + Message = arg_1 + Priors = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the EditAttachmentOptions type @@ -17328,27 +16180,25 @@ module EditAttachmentOptionsJsonParseExtension = type EditAttachmentOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditAttachmentOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditAttachmentOptions = let arg_1 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "name" then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "name" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Name = arg_1 - } + { AdditionalProperties = arg_0 + Name = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the EditBranchProtectionOption type @@ -17358,37 +16208,37 @@ module EditBranchProtectionOptionJsonParseExtension = type EditBranchProtectionOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditBranchProtectionOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditBranchProtectionOption = let arg_21 = match node.["unprotected_file_patterns"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_20 = match node.["status_check_contexts"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_19 = match node.["required_approvals"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_18 = match node.["require_signed_commits"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_17 = match node.["push_whitelist_usernames"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -17396,27 +16246,27 @@ module EditBranchProtectionOptionJsonParseExtension = match node.["push_whitelist_teams"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_15 = match node.["push_whitelist_deploy_keys"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_14 = match node.["protected_file_patterns"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_13 = match node.["merge_whitelist_usernames"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -17424,62 +16274,62 @@ module EditBranchProtectionOptionJsonParseExtension = match node.["merge_whitelist_teams"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_11 = match node.["enable_status_check"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["enable_push_whitelist"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["enable_push"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["enable_merge_whitelist"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["enable_approvals_whitelist"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["dismiss_stale_approvals"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["block_on_rejected_reviews"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["block_on_outdated_branch"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["block_on_official_review_requests"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["approvals_whitelist_username"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -17487,18 +16337,18 @@ module EditBranchProtectionOptionJsonParseExtension = match node.["approvals_whitelist_teams"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "approvals_whitelist_teams" || key = "approvals_whitelist_username" @@ -17524,34 +16374,32 @@ module EditBranchProtectionOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - ApprovalsWhitelistTeams = arg_1 - ApprovalsWhitelistUsername = arg_2 - BlockOnOfficialReviewRequests = arg_3 - BlockOnOutdatedBranch = arg_4 - BlockOnRejectedReviews = arg_5 - DismissStaleApprovals = arg_6 - EnableApprovalsWhitelist = arg_7 - EnableMergeWhitelist = arg_8 - EnablePush = arg_9 - EnablePushWhitelist = arg_10 - EnableStatusCheck = arg_11 - MergeWhitelistTeams = arg_12 - MergeWhitelistUsernames = arg_13 - ProtectedFilePatterns = arg_14 - PushWhitelistDeployKeys = arg_15 - PushWhitelistTeams = arg_16 - PushWhitelistUsernames = arg_17 - RequireSignedCommits = arg_18 - RequiredApprovals = arg_19 - StatusCheckContexts = arg_20 - UnprotectedFilePatterns = arg_21 - } + { AdditionalProperties = arg_0 + ApprovalsWhitelistTeams = arg_1 + ApprovalsWhitelistUsername = arg_2 + BlockOnOfficialReviewRequests = arg_3 + BlockOnOutdatedBranch = arg_4 + BlockOnRejectedReviews = arg_5 + DismissStaleApprovals = arg_6 + EnableApprovalsWhitelist = arg_7 + EnableMergeWhitelist = arg_8 + EnablePush = arg_9 + EnablePushWhitelist = arg_10 + EnableStatusCheck = arg_11 + MergeWhitelistTeams = arg_12 + MergeWhitelistUsernames = arg_13 + ProtectedFilePatterns = arg_14 + PushWhitelistDeployKeys = arg_15 + PushWhitelistTeams = arg_16 + PushWhitelistUsernames = arg_17 + RequireSignedCommits = arg_18 + RequiredApprovals = arg_19 + StatusCheckContexts = arg_20 + UnprotectedFilePatterns = arg_21 } namespace Gitea /// Module containing JSON parsing extension members for the EditDeadlineOption type @@ -17561,37 +16409,32 @@ module EditDeadlineOptionJsonParseExtension = type EditDeadlineOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditDeadlineOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditDeadlineOption = let arg_1 = (match node.["due_date"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("due_date") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "due_date" then - () - else - result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "due_date" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - DueDate = arg_1 - } + { AdditionalProperties = arg_0 + DueDate = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the EditGitHookOption type @@ -17601,27 +16444,25 @@ module EditGitHookOptionJsonParseExtension = type EditGitHookOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditGitHookOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditGitHookOption = let arg_1 = match node.["content"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "content" then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "content" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Content = arg_1 - } + { AdditionalProperties = arg_0 + Content = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the Type2 type @@ -17631,34 +16472,33 @@ module Type2JsonParseExtension = type Type2 with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Type2 = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Type2 = let arg_0 = - let result = System.Collections.Generic.Dictionary () - let node = node.AsObject () + let result = System.Collections.Generic.Dictionary() + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if false then () else - result.Add ( - key, - (match node.[key] with - | null -> - raise ( - System.Collections.Generic.KeyNotFoundException ( - sprintf "Required key '%s' not found on JSON object" (key) + result + .Add( + key, + (match node.[key] with + | null -> + raise ( + System.Collections.Generic.KeyNotFoundException( + sprintf "Required key '%s' not found on JSON object" (key) + ) ) - ) - | v -> v) - .AsValue() - .GetValue () - ) + | v -> v) + .AsValue() + .GetValue() + ) result - { - AdditionalProperties = arg_0 - } + { AdditionalProperties = arg_0 } namespace Gitea /// Module containing JSON parsing extension members for the EditHookOption type @@ -17668,13 +16508,13 @@ module EditHookOptionJsonParseExtension = type EditHookOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditHookOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditHookOption = let arg_5 = match node.["events"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -17686,25 +16526,25 @@ module EditHookOptionJsonParseExtension = let arg_3 = match node.["branch_filter"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["authorization_header"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["active"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "active" || key = "authorization_header" @@ -17714,18 +16554,16 @@ module EditHookOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Active = arg_1 - AuthorizationHeader = arg_2 - BranchFilter = arg_3 - Config = arg_4 - Events = arg_5 - } + { AdditionalProperties = arg_0 + Active = arg_1 + AuthorizationHeader = arg_2 + BranchFilter = arg_3 + Config = arg_4 + Events = arg_5 } namespace Gitea /// Module containing JSON parsing extension members for the EditIssueCommentOption type @@ -17735,34 +16573,32 @@ module EditIssueCommentOptionJsonParseExtension = type EditIssueCommentOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditIssueCommentOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditIssueCommentOption = let arg_1 = (match node.["body"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("body") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "body" then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "body" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Body = arg_1 - } + { AdditionalProperties = arg_0 + Body = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the EditIssueOption type @@ -17772,63 +16608,63 @@ module EditIssueOptionJsonParseExtension = type EditIssueOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditIssueOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditIssueOption = let arg_9 = match node.["unset_due_date"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["state"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["ref"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["milestone"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["due_date"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["assignees"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_1 = match node.["assignee"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "assignee" || key = "assignees" @@ -17842,22 +16678,20 @@ module EditIssueOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Assignee = arg_1 - Assignees = arg_2 - Body = arg_3 - DueDate = arg_4 - Milestone = arg_5 - Ref = arg_6 - State = arg_7 - Title = arg_8 - UnsetDueDate = arg_9 - } + { AdditionalProperties = arg_0 + Assignee = arg_1 + Assignees = arg_2 + Body = arg_3 + DueDate = arg_4 + Milestone = arg_5 + Ref = arg_6 + State = arg_7 + Title = arg_8 + UnsetDueDate = arg_9 } namespace Gitea /// Module containing JSON parsing extension members for the EditLabelOption type @@ -17867,48 +16701,46 @@ module EditLabelOptionJsonParseExtension = type EditLabelOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditLabelOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditLabelOption = let arg_4 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["exclusive"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["color"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "color" || key = "description" || key = "exclusive" || key = "name" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Color = arg_1 - Description = arg_2 - Exclusive = arg_3 - Name = arg_4 - } + { AdditionalProperties = arg_0 + Color = arg_1 + Description = arg_2 + Exclusive = arg_3 + Name = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the EditMilestoneOption type @@ -17918,48 +16750,46 @@ module EditMilestoneOptionJsonParseExtension = type EditMilestoneOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditMilestoneOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditMilestoneOption = let arg_4 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["state"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["due_on"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "description" || key = "due_on" || key = "state" || key = "title" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Description = arg_1 - DueOn = arg_2 - State = arg_3 - Title = arg_4 - } + { AdditionalProperties = arg_0 + Description = arg_1 + DueOn = arg_2 + State = arg_3 + Title = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the EditOrgOption type @@ -17969,44 +16799,44 @@ module EditOrgOptionJsonParseExtension = type EditOrgOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditOrgOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditOrgOption = let arg_6 = match node.["website"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["visibility"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["repo_admin_change_team_access"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["location"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["full_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "description" || key = "full_name" @@ -18017,19 +16847,17 @@ module EditOrgOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Description = arg_1 - FullName = arg_2 - Location = arg_3 - RepoAdminChangeTeamAccess = arg_4 - Visibility = arg_5 - Website = arg_6 - } + { AdditionalProperties = arg_0 + Description = arg_1 + FullName = arg_2 + Location = arg_3 + RepoAdminChangeTeamAccess = arg_4 + Visibility = arg_5 + Website = arg_6 } namespace Gitea /// Module containing JSON parsing extension members for the EditPullRequestOption type @@ -18039,77 +16867,77 @@ module EditPullRequestOptionJsonParseExtension = type EditPullRequestOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditPullRequestOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditPullRequestOption = let arg_11 = match node.["unset_due_date"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["state"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["milestone"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["labels"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_6 = match node.["due_date"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["base"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["assignees"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_2 = match node.["assignee"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["allow_maintainer_edit"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "allow_maintainer_edit" || key = "assignee" @@ -18125,24 +16953,22 @@ module EditPullRequestOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - AllowMaintainerEdit = arg_1 - Assignee = arg_2 - Assignees = arg_3 - Base = arg_4 - Body = arg_5 - DueDate = arg_6 - Labels = arg_7 - Milestone = arg_8 - State = arg_9 - Title = arg_10 - UnsetDueDate = arg_11 - } + { AdditionalProperties = arg_0 + AllowMaintainerEdit = arg_1 + Assignee = arg_2 + Assignees = arg_3 + Base = arg_4 + Body = arg_5 + DueDate = arg_6 + Labels = arg_7 + Milestone = arg_8 + State = arg_9 + Title = arg_10 + UnsetDueDate = arg_11 } namespace Gitea /// Module containing JSON parsing extension members for the EditReactionOption type @@ -18152,27 +16978,25 @@ module EditReactionOptionJsonParseExtension = type EditReactionOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditReactionOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditReactionOption = let arg_1 = match node.["content"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "content" then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "content" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Content = arg_1 - } + { AdditionalProperties = arg_0 + Content = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the EditReleaseOption type @@ -18182,44 +17006,44 @@ module EditReleaseOptionJsonParseExtension = type EditReleaseOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditReleaseOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditReleaseOption = let arg_6 = match node.["target_commitish"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["tag_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["prerelease"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["draft"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "body" || key = "draft" @@ -18230,19 +17054,17 @@ module EditReleaseOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Body = arg_1 - Draft = arg_2 - Name = arg_3 - Prerelease = arg_4 - TagName = arg_5 - TargetCommitish = arg_6 - } + { AdditionalProperties = arg_0 + Body = arg_1 + Draft = arg_2 + Name = arg_3 + Prerelease = arg_4 + TagName = arg_5 + TargetCommitish = arg_6 } namespace Gitea /// Module containing JSON parsing extension members for the Type3 type @@ -18252,34 +17074,33 @@ module Type3JsonParseExtension = type Type3 with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Type3 = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Type3 = let arg_0 = - let result = System.Collections.Generic.Dictionary () - let node = node.AsObject () + let result = System.Collections.Generic.Dictionary() + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if false then () else - result.Add ( - key, - (match node.[key] with - | null -> - raise ( - System.Collections.Generic.KeyNotFoundException ( - sprintf "Required key '%s' not found on JSON object" (key) + result + .Add( + key, + (match node.[key] with + | null -> + raise ( + System.Collections.Generic.KeyNotFoundException( + sprintf "Required key '%s' not found on JSON object" (key) + ) ) - ) - | v -> v) - .AsValue() - .GetValue () - ) + | v -> v) + .AsValue() + .GetValue() + ) result - { - AdditionalProperties = arg_0 - } + { AdditionalProperties = arg_0 } namespace Gitea /// Module containing JSON parsing extension members for the EditTeamOption type @@ -18289,7 +17110,7 @@ module EditTeamOptionJsonParseExtension = type EditTeamOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditTeamOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditTeamOption = let arg_7 = match node.["units_map"] with | null -> None @@ -18299,50 +17120,50 @@ module EditTeamOptionJsonParseExtension = match node.["units"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_5 = match node.["permission"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = (match node.["name"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("name") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_3 = match node.["includes_all_repositories"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["can_create_org_repo"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "can_create_org_repo" || key = "description" @@ -18354,20 +17175,18 @@ module EditTeamOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - CanCreateOrgRepo = arg_1 - Description = arg_2 - IncludesAllRepositories = arg_3 - Name = arg_4 - Permission = arg_5 - Units = arg_6 - UnitsMap = arg_7 - } + { AdditionalProperties = arg_0 + CanCreateOrgRepo = arg_1 + Description = arg_2 + IncludesAllRepositories = arg_3 + Name = arg_4 + Permission = arg_5 + Units = arg_6 + UnitsMap = arg_7 } namespace Gitea /// Module containing JSON parsing extension members for the EditUserOption type @@ -18377,118 +17196,118 @@ module EditUserOptionJsonParseExtension = type EditUserOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditUserOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditUserOption = let arg_18 = match node.["website"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_17 = match node.["visibility"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_16 = (match node.["source_id"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("source_id") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_15 = match node.["restricted"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_14 = match node.["prohibit_login"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_13 = match node.["password"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_12 = match node.["must_change_password"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_11 = match node.["max_repo_creation"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = (match node.["login_name"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("login_name") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_9 = match node.["location"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["full_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["email"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["allow_import_local"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["allow_git_hook"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["allow_create_organization"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["admin"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["active"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "active" || key = "admin" @@ -18511,31 +17330,29 @@ module EditUserOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Active = arg_1 - Admin = arg_2 - AllowCreateOrganization = arg_3 - AllowGitHook = arg_4 - AllowImportLocal = arg_5 - Description = arg_6 - Email = arg_7 - FullName = arg_8 - Location = arg_9 - LoginName = arg_10 - MaxRepoCreation = arg_11 - MustChangePassword = arg_12 - Password = arg_13 - ProhibitLogin = arg_14 - Restricted = arg_15 - SourceId = arg_16 - Visibility = arg_17 - Website = arg_18 - } + { AdditionalProperties = arg_0 + Active = arg_1 + Admin = arg_2 + AllowCreateOrganization = arg_3 + AllowGitHook = arg_4 + AllowImportLocal = arg_5 + Description = arg_6 + Email = arg_7 + FullName = arg_8 + Location = arg_9 + LoginName = arg_10 + MaxRepoCreation = arg_11 + MustChangePassword = arg_12 + Password = arg_13 + ProhibitLogin = arg_14 + Restricted = arg_15 + SourceId = arg_16 + Visibility = arg_17 + Website = arg_18 } namespace Gitea /// Module containing JSON parsing extension members for the Email type @@ -18545,42 +17362,40 @@ module EmailJsonParseExtension = type Email with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Email = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Email = let arg_3 = match node.["verified"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["primary"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["email"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "email" || key = "primary" || key = "verified" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Email = arg_1 - Primary = arg_2 - Verified = arg_3 - } + { AdditionalProperties = arg_0 + Email = arg_1 + Primary = arg_2 + Verified = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the ExternalTracker type @@ -18590,34 +17405,34 @@ module ExternalTrackerJsonParseExtension = type ExternalTracker with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : ExternalTracker = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : ExternalTracker = let arg_4 = match node.["external_tracker_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["external_tracker_style"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["external_tracker_regexp_pattern"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["external_tracker_format"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "external_tracker_format" || key = "external_tracker_regexp_pattern" @@ -18626,17 +17441,15 @@ module ExternalTrackerJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - ExternalTrackerFormat = arg_1 - ExternalTrackerRegexpPattern = arg_2 - ExternalTrackerStyle = arg_3 - ExternalTrackerUrl = arg_4 - } + { AdditionalProperties = arg_0 + ExternalTrackerFormat = arg_1 + ExternalTrackerRegexpPattern = arg_2 + ExternalTrackerStyle = arg_3 + ExternalTrackerUrl = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the ExternalWiki type @@ -18646,30 +17459,28 @@ module ExternalWikiJsonParseExtension = type ExternalWiki with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : ExternalWiki = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : ExternalWiki = let arg_1 = match node.["external_wiki_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "external_wiki_url" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - ExternalWikiUrl = arg_1 - } + { AdditionalProperties = arg_0 + ExternalWikiUrl = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the FileCommitResponse type @@ -18679,11 +17490,11 @@ module FileCommitResponseJsonParseExtension = type FileCommitResponse with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : FileCommitResponse = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : FileCommitResponse = let arg_9 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["tree"] with @@ -18693,13 +17504,13 @@ module FileCommitResponseJsonParseExtension = let arg_7 = match node.["sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["parents"] with | null -> None | v -> - v.AsArray () + v.AsArray() |> Seq.map (fun elt -> CommitMeta.jsonParse elt) |> List.ofSeq |> Some @@ -18707,17 +17518,17 @@ module FileCommitResponseJsonParseExtension = let arg_5 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["created"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["committer"] with @@ -18731,11 +17542,11 @@ module FileCommitResponseJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "author" || key = "committer" @@ -18749,22 +17560,20 @@ module FileCommitResponseJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Author = arg_1 - Committer = arg_2 - Created = arg_3 - HtmlUrl = arg_4 - Message = arg_5 - Parents = arg_6 - Sha = arg_7 - Tree = arg_8 - Url = arg_9 - } + { AdditionalProperties = arg_0 + Author = arg_1 + Committer = arg_2 + Created = arg_3 + HtmlUrl = arg_4 + Message = arg_5 + Parents = arg_6 + Sha = arg_7 + Tree = arg_8 + Url = arg_9 } namespace Gitea /// Module containing JSON parsing extension members for the FileLinksResponse type @@ -18774,42 +17583,40 @@ module FileLinksResponseJsonParseExtension = type FileLinksResponse with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : FileLinksResponse = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : FileLinksResponse = let arg_3 = match node.["self"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["html"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["git"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "git" || key = "html" || key = "self" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Git = arg_1 - Html = arg_2 - Self = arg_3 - } + { AdditionalProperties = arg_0 + Git = arg_1 + Html = arg_2 + Self = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the GPGKeyEmail type @@ -18819,36 +17626,34 @@ module GPGKeyEmailJsonParseExtension = type GPGKeyEmail with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : GPGKeyEmail = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : GPGKeyEmail = let arg_2 = match node.["verified"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["email"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "email" || key = "verified" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Email = arg_1 - Verified = arg_2 - } + { AdditionalProperties = arg_0 + Email = arg_1 + Verified = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the GeneralAPISettings type @@ -18858,34 +17663,34 @@ module GeneralAPISettingsJsonParseExtension = type GeneralAPISettings with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : GeneralAPISettings = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : GeneralAPISettings = let arg_4 = match node.["max_response_items"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["default_paging_num"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["default_max_blob_size"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["default_git_trees_per_page"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "default_git_trees_per_page" || key = "default_max_blob_size" @@ -18894,17 +17699,15 @@ module GeneralAPISettingsJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - DefaultGitTreesPerPage = arg_1 - DefaultMaxBlobSize = arg_2 - DefaultPagingNum = arg_3 - MaxResponseItems = arg_4 - } + { AdditionalProperties = arg_0 + DefaultGitTreesPerPage = arg_1 + DefaultMaxBlobSize = arg_2 + DefaultPagingNum = arg_3 + MaxResponseItems = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the GeneralAttachmentSettings type @@ -18914,34 +17717,34 @@ module GeneralAttachmentSettingsJsonParseExtension = type GeneralAttachmentSettings with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : GeneralAttachmentSettings = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : GeneralAttachmentSettings = let arg_4 = match node.["max_size"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["max_files"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["enabled"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["allowed_types"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "allowed_types" || key = "enabled" @@ -18950,17 +17753,15 @@ module GeneralAttachmentSettingsJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - AllowedTypes = arg_1 - Enabled = arg_2 - MaxFiles = arg_3 - MaxSize = arg_4 - } + { AdditionalProperties = arg_0 + AllowedTypes = arg_1 + Enabled = arg_2 + MaxFiles = arg_3 + MaxSize = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the GeneralRepoSettings type @@ -18970,44 +17771,44 @@ module GeneralRepoSettingsJsonParseExtension = type GeneralRepoSettings with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : GeneralRepoSettings = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : GeneralRepoSettings = let arg_6 = match node.["time_tracking_disabled"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["stars_disabled"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["mirrors_disabled"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["migrations_disabled"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["lfs_disabled"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["http_git_disabled"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "http_git_disabled" || key = "lfs_disabled" @@ -19018,19 +17819,17 @@ module GeneralRepoSettingsJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - HttpGitDisabled = arg_1 - LfsDisabled = arg_2 - MigrationsDisabled = arg_3 - MirrorsDisabled = arg_4 - StarsDisabled = arg_5 - TimeTrackingDisabled = arg_6 - } + { AdditionalProperties = arg_0 + HttpGitDisabled = arg_1 + LfsDisabled = arg_2 + MigrationsDisabled = arg_3 + MirrorsDisabled = arg_4 + StarsDisabled = arg_5 + TimeTrackingDisabled = arg_6 } namespace Gitea /// Module containing JSON parsing extension members for the GeneralUISettings type @@ -19040,18 +17839,18 @@ module GeneralUISettingsJsonParseExtension = type GeneralUISettings with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : GeneralUISettings = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : GeneralUISettings = let arg_3 = match node.["default_theme"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["custom_emojis"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -19059,31 +17858,29 @@ module GeneralUISettingsJsonParseExtension = match node.["allowed_reactions"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "allowed_reactions" || key = "custom_emojis" || key = "default_theme" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - AllowedReactions = arg_1 - CustomEmojis = arg_2 - DefaultTheme = arg_3 - } + { AdditionalProperties = arg_0 + AllowedReactions = arg_1 + CustomEmojis = arg_2 + DefaultTheme = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the GenerateRepoOption type @@ -19093,83 +17890,83 @@ module GenerateRepoOptionJsonParseExtension = type GenerateRepoOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : GenerateRepoOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : GenerateRepoOption = let arg_11 = match node.["webhooks"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["topics"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["private"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = (match node.["owner"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("owner") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_7 = (match node.["name"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("name") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_6 = match node.["labels"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["git_hooks"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["git_content"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["default_branch"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["avatar"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "avatar" || key = "default_branch" @@ -19185,24 +17982,22 @@ module GenerateRepoOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Avatar = arg_1 - DefaultBranch = arg_2 - Description = arg_3 - GitContent = arg_4 - GitHooks = arg_5 - Labels = arg_6 - Name = arg_7 - Owner = arg_8 - Private = arg_9 - Topics = arg_10 - Webhooks = arg_11 - } + { AdditionalProperties = arg_0 + Avatar = arg_1 + DefaultBranch = arg_2 + Description = arg_3 + GitContent = arg_4 + GitHooks = arg_5 + Labels = arg_6 + Name = arg_7 + Owner = arg_8 + Private = arg_9 + Topics = arg_10 + Webhooks = arg_11 } namespace Gitea /// Module containing JSON parsing extension members for the GitBlobResponse type @@ -19212,39 +18007,39 @@ module GitBlobResponseJsonParseExtension = type GitBlobResponse with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : GitBlobResponse = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : GitBlobResponse = let arg_5 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["size"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["encoding"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["content"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "content" || key = "encoding" @@ -19254,18 +18049,16 @@ module GitBlobResponseJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Content = arg_1 - Encoding = arg_2 - Sha = arg_3 - Size = arg_4 - Url = arg_5 - } + { AdditionalProperties = arg_0 + Content = arg_1 + Encoding = arg_2 + Sha = arg_3 + Size = arg_4 + Url = arg_5 } namespace Gitea /// Module containing JSON parsing extension members for the GitEntry type @@ -19275,44 +18068,44 @@ module GitEntryJsonParseExtension = type GitEntry with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : GitEntry = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : GitEntry = let arg_6 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["type"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["size"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["path"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["mode"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "mode" || key = "path" @@ -19323,19 +18116,17 @@ module GitEntryJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Mode = arg_1 - Path = arg_2 - Sha = arg_3 - Size = arg_4 - Type = arg_5 - Url = arg_6 - } + { AdditionalProperties = arg_0 + Mode = arg_1 + Path = arg_2 + Sha = arg_3 + Size = arg_4 + Type = arg_5 + Url = arg_6 } namespace Gitea /// Module containing JSON parsing extension members for the GitHook type @@ -19345,42 +18136,40 @@ module GitHookJsonParseExtension = type GitHook with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : GitHook = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : GitHook = let arg_3 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["is_active"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["content"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "content" || key = "is_active" || key = "name" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Content = arg_1 - IsActive = arg_2 - Name = arg_3 - } + { AdditionalProperties = arg_0 + Content = arg_1 + IsActive = arg_2 + Name = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the GitObject type @@ -19390,42 +18179,40 @@ module GitObjectJsonParseExtension = type GitObject with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : GitObject = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : GitObject = let arg_3 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["type"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "sha" || key = "type" || key = "url" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Sha = arg_1 - Type = arg_2 - Url = arg_3 - } + { AdditionalProperties = arg_0 + Sha = arg_1 + Type = arg_2 + Url = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the GitTreeResponse type @@ -19435,48 +18222,44 @@ module GitTreeResponseJsonParseExtension = type GitTreeResponse with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : GitTreeResponse = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : GitTreeResponse = let arg_6 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["truncated"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["tree"] with | null -> None - | v -> - v.AsArray () - |> Seq.map (fun elt -> GitEntry.jsonParse elt) - |> List.ofSeq - |> Some + | v -> v.AsArray() |> Seq.map (fun elt -> GitEntry.jsonParse elt) |> List.ofSeq |> Some let arg_3 = match node.["total_count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["page"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "page" || key = "sha" @@ -19487,19 +18270,17 @@ module GitTreeResponseJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Page = arg_1 - Sha = arg_2 - TotalCount = arg_3 - Tree = arg_4 - Truncated = arg_5 - Url = arg_6 - } + { AdditionalProperties = arg_0 + Page = arg_1 + Sha = arg_2 + TotalCount = arg_3 + Tree = arg_4 + Truncated = arg_5 + Url = arg_6 } namespace Gitea /// Module containing JSON parsing extension members for the Type4 type @@ -19509,34 +18290,33 @@ module Type4JsonParseExtension = type Type4 with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Type4 = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Type4 = let arg_0 = - let result = System.Collections.Generic.Dictionary () - let node = node.AsObject () + let result = System.Collections.Generic.Dictionary() + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if false then () else - result.Add ( - key, - (match node.[key] with - | null -> - raise ( - System.Collections.Generic.KeyNotFoundException ( - sprintf "Required key '%s' not found on JSON object" (key) + result + .Add( + key, + (match node.[key] with + | null -> + raise ( + System.Collections.Generic.KeyNotFoundException( + sprintf "Required key '%s' not found on JSON object" (key) + ) ) - ) - | v -> v) - .AsValue() - .GetValue () - ) + | v -> v) + .AsValue() + .GetValue() + ) result - { - AdditionalProperties = arg_0 - } + { AdditionalProperties = arg_0 } namespace Gitea /// Module containing JSON parsing extension members for the Hook type @@ -19546,35 +18326,35 @@ module HookJsonParseExtension = type Hook with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Hook = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Hook = let arg_8 = match node.["updated_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["type"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["events"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_4 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["config"] with @@ -19584,20 +18364,20 @@ module HookJsonParseExtension = let arg_2 = match node.["authorization_header"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["active"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "active" || key = "authorization_header" @@ -19610,21 +18390,19 @@ module HookJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Active = arg_1 - AuthorizationHeader = arg_2 - Config = arg_3 - CreatedAt = arg_4 - Events = arg_5 - Id = arg_6 - Type = arg_7 - UpdatedAt = arg_8 - } + { AdditionalProperties = arg_0 + Active = arg_1 + AuthorizationHeader = arg_2 + Config = arg_3 + CreatedAt = arg_4 + Events = arg_5 + Id = arg_6 + Type = arg_7 + UpdatedAt = arg_8 } namespace Gitea /// Module containing JSON parsing extension members for the Identity type @@ -19634,36 +18412,34 @@ module IdentityJsonParseExtension = type Identity with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Identity = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Identity = let arg_2 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["email"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "email" || key = "name" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Email = arg_1 - Name = arg_2 - } + { AdditionalProperties = arg_0 + Email = arg_1 + Name = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the InternalTracker type @@ -19673,29 +18449,29 @@ module InternalTrackerJsonParseExtension = type InternalTracker with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : InternalTracker = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : InternalTracker = let arg_3 = match node.["enable_time_tracker"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["enable_issue_dependencies"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["allow_only_contributors_to_track_time"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "allow_only_contributors_to_track_time" || key = "enable_issue_dependencies" @@ -19703,16 +18479,14 @@ module InternalTrackerJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - AllowOnlyContributorsToTrackTime = arg_1 - EnableIssueDependencies = arg_2 - EnableTimeTracker = arg_3 - } + { AdditionalProperties = arg_0 + AllowOnlyContributorsToTrackTime = arg_1 + EnableIssueDependencies = arg_2 + EnableTimeTracker = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the IssueDeadline type @@ -19722,30 +18496,25 @@ module IssueDeadlineJsonParseExtension = type IssueDeadline with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : IssueDeadline = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : IssueDeadline = let arg_1 = match node.["due_date"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "due_date" then - () - else - result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "due_date" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - DueDate = arg_1 - } + { AdditionalProperties = arg_0 + DueDate = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the Type5 type @@ -19755,19 +18524,17 @@ module Type5JsonParseExtension = type Type5 with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Type5 = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Type5 = let arg_0 = - let result = System.Collections.Generic.Dictionary () - let node = node.AsObject () + let result = System.Collections.Generic.Dictionary() + let node = node.AsObject() - for KeyValue (key, value) in node do - if false then () else result.Add (key, ()) + for KeyValue(key, value) in node do + if false then () else result.Add(key, ()) result - { - AdditionalProperties = arg_0 - } + { AdditionalProperties = arg_0 } namespace Gitea /// Module containing JSON parsing extension members for the Type6 type @@ -19777,19 +18544,17 @@ module Type6JsonParseExtension = type Type6 with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Type6 = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Type6 = let arg_0 = - let result = System.Collections.Generic.Dictionary () - let node = node.AsObject () + let result = System.Collections.Generic.Dictionary() + let node = node.AsObject() - for KeyValue (key, value) in node do - if false then () else result.Add (key, ()) + for KeyValue(key, value) in node do + if false then () else result.Add(key, ()) result - { - AdditionalProperties = arg_0 - } + { AdditionalProperties = arg_0 } namespace Gitea /// Module containing JSON parsing extension members for the IssueLabelsOption type @@ -19799,31 +18564,29 @@ module IssueLabelsOptionJsonParseExtension = type IssueLabelsOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : IssueLabelsOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : IssueLabelsOption = let arg_1 = match node.["labels"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "labels" then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "labels" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Labels = arg_1 - } + { AdditionalProperties = arg_0 + Labels = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the Label type @@ -19833,44 +18596,44 @@ module LabelJsonParseExtension = type Label with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Label = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Label = let arg_6 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["exclusive"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["color"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "color" || key = "description" @@ -19881,19 +18644,17 @@ module LabelJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Color = arg_1 - Description = arg_2 - Exclusive = arg_3 - Id = arg_4 - Name = arg_5 - Url = arg_6 - } + { AdditionalProperties = arg_0 + Color = arg_1 + Description = arg_2 + Exclusive = arg_3 + Id = arg_4 + Name = arg_5 + Url = arg_6 } namespace Gitea /// Module containing JSON parsing extension members for the MarkdownOption type @@ -19903,48 +18664,46 @@ module MarkdownOptionJsonParseExtension = type MarkdownOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : MarkdownOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : MarkdownOption = let arg_4 = match node.["Wiki"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["Text"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["Mode"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["Context"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "Context" || key = "Mode" || key = "Text" || key = "Wiki" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Context = arg_1 - Mode = arg_2 - Text = arg_3 - Wiki = arg_4 - } + { AdditionalProperties = arg_0 + Context = arg_1 + Mode = arg_2 + Text = arg_3 + Wiki = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the MergePullRequestOption type @@ -19954,61 +18713,61 @@ module MergePullRequestOptionJsonParseExtension = type MergePullRequestOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : MergePullRequestOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : MergePullRequestOption = let arg_8 = match node.["merge_when_checks_succeed"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["head_commit_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["force_merge"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["delete_branch_after_merge"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["MergeTitleField"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["MergeMessageField"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["MergeCommitID"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = (match node.["Do"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("Do") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "Do" || key = "MergeCommitID" @@ -20021,21 +18780,19 @@ module MergePullRequestOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Do = arg_1 - MergeCommitID = arg_2 - MergeMessageField = arg_3 - MergeTitleField = arg_4 - DeleteBranchAfterMerge = arg_5 - ForceMerge = arg_6 - HeadCommitId = arg_7 - MergeWhenChecksSucceed = arg_8 - } + { AdditionalProperties = arg_0 + Do = arg_1 + MergeCommitID = arg_2 + MergeMessageField = arg_3 + MergeTitleField = arg_4 + DeleteBranchAfterMerge = arg_5 + ForceMerge = arg_6 + HeadCommitId = arg_7 + MergeWhenChecksSucceed = arg_8 } namespace Gitea /// Module containing JSON parsing extension members for the MigrateRepoOptions type @@ -20045,128 +18802,128 @@ module MigrateRepoOptionsJsonParseExtension = type MigrateRepoOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : MigrateRepoOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : MigrateRepoOptions = let arg_20 = match node.["wiki"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_19 = match node.["uid"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_18 = match node.["service"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_17 = match node.["repo_owner"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_16 = (match node.["repo_name"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("repo_name") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_15 = match node.["releases"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_14 = match node.["pull_requests"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_13 = match node.["private"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_12 = match node.["mirror_interval"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_11 = match node.["mirror"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["milestones"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["lfs_endpoint"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["lfs"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["labels"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["issues"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = (match node.["clone_addr"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("clone_addr") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_3 = match node.["auth_username"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["auth_token"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["auth_password"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "auth_password" || key = "auth_token" @@ -20191,33 +18948,31 @@ module MigrateRepoOptionsJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - AuthPassword = arg_1 - AuthToken = arg_2 - AuthUsername = arg_3 - CloneAddr = arg_4 - Description = arg_5 - Issues = arg_6 - Labels = arg_7 - Lfs = arg_8 - LfsEndpoint = arg_9 - Milestones = arg_10 - Mirror = arg_11 - MirrorInterval = arg_12 - Private = arg_13 - PullRequests = arg_14 - Releases = arg_15 - RepoName = arg_16 - RepoOwner = arg_17 - Service = arg_18 - Uid = arg_19 - Wiki = arg_20 - } + { AdditionalProperties = arg_0 + AuthPassword = arg_1 + AuthToken = arg_2 + AuthUsername = arg_3 + CloneAddr = arg_4 + Description = arg_5 + Issues = arg_6 + Labels = arg_7 + Lfs = arg_8 + LfsEndpoint = arg_9 + Milestones = arg_10 + Mirror = arg_11 + MirrorInterval = arg_12 + Private = arg_13 + PullRequests = arg_14 + Releases = arg_15 + RepoName = arg_16 + RepoOwner = arg_17 + Service = arg_18 + Uid = arg_19 + Wiki = arg_20 } namespace Gitea /// Module containing JSON parsing extension members for the Type7 type @@ -20227,21 +18982,19 @@ module Type7JsonParseExtension = type Type7 with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Type7 = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Type7 = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if false then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if false then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - } + { AdditionalProperties = arg_0 } namespace Gitea /// Module containing JSON parsing extension members for the NodeInfoServices type @@ -20251,13 +19004,13 @@ module NodeInfoServicesJsonParseExtension = type NodeInfoServices with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : NodeInfoServices = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : NodeInfoServices = let arg_2 = match node.["outbound"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -20265,30 +19018,28 @@ module NodeInfoServicesJsonParseExtension = match node.["inbound"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "inbound" || key = "outbound" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Inbound = arg_1 - Outbound = arg_2 - } + { AdditionalProperties = arg_0 + Inbound = arg_1 + Outbound = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the NodeInfoSoftware type @@ -20298,48 +19049,46 @@ module NodeInfoSoftwareJsonParseExtension = type NodeInfoSoftware with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : NodeInfoSoftware = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : NodeInfoSoftware = let arg_4 = match node.["version"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["repository"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["homepage"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "homepage" || key = "name" || key = "repository" || key = "version" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Homepage = arg_1 - Name = arg_2 - Repository = arg_3 - Version = arg_4 - } + { AdditionalProperties = arg_0 + Homepage = arg_1 + Name = arg_2 + Repository = arg_3 + Version = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the NodeInfoUsageUsers type @@ -20349,42 +19098,40 @@ module NodeInfoUsageUsersJsonParseExtension = type NodeInfoUsageUsers with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : NodeInfoUsageUsers = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : NodeInfoUsageUsers = let arg_3 = match node.["total"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["activeMonth"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["activeHalfyear"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "activeHalfyear" || key = "activeMonth" || key = "total" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - ActiveHalfyear = arg_1 - ActiveMonth = arg_2 - Total = arg_3 - } + { AdditionalProperties = arg_0 + ActiveHalfyear = arg_1 + ActiveMonth = arg_2 + Total = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the NotificationCount type @@ -20394,27 +19141,25 @@ module NotificationCountJsonParseExtension = type NotificationCount with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : NotificationCount = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : NotificationCount = let arg_1 = match node.["new"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "new" then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "new" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - New = arg_1 - } + { AdditionalProperties = arg_0 + New = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the OAuth2Application type @@ -20424,53 +19169,53 @@ module OAuth2ApplicationJsonParseExtension = type OAuth2Application with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : OAuth2Application = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : OAuth2Application = let arg_7 = match node.["redirect_uris"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_6 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["created"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["confidential_client"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["client_secret"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["client_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "client_id" || key = "client_secret" @@ -20482,20 +19227,18 @@ module OAuth2ApplicationJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - ClientId = arg_1 - ClientSecret = arg_2 - ConfidentialClient = arg_3 - Created = arg_4 - Id = arg_5 - Name = arg_6 - RedirectUris = arg_7 - } + { AdditionalProperties = arg_0 + ClientId = arg_1 + ClientSecret = arg_2 + ConfidentialClient = arg_3 + Created = arg_4 + Id = arg_5 + Name = arg_6 + RedirectUris = arg_7 } namespace Gitea /// Module containing JSON parsing extension members for the Organization type @@ -20505,64 +19248,64 @@ module OrganizationJsonParseExtension = type Organization with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Organization = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Organization = let arg_10 = match node.["website"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["visibility"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["username"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["repo_admin_change_team_access"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["location"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["full_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["avatar_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "avatar_url" || key = "description" @@ -20577,23 +19320,21 @@ module OrganizationJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - AvatarUrl = arg_1 - Description = arg_2 - FullName = arg_3 - Id = arg_4 - Location = arg_5 - Name = arg_6 - RepoAdminChangeTeamAccess = arg_7 - Username = arg_8 - Visibility = arg_9 - Website = arg_10 - } + { AdditionalProperties = arg_0 + AvatarUrl = arg_1 + Description = arg_2 + FullName = arg_3 + Id = arg_4 + Location = arg_5 + Name = arg_6 + RepoAdminChangeTeamAccess = arg_7 + Username = arg_8 + Visibility = arg_9 + Website = arg_10 } namespace Gitea /// Module containing JSON parsing extension members for the OrganizationPermissions type @@ -20603,39 +19344,39 @@ module OrganizationPermissionsJsonParseExtension = type OrganizationPermissions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : OrganizationPermissions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : OrganizationPermissions = let arg_5 = match node.["is_owner"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["is_admin"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["can_write"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["can_read"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["can_create_repository"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "can_create_repository" || key = "can_read" @@ -20645,18 +19386,16 @@ module OrganizationPermissionsJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - CanCreateRepository = arg_1 - CanRead = arg_2 - CanWrite = arg_3 - IsAdmin = arg_4 - IsOwner = arg_5 - } + { AdditionalProperties = arg_0 + CanCreateRepository = arg_1 + CanRead = arg_2 + CanWrite = arg_3 + IsAdmin = arg_4 + IsOwner = arg_5 } namespace Gitea /// Module containing JSON parsing extension members for the PackageFile type @@ -20666,49 +19405,49 @@ module PackageFileJsonParseExtension = type PackageFile with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : PackageFile = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : PackageFile = let arg_7 = match node.["sha512"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["sha256"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["sha1"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["md5"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["Size"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "Size" || key = "id" @@ -20720,20 +19459,18 @@ module PackageFileJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Size = arg_1 - Id = arg_2 - Md5 = arg_3 - Name = arg_4 - Sha1 = arg_5 - Sha256 = arg_6 - Sha512 = arg_7 - } + { AdditionalProperties = arg_0 + Size = arg_1 + Id = arg_2 + Md5 = arg_3 + Name = arg_4 + Sha1 = arg_5 + Sha256 = arg_6 + Sha512 = arg_7 } namespace Gitea /// Module containing JSON parsing extension members for the PayloadUser type @@ -20743,42 +19480,40 @@ module PayloadUserJsonParseExtension = type PayloadUser with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : PayloadUser = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : PayloadUser = let arg_3 = match node.["username"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["email"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "email" || key = "name" || key = "username" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Email = arg_1 - Name = arg_2 - Username = arg_3 - } + { AdditionalProperties = arg_0 + Email = arg_1 + Name = arg_2 + Username = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the Permission type @@ -20788,42 +19523,40 @@ module PermissionJsonParseExtension = type Permission with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Permission = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Permission = let arg_3 = match node.["push"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["pull"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["admin"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "admin" || key = "pull" || key = "push" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Admin = arg_1 - Pull = arg_2 - Push = arg_3 - } + { AdditionalProperties = arg_0 + Admin = arg_1 + Pull = arg_2 + Push = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the PullRequestMeta type @@ -20833,36 +19566,34 @@ module PullRequestMetaJsonParseExtension = type PullRequestMeta with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : PullRequestMeta = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : PullRequestMeta = let arg_2 = match node.["merged_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["merged"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "merged" || key = "merged_at" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Merged = arg_1 - MergedAt = arg_2 - } + { AdditionalProperties = arg_0 + Merged = arg_1 + MergedAt = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the PullReviewRequestOptions type @@ -20872,13 +19603,13 @@ module PullReviewRequestOptionsJsonParseExtension = type PullReviewRequestOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : PullReviewRequestOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : PullReviewRequestOptions = let arg_2 = match node.["team_reviewers"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -20886,30 +19617,28 @@ module PullReviewRequestOptionsJsonParseExtension = match node.["reviewers"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "reviewers" || key = "team_reviewers" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Reviewers = arg_1 - TeamReviewers = arg_2 - } + { AdditionalProperties = arg_0 + Reviewers = arg_1 + TeamReviewers = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the PushMirror type @@ -20919,54 +19648,54 @@ module PushMirrorJsonParseExtension = type PushMirror with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : PushMirror = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : PushMirror = let arg_8 = match node.["sync_on_commit"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["repo_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["remote_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["remote_address"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["last_update"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["last_error"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["interval"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["created"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "created" || key = "interval" @@ -20979,21 +19708,19 @@ module PushMirrorJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Created = arg_1 - Interval = arg_2 - LastError = arg_3 - LastUpdate = arg_4 - RemoteAddress = arg_5 - RemoteName = arg_6 - RepoName = arg_7 - SyncOnCommit = arg_8 - } + { AdditionalProperties = arg_0 + Created = arg_1 + Interval = arg_2 + LastError = arg_3 + LastUpdate = arg_4 + RemoteAddress = arg_5 + RemoteName = arg_6 + RepoName = arg_7 + SyncOnCommit = arg_8 } namespace Gitea /// Module containing JSON parsing extension members for the Reference type @@ -21003,16 +19730,16 @@ module ReferenceJsonParseExtension = type Reference with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Reference = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Reference = let arg_3 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["ref"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["object"] with @@ -21021,24 +19748,22 @@ module ReferenceJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "object" || key = "ref" || key = "url" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Object = arg_1 - Ref = arg_2 - Url = arg_3 - } + { AdditionalProperties = arg_0 + Object = arg_1 + Ref = arg_2 + Url = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the RepoTopicOptions type @@ -21048,31 +19773,29 @@ module RepoTopicOptionsJsonParseExtension = type RepoTopicOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : RepoTopicOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : RepoTopicOptions = let arg_1 = match node.["topics"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "topics" then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "topics" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Topics = arg_1 - } + { AdditionalProperties = arg_0 + Topics = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the RepositoryMeta type @@ -21082,48 +19805,46 @@ module RepositoryMetaJsonParseExtension = type RepositoryMeta with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : RepositoryMeta = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : RepositoryMeta = let arg_4 = match node.["owner"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["full_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "full_name" || key = "id" || key = "name" || key = "owner" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - FullName = arg_1 - Id = arg_2 - Name = arg_3 - Owner = arg_4 - } + { AdditionalProperties = arg_0 + FullName = arg_1 + Id = arg_2 + Name = arg_3 + Owner = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the ServerVersion type @@ -21133,27 +19854,25 @@ module ServerVersionJsonParseExtension = type ServerVersion with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : ServerVersion = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : ServerVersion = let arg_1 = match node.["version"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "version" then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "version" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Version = arg_1 - } + { AdditionalProperties = arg_0 + Version = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the StopWatch type @@ -21163,49 +19882,49 @@ module StopWatchJsonParseExtension = type StopWatch with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : StopWatch = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : StopWatch = let arg_7 = match node.["seconds"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["repo_owner_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["repo_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["issue_title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["issue_index"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["duration"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["created"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "created" || key = "duration" @@ -21217,20 +19936,18 @@ module StopWatchJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Created = arg_1 - Duration = arg_2 - IssueIndex = arg_3 - IssueTitle = arg_4 - RepoName = arg_5 - RepoOwnerName = arg_6 - Seconds = arg_7 - } + { AdditionalProperties = arg_0 + Created = arg_1 + Duration = arg_2 + IssueIndex = arg_3 + IssueTitle = arg_4 + RepoName = arg_5 + RepoOwnerName = arg_6 + Seconds = arg_7 } namespace Gitea /// Module containing JSON parsing extension members for the SubmitPullReviewOptions type @@ -21240,36 +19957,34 @@ module SubmitPullReviewOptionsJsonParseExtension = type SubmitPullReviewOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : SubmitPullReviewOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : SubmitPullReviewOptions = let arg_2 = match node.["event"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "body" || key = "event" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Body = arg_1 - Event = arg_2 - } + { AdditionalProperties = arg_0 + Body = arg_1 + Event = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the Tag type @@ -21279,31 +19994,31 @@ module TagJsonParseExtension = type Tag with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Tag = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Tag = let arg_6 = match node.["zipball_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["tarball_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["commit"] with @@ -21312,11 +20027,11 @@ module TagJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "commit" || key = "id" @@ -21327,19 +20042,17 @@ module TagJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Commit = arg_1 - Id = arg_2 - Message = arg_3 - Name = arg_4 - TarballUrl = arg_5 - ZipballUrl = arg_6 - } + { AdditionalProperties = arg_0 + Commit = arg_1 + Id = arg_2 + Message = arg_3 + Name = arg_4 + TarballUrl = arg_5 + ZipballUrl = arg_6 } namespace Gitea /// Module containing JSON parsing extension members for the Type8 type @@ -21349,34 +20062,33 @@ module Type8JsonParseExtension = type Type8 with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Type8 = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Type8 = let arg_0 = - let result = System.Collections.Generic.Dictionary () - let node = node.AsObject () + let result = System.Collections.Generic.Dictionary() + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if false then () else - result.Add ( - key, - (match node.[key] with - | null -> - raise ( - System.Collections.Generic.KeyNotFoundException ( - sprintf "Required key '%s' not found on JSON object" (key) + result + .Add( + key, + (match node.[key] with + | null -> + raise ( + System.Collections.Generic.KeyNotFoundException( + sprintf "Required key '%s' not found on JSON object" (key) + ) ) - ) - | v -> v) - .AsValue() - .GetValue () - ) + | v -> v) + .AsValue() + .GetValue() + ) result - { - AdditionalProperties = arg_0 - } + { AdditionalProperties = arg_0 } namespace Gitea /// Module containing JSON parsing extension members for the Team type @@ -21386,7 +20098,7 @@ module TeamJsonParseExtension = type Team with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Team = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Team = let arg_9 = match node.["units_map"] with | null -> None @@ -21396,15 +20108,15 @@ module TeamJsonParseExtension = match node.["units"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_7 = match node.["permission"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["organization"] with @@ -21414,35 +20126,35 @@ module TeamJsonParseExtension = let arg_5 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["includes_all_repositories"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["can_create_org_repo"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "can_create_org_repo" || key = "description" @@ -21456,22 +20168,20 @@ module TeamJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - CanCreateOrgRepo = arg_1 - Description = arg_2 - Id = arg_3 - IncludesAllRepositories = arg_4 - Name = arg_5 - Organization = arg_6 - Permission = arg_7 - Units = arg_8 - UnitsMap = arg_9 - } + { AdditionalProperties = arg_0 + CanCreateOrgRepo = arg_1 + Description = arg_2 + Id = arg_3 + IncludesAllRepositories = arg_4 + Name = arg_5 + Organization = arg_6 + Permission = arg_7 + Units = arg_8 + UnitsMap = arg_9 } namespace Gitea /// Module containing JSON parsing extension members for the TopicName type @@ -21481,31 +20191,29 @@ module TopicNameJsonParseExtension = type TopicName with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : TopicName = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : TopicName = let arg_1 = match node.["topics"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "topics" then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "topics" then () else result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Topics = arg_1 - } + { AdditionalProperties = arg_0 + Topics = arg_1 } namespace Gitea /// Module containing JSON parsing extension members for the TopicResponse type @@ -21515,39 +20223,39 @@ module TopicResponseJsonParseExtension = type TopicResponse with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : TopicResponse = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : TopicResponse = let arg_5 = match node.["updated"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["topic_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["repo_count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["created"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "created" || key = "id" @@ -21557,18 +20265,16 @@ module TopicResponseJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Created = arg_1 - Id = arg_2 - RepoCount = arg_3 - TopicName = arg_4 - Updated = arg_5 - } + { AdditionalProperties = arg_0 + Created = arg_1 + Id = arg_2 + RepoCount = arg_3 + TopicName = arg_4 + Updated = arg_5 } namespace Gitea /// Module containing JSON parsing extension members for the TransferRepoOption type @@ -21578,13 +20284,13 @@ module TransferRepoOptionJsonParseExtension = type TransferRepoOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : TransferRepoOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : TransferRepoOption = let arg_2 = match node.["team_ids"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -21592,33 +20298,31 @@ module TransferRepoOptionJsonParseExtension = (match node.["new_owner"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("new_owner") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "new_owner" || key = "team_ids" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - NewOwner = arg_1 - TeamIds = arg_2 - } + { AdditionalProperties = arg_0 + NewOwner = arg_1 + TeamIds = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the UpdateFileOptions type @@ -21628,38 +20332,38 @@ module UpdateFileOptionsJsonParseExtension = type UpdateFileOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : UpdateFileOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : UpdateFileOptions = let arg_10 = match node.["signoff"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = (match node.["sha"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("sha") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_8 = match node.["new_branch"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["from_path"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["dates"] with @@ -21670,13 +20374,13 @@ module UpdateFileOptionsJsonParseExtension = (match node.["content"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("content") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_3 = match node.["committer"] with @@ -21686,7 +20390,7 @@ module UpdateFileOptionsJsonParseExtension = let arg_2 = match node.["branch"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["author"] with @@ -21695,11 +20399,11 @@ module UpdateFileOptionsJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "author" || key = "branch" @@ -21714,23 +20418,21 @@ module UpdateFileOptionsJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Author = arg_1 - Branch = arg_2 - Committer = arg_3 - Content = arg_4 - Dates = arg_5 - FromPath = arg_6 - Message = arg_7 - NewBranch = arg_8 - Sha = arg_9 - Signoff = arg_10 - } + { AdditionalProperties = arg_0 + Author = arg_1 + Branch = arg_2 + Committer = arg_3 + Content = arg_4 + Dates = arg_5 + FromPath = arg_6 + Message = arg_7 + NewBranch = arg_8 + Sha = arg_9 + Signoff = arg_10 } namespace Gitea /// Module containing JSON parsing extension members for the User type @@ -21740,114 +20442,114 @@ module UserJsonParseExtension = type User with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : User = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : User = let arg_20 = match node.["website"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_19 = match node.["visibility"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_18 = match node.["starred_repos_count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_17 = match node.["restricted"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_16 = match node.["prohibit_login"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_15 = match node.["login_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_14 = match node.["login"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_13 = match node.["location"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_12 = match node.["last_login"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_11 = match node.["language"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["is_admin"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["full_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["following_count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["followers_count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["email"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["created"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["avatar_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["active"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "active" || key = "avatar_url" @@ -21872,33 +20574,31 @@ module UserJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Active = arg_1 - AvatarUrl = arg_2 - Created = arg_3 - Description = arg_4 - Email = arg_5 - FollowersCount = arg_6 - FollowingCount = arg_7 - FullName = arg_8 - Id = arg_9 - IsAdmin = arg_10 - Language = arg_11 - LastLogin = arg_12 - Location = arg_13 - Login = arg_14 - LoginName = arg_15 - ProhibitLogin = arg_16 - Restricted = arg_17 - StarredReposCount = arg_18 - Visibility = arg_19 - Website = arg_20 - } + { AdditionalProperties = arg_0 + Active = arg_1 + AvatarUrl = arg_2 + Created = arg_3 + Description = arg_4 + Email = arg_5 + FollowersCount = arg_6 + FollowingCount = arg_7 + FullName = arg_8 + Id = arg_9 + IsAdmin = arg_10 + Language = arg_11 + LastLogin = arg_12 + Location = arg_13 + Login = arg_14 + LoginName = arg_15 + ProhibitLogin = arg_16 + Restricted = arg_17 + StarredReposCount = arg_18 + Visibility = arg_19 + Website = arg_20 } namespace Gitea /// Module containing JSON parsing extension members for the UserHeatmapData type @@ -21908,36 +20608,34 @@ module UserHeatmapDataJsonParseExtension = type UserHeatmapData with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : UserHeatmapData = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : UserHeatmapData = let arg_2 = match node.["timestamp"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["contributions"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "contributions" || key = "timestamp" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Contributions = arg_1 - Timestamp = arg_2 - } + { AdditionalProperties = arg_0 + Contributions = arg_1 + Timestamp = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the UserSettings type @@ -21947,59 +20645,59 @@ module UserSettingsJsonParseExtension = type UserSettings with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : UserSettings = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : UserSettings = let arg_9 = match node.["website"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["theme"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["location"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["language"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["hide_email"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["hide_activity"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["full_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["diff_view_style"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "description" || key = "diff_view_style" @@ -22013,22 +20711,20 @@ module UserSettingsJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Description = arg_1 - DiffViewStyle = arg_2 - FullName = arg_3 - HideActivity = arg_4 - HideEmail = arg_5 - Language = arg_6 - Location = arg_7 - Theme = arg_8 - Website = arg_9 - } + { AdditionalProperties = arg_0 + Description = arg_1 + DiffViewStyle = arg_2 + FullName = arg_3 + HideActivity = arg_4 + HideEmail = arg_5 + Language = arg_6 + Location = arg_7 + Theme = arg_8 + Website = arg_9 } namespace Gitea /// Module containing JSON parsing extension members for the UserSettingsOptions type @@ -22038,59 +20734,59 @@ module UserSettingsOptionsJsonParseExtension = type UserSettingsOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : UserSettingsOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : UserSettingsOptions = let arg_9 = match node.["website"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["theme"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["location"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["language"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["hide_email"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["hide_activity"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["full_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["diff_view_style"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "description" || key = "diff_view_style" @@ -22104,22 +20800,20 @@ module UserSettingsOptionsJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Description = arg_1 - DiffViewStyle = arg_2 - FullName = arg_3 - HideActivity = arg_4 - HideEmail = arg_5 - Language = arg_6 - Location = arg_7 - Theme = arg_8 - Website = arg_9 - } + { AdditionalProperties = arg_0 + Description = arg_1 + DiffViewStyle = arg_2 + FullName = arg_3 + HideActivity = arg_4 + HideEmail = arg_5 + Language = arg_6 + Location = arg_7 + Theme = arg_8 + Website = arg_9 } namespace Gitea /// Module containing JSON parsing extension members for the WatchInfo type @@ -22129,21 +20823,21 @@ module WatchInfoJsonParseExtension = type WatchInfo with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : WatchInfo = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : WatchInfo = let arg_6 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["subscribed"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["repository_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["reason"] with @@ -22153,20 +20847,20 @@ module WatchInfoJsonParseExtension = let arg_2 = match node.["ignored"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "created_at" || key = "ignored" @@ -22177,19 +20871,17 @@ module WatchInfoJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - CreatedAt = arg_1 - Ignored = arg_2 - Reason = arg_3 - RepositoryUrl = arg_4 - Subscribed = arg_5 - Url = arg_6 - } + { AdditionalProperties = arg_0 + CreatedAt = arg_1 + Ignored = arg_2 + Reason = arg_3 + RepositoryUrl = arg_4 + Subscribed = arg_5 + Url = arg_6 } namespace Gitea /// Module containing JSON parsing extension members for the WikiCommit type @@ -22199,16 +20891,16 @@ module WikiCommitJsonParseExtension = type WikiCommit with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : WikiCommit = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : WikiCommit = let arg_4 = match node.["sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["commiter"] with @@ -22222,25 +20914,23 @@ module WikiCommitJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "author" || key = "commiter" || key = "message" || key = "sha" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Author = arg_1 - Commiter = arg_2 - Message = arg_3 - Sha = arg_4 - } + { AdditionalProperties = arg_0 + Author = arg_1 + Commiter = arg_2 + Message = arg_3 + Sha = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the WikiCommitList type @@ -22250,40 +20940,38 @@ module WikiCommitListJsonParseExtension = type WikiCommitList with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : WikiCommitList = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : WikiCommitList = let arg_2 = match node.["count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["commits"] with | null -> None | v -> - v.AsArray () + v.AsArray() |> Seq.map (fun elt -> WikiCommit.jsonParse elt) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "commits" || key = "count" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Commits = arg_1 - Count = arg_2 - } + { AdditionalProperties = arg_0 + Commits = arg_1 + Count = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the WikiPage type @@ -22293,21 +20981,21 @@ module WikiPageJsonParseExtension = type WikiPage with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : WikiPage = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : WikiPage = let arg_8 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["sub_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["sidebar"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["last_commit"] with @@ -22317,30 +21005,30 @@ module WikiPageJsonParseExtension = let arg_4 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["footer"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["content_base64"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["commit_count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "commit_count" || key = "content_base64" @@ -22353,21 +21041,19 @@ module WikiPageJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - CommitCount = arg_1 - ContentBase64 = arg_2 - Footer = arg_3 - HtmlUrl = arg_4 - LastCommit = arg_5 - Sidebar = arg_6 - SubUrl = arg_7 - Title = arg_8 - } + { AdditionalProperties = arg_0 + CommitCount = arg_1 + ContentBase64 = arg_2 + Footer = arg_3 + HtmlUrl = arg_4 + LastCommit = arg_5 + Sidebar = arg_6 + SubUrl = arg_7 + Title = arg_8 } namespace Gitea /// Module containing JSON parsing extension members for the WikiPageMetaData type @@ -22377,16 +21063,16 @@ module WikiPageMetaDataJsonParseExtension = type WikiPageMetaData with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : WikiPageMetaData = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : WikiPageMetaData = let arg_4 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["sub_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["last_commit"] with @@ -22396,29 +21082,27 @@ module WikiPageMetaDataJsonParseExtension = let arg_1 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "html_url" || key = "last_commit" || key = "sub_url" || key = "title" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - HtmlUrl = arg_1 - LastCommit = arg_2 - SubUrl = arg_3 - Title = arg_4 - } + { AdditionalProperties = arg_0 + HtmlUrl = arg_1 + LastCommit = arg_2 + SubUrl = arg_3 + Title = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the Comment type @@ -22428,7 +21112,7 @@ module CommentJsonParseExtension = type Comment with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Comment = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Comment = let arg_11 = match node.["user"] with | null -> None @@ -22437,64 +21121,64 @@ module CommentJsonParseExtension = let arg_10 = match node.["updated_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["pull_request_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["original_author_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["original_author"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["issue_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["assets"] with | null -> None | v -> - v.AsArray () + v.AsArray() |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "assets" || key = "body" @@ -22510,24 +21194,22 @@ module CommentJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Assets = arg_1 - Body = arg_2 - CreatedAt = arg_3 - HtmlUrl = arg_4 - Id = arg_5 - IssueUrl = arg_6 - OriginalAuthor = arg_7 - OriginalAuthorId = arg_8 - PullRequestUrl = arg_9 - UpdatedAt = arg_10 - User = arg_11 - } + { AdditionalProperties = arg_0 + Assets = arg_1 + Body = arg_2 + CreatedAt = arg_3 + HtmlUrl = arg_4 + Id = arg_5 + IssueUrl = arg_6 + OriginalAuthor = arg_7 + OriginalAuthorId = arg_8 + PullRequestUrl = arg_9 + UpdatedAt = arg_10 + User = arg_11 } namespace Gitea /// Module containing JSON parsing extension members for the CommitStatus type @@ -22537,36 +21219,36 @@ module CommitStatusJsonParseExtension = type CommitStatus with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CommitStatus = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CommitStatus = let arg_9 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["updated_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["target_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["status"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["creator"] with @@ -22576,20 +21258,20 @@ module CommitStatusJsonParseExtension = let arg_2 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["context"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "context" || key = "created_at" @@ -22603,22 +21285,20 @@ module CommitStatusJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Context = arg_1 - CreatedAt = arg_2 - Creator = arg_3 - Description = arg_4 - Id = arg_5 - Status = arg_6 - TargetUrl = arg_7 - UpdatedAt = arg_8 - Url = arg_9 - } + { AdditionalProperties = arg_0 + Context = arg_1 + CreatedAt = arg_2 + Creator = arg_3 + Description = arg_4 + Id = arg_5 + Status = arg_6 + TargetUrl = arg_7 + UpdatedAt = arg_8 + Url = arg_9 } namespace Gitea /// Module containing JSON parsing extension members for the ContentsResponse type @@ -22628,76 +21308,76 @@ module ContentsResponseJsonParseExtension = type ContentsResponse with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : ContentsResponse = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : ContentsResponse = let arg_15 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_14 = match node.["type"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_13 = match node.["target"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_12 = match node.["submodule_git_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_11 = match node.["size"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["path"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["last_commit_sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["git_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["encoding"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["download_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["content"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["_links"] with @@ -22706,11 +21386,11 @@ module ContentsResponseJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "_links" || key = "content" @@ -22730,28 +21410,26 @@ module ContentsResponseJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Links = arg_1 - Content = arg_2 - DownloadUrl = arg_3 - Encoding = arg_4 - GitUrl = arg_5 - HtmlUrl = arg_6 - LastCommitSha = arg_7 - Name = arg_8 - Path = arg_9 - Sha = arg_10 - Size = arg_11 - SubmoduleGitUrl = arg_12 - Target = arg_13 - Type = arg_14 - Url = arg_15 - } + { AdditionalProperties = arg_0 + Links = arg_1 + Content = arg_2 + DownloadUrl = arg_3 + Encoding = arg_4 + GitUrl = arg_5 + HtmlUrl = arg_6 + LastCommitSha = arg_7 + Name = arg_8 + Path = arg_9 + Sha = arg_10 + Size = arg_11 + SubmoduleGitUrl = arg_12 + Target = arg_13 + Type = arg_14 + Url = arg_15 } namespace Gitea /// Module containing JSON parsing extension members for the CreateFileOptions type @@ -22761,21 +21439,21 @@ module CreateFileOptionsJsonParseExtension = type CreateFileOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateFileOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateFileOptions = let arg_8 = match node.["signoff"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["new_branch"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["dates"] with @@ -22786,13 +21464,13 @@ module CreateFileOptionsJsonParseExtension = (match node.["content"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("content") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_3 = match node.["committer"] with @@ -22802,7 +21480,7 @@ module CreateFileOptionsJsonParseExtension = let arg_2 = match node.["branch"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["author"] with @@ -22811,11 +21489,11 @@ module CreateFileOptionsJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "author" || key = "branch" @@ -22828,21 +21506,19 @@ module CreateFileOptionsJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Author = arg_1 - Branch = arg_2 - Committer = arg_3 - Content = arg_4 - Dates = arg_5 - Message = arg_6 - NewBranch = arg_7 - Signoff = arg_8 - } + { AdditionalProperties = arg_0 + Author = arg_1 + Branch = arg_2 + Committer = arg_3 + Content = arg_4 + Dates = arg_5 + Message = arg_6 + NewBranch = arg_7 + Signoff = arg_8 } namespace Gitea /// Module containing JSON parsing extension members for the CreateHookOption type @@ -22852,25 +21528,25 @@ module CreateHookOptionJsonParseExtension = type CreateHookOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreateHookOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreateHookOption = let arg_6 = (match node.["type"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("type") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_5 = match node.["events"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -22879,7 +21555,7 @@ module CreateHookOptionJsonParseExtension = match node.["config"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("config") ) ) @@ -22889,25 +21565,25 @@ module CreateHookOptionJsonParseExtension = let arg_3 = match node.["branch_filter"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["authorization_header"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["active"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "active" || key = "authorization_header" @@ -22918,19 +21594,17 @@ module CreateHookOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Active = arg_1 - AuthorizationHeader = arg_2 - BranchFilter = arg_3 - Config = arg_4 - Events = arg_5 - Type = arg_6 - } + { AdditionalProperties = arg_0 + Active = arg_1 + AuthorizationHeader = arg_2 + BranchFilter = arg_3 + Config = arg_4 + Events = arg_5 + Type = arg_6 } namespace Gitea /// Module containing JSON parsing extension members for the CreatePullReviewOptions type @@ -22940,22 +21614,22 @@ module CreatePullReviewOptionsJsonParseExtension = type CreatePullReviewOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CreatePullReviewOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CreatePullReviewOptions = let arg_4 = match node.["event"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["commit_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["comments"] with | null -> None | v -> - v.AsArray () + v.AsArray() |> Seq.map (fun elt -> CreatePullReviewComment.jsonParse elt) |> List.ofSeq |> Some @@ -22963,29 +21637,27 @@ module CreatePullReviewOptionsJsonParseExtension = let arg_1 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "body" || key = "comments" || key = "commit_id" || key = "event" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Body = arg_1 - Comments = arg_2 - CommitId = arg_3 - Event = arg_4 - } + { AdditionalProperties = arg_0 + Body = arg_1 + Comments = arg_2 + CommitId = arg_3 + Event = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the DeleteFileOptions type @@ -22995,33 +21667,33 @@ module DeleteFileOptionsJsonParseExtension = type DeleteFileOptions with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : DeleteFileOptions = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : DeleteFileOptions = let arg_8 = match node.["signoff"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = (match node.["sha"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("sha") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_6 = match node.["new_branch"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["dates"] with @@ -23036,7 +21708,7 @@ module DeleteFileOptionsJsonParseExtension = let arg_2 = match node.["branch"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["author"] with @@ -23045,11 +21717,11 @@ module DeleteFileOptionsJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "author" || key = "branch" @@ -23062,21 +21734,19 @@ module DeleteFileOptionsJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Author = arg_1 - Branch = arg_2 - Committer = arg_3 - Dates = arg_4 - Message = arg_5 - NewBranch = arg_6 - Sha = arg_7 - Signoff = arg_8 - } + { AdditionalProperties = arg_0 + Author = arg_1 + Branch = arg_2 + Committer = arg_3 + Dates = arg_4 + Message = arg_5 + NewBranch = arg_6 + Sha = arg_7 + Signoff = arg_8 } namespace Gitea /// Module containing JSON parsing extension members for the EditRepoOption type @@ -23086,31 +21756,31 @@ module EditRepoOptionJsonParseExtension = type EditRepoOption with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : EditRepoOption = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : EditRepoOption = let arg_27 = match node.["website"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_26 = match node.["template"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_25 = match node.["private"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_24 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_23 = match node.["mirror_interval"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_22 = match node.["internal_tracker"] with @@ -23120,27 +21790,27 @@ module EditRepoOptionJsonParseExtension = let arg_21 = match node.["ignore_whitespace_conflicts"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_20 = match node.["has_wiki"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_19 = match node.["has_pull_requests"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_18 = match node.["has_projects"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_17 = match node.["has_issues"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_16 = match node.["external_wiki"] with @@ -23155,80 +21825,80 @@ module EditRepoOptionJsonParseExtension = let arg_14 = match node.["enable_prune"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_13 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_12 = match node.["default_merge_style"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_11 = match node.["default_delete_branch_after_merge"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["default_branch"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["default_allow_maintainer_edit"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["autodetect_manual_merge"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["archived"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["allow_squash_merge"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["allow_rebase_update"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["allow_rebase_explicit"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["allow_rebase"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["allow_merge_commits"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["allow_manual_merge"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "allow_manual_merge" || key = "allow_merge_commits" @@ -23260,40 +21930,38 @@ module EditRepoOptionJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - AllowManualMerge = arg_1 - AllowMergeCommits = arg_2 - AllowRebase = arg_3 - AllowRebaseExplicit = arg_4 - AllowRebaseUpdate = arg_5 - AllowSquashMerge = arg_6 - Archived = arg_7 - AutodetectManualMerge = arg_8 - DefaultAllowMaintainerEdit = arg_9 - DefaultBranch = arg_10 - DefaultDeleteBranchAfterMerge = arg_11 - DefaultMergeStyle = arg_12 - Description = arg_13 - EnablePrune = arg_14 - ExternalTracker = arg_15 - ExternalWiki = arg_16 - HasIssues = arg_17 - HasProjects = arg_18 - HasPullRequests = arg_19 - HasWiki = arg_20 - IgnoreWhitespaceConflicts = arg_21 - InternalTracker = arg_22 - MirrorInterval = arg_23 - Name = arg_24 - Private = arg_25 - Template = arg_26 - Website = arg_27 - } + { AdditionalProperties = arg_0 + AllowManualMerge = arg_1 + AllowMergeCommits = arg_2 + AllowRebase = arg_3 + AllowRebaseExplicit = arg_4 + AllowRebaseUpdate = arg_5 + AllowSquashMerge = arg_6 + Archived = arg_7 + AutodetectManualMerge = arg_8 + DefaultAllowMaintainerEdit = arg_9 + DefaultBranch = arg_10 + DefaultDeleteBranchAfterMerge = arg_11 + DefaultMergeStyle = arg_12 + Description = arg_13 + EnablePrune = arg_14 + ExternalTracker = arg_15 + ExternalWiki = arg_16 + HasIssues = arg_17 + HasProjects = arg_18 + HasPullRequests = arg_19 + HasWiki = arg_20 + IgnoreWhitespaceConflicts = arg_21 + InternalTracker = arg_22 + MirrorInterval = arg_23 + Name = arg_24 + Private = arg_25 + Template = arg_26 + Website = arg_27 } namespace Gitea /// Module containing JSON parsing extension members for the IssueFormField type @@ -23303,7 +21971,7 @@ module IssueFormFieldJsonParseExtension = type IssueFormField with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : IssueFormField = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : IssueFormField = let arg_4 = match node.["validations"] with | null -> None @@ -23312,12 +21980,12 @@ module IssueFormFieldJsonParseExtension = let arg_3 = match node.["type"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["attributes"] with @@ -23326,25 +21994,23 @@ module IssueFormFieldJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "attributes" || key = "id" || key = "type" || key = "validations" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Attributes = arg_1 - Id = arg_2 - Type = arg_3 - Validations = arg_4 - } + { AdditionalProperties = arg_0 + Attributes = arg_1 + Id = arg_2 + Type = arg_3 + Validations = arg_4 } namespace Gitea /// Module containing JSON parsing extension members for the IssueTemplate type @@ -23354,46 +22020,46 @@ module IssueTemplateJsonParseExtension = type IssueTemplate with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : IssueTemplate = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : IssueTemplate = let arg_8 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["ref"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["labels"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_4 = match node.["file_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["content"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["body"] with | null -> None | v -> - v.AsArray () + v.AsArray() |> Seq.map (fun elt -> IssueFormField.jsonParse elt) |> List.ofSeq |> Some @@ -23401,15 +22067,15 @@ module IssueTemplateJsonParseExtension = let arg_1 = match node.["about"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "about" || key = "body" @@ -23422,21 +22088,19 @@ module IssueTemplateJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - About = arg_1 - Body = arg_2 - Content = arg_3 - FileName = arg_4 - Labels = arg_5 - Name = arg_6 - Ref = arg_7 - Title = arg_8 - } + { AdditionalProperties = arg_0 + About = arg_1 + Body = arg_2 + Content = arg_3 + FileName = arg_4 + Labels = arg_5 + Name = arg_6 + Ref = arg_7 + Title = arg_8 } namespace Gitea /// Module containing JSON parsing extension members for the Milestone type @@ -23446,64 +22110,64 @@ module MilestoneJsonParseExtension = type Milestone with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Milestone = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Milestone = let arg_10 = match node.["updated_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["state"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["open_issues"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["due_on"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["closed_issues"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["closed_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "closed_at" || key = "closed_issues" @@ -23518,23 +22182,21 @@ module MilestoneJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - ClosedAt = arg_1 - ClosedIssues = arg_2 - CreatedAt = arg_3 - Description = arg_4 - DueOn = arg_5 - Id = arg_6 - OpenIssues = arg_7 - State = arg_8 - Title = arg_9 - UpdatedAt = arg_10 - } + { AdditionalProperties = arg_0 + ClosedAt = arg_1 + ClosedIssues = arg_2 + CreatedAt = arg_3 + Description = arg_4 + DueOn = arg_5 + Id = arg_6 + OpenIssues = arg_7 + State = arg_8 + Title = arg_9 + UpdatedAt = arg_10 } namespace Gitea /// Module containing JSON parsing extension members for the NodeInfoUsage type @@ -23544,7 +22206,7 @@ module NodeInfoUsageJsonParseExtension = type NodeInfoUsage with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : NodeInfoUsage = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : NodeInfoUsage = let arg_3 = match node.["users"] with | null -> None @@ -23553,33 +22215,31 @@ module NodeInfoUsageJsonParseExtension = let arg_2 = match node.["localPosts"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["localComments"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "localComments" || key = "localPosts" || key = "users" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - LocalComments = arg_1 - LocalPosts = arg_2 - Users = arg_3 - } + { AdditionalProperties = arg_0 + LocalComments = arg_1 + LocalPosts = arg_2 + Users = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the NotificationSubject type @@ -23589,49 +22249,49 @@ module NotificationSubjectJsonParseExtension = type NotificationSubject with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : NotificationSubject = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : NotificationSubject = let arg_7 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["type"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["state"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["latest_comment_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["latest_comment_html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "html_url" || key = "latest_comment_html_url" @@ -23643,20 +22303,18 @@ module NotificationSubjectJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - HtmlUrl = arg_1 - LatestCommentHtmlUrl = arg_2 - LatestCommentUrl = arg_3 - State = arg_4 - Title = arg_5 - Type = arg_6 - Url = arg_7 - } + { AdditionalProperties = arg_0 + HtmlUrl = arg_1 + LatestCommentHtmlUrl = arg_2 + LatestCommentUrl = arg_3 + State = arg_4 + Title = arg_5 + Type = arg_6 + Url = arg_7 } namespace Gitea /// Module containing JSON parsing extension members for the PayloadCommitVerification type @@ -23666,11 +22324,11 @@ module PayloadCommitVerificationJsonParseExtension = type PayloadCommitVerification with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : PayloadCommitVerification = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : PayloadCommitVerification = let arg_5 = match node.["verified"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["signer"] with @@ -23680,25 +22338,25 @@ module PayloadCommitVerificationJsonParseExtension = let arg_3 = match node.["signature"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["reason"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["payload"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "payload" || key = "reason" @@ -23708,18 +22366,16 @@ module PayloadCommitVerificationJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Payload = arg_1 - Reason = arg_2 - Signature = arg_3 - Signer = arg_4 - Verified = arg_5 - } + { AdditionalProperties = arg_0 + Payload = arg_1 + Reason = arg_2 + Signature = arg_3 + Signer = arg_4 + Verified = arg_5 } namespace Gitea /// Module containing JSON parsing extension members for the PublicKey type @@ -23729,7 +22385,7 @@ module PublicKeyJsonParseExtension = type PublicKey with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : PublicKey = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : PublicKey = let arg_9 = match node.["user"] with | null -> None @@ -23738,50 +22394,50 @@ module PublicKeyJsonParseExtension = let arg_8 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["read_only"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["key_type"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["key"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["fingerprint"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "created_at" || key = "fingerprint" @@ -23795,22 +22451,20 @@ module PublicKeyJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - CreatedAt = arg_1 - Fingerprint = arg_2 - Id = arg_3 - Key = arg_4 - KeyType = arg_5 - ReadOnly = arg_6 - Title = arg_7 - Url = arg_8 - User = arg_9 - } + { AdditionalProperties = arg_0 + CreatedAt = arg_1 + Fingerprint = arg_2 + Id = arg_3 + Key = arg_4 + KeyType = arg_5 + ReadOnly = arg_6 + Title = arg_7 + Url = arg_8 + User = arg_9 } namespace Gitea /// Module containing JSON parsing extension members for the PullReview type @@ -23820,7 +22474,7 @@ module PullReviewJsonParseExtension = type PullReview with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : PullReview = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : PullReview = let arg_14 = match node.["user"] with | null -> None @@ -23829,7 +22483,7 @@ module PullReviewJsonParseExtension = let arg_13 = match node.["updated_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_12 = match node.["team"] with @@ -23839,65 +22493,65 @@ module PullReviewJsonParseExtension = let arg_11 = match node.["submitted_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["state"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["stale"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["pull_request_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["official"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["dismissed"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["commit_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["comments_count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "body" || key = "comments_count" @@ -23916,27 +22570,25 @@ module PullReviewJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Body = arg_1 - CommentsCount = arg_2 - CommitId = arg_3 - Dismissed = arg_4 - HtmlUrl = arg_5 - Id = arg_6 - Official = arg_7 - PullRequestUrl = arg_8 - Stale = arg_9 - State = arg_10 - SubmittedAt = arg_11 - Team = arg_12 - UpdatedAt = arg_13 - User = arg_14 - } + { AdditionalProperties = arg_0 + Body = arg_1 + CommentsCount = arg_2 + CommitId = arg_3 + Dismissed = arg_4 + HtmlUrl = arg_5 + Id = arg_6 + Official = arg_7 + PullRequestUrl = arg_8 + Stale = arg_9 + State = arg_10 + SubmittedAt = arg_11 + Team = arg_12 + UpdatedAt = arg_13 + User = arg_14 } namespace Gitea /// Module containing JSON parsing extension members for the PullReviewComment type @@ -23946,7 +22598,7 @@ module PullReviewCommentJsonParseExtension = type PullReviewComment with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : PullReviewComment = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : PullReviewComment = let arg_15 = match node.["user"] with | null -> None @@ -23955,7 +22607,7 @@ module PullReviewCommentJsonParseExtension = let arg_14 = match node.["updated_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_13 = match node.["resolver"] with @@ -23965,70 +22617,70 @@ module PullReviewCommentJsonParseExtension = let arg_12 = match node.["pull_request_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_11 = match node.["pull_request_review_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["position"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["path"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["original_position"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["original_commit_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["diff_hunk"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["commit_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "body" || key = "commit_id" @@ -24048,28 +22700,26 @@ module PullReviewCommentJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Body = arg_1 - CommitId = arg_2 - CreatedAt = arg_3 - DiffHunk = arg_4 - HtmlUrl = arg_5 - Id = arg_6 - OriginalCommitId = arg_7 - OriginalPosition = arg_8 - Path = arg_9 - Position = arg_10 - PullRequestReviewId = arg_11 - PullRequestUrl = arg_12 - Resolver = arg_13 - UpdatedAt = arg_14 - User = arg_15 - } + { AdditionalProperties = arg_0 + Body = arg_1 + CommitId = arg_2 + CreatedAt = arg_3 + DiffHunk = arg_4 + HtmlUrl = arg_5 + Id = arg_6 + OriginalCommitId = arg_7 + OriginalPosition = arg_8 + Path = arg_9 + Position = arg_10 + PullRequestReviewId = arg_11 + PullRequestUrl = arg_12 + Resolver = arg_13 + UpdatedAt = arg_14 + User = arg_15 } namespace Gitea /// Module containing JSON parsing extension members for the Reaction type @@ -24079,7 +22729,7 @@ module ReactionJsonParseExtension = type Reaction with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Reaction = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Reaction = let arg_3 = match node.["user"] with | null -> None @@ -24088,33 +22738,31 @@ module ReactionJsonParseExtension = let arg_2 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["content"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "content" || key = "created_at" || key = "user" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Content = arg_1 - CreatedAt = arg_2 - User = arg_3 - } + { AdditionalProperties = arg_0 + Content = arg_1 + CreatedAt = arg_2 + User = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the Release type @@ -24124,71 +22772,71 @@ module ReleaseJsonParseExtension = type Release with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Release = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Release = let arg_15 = match node.["zipball_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_14 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_13 = match node.["target_commitish"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_12 = match node.["tarball_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_11 = match node.["tag_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["published_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["prerelease"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["draft"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["author"] with @@ -24199,18 +22847,18 @@ module ReleaseJsonParseExtension = match node.["assets"] with | null -> None | v -> - v.AsArray () + v.AsArray() |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "assets" || key = "author" @@ -24230,28 +22878,26 @@ module ReleaseJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Assets = arg_1 - Author = arg_2 - Body = arg_3 - CreatedAt = arg_4 - Draft = arg_5 - HtmlUrl = arg_6 - Id = arg_7 - Name = arg_8 - Prerelease = arg_9 - PublishedAt = arg_10 - TagName = arg_11 - TarballUrl = arg_12 - TargetCommitish = arg_13 - Url = arg_14 - ZipballUrl = arg_15 - } + { AdditionalProperties = arg_0 + Assets = arg_1 + Author = arg_2 + Body = arg_3 + CreatedAt = arg_4 + Draft = arg_5 + HtmlUrl = arg_6 + Id = arg_7 + Name = arg_8 + Prerelease = arg_9 + PublishedAt = arg_10 + TagName = arg_11 + TarballUrl = arg_12 + TargetCommitish = arg_13 + Url = arg_14 + ZipballUrl = arg_15 } namespace Gitea /// Module containing JSON parsing extension members for the RepoCollaboratorPermission type @@ -24261,7 +22907,7 @@ module RepoCollaboratorPermissionJsonParseExtension = type RepoCollaboratorPermission with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : RepoCollaboratorPermission = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : RepoCollaboratorPermission = let arg_3 = match node.["user"] with | null -> None @@ -24270,33 +22916,31 @@ module RepoCollaboratorPermissionJsonParseExtension = let arg_2 = match node.["role_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["permission"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "permission" || key = "role_name" || key = "user" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Permission = arg_1 - RoleName = arg_2 - User = arg_3 - } + { AdditionalProperties = arg_0 + Permission = arg_1 + RoleName = arg_2 + User = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the RepoCommit type @@ -24306,7 +22950,7 @@ module RepoCommitJsonParseExtension = type RepoCommit with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : RepoCommit = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : RepoCommit = let arg_6 = match node.["verification"] with | null -> None @@ -24315,7 +22959,7 @@ module RepoCommitJsonParseExtension = let arg_5 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["tree"] with @@ -24325,7 +22969,7 @@ module RepoCommitJsonParseExtension = let arg_3 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["committer"] with @@ -24339,11 +22983,11 @@ module RepoCommitJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "author" || key = "committer" @@ -24354,19 +22998,17 @@ module RepoCommitJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Author = arg_1 - Committer = arg_2 - Message = arg_3 - Tree = arg_4 - Url = arg_5 - Verification = arg_6 - } + { AdditionalProperties = arg_0 + Author = arg_1 + Committer = arg_2 + Message = arg_3 + Tree = arg_4 + Url = arg_5 + Verification = arg_6 } namespace Gitea /// Module containing JSON parsing extension members for the RepoTransfer type @@ -24376,11 +23018,11 @@ module RepoTransferJsonParseExtension = type RepoTransfer with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : RepoTransfer = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : RepoTransfer = let arg_3 = match node.["teams"] with | null -> None - | v -> v.AsArray () |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq |> Some + | v -> v.AsArray() |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq |> Some let arg_2 = match node.["recipient"] with @@ -24394,24 +23036,22 @@ module RepoTransferJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "doer" || key = "recipient" || key = "teams" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Doer = arg_1 - Recipient = arg_2 - Teams = arg_3 - } + { AdditionalProperties = arg_0 + Doer = arg_1 + Recipient = arg_2 + Teams = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the Repository type @@ -24421,41 +23061,41 @@ module RepositoryJsonParseExtension = type Repository with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Repository = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Repository = let arg_52 = match node.["website"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_51 = match node.["watchers_count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_50 = match node.["updated_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_49 = match node.["template"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_48 = match node.["stars_count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_47 = match node.["ssh_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_46 = match node.["size"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_45 = match node.["repo_transfer"] with @@ -24465,12 +23105,12 @@ module RepositoryJsonParseExtension = let arg_44 = match node.["release_counter"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_43 = match node.["private"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_42 = match node.["permissions"] with @@ -24490,52 +23130,52 @@ module RepositoryJsonParseExtension = let arg_39 = match node.["original_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_38 = match node.["open_pr_counter"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_37 = match node.["open_issues_count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_36 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_35 = match node.["mirror_updated"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_34 = match node.["mirror_interval"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_33 = match node.["mirror"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_32 = match node.["link"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_31 = match node.["languages_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_30 = match node.["language"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_29 = match node.["internal_tracker"] with @@ -24545,57 +23185,57 @@ module RepositoryJsonParseExtension = let arg_28 = match node.["internal"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_27 = match node.["ignore_whitespace_conflicts"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_26 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_25 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_24 = match node.["has_wiki"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_23 = match node.["has_pull_requests"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_22 = match node.["has_projects"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_21 = match node.["has_issues"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_20 = match node.["full_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_19 = match node.["forks_count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_18 = match node.["fork"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_17 = match node.["external_wiki"] with @@ -24610,85 +23250,85 @@ module RepositoryJsonParseExtension = let arg_15 = match node.["empty"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_14 = match node.["description"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_13 = match node.["default_merge_style"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_12 = match node.["default_delete_branch_after_merge"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_11 = match node.["default_branch"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["default_allow_maintainer_edit"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["clone_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["avatar_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["archived"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["allow_squash_merge"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["allow_rebase_update"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["allow_rebase_explicit"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["allow_rebase"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["allow_merge_commits"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "allow_merge_commits" || key = "allow_rebase" @@ -24745,65 +23385,63 @@ module RepositoryJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - AllowMergeCommits = arg_1 - AllowRebase = arg_2 - AllowRebaseExplicit = arg_3 - AllowRebaseUpdate = arg_4 - AllowSquashMerge = arg_5 - Archived = arg_6 - AvatarUrl = arg_7 - CloneUrl = arg_8 - CreatedAt = arg_9 - DefaultAllowMaintainerEdit = arg_10 - DefaultBranch = arg_11 - DefaultDeleteBranchAfterMerge = arg_12 - DefaultMergeStyle = arg_13 - Description = arg_14 - Empty = arg_15 - ExternalTracker = arg_16 - ExternalWiki = arg_17 - Fork = arg_18 - ForksCount = arg_19 - FullName = arg_20 - HasIssues = arg_21 - HasProjects = arg_22 - HasPullRequests = arg_23 - HasWiki = arg_24 - HtmlUrl = arg_25 - Id = arg_26 - IgnoreWhitespaceConflicts = arg_27 - Internal = arg_28 - InternalTracker = arg_29 - Language = arg_30 - LanguagesUrl = arg_31 - Link = arg_32 - Mirror = arg_33 - MirrorInterval = arg_34 - MirrorUpdated = arg_35 - Name = arg_36 - OpenIssuesCount = arg_37 - OpenPrCounter = arg_38 - OriginalUrl = arg_39 - Owner = arg_40 - Parent = arg_41 - Permissions = arg_42 - Private = arg_43 - ReleaseCounter = arg_44 - RepoTransfer = arg_45 - Size = arg_46 - SshUrl = arg_47 - StarsCount = arg_48 - Template = arg_49 - UpdatedAt = arg_50 - WatchersCount = arg_51 - Website = arg_52 - } + { AdditionalProperties = arg_0 + AllowMergeCommits = arg_1 + AllowRebase = arg_2 + AllowRebaseExplicit = arg_3 + AllowRebaseUpdate = arg_4 + AllowSquashMerge = arg_5 + Archived = arg_6 + AvatarUrl = arg_7 + CloneUrl = arg_8 + CreatedAt = arg_9 + DefaultAllowMaintainerEdit = arg_10 + DefaultBranch = arg_11 + DefaultDeleteBranchAfterMerge = arg_12 + DefaultMergeStyle = arg_13 + Description = arg_14 + Empty = arg_15 + ExternalTracker = arg_16 + ExternalWiki = arg_17 + Fork = arg_18 + ForksCount = arg_19 + FullName = arg_20 + HasIssues = arg_21 + HasProjects = arg_22 + HasPullRequests = arg_23 + HasWiki = arg_24 + HtmlUrl = arg_25 + Id = arg_26 + IgnoreWhitespaceConflicts = arg_27 + Internal = arg_28 + InternalTracker = arg_29 + Language = arg_30 + LanguagesUrl = arg_31 + Link = arg_32 + Mirror = arg_33 + MirrorInterval = arg_34 + MirrorUpdated = arg_35 + Name = arg_36 + OpenIssuesCount = arg_37 + OpenPrCounter = arg_38 + OriginalUrl = arg_39 + Owner = arg_40 + Parent = arg_41 + Permissions = arg_42 + Private = arg_43 + ReleaseCounter = arg_44 + RepoTransfer = arg_45 + Size = arg_46 + SshUrl = arg_47 + StarsCount = arg_48 + Template = arg_49 + UpdatedAt = arg_50 + WatchersCount = arg_51 + Website = arg_52 } namespace Gitea /// Module containing JSON parsing extension members for the SearchResults type @@ -24813,40 +23451,38 @@ module SearchResultsJsonParseExtension = type SearchResults with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : SearchResults = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : SearchResults = let arg_2 = match node.["ok"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["data"] with | null -> None | v -> - v.AsArray () + v.AsArray() |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "data" || key = "ok" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Data = arg_1 - Ok = arg_2 - } + { AdditionalProperties = arg_0 + Data = arg_1 + Ok = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the AnnotatedTag type @@ -24856,7 +23492,7 @@ module AnnotatedTagJsonParseExtension = type AnnotatedTag with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : AnnotatedTag = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : AnnotatedTag = let arg_7 = match node.["verification"] with | null -> None @@ -24865,7 +23501,7 @@ module AnnotatedTagJsonParseExtension = let arg_6 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["tagger"] with @@ -24875,12 +23511,12 @@ module AnnotatedTagJsonParseExtension = let arg_4 = match node.["tag"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["object"] with @@ -24890,15 +23526,15 @@ module AnnotatedTagJsonParseExtension = let arg_1 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "message" || key = "object" @@ -24910,20 +23546,18 @@ module AnnotatedTagJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Message = arg_1 - Object = arg_2 - Sha = arg_3 - Tag = arg_4 - Tagger = arg_5 - Url = arg_6 - Verification = arg_7 - } + { AdditionalProperties = arg_0 + Message = arg_1 + Object = arg_2 + Sha = arg_3 + Tag = arg_4 + Tagger = arg_5 + Url = arg_6 + Verification = arg_7 } namespace Gitea /// Module containing JSON parsing extension members for the CombinedStatus type @@ -24933,22 +23567,22 @@ module CombinedStatusJsonParseExtension = type CombinedStatus with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CombinedStatus = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CombinedStatus = let arg_7 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["total_count"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["statuses"] with | null -> None | v -> - v.AsArray () + v.AsArray() |> Seq.map (fun elt -> CommitStatus.jsonParse elt) |> List.ofSeq |> Some @@ -24956,12 +23590,12 @@ module CombinedStatusJsonParseExtension = let arg_4 = match node.["state"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["repository"] with @@ -24971,15 +23605,15 @@ module CombinedStatusJsonParseExtension = let arg_1 = match node.["commit_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "commit_url" || key = "repository" @@ -24991,20 +23625,18 @@ module CombinedStatusJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - CommitUrl = arg_1 - Repository = arg_2 - Sha = arg_3 - State = arg_4 - Statuses = arg_5 - TotalCount = arg_6 - Url = arg_7 - } + { AdditionalProperties = arg_0 + CommitUrl = arg_1 + Repository = arg_2 + Sha = arg_3 + State = arg_4 + Statuses = arg_5 + TotalCount = arg_6 + Url = arg_7 } namespace Gitea /// Module containing JSON parsing extension members for the Commit type @@ -25014,11 +23646,11 @@ module CommitJsonParseExtension = type Commit with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Commit = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Commit = let arg_10 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["stats"] with @@ -25028,13 +23660,13 @@ module CommitJsonParseExtension = let arg_8 = match node.["sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["parents"] with | null -> None | v -> - v.AsArray () + v.AsArray() |> Seq.map (fun elt -> CommitMeta.jsonParse elt) |> List.ofSeq |> Some @@ -25042,13 +23674,13 @@ module CommitJsonParseExtension = let arg_6 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["files"] with | null -> None | v -> - v.AsArray () + v.AsArray() |> Seq.map (fun elt -> CommitAffectedFiles.jsonParse elt) |> List.ofSeq |> Some @@ -25056,7 +23688,7 @@ module CommitJsonParseExtension = let arg_4 = match node.["created"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["committer"] with @@ -25075,11 +23707,11 @@ module CommitJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "author" || key = "commit" @@ -25094,23 +23726,21 @@ module CommitJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Author = arg_1 - Commit = arg_2 - Committer = arg_3 - Created = arg_4 - Files = arg_5 - HtmlUrl = arg_6 - Parents = arg_7 - Sha = arg_8 - Stats = arg_9 - Url = arg_10 - } + { AdditionalProperties = arg_0 + Author = arg_1 + Commit = arg_2 + Committer = arg_3 + Created = arg_4 + Files = arg_5 + HtmlUrl = arg_6 + Parents = arg_7 + Sha = arg_8 + Stats = arg_9 + Url = arg_10 } namespace Gitea /// Module containing JSON parsing extension members for the DeployKey type @@ -25120,16 +23750,16 @@ module DeployKeyJsonParseExtension = type DeployKey with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : DeployKey = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : DeployKey = let arg_9 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["repository"] with @@ -25139,40 +23769,40 @@ module DeployKeyJsonParseExtension = let arg_6 = match node.["read_only"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["key_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["key"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["fingerprint"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "created_at" || key = "fingerprint" @@ -25186,22 +23816,20 @@ module DeployKeyJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - CreatedAt = arg_1 - Fingerprint = arg_2 - Id = arg_3 - Key = arg_4 - KeyId = arg_5 - ReadOnly = arg_6 - Repository = arg_7 - Title = arg_8 - Url = arg_9 - } + { AdditionalProperties = arg_0 + CreatedAt = arg_1 + Fingerprint = arg_2 + Id = arg_3 + Key = arg_4 + KeyId = arg_5 + ReadOnly = arg_6 + Repository = arg_7 + Title = arg_8 + Url = arg_9 } namespace Gitea /// Module containing JSON parsing extension members for the FileDeleteResponse type @@ -25211,7 +23839,7 @@ module FileDeleteResponseJsonParseExtension = type FileDeleteResponse with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : FileDeleteResponse = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : FileDeleteResponse = let arg_3 = match node.["verification"] with | null -> None @@ -25229,24 +23857,22 @@ module FileDeleteResponseJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "commit" || key = "content" || key = "verification" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Commit = arg_1 - Content = arg_2 - Verification = arg_3 - } + { AdditionalProperties = arg_0 + Commit = arg_1 + Content = arg_2 + Verification = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the FileResponse type @@ -25256,7 +23882,7 @@ module FileResponseJsonParseExtension = type FileResponse with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : FileResponse = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : FileResponse = let arg_3 = match node.["verification"] with | null -> None @@ -25274,24 +23900,22 @@ module FileResponseJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "commit" || key = "content" || key = "verification" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Commit = arg_1 - Content = arg_2 - Verification = arg_3 - } + { AdditionalProperties = arg_0 + Commit = arg_1 + Content = arg_2 + Verification = arg_3 } namespace Gitea /// Module containing JSON parsing extension members for the Issue type @@ -25301,7 +23925,7 @@ module IssueJsonParseExtension = type Issue with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Issue = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Issue = let arg_24 = match node.["user"] with | null -> None @@ -25310,22 +23934,22 @@ module IssueJsonParseExtension = let arg_23 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_22 = match node.["updated_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_21 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_20 = match node.["state"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_19 = match node.["repository"] with @@ -25335,7 +23959,7 @@ module IssueJsonParseExtension = let arg_18 = match node.["ref"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_17 = match node.["pull_request"] with @@ -25345,17 +23969,17 @@ module IssueJsonParseExtension = let arg_16 = match node.["original_author_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_15 = match node.["original_author"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_14 = match node.["number"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_13 = match node.["milestone"] with @@ -25365,52 +23989,52 @@ module IssueJsonParseExtension = let arg_12 = match node.["labels"] with | null -> None - | v -> v.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq |> Some + | v -> v.AsArray() |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq |> Some let arg_11 = match node.["is_locked"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["due_date"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["comments"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["closed_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["assignees"] with | null -> None - | v -> v.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq |> Some + | v -> v.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq |> Some let arg_2 = match node.["assignee"] with @@ -25421,18 +24045,18 @@ module IssueJsonParseExtension = match node.["assets"] with | null -> None | v -> - v.AsArray () + v.AsArray() |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "assets" || key = "assignee" @@ -25461,37 +24085,35 @@ module IssueJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Assets = arg_1 - Assignee = arg_2 - Assignees = arg_3 - Body = arg_4 - ClosedAt = arg_5 - Comments = arg_6 - CreatedAt = arg_7 - DueDate = arg_8 - HtmlUrl = arg_9 - Id = arg_10 - IsLocked = arg_11 - Labels = arg_12 - Milestone = arg_13 - Number = arg_14 - OriginalAuthor = arg_15 - OriginalAuthorId = arg_16 - PullRequest = arg_17 - Ref = arg_18 - Repository = arg_19 - State = arg_20 - Title = arg_21 - UpdatedAt = arg_22 - Url = arg_23 - User = arg_24 - } + { AdditionalProperties = arg_0 + Assets = arg_1 + Assignee = arg_2 + Assignees = arg_3 + Body = arg_4 + ClosedAt = arg_5 + Comments = arg_6 + CreatedAt = arg_7 + DueDate = arg_8 + HtmlUrl = arg_9 + Id = arg_10 + IsLocked = arg_11 + Labels = arg_12 + Milestone = arg_13 + Number = arg_14 + OriginalAuthor = arg_15 + OriginalAuthorId = arg_16 + PullRequest = arg_17 + Ref = arg_18 + Repository = arg_19 + State = arg_20 + Title = arg_21 + UpdatedAt = arg_22 + Url = arg_23 + User = arg_24 } namespace Gitea /// Module containing JSON parsing extension members for the NodeInfo type @@ -25501,11 +24123,11 @@ module NodeInfoJsonParseExtension = type NodeInfo with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : NodeInfo = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : NodeInfo = let arg_7 = match node.["version"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["usage"] with @@ -25526,15 +24148,15 @@ module NodeInfoJsonParseExtension = match node.["protocols"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_2 = match node.["openRegistrations"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["metadata"] with @@ -25543,11 +24165,11 @@ module NodeInfoJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "metadata" || key = "openRegistrations" @@ -25559,20 +24181,18 @@ module NodeInfoJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Metadata = arg_1 - OpenRegistrations = arg_2 - Protocols = arg_3 - Services = arg_4 - Software = arg_5 - Usage = arg_6 - Version = arg_7 - } + { AdditionalProperties = arg_0 + Metadata = arg_1 + OpenRegistrations = arg_2 + Protocols = arg_3 + Services = arg_4 + Software = arg_5 + Usage = arg_6 + Version = arg_7 } namespace Gitea /// Module containing JSON parsing extension members for the Note type @@ -25582,11 +24202,11 @@ module NoteJsonParseExtension = type Note with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Note = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Note = let arg_2 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["commit"] with @@ -25595,23 +24215,21 @@ module NoteJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "commit" || key = "message" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Commit = arg_1 - Message = arg_2 - } + { AdditionalProperties = arg_0 + Commit = arg_1 + Message = arg_2 } namespace Gitea /// Module containing JSON parsing extension members for the NotificationThread type @@ -25621,21 +24239,21 @@ module NotificationThreadJsonParseExtension = type NotificationThread with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : NotificationThread = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : NotificationThread = let arg_7 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["updated_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["unread"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["subject"] with @@ -25650,20 +24268,20 @@ module NotificationThreadJsonParseExtension = let arg_2 = match node.["pinned"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "id" || key = "pinned" @@ -25675,20 +24293,18 @@ module NotificationThreadJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Id = arg_1 - Pinned = arg_2 - Repository = arg_3 - Subject = arg_4 - Unread = arg_5 - UpdatedAt = arg_6 - Url = arg_7 - } + { AdditionalProperties = arg_0 + Id = arg_1 + Pinned = arg_2 + Repository = arg_3 + Subject = arg_4 + Unread = arg_5 + UpdatedAt = arg_6 + Url = arg_7 } namespace Gitea /// Module containing JSON parsing extension members for the PRBranchInfo type @@ -25698,16 +24314,16 @@ module PRBranchInfoJsonParseExtension = type PRBranchInfo with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : PRBranchInfo = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : PRBranchInfo = let arg_5 = match node.["sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["repo_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["repo"] with @@ -25717,35 +24333,33 @@ module PRBranchInfoJsonParseExtension = let arg_2 = match node.["ref"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["label"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "label" || key = "ref" || key = "repo" || key = "repo_id" || key = "sha" then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Label = arg_1 - Ref = arg_2 - Repo = arg_3 - RepoId = arg_4 - Sha = arg_5 - } + { AdditionalProperties = arg_0 + Label = arg_1 + Ref = arg_2 + Repo = arg_3 + RepoId = arg_4 + Sha = arg_5 } namespace Gitea /// Module containing JSON parsing extension members for the Package type @@ -25755,16 +24369,16 @@ module PackageJsonParseExtension = type Package with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Package = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Package = let arg_8 = match node.["version"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["type"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["repository"] with @@ -25779,12 +24393,12 @@ module PackageJsonParseExtension = let arg_4 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["creator"] with @@ -25794,15 +24408,15 @@ module PackageJsonParseExtension = let arg_1 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "created_at" || key = "creator" @@ -25815,21 +24429,19 @@ module PackageJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - CreatedAt = arg_1 - Creator = arg_2 - Id = arg_3 - Name = arg_4 - Owner = arg_5 - Repository = arg_6 - Type = arg_7 - Version = arg_8 - } + { AdditionalProperties = arg_0 + CreatedAt = arg_1 + Creator = arg_2 + Id = arg_3 + Name = arg_4 + Owner = arg_5 + Repository = arg_6 + Type = arg_7 + Version = arg_8 } namespace Gitea /// Module containing JSON parsing extension members for the PayloadCommit type @@ -25839,7 +24451,7 @@ module PayloadCommitJsonParseExtension = type PayloadCommit with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : PayloadCommit = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : PayloadCommit = let arg_10 = match node.["verification"] with | null -> None @@ -25848,19 +24460,19 @@ module PayloadCommitJsonParseExtension = let arg_9 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["timestamp"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["removed"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some @@ -25868,20 +24480,20 @@ module PayloadCommitJsonParseExtension = match node.["modified"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_5 = match node.["message"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["committer"] with @@ -25897,18 +24509,18 @@ module PayloadCommitJsonParseExtension = match node.["added"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "added" || key = "author" @@ -25923,23 +24535,21 @@ module PayloadCommitJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Added = arg_1 - Author = arg_2 - Committer = arg_3 - Id = arg_4 - Message = arg_5 - Modified = arg_6 - Removed = arg_7 - Timestamp = arg_8 - Url = arg_9 - Verification = arg_10 - } + { AdditionalProperties = arg_0 + Added = arg_1 + Author = arg_2 + Committer = arg_3 + Id = arg_4 + Message = arg_5 + Modified = arg_6 + Removed = arg_7 + Timestamp = arg_8 + Url = arg_9 + Verification = arg_10 } namespace Gitea /// Module containing JSON parsing extension members for the PullRequest type @@ -25949,7 +24559,7 @@ module PullRequestJsonParseExtension = type PullRequest with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : PullRequest = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : PullRequest = let arg_29 = match node.["user"] with | null -> None @@ -25958,32 +24568,32 @@ module PullRequestJsonParseExtension = let arg_28 = match node.["url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_27 = match node.["updated_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_26 = match node.["title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_25 = match node.["state"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_24 = match node.["patch_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_23 = match node.["number"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_22 = match node.["milestone"] with @@ -25998,47 +24608,47 @@ module PullRequestJsonParseExtension = let arg_20 = match node.["merged_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_19 = match node.["merged"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_18 = match node.["mergeable"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_17 = match node.["merge_commit_sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_16 = match node.["merge_base"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_15 = match node.["labels"] with | null -> None - | v -> v.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq |> Some + | v -> v.AsArray() |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq |> Some let arg_14 = match node.["is_locked"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_13 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_12 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_11 = match node.["head"] with @@ -26048,32 +24658,32 @@ module PullRequestJsonParseExtension = let arg_10 = match node.["due_date"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_9 = match node.["diff_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["comments"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["closed_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["base"] with @@ -26083,7 +24693,7 @@ module PullRequestJsonParseExtension = let arg_3 = match node.["assignees"] with | null -> None - | v -> v.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq |> Some + | v -> v.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq |> Some let arg_2 = match node.["assignee"] with @@ -26093,15 +24703,15 @@ module PullRequestJsonParseExtension = let arg_1 = match node.["allow_maintainer_edit"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "allow_maintainer_edit" || key = "assignee" @@ -26135,42 +24745,40 @@ module PullRequestJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - AllowMaintainerEdit = arg_1 - Assignee = arg_2 - Assignees = arg_3 - Base = arg_4 - Body = arg_5 - ClosedAt = arg_6 - Comments = arg_7 - CreatedAt = arg_8 - DiffUrl = arg_9 - DueDate = arg_10 - Head = arg_11 - HtmlUrl = arg_12 - Id = arg_13 - IsLocked = arg_14 - Labels = arg_15 - MergeBase = arg_16 - MergeCommitSha = arg_17 - Mergeable = arg_18 - Merged = arg_19 - MergedAt = arg_20 - MergedBy = arg_21 - Milestone = arg_22 - Number = arg_23 - PatchUrl = arg_24 - State = arg_25 - Title = arg_26 - UpdatedAt = arg_27 - Url = arg_28 - User = arg_29 - } + { AdditionalProperties = arg_0 + AllowMaintainerEdit = arg_1 + Assignee = arg_2 + Assignees = arg_3 + Base = arg_4 + Body = arg_5 + ClosedAt = arg_6 + Comments = arg_7 + CreatedAt = arg_8 + DiffUrl = arg_9 + DueDate = arg_10 + Head = arg_11 + HtmlUrl = arg_12 + Id = arg_13 + IsLocked = arg_14 + Labels = arg_15 + MergeBase = arg_16 + MergeCommitSha = arg_17 + Mergeable = arg_18 + Merged = arg_19 + MergedAt = arg_20 + MergedBy = arg_21 + Milestone = arg_22 + Number = arg_23 + PatchUrl = arg_24 + State = arg_25 + Title = arg_26 + UpdatedAt = arg_27 + Url = arg_28 + User = arg_29 } namespace Gitea /// Module containing JSON parsing extension members for the TrackedTime type @@ -26180,26 +24788,26 @@ module TrackedTimeJsonParseExtension = type TrackedTime with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : TrackedTime = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : TrackedTime = let arg_7 = match node.["user_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["user_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["time"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["issue_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["issue"] with @@ -26209,20 +24817,20 @@ module TrackedTimeJsonParseExtension = let arg_2 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["created"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "created" || key = "id" @@ -26234,20 +24842,18 @@ module TrackedTimeJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Created = arg_1 - Id = arg_2 - Issue = arg_3 - IssueId = arg_4 - Time = arg_5 - UserId = arg_6 - UserName = arg_7 - } + { AdditionalProperties = arg_0 + Created = arg_1 + Id = arg_2 + Issue = arg_3 + IssueId = arg_4 + Time = arg_5 + UserId = arg_6 + UserName = arg_7 } namespace Gitea /// Module containing JSON parsing extension members for the Branch type @@ -26257,50 +24863,50 @@ module BranchJsonParseExtension = type Branch with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Branch = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Branch = let arg_9 = match node.["user_can_push"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_8 = match node.["user_can_merge"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["status_check_contexts"] with | null -> None | v -> - v.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + v.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq |> Some let arg_6 = match node.["required_approvals"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["protected"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_4 = match node.["name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["enable_status_check"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["effective_branch_protection_name"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["commit"] with @@ -26309,11 +24915,11 @@ module BranchJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "commit" || key = "effective_branch_protection_name" @@ -26327,22 +24933,20 @@ module BranchJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Commit = arg_1 - EffectiveBranchProtectionName = arg_2 - EnableStatusCheck = arg_3 - Name = arg_4 - Protected = arg_5 - RequiredApprovals = arg_6 - StatusCheckContexts = arg_7 - UserCanMerge = arg_8 - UserCanPush = arg_9 - } + { AdditionalProperties = arg_0 + Commit = arg_1 + EffectiveBranchProtectionName = arg_2 + EnableStatusCheck = arg_3 + Name = arg_4 + Protected = arg_5 + RequiredApprovals = arg_6 + StatusCheckContexts = arg_7 + UserCanMerge = arg_8 + UserCanPush = arg_9 } namespace Gitea /// Module containing JSON parsing extension members for the TimelineComment type @@ -26352,7 +24956,7 @@ module TimelineCommentJsonParseExtension = type TimelineComment with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : TimelineComment = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : TimelineComment = let arg_29 = match node.["user"] with | null -> None @@ -26361,12 +24965,12 @@ module TimelineCommentJsonParseExtension = let arg_28 = match node.["updated_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_27 = match node.["type"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_26 = match node.["tracked_time"] with @@ -26376,7 +24980,7 @@ module TimelineCommentJsonParseExtension = let arg_25 = match node.["review_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_24 = match node.["resolve_doer"] with @@ -26386,7 +24990,7 @@ module TimelineCommentJsonParseExtension = let arg_23 = match node.["removed_assignee"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_22 = match node.["ref_issue"] with @@ -26396,7 +25000,7 @@ module TimelineCommentJsonParseExtension = let arg_21 = match node.["ref_commit_sha"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_20 = match node.["ref_comment"] with @@ -26406,32 +25010,32 @@ module TimelineCommentJsonParseExtension = let arg_19 = match node.["ref_action"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_18 = match node.["pull_request_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_17 = match node.["project_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_16 = match node.["old_title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_15 = match node.["old_ref"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_14 = match node.["old_project_id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_13 = match node.["old_milestone"] with @@ -26441,12 +25045,12 @@ module TimelineCommentJsonParseExtension = let arg_12 = match node.["new_title"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_11 = match node.["new_ref"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_10 = match node.["milestone"] with @@ -26461,17 +25065,17 @@ module TimelineCommentJsonParseExtension = let arg_8 = match node.["issue_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_7 = match node.["id"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_6 = match node.["html_url"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_5 = match node.["dependent_issue"] with @@ -26481,12 +25085,12 @@ module TimelineCommentJsonParseExtension = let arg_4 = match node.["created_at"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = match node.["body"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = match node.["assignee_team"] with @@ -26500,11 +25104,11 @@ module TimelineCommentJsonParseExtension = let arg_0 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "assignee" || key = "assignee_team" @@ -26538,42 +25142,40 @@ module TimelineCommentJsonParseExtension = then () else - result.Add (key, node.[key]) + result.Add(key, node.[key]) result - { - AdditionalProperties = arg_0 - Assignee = arg_1 - AssigneeTeam = arg_2 - Body = arg_3 - CreatedAt = arg_4 - DependentIssue = arg_5 - HtmlUrl = arg_6 - Id = arg_7 - IssueUrl = arg_8 - Label = arg_9 - Milestone = arg_10 - NewRef = arg_11 - NewTitle = arg_12 - OldMilestone = arg_13 - OldProjectId = arg_14 - OldRef = arg_15 - OldTitle = arg_16 - ProjectId = arg_17 - PullRequestUrl = arg_18 - RefAction = arg_19 - RefComment = arg_20 - RefCommitSha = arg_21 - RefIssue = arg_22 - RemovedAssignee = arg_23 - ResolveDoer = arg_24 - ReviewId = arg_25 - TrackedTime = arg_26 - Type = arg_27 - UpdatedAt = arg_28 - User = arg_29 - } + { AdditionalProperties = arg_0 + Assignee = arg_1 + AssigneeTeam = arg_2 + Body = arg_3 + CreatedAt = arg_4 + DependentIssue = arg_5 + HtmlUrl = arg_6 + Id = arg_7 + IssueUrl = arg_8 + Label = arg_9 + Milestone = arg_10 + NewRef = arg_11 + NewTitle = arg_12 + OldMilestone = arg_13 + OldProjectId = arg_14 + OldRef = arg_15 + OldTitle = arg_16 + ProjectId = arg_17 + PullRequestUrl = arg_18 + RefAction = arg_19 + RefComment = arg_20 + RefCommitSha = arg_21 + RefIssue = arg_22 + RemovedAssignee = arg_23 + ResolveDoer = arg_24 + ReviewId = arg_25 + TrackedTime = arg_26 + Type = arg_27 + UpdatedAt = arg_28 + User = arg_29 } namespace Gitea /// Module containing JSON parsing extension members for the LanguageStatistics type @@ -26583,15861 +25185,16130 @@ module LanguageStatisticsJsonParseExtension = type LanguageStatistics with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : LanguageStatistics = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : LanguageStatistics = let arg_0 = - let result = System.Collections.Generic.Dictionary () - let node = node.AsObject () + let result = System.Collections.Generic.Dictionary() + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if false then () else - result.Add ( - key, - (match node.[key] with - | null -> - raise ( - System.Collections.Generic.KeyNotFoundException ( - sprintf "Required key '%s' not found on JSON object" (key) + result + .Add( + key, + (match node.[key] with + | null -> + raise ( + System.Collections.Generic.KeyNotFoundException( + sprintf "Required key '%s' not found on JSON object" (key) + ) ) - ) - | v -> v) - .AsValue() - .GetValue () - ) + | v -> v) + .AsValue() + .GetValue() + ) result - { - AdditionalProperties = arg_0 - } + { AdditionalProperties = arg_0 } +// Source generated by Whippet. Changes will be overwritten on next build. namespace Gitea open WoofWare.Myriad.Plugins /// Module for constructing a REST client. -[] +[] module Gitea = /// Create a REST client. - let make (client : System.Net.Http.HttpClient) : IGitea = + let make (client: System.Net.Http.HttpClient) : IGitea = { new IGitea with - member _.ActivitypubPerson (username : string, ct : System.Threading.CancellationToken option) = + member _.ActivitypubPerson(username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "activitypub/user/{username}" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return ActivityPub.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.ActivitypubPersonInbox (username : string, ct : System.Threading.CancellationToken option) = + member _.ActivitypubPersonInbox(username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "activitypub/user/{username}/inbox" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.AdminCronList (page : int, limit : int, ct : System.Threading.CancellationToken option) = + member _.AdminCronList(page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("admin/cron" - + (if "admin/cron".IndexOf (char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "admin/cron".IndexOf(char 63) >= 0 then "&" else "?") + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Cron.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Cron.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.AdminCronRun (task : string, ct : System.Threading.CancellationToken option) = + member _.AdminCronRun(task: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "admin/cron/{task}" - .Replace ("{task}", task.ToString () |> System.Uri.EscapeDataString), + .Replace("{task}", task.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.AdminListHooks (page : int, limit : int, ct : System.Threading.CancellationToken option) = + member _.AdminListHooks(page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("admin/hooks" - + (if "admin/hooks".IndexOf (char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "admin/hooks".IndexOf(char 63) >= 0 then "&" else "?") + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Hook.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Hook.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.AdminCreateHook (body : CreateHookOption, ct : System.Threading.CancellationToken option) = + member _.AdminCreateHook(body: CreateHookOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("admin/hooks", System.UriKind.Relative) + System.Uri("admin/hooks", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateHookOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Hook.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.AdminGetHook (id : int, ct : System.Threading.CancellationToken option) = + member _.AdminGetHook(id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( - "admin/hooks/{id}" - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + System.Uri( + "admin/hooks/{id}".Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Hook.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.AdminEditHook (id : int, body : EditHookOption, ct : System.Threading.CancellationToken option) = + member _.AdminEditHook(id: int, body: EditHookOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( - "admin/hooks/{id}" - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + System.Uri( + "admin/hooks/{id}".Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditHookOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Hook.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.AdminGetAllOrgs (page : int, limit : int, ct : System.Threading.CancellationToken option) = + member _.AdminGetAllOrgs(page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("admin/orgs" - + (if "admin/orgs".IndexOf (char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "admin/orgs".IndexOf(char 63) >= 0 then "&" else "?") + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Organization.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.AdminUnadoptedList - (page : int, limit : int, pattern : string, ct : System.Threading.CancellationToken option) - = + ( + page: int, + limit: int, + pattern: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("admin/unadopted" - + (if "admin/unadopted".IndexOf (char 63) >= 0 then - "&" - else - "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString) - + "&pattern=" - + ((pattern.ToString ()) |> System.Uri.EscapeDataString)), + + (if "admin/unadopted".IndexOf(char 63) >= 0 then "&" else "?") + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString) + + "&pattern=" + + ((pattern.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + jsonNode.AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.AdminAdoptRepository - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + member _.AdminAdoptRepository(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "admin/unadopted/{owner}/{repo}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.AdminDeleteUnadoptedRepository - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "admin/unadopted/{owner}/{repo}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.AdminGetAllUsers (page : int, limit : int, ct : System.Threading.CancellationToken option) = + member _.AdminGetAllUsers(page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("admin/users" - + (if "admin/users".IndexOf (char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "admin/users".IndexOf(char 63) >= 0 then "&" else "?") + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.AdminCreateUser (body : CreateUserOption, ct : System.Threading.CancellationToken option) = + member _.AdminCreateUser(body: CreateUserOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("admin/users", System.UriKind.Relative) + System.Uri("admin/users", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateUserOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return User.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.AdminDeleteUser (username : string, purge : bool, ct : System.Threading.CancellationToken option) = + member _.AdminDeleteUser(username: string, purge: bool, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("admin/users/{username}" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString) - + (if "admin/users/{username}".IndexOf (char 63) >= 0 then + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString) + + (if "admin/users/{username}".IndexOf(char 63) >= 0 then "&" else "?") - + "purge=" - + ((purge.ToString ()) |> System.Uri.EscapeDataString)), + + "purge=" + + ((purge.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.AdminEditUser - (username : string, body : EditUserOption, ct : System.Threading.CancellationToken option) - = + ( + username: string, + body: EditUserOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "admin/users/{username}" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditUserOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return User.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.AdminCreatePublicKey - (username : string, key : CreateKeyOption, ct : System.Threading.CancellationToken option) - = + ( + username: string, + key: CreateKeyOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "admin/users/{username}/keys" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( key |> CreateKeyOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return PublicKey.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.AdminDeleteUserPublicKey - (username : string, id : int, ct : System.Threading.CancellationToken option) - = + ( + username: string, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "admin/users/{username}/keys/{id}" - .Replace("{username}", username.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.AdminCreateOrg - (username : string, organization : CreateOrgOption, ct : System.Threading.CancellationToken option) - = + ( + username: string, + organization: CreateOrgOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "admin/users/{username}/orgs" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( organization |> CreateOrgOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Organization.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.AdminCreateRepo - (username : string, repository : CreateRepoOption, ct : System.Threading.CancellationToken option) - = + ( + username: string, + repository: CreateRepoOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "admin/users/{username}/repos" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( repository |> CreateRepoOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.AdminDeleteHook (id : int, ct : System.Threading.CancellationToken option) = + member _.AdminDeleteHook(id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( - "amdin/hooks/{id}" - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + System.Uri( + "amdin/hooks/{id}".Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RenderMarkdown (body : MarkdownOption, ct : System.Threading.CancellationToken option) = + member _.RenderMarkdown(body: MarkdownOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("markdown", System.UriKind.Relative) + System.Uri("markdown", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> MarkdownOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "text/html" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RenderMarkdownRaw (body : string, ct : System.Threading.CancellationToken option) = + member _.RenderMarkdownRaw(body: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("markdown/raw", System.UriKind.Relative) + System.Uri("markdown/raw", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let queryParams = new System.Net.Http.StringContent (body, null, "text/html") + let queryParams = new System.Net.Http.StringContent(body, null, "text/html") do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetNodeInfo (ct : System.Threading.CancellationToken option) = + member _.GetNodeInfo(ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("nodeinfo", System.UriKind.Relative) + System.Uri("nodeinfo", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return NodeInfo.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.NotifyGetList ( - all : bool, - status_types : string list, - subject_type : string list, - since : string, - before : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + all: bool, + status_types: string list, + subject_type: string list, + since: string, + before: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("notifications" - + (if "notifications".IndexOf (char 63) >= 0 then "&" else "?") - + "all=" - + ((all.ToString ()) |> System.Uri.EscapeDataString) - + "&status-types=" - + ((status_types.ToString ()) |> System.Uri.EscapeDataString) - + "&subject-type=" - + ((subject_type.ToString ()) |> System.Uri.EscapeDataString) - + "&since=" - + ((since.ToString ()) |> System.Uri.EscapeDataString) - + "&before=" - + ((before.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "notifications".IndexOf(char 63) >= 0 then "&" else "?") + + "all=" + + ((all.ToString()) |> System.Uri.EscapeDataString) + + "&status-types=" + + ((status_types.ToString()) |> System.Uri.EscapeDataString) + + "&subject-type=" + + ((subject_type.ToString()) |> System.Uri.EscapeDataString) + + "&since=" + + ((since.ToString()) |> System.Uri.EscapeDataString) + + "&before=" + + ((before.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> NotificationThread.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.NotifyReadList ( - last_read_at : string, - all : string, - status_types : string list, - to_status : string, - ct : System.Threading.CancellationToken option - ) - = + last_read_at: string, + all: string, + status_types: string list, + to_status: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("notifications" - + (if "notifications".IndexOf (char 63) >= 0 then "&" else "?") - + "last_read_at=" - + ((last_read_at.ToString ()) |> System.Uri.EscapeDataString) - + "&all=" - + ((all.ToString ()) |> System.Uri.EscapeDataString) - + "&status-types=" - + ((status_types.ToString ()) |> System.Uri.EscapeDataString) - + "&to-status=" - + ((to_status.ToString ()) |> System.Uri.EscapeDataString)), + + (if "notifications".IndexOf(char 63) >= 0 then "&" else "?") + + "last_read_at=" + + ((last_read_at.ToString()) |> System.Uri.EscapeDataString) + + "&all=" + + ((all.ToString()) |> System.Uri.EscapeDataString) + + "&status-types=" + + ((status_types.ToString()) |> System.Uri.EscapeDataString) + + "&to-status=" + + ((to_status.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> NotificationThread.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.NotifyNewAvailable (ct : System.Threading.CancellationToken option) = + member _.NotifyNewAvailable(ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("notifications/new", System.UriKind.Relative) + System.Uri("notifications/new", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return NotificationCount.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.NotifyGetThread (id : string, ct : System.Threading.CancellationToken option) = + member _.NotifyGetThread(id: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "notifications/threads/{id}" - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return NotificationThread.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.NotifyReadThread - (id : string, to_status : string, ct : System.Threading.CancellationToken option) - = + member _.NotifyReadThread(id: string, to_status: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("notifications/threads/{id}" - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString) - + (if "notifications/threads/{id}".IndexOf (char 63) >= 0 then + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + + (if "notifications/threads/{id}".IndexOf(char 63) >= 0 then "&" else "?") - + "to-status=" - + ((to_status.ToString ()) |> System.Uri.EscapeDataString)), + + "to-status=" + + ((to_status.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return NotificationThread.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.CreateOrgRepoDeprecated - (org : string, body : CreateRepoOption, ct : System.Threading.CancellationToken option) - = + ( + org: string, + body: CreateRepoOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "org/{org}/repos" - .Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateRepoOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgGetAll (page : int, limit : int, ct : System.Threading.CancellationToken option) = + member _.OrgGetAll(page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("orgs" - + (if "orgs".IndexOf (char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "orgs".IndexOf(char 63) >= 0 then "&" else "?") + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Organization.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgCreate (organization : CreateOrgOption, ct : System.Threading.CancellationToken option) = + member _.OrgCreate(organization: CreateOrgOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("orgs", System.UriKind.Relative) + System.Uri("orgs", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( organization |> CreateOrgOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Organization.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgGet (org : string, ct : System.Threading.CancellationToken option) = + member _.OrgGet(org: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( - "orgs/{org}".Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString), + System.Uri( + "orgs/{org}".Replace("{org}", org.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Organization.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgDelete (org : string, ct : System.Threading.CancellationToken option) = + member _.OrgDelete(org: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( - "orgs/{org}".Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString), + System.Uri( + "orgs/{org}".Replace("{org}", org.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgEdit (org : string, body : EditOrgOption, ct : System.Threading.CancellationToken option) = + member _.OrgEdit(org: string, body: EditOrgOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( - "orgs/{org}".Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString), + System.Uri( + "orgs/{org}".Replace("{org}", org.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditOrgOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Organization.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgListHooks - (org : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + member _.OrgListHooks(org: string, page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("orgs/{org}/hooks" - .Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString) - + (if "orgs/{org}/hooks".IndexOf (char 63) >= 0 then + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + + (if "orgs/{org}/hooks".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Hook.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Hook.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgCreateHook - (org : string, body : CreateHookOption, ct : System.Threading.CancellationToken option) - = + member _.OrgCreateHook(org: string, body: CreateHookOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/hooks" - .Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateHookOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Hook.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgGetHook (org : string, id : int, ct : System.Threading.CancellationToken option) = + member _.OrgGetHook(org: string, id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/hooks/{id}" - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Hook.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgDeleteHook (org : string, id : int, ct : System.Threading.CancellationToken option) = + member _.OrgDeleteHook(org: string, id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/hooks/{id}" - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.OrgEditHook - (org : string, id : int, body : EditHookOption, ct : System.Threading.CancellationToken option) - = + ( + org: string, + id: int, + body: EditHookOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/hooks/{id}" - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditHookOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Hook.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgListLabels - (org : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + member _.OrgListLabels(org: string, page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("orgs/{org}/labels" - .Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString) - + (if "orgs/{org}/labels".IndexOf (char 63) >= 0 then + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + + (if "orgs/{org}/labels".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.OrgCreateLabel - (org : string, body : CreateLabelOption, ct : System.Threading.CancellationToken option) - = + ( + org: string, + body: CreateLabelOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/labels" - .Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateLabelOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Label.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgGetLabel (org : string, id : int, ct : System.Threading.CancellationToken option) = + member _.OrgGetLabel(org: string, id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/labels/{id}" - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Label.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgDeleteLabel (org : string, id : int, ct : System.Threading.CancellationToken option) = + member _.OrgDeleteLabel(org: string, id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/labels/{id}" - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.OrgEditLabel - (org : string, id : int, body : EditLabelOption, ct : System.Threading.CancellationToken option) - = + ( + org: string, + id: int, + body: EditLabelOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/labels/{id}" - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditLabelOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Label.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgListMembers - (org : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + member _.OrgListMembers(org: string, page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("orgs/{org}/members" - .Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString) - + (if "orgs/{org}/members".IndexOf (char 63) >= 0 then + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + + (if "orgs/{org}/members".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgIsMember (org : string, username : string, ct : System.Threading.CancellationToken option) = + member _.OrgIsMember(org: string, username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/members/{username}" - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgDeleteMember (org : string, username : string, ct : System.Threading.CancellationToken option) = + member _.OrgDeleteMember(org: string, username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/members/{username}" - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.OrgListPublicMembers - (org : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + org: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("orgs/{org}/public_members" - .Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString) - + (if "orgs/{org}/public_members".IndexOf (char 63) >= 0 then + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + + (if "orgs/{org}/public_members".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgIsPublicMember - (org : string, username : string, ct : System.Threading.CancellationToken option) - = + member _.OrgIsPublicMember(org: string, username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/public_members/{username}" - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgConcealMember - (org : string, username : string, ct : System.Threading.CancellationToken option) - = + member _.OrgConcealMember(org: string, username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/public_members/{username}" - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgPublicizeMember - (org : string, username : string, ct : System.Threading.CancellationToken option) - = + member _.OrgPublicizeMember(org: string, username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/public_members/{username}" - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgListRepos - (org : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + member _.OrgListRepos(org: string, page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("orgs/{org}/repos" - .Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString) - + (if "orgs/{org}/repos".IndexOf (char 63) >= 0 then + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + + (if "orgs/{org}/repos".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.CreateOrgRepo - (org : string, body : CreateRepoOption, ct : System.Threading.CancellationToken option) - = + member _.CreateOrgRepo(org: string, body: CreateRepoOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/repos" - .Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateRepoOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgListTeams - (org : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + member _.OrgListTeams(org: string, page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("orgs/{org}/teams" - .Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString) - + (if "orgs/{org}/teams".IndexOf (char 63) >= 0 then + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + + (if "orgs/{org}/teams".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgCreateTeam - (org : string, body : CreateTeamOption, ct : System.Threading.CancellationToken option) - = + member _.OrgCreateTeam(org: string, body: CreateTeamOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "orgs/{org}/teams" - .Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString), + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateTeamOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Team.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.TeamSearch ( - org : string, - q : string, - include_desc : bool, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + org: string, + q: string, + include_desc: bool, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("orgs/{org}/teams/search" - .Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString) - + (if "orgs/{org}/teams/search".IndexOf (char 63) >= 0 then + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + + (if "orgs/{org}/teams/search".IndexOf(char 63) >= 0 then "&" else "?") - + "q=" - + ((q.ToString ()) |> System.Uri.EscapeDataString) - + "&include_desc=" - + ((include_desc.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "q=" + + ((q.ToString()) |> System.Uri.EscapeDataString) + + "&include_desc=" + + ((include_desc.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.ListPackages ( - owner : string, - page : int, - limit : int, - type' : string, - q : string, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + page: int, + limit: int, + type': string, + q: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("packages/{owner}" - .Replace ("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - + (if "packages/{owner}".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + + (if "packages/{owner}".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString) - + "&type=" - + ((type'.ToString ()) |> System.Uri.EscapeDataString) - + "&q=" - + ((q.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString) + + "&type=" + + ((type'.ToString()) |> System.Uri.EscapeDataString) + + "&q=" + + ((q.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Package.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Package.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.GetPackage ( - owner : string, - type' : string, - name : string, - version : string, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + type': string, + name: string, + version: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "packages/{owner}/{type}/{name}/{version}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{type}", type'.ToString () |> System.Uri.EscapeDataString) - .Replace("{name}", name.ToString () |> System.Uri.EscapeDataString) - .Replace ("{version}", version.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{type}", type'.ToString() |> System.Uri.EscapeDataString) + .Replace("{name}", name.ToString() |> System.Uri.EscapeDataString) + .Replace("{version}", version.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Package.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.DeletePackage ( - owner : string, - type' : string, - name : string, - version : string, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + type': string, + name: string, + version: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "packages/{owner}/{type}/{name}/{version}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{type}", type'.ToString () |> System.Uri.EscapeDataString) - .Replace("{name}", name.ToString () |> System.Uri.EscapeDataString) - .Replace ("{version}", version.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{type}", type'.ToString() |> System.Uri.EscapeDataString) + .Replace("{name}", name.ToString() |> System.Uri.EscapeDataString) + .Replace("{version}", version.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.ListPackageFiles ( - owner : string, - type' : string, - name : string, - version : string, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + type': string, + name: string, + version: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "packages/{owner}/{type}/{name}/{version}/files" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{type}", type'.ToString () |> System.Uri.EscapeDataString) - .Replace("{name}", name.ToString () |> System.Uri.EscapeDataString) - .Replace ("{version}", version.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{type}", type'.ToString() |> System.Uri.EscapeDataString) + .Replace("{name}", name.ToString() |> System.Uri.EscapeDataString) + .Replace("{version}", version.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> PackageFile.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueSearchIssues ( - state : string, - labels : string, - milestones : string, - q : string, - priority_repo_id : int, - type' : string, - since : string, - before : string, - assigned : bool, - created : bool, - mentioned : bool, - review_requested : bool, - owner : string, - team : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + state: string, + labels: string, + milestones: string, + q: string, + priority_repo_id: int, + type': string, + since: string, + before: string, + assigned: bool, + created: bool, + mentioned: bool, + review_requested: bool, + owner: string, + team: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/issues/search" - + (if "repos/issues/search".IndexOf (char 63) >= 0 then + + (if "repos/issues/search".IndexOf(char 63) >= 0 then "&" else "?") - + "state=" - + ((state.ToString ()) |> System.Uri.EscapeDataString) - + "&labels=" - + ((labels.ToString ()) |> System.Uri.EscapeDataString) - + "&milestones=" - + ((milestones.ToString ()) |> System.Uri.EscapeDataString) - + "&q=" - + ((q.ToString ()) |> System.Uri.EscapeDataString) - + "&priority_repo_id=" - + ((priority_repo_id.ToString ()) |> System.Uri.EscapeDataString) - + "&type=" - + ((type'.ToString ()) |> System.Uri.EscapeDataString) - + "&since=" - + ((since.ToString ()) |> System.Uri.EscapeDataString) - + "&before=" - + ((before.ToString ()) |> System.Uri.EscapeDataString) - + "&assigned=" - + ((assigned.ToString ()) |> System.Uri.EscapeDataString) - + "&created=" - + ((created.ToString ()) |> System.Uri.EscapeDataString) - + "&mentioned=" - + ((mentioned.ToString ()) |> System.Uri.EscapeDataString) - + "&review_requested=" - + ((review_requested.ToString ()) |> System.Uri.EscapeDataString) - + "&owner=" - + ((owner.ToString ()) |> System.Uri.EscapeDataString) - + "&team=" - + ((team.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), - System.UriKind.Relative - ) - ) - - let httpMessage = - new System.Net.Http.HttpRequestMessage ( + + "state=" + + ((state.ToString()) |> System.Uri.EscapeDataString) + + "&labels=" + + ((labels.ToString()) |> System.Uri.EscapeDataString) + + "&milestones=" + + ((milestones.ToString()) |> System.Uri.EscapeDataString) + + "&q=" + + ((q.ToString()) |> System.Uri.EscapeDataString) + + "&priority_repo_id=" + + ((priority_repo_id.ToString()) |> System.Uri.EscapeDataString) + + "&type=" + + ((type'.ToString()) |> System.Uri.EscapeDataString) + + "&since=" + + ((since.ToString()) |> System.Uri.EscapeDataString) + + "&before=" + + ((before.ToString()) |> System.Uri.EscapeDataString) + + "&assigned=" + + ((assigned.ToString()) |> System.Uri.EscapeDataString) + + "&created=" + + ((created.ToString()) |> System.Uri.EscapeDataString) + + "&mentioned=" + + ((mentioned.ToString()) |> System.Uri.EscapeDataString) + + "&review_requested=" + + ((review_requested.ToString()) |> System.Uri.EscapeDataString) + + "&owner=" + + ((owner.ToString()) |> System.Uri.EscapeDataString) + + "&team=" + + ((team.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), + System.UriKind.Relative + ) + ) + + let httpMessage = + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Issue.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Issue.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoMigrate (body : MigrateRepoOptions, ct : System.Threading.CancellationToken option) = + member _.RepoMigrate(body: MigrateRepoOptions, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("repos/migrate", System.UriKind.Relative) + System.Uri("repos/migrate", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> MigrateRepoOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoSearch ( - q : string, - topic : bool, - includeDesc : bool, - uid : int, - priority_owner_id : int, - team_id : int, - starredBy : int, - private' : bool, - is_private : bool, - template : bool, - archived : bool, - mode : string, - exclusive : bool, - sort : string, - order : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + q: string, + topic: bool, + includeDesc: bool, + uid: int, + priority_owner_id: int, + team_id: int, + starredBy: int, + private': bool, + is_private: bool, + template: bool, + archived: bool, + mode: string, + exclusive: bool, + sort: string, + order: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/search" - + (if "repos/search".IndexOf (char 63) >= 0 then "&" else "?") - + "q=" - + ((q.ToString ()) |> System.Uri.EscapeDataString) - + "&topic=" - + ((topic.ToString ()) |> System.Uri.EscapeDataString) - + "&includeDesc=" - + ((includeDesc.ToString ()) |> System.Uri.EscapeDataString) - + "&uid=" - + ((uid.ToString ()) |> System.Uri.EscapeDataString) - + "&priority_owner_id=" - + ((priority_owner_id.ToString ()) |> System.Uri.EscapeDataString) - + "&team_id=" - + ((team_id.ToString ()) |> System.Uri.EscapeDataString) - + "&starredBy=" - + ((starredBy.ToString ()) |> System.Uri.EscapeDataString) - + "&private=" - + ((private'.ToString ()) |> System.Uri.EscapeDataString) - + "&is_private=" - + ((is_private.ToString ()) |> System.Uri.EscapeDataString) - + "&template=" - + ((template.ToString ()) |> System.Uri.EscapeDataString) - + "&archived=" - + ((archived.ToString ()) |> System.Uri.EscapeDataString) - + "&mode=" - + ((mode.ToString ()) |> System.Uri.EscapeDataString) - + "&exclusive=" - + ((exclusive.ToString ()) |> System.Uri.EscapeDataString) - + "&sort=" - + ((sort.ToString ()) |> System.Uri.EscapeDataString) - + "&order=" - + ((order.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), - System.UriKind.Relative - ) - ) - - let httpMessage = - new System.Net.Http.HttpRequestMessage ( + + (if "repos/search".IndexOf(char 63) >= 0 then "&" else "?") + + "q=" + + ((q.ToString()) |> System.Uri.EscapeDataString) + + "&topic=" + + ((topic.ToString()) |> System.Uri.EscapeDataString) + + "&includeDesc=" + + ((includeDesc.ToString()) |> System.Uri.EscapeDataString) + + "&uid=" + + ((uid.ToString()) |> System.Uri.EscapeDataString) + + "&priority_owner_id=" + + ((priority_owner_id.ToString()) |> System.Uri.EscapeDataString) + + "&team_id=" + + ((team_id.ToString()) |> System.Uri.EscapeDataString) + + "&starredBy=" + + ((starredBy.ToString()) |> System.Uri.EscapeDataString) + + "&private=" + + ((private'.ToString()) |> System.Uri.EscapeDataString) + + "&is_private=" + + ((is_private.ToString()) |> System.Uri.EscapeDataString) + + "&template=" + + ((template.ToString()) |> System.Uri.EscapeDataString) + + "&archived=" + + ((archived.ToString()) |> System.Uri.EscapeDataString) + + "&mode=" + + ((mode.ToString()) |> System.Uri.EscapeDataString) + + "&exclusive=" + + ((exclusive.ToString()) |> System.Uri.EscapeDataString) + + "&sort=" + + ((sort.ToString()) |> System.Uri.EscapeDataString) + + "&order=" + + ((order.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), + System.UriKind.Relative + ) + ) + + let httpMessage = + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return SearchResults.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoGet (owner : string, repo : string, ct : System.Threading.CancellationToken option) = + member _.RepoGet(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoDelete (owner : string, repo : string, ct : System.Threading.CancellationToken option) = + member _.RepoDelete(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoEdit - (owner : string, repo : string, body : EditRepoOption, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + body: EditRepoOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditRepoOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetArchive - (owner : string, repo : string, archive : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + archive: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/archive/{archive}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{archive}", archive.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{archive}", archive.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoGetAssignees (owner : string, repo : string, ct : System.Threading.CancellationToken option) = + member _.RepoGetAssignees(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/assignees" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListBranchProtection - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/branch_protections" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> BranchProtection.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCreateBranchProtection ( - owner : string, - repo : string, - body : CreateBranchProtectionOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + body: CreateBranchProtectionOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/branch_protections" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateBranchProtectionOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return BranchProtection.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetBranchProtection - (owner : string, repo : string, name : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + name: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/branch_protections/{name}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{name}", name.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{name}", name.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return BranchProtection.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteBranchProtection - (owner : string, repo : string, name : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + name: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/branch_protections/{name}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{name}", name.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{name}", name.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoEditBranchProtection ( - owner : string, - repo : string, - name : string, - body : EditBranchProtectionOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + name: string, + body: EditBranchProtectionOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/branch_protections/{name}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{name}", name.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{name}", name.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditBranchProtectionOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return BranchProtection.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListBranches - (owner : string, repo : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/branches" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/branches".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/branches".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Branch.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Branch.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCreateBranch ( - owner : string, - repo : string, - body : CreateBranchRepoOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + body: CreateBranchRepoOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/branches" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateBranchRepoOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Branch.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetBranch - (owner : string, repo : string, branch : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + branch: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/branches/{branch}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{branch}", branch.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{branch}", branch.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Branch.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteBranch - (owner : string, repo : string, branch : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + branch: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/branches/{branch}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{branch}", branch.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{branch}", branch.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListCollaborators - (owner : string, repo : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/collaborators" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/collaborators".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/collaborators".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCheckCollaborator - (owner : string, repo : string, collaborator : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + collaborator: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/collaborators/{collaborator}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{collaborator}", collaborator.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{collaborator}", collaborator.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteCollaborator - (owner : string, repo : string, collaborator : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + collaborator: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/collaborators/{collaborator}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{collaborator}", collaborator.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{collaborator}", collaborator.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoAddCollaborator ( - owner : string, - repo : string, - collaborator : string, - body : AddCollaboratorOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + collaborator: string, + body: AddCollaboratorOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/collaborators/{collaborator}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{collaborator}", collaborator.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{collaborator}", collaborator.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> AddCollaboratorOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetRepoPermissions - (owner : string, repo : string, collaborator : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + collaborator: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/collaborators/{collaborator}/permission" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{collaborator}", collaborator.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{collaborator}", collaborator.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return RepoCollaboratorPermission.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetAllCommits ( - owner : string, - repo : string, - sha : string, - path : string, - stat : bool, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + sha: string, + path: string, + stat: bool, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/commits" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/commits".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/commits".IndexOf(char 63) >= 0 then "&" else "?") - + "sha=" - + ((sha.ToString ()) |> System.Uri.EscapeDataString) - + "&path=" - + ((path.ToString ()) |> System.Uri.EscapeDataString) - + "&stat=" - + ((stat.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "sha=" + + ((sha.ToString()) |> System.Uri.EscapeDataString) + + "&path=" + + ((path.ToString()) |> System.Uri.EscapeDataString) + + "&stat=" + + ((stat.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Commit.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Commit.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetCombinedStatusByRef ( - owner : string, - repo : string, - ref : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + ref: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/commits/{ref}/status" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{ref}", ref.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/commits/{ref}/status".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{ref}", ref.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/commits/{ref}/status".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return CombinedStatus.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListStatusesByRef ( - owner : string, - repo : string, - ref : string, - sort : string, - state : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + ref: string, + sort: string, + state: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/commits/{ref}/statuses" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{ref}", ref.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/commits/{ref}/statuses".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{ref}", ref.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/commits/{ref}/statuses".IndexOf(char 63) >= 0 then "&" else "?") - + "sort=" - + ((sort.ToString ()) |> System.Uri.EscapeDataString) - + "&state=" - + ((state.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "sort=" + + ((sort.ToString()) |> System.Uri.EscapeDataString) + + "&state=" + + ((state.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> CommitStatus.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetContentsList - (owner : string, repo : string, ref : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + ref: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/contents" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/contents".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/contents".IndexOf(char 63) >= 0 then "&" else "?") - + "ref=" - + ((ref.ToString ()) |> System.Uri.EscapeDataString)), + + "ref=" + + ((ref.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> ContentsResponse.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetContents ( - owner : string, - repo : string, - filepath : string, - ref : string, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + filepath: string, + ref: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/contents/{filepath}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{filepath}", filepath.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/contents/{filepath}".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{filepath}", filepath.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/contents/{filepath}".IndexOf(char 63) >= 0 then "&" else "?") - + "ref=" - + ((ref.ToString ()) |> System.Uri.EscapeDataString)), + + "ref=" + + ((ref.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return ContentsResponse.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCreateFile ( - owner : string, - repo : string, - filepath : string, - body : CreateFileOptions, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + filepath: string, + body: CreateFileOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/contents/{filepath}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{filepath}", filepath.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{filepath}", filepath.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateFileOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return FileResponse.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteFile ( - owner : string, - repo : string, - filepath : string, - body : DeleteFileOptions, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + filepath: string, + body: DeleteFileOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/contents/{filepath}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{filepath}", filepath.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{filepath}", filepath.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> DeleteFileOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return FileDeleteResponse.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoUpdateFile ( - owner : string, - repo : string, - filepath : string, - body : UpdateFileOptions, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + filepath: string, + body: UpdateFileOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/contents/{filepath}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{filepath}", filepath.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{filepath}", filepath.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> UpdateFileOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return FileResponse.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoApplyDiffPatch - (owner : string, repo : string, body : UpdateFileOptions, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + body: UpdateFileOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/diffpatch" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> UpdateFileOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return FileResponse.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetEditorConfig ( - owner : string, - repo : string, - filepath : string, - ref : string, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + filepath: string, + ref: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/editorconfig/{filepath}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{filepath}", filepath.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/editorconfig/{filepath}".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{filepath}", filepath.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/editorconfig/{filepath}".IndexOf(char 63) >= 0 then "&" else "?") - + "ref=" - + ((ref.ToString ()) |> System.Uri.EscapeDataString)), + + "ref=" + + ((ref.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.ListForks - (owner : string, repo : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/forks" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/forks".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/forks".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.CreateFork - (owner : string, repo : string, body : CreateForkOption, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + body: CreateForkOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/forks" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateForkOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetBlob - (owner : string, repo : string, sha : string, ct : System.Threading.CancellationToken option) - = + member _.GetBlob(owner: string, repo: string, sha: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/git/blobs/{sha}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{sha}", sha.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{sha}", sha.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return GitBlobResponse.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetSingleCommit - (owner : string, repo : string, sha : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + sha: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/git/commits/{sha}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{sha}", sha.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{sha}", sha.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Commit.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDownloadCommitDiffOrPatch ( - owner : string, - repo : string, - sha : string, - diffType : string, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + sha: string, + diffType: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/git/commits/{sha}.{diffType}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{sha}", sha.ToString () |> System.Uri.EscapeDataString) - .Replace ("{diffType}", diffType.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{sha}", sha.ToString() |> System.Uri.EscapeDataString) + .Replace("{diffType}", diffType.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetNote - (owner : string, repo : string, sha : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + sha: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/git/notes/{sha}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{sha}", sha.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{sha}", sha.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Note.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoListAllGitRefs - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + member _.RepoListAllGitRefs(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/git/refs" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return - jsonNode.AsArray () - |> Seq.map (fun elt -> Reference.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Reference.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListGitRefs - (owner : string, repo : string, ref : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + ref: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/git/refs/{ref}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{ref}", ref.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{ref}", ref.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return - jsonNode.AsArray () - |> Seq.map (fun elt -> Reference.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Reference.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.GetAnnotatedTag - (owner : string, repo : string, sha : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + sha: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/git/tags/{sha}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{sha}", sha.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{sha}", sha.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return AnnotatedTag.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.GetTree ( - owner : string, - repo : string, - sha : string, - recursive : bool, - page : int, - per_page : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + sha: string, + recursive: bool, + page: int, + per_page: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/git/trees/{sha}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{sha}", sha.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/git/trees/{sha}".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{sha}", sha.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/git/trees/{sha}".IndexOf(char 63) >= 0 then "&" else "?") - + "recursive=" - + ((recursive.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&per_page=" - + ((per_page.ToString ()) |> System.Uri.EscapeDataString)), + + "recursive=" + + ((recursive.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&per_page=" + + ((per_page.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return GitTreeResponse.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListHooks - (owner : string, repo : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/hooks" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/hooks".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/hooks".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Hook.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Hook.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCreateHook - (owner : string, repo : string, body : CreateHookOption, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + body: CreateHookOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/hooks" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateHookOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Hook.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoListGitHooks (owner : string, repo : string, ct : System.Threading.CancellationToken option) = + member _.RepoListGitHooks(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/hooks/git" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> GitHook.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> GitHook.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetGitHook - (owner : string, repo : string, id : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/hooks/git/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return GitHook.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteGitHook - (owner : string, repo : string, id : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/hooks/git/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoEditGitHook ( - owner : string, - repo : string, - id : string, - body : EditGitHookOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + id: string, + body: EditGitHookOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/hooks/git/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditGitHookOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return GitHook.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoGetHook - (owner : string, repo : string, id : int, ct : System.Threading.CancellationToken option) - = + member _.RepoGetHook(owner: string, repo: string, id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/hooks/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Hook.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteHook - (owner : string, repo : string, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/hooks/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoEditHook ( - owner : string, - repo : string, - id : int, - body : EditHookOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + id: int, + body: EditHookOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/hooks/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditHookOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Hook.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoTestHook - (owner : string, repo : string, id : int, ref : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: int, + ref: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/hooks/{id}/tests" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/hooks/{id}/tests".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/hooks/{id}/tests".IndexOf(char 63) >= 0 then "&" else "?") - + "ref=" - + ((ref.ToString ()) |> System.Uri.EscapeDataString)), + + "ref=" + + ((ref.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoGetIssueTemplates - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + member _.RepoGetIssueTemplates(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issue_templates" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> IssueTemplate.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueListIssues ( - owner : string, - repo : string, - state : string, - labels : string, - q : string, - type' : string, - milestones : string, - since : string, - before : string, - created_by : string, - assigned_by : string, - mentioned_by : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + state: string, + labels: string, + q: string, + type': string, + milestones: string, + since: string, + before: string, + created_by: string, + assigned_by: string, + mentioned_by: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/issues" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/issues".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/issues".IndexOf(char 63) >= 0 then "&" else "?") - + "state=" - + ((state.ToString ()) |> System.Uri.EscapeDataString) - + "&labels=" - + ((labels.ToString ()) |> System.Uri.EscapeDataString) - + "&q=" - + ((q.ToString ()) |> System.Uri.EscapeDataString) - + "&type=" - + ((type'.ToString ()) |> System.Uri.EscapeDataString) - + "&milestones=" - + ((milestones.ToString ()) |> System.Uri.EscapeDataString) - + "&since=" - + ((since.ToString ()) |> System.Uri.EscapeDataString) - + "&before=" - + ((before.ToString ()) |> System.Uri.EscapeDataString) - + "&created_by=" - + ((created_by.ToString ()) |> System.Uri.EscapeDataString) - + "&assigned_by=" - + ((assigned_by.ToString ()) |> System.Uri.EscapeDataString) - + "&mentioned_by=" - + ((mentioned_by.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), - System.UriKind.Relative - ) - ) - - let httpMessage = - new System.Net.Http.HttpRequestMessage ( + + "state=" + + ((state.ToString()) |> System.Uri.EscapeDataString) + + "&labels=" + + ((labels.ToString()) |> System.Uri.EscapeDataString) + + "&q=" + + ((q.ToString()) |> System.Uri.EscapeDataString) + + "&type=" + + ((type'.ToString()) |> System.Uri.EscapeDataString) + + "&milestones=" + + ((milestones.ToString()) |> System.Uri.EscapeDataString) + + "&since=" + + ((since.ToString()) |> System.Uri.EscapeDataString) + + "&before=" + + ((before.ToString()) |> System.Uri.EscapeDataString) + + "&created_by=" + + ((created_by.ToString()) |> System.Uri.EscapeDataString) + + "&assigned_by=" + + ((assigned_by.ToString()) |> System.Uri.EscapeDataString) + + "&mentioned_by=" + + ((mentioned_by.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), + System.UriKind.Relative + ) + ) + + let httpMessage = + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Issue.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Issue.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueCreateIssue - (owner : string, repo : string, body : CreateIssueOption, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + body: CreateIssueOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateIssueOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Issue.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueGetRepoComments ( - owner : string, - repo : string, - since : string, - before : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + since: string, + before: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/issues/comments" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/issues/comments".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/issues/comments".IndexOf(char 63) >= 0 then "&" else "?") - + "since=" - + ((since.ToString ()) |> System.Uri.EscapeDataString) - + "&before=" - + ((before.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "since=" + + ((since.ToString()) |> System.Uri.EscapeDataString) + + "&before=" + + ((before.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Comment.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Comment.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueDeleteComment - (owner : string, repo : string, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/comments/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueListIssueCommentAttachments - (owner : string, repo : string, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/comments/{id}/assets" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueGetIssueCommentAttachment ( - owner : string, - repo : string, - id : int, - attachment_id : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + id: int, + attachment_id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{id}", id.ToString () |> System.Uri.EscapeDataString) - .Replace ( - "{attachment_id}", - attachment_id.ToString () |> System.Uri.EscapeDataString - ), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + .Replace("{attachment_id}", attachment_id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Attachment.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueDeleteIssueCommentAttachment ( - owner : string, - repo : string, - id : int, - attachment_id : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + id: int, + attachment_id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{id}", id.ToString () |> System.Uri.EscapeDataString) - .Replace ( - "{attachment_id}", - attachment_id.ToString () |> System.Uri.EscapeDataString - ), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + .Replace("{attachment_id}", attachment_id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueEditIssueCommentAttachment ( - owner : string, - repo : string, - id : int, - attachment_id : int, - body : EditAttachmentOptions, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + id: int, + attachment_id: int, + body: EditAttachmentOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{id}", id.ToString () |> System.Uri.EscapeDataString) - .Replace ( - "{attachment_id}", - attachment_id.ToString () |> System.Uri.EscapeDataString - ), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + .Replace("{attachment_id}", attachment_id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditAttachmentOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Attachment.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueGetCommentReactions - (owner : string, repo : string, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/comments/{id}/reactions" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Reaction.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Reaction.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueDeleteCommentReaction ( - owner : string, - repo : string, - id : int, - content : EditReactionOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + id: int, + content: EditReactionOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/comments/{id}/reactions" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( content |> EditReactionOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueGetIssue - (owner : string, repo : string, index : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Issue.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueDelete - (owner : string, repo : string, index : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueEditIssue ( - owner : string, - repo : string, - index : int, - body : EditIssueOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + body: EditIssueOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditIssueOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Issue.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueListIssueAttachments - (owner : string, repo : string, index : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/assets" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueGetIssueAttachment ( - owner : string, - repo : string, - index : int, - attachment_id : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + attachment_id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{index}", index.ToString () |> System.Uri.EscapeDataString) - .Replace ( - "{attachment_id}", - attachment_id.ToString () |> System.Uri.EscapeDataString - ), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + .Replace("{attachment_id}", attachment_id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Attachment.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueDeleteIssueAttachment ( - owner : string, - repo : string, - index : int, - attachment_id : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + attachment_id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{index}", index.ToString () |> System.Uri.EscapeDataString) - .Replace ( - "{attachment_id}", - attachment_id.ToString () |> System.Uri.EscapeDataString - ), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + .Replace("{attachment_id}", attachment_id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueEditIssueAttachment ( - owner : string, - repo : string, - index : int, - attachment_id : int, - body : EditAttachmentOptions, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + attachment_id: int, + body: EditAttachmentOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{index}", index.ToString () |> System.Uri.EscapeDataString) - .Replace ( - "{attachment_id}", - attachment_id.ToString () |> System.Uri.EscapeDataString - ), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + .Replace("{attachment_id}", attachment_id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditAttachmentOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Attachment.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueGetComments ( - owner : string, - repo : string, - index : int, - since : string, - before : string, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + since: string, + before: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/issues/{index}/comments" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/issues/{index}/comments".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/issues/{index}/comments".IndexOf(char 63) >= 0 then "&" else "?") - + "since=" - + ((since.ToString ()) |> System.Uri.EscapeDataString) - + "&before=" - + ((before.ToString ()) |> System.Uri.EscapeDataString)), + + "since=" + + ((since.ToString()) |> System.Uri.EscapeDataString) + + "&before=" + + ((before.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Comment.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Comment.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueCreateComment ( - owner : string, - repo : string, - index : int, - body : CreateIssueCommentOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + body: CreateIssueCommentOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/comments" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateIssueCommentOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Comment.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueDeleteCommentDeprecated - (owner : string, repo : string, index : int, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/comments/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{index}", index.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueEditIssueDeadline ( - owner : string, - repo : string, - index : int, - body : EditDeadlineOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + body: EditDeadlineOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/deadline" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditDeadlineOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return IssueDeadline.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueGetLabels - (owner : string, repo : string, index : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/labels" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueAddLabel ( - owner : string, - repo : string, - index : int, - body : IssueLabelsOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + body: IssueLabelsOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/labels" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> IssueLabelsOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueClearLabels - (owner : string, repo : string, index : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/labels" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueReplaceLabels ( - owner : string, - repo : string, - index : int, - body : IssueLabelsOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + body: IssueLabelsOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/labels" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> IssueLabelsOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueRemoveLabel - (owner : string, repo : string, index : int, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/labels/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{index}", index.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueGetIssueReactions ( - owner : string, - repo : string, - index : int, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/issues/{index}/reactions" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/issues/{index}/reactions".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/issues/{index}/reactions".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Reaction.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Reaction.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueDeleteIssueReaction ( - owner : string, - repo : string, - index : int, - content : EditReactionOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + content: EditReactionOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/reactions" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( content |> EditReactionOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueDeleteStopWatch - (owner : string, repo : string, index : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/stopwatch/delete" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueStartStopWatch - (owner : string, repo : string, index : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/stopwatch/start" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueStopStopWatch - (owner : string, repo : string, index : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/stopwatch/stop" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueSubscriptions ( - owner : string, - repo : string, - index : int, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/issues/{index}/subscriptions" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/issues/{index}/subscriptions".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/issues/{index}/subscriptions".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueCheckSubscription - (owner : string, repo : string, index : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/subscriptions/check" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return WatchInfo.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueGetCommentsAndTimeline ( - owner : string, - repo : string, - index : int, - since : string, - page : int, - limit : int, - before : string, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + since: string, + page: int, + limit: int, + before: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/issues/{index}/timeline" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/issues/{index}/timeline".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/issues/{index}/timeline".IndexOf(char 63) >= 0 then "&" else "?") - + "since=" - + ((since.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString) - + "&before=" - + ((before.ToString ()) |> System.Uri.EscapeDataString)), + + "since=" + + ((since.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString) + + "&before=" + + ((before.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> TimelineComment.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueTrackedTimes ( - owner : string, - repo : string, - index : int, - user : string, - since : string, - before : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + user: string, + since: string, + before: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/issues/{index}/times" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/issues/{index}/times".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/issues/{index}/times".IndexOf(char 63) >= 0 then "&" else "?") - + "user=" - + ((user.ToString ()) |> System.Uri.EscapeDataString) - + "&since=" - + ((since.ToString ()) |> System.Uri.EscapeDataString) - + "&before=" - + ((before.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "user=" + + ((user.ToString()) |> System.Uri.EscapeDataString) + + "&since=" + + ((since.ToString()) |> System.Uri.EscapeDataString) + + "&before=" + + ((before.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> TrackedTime.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueAddTime ( - owner : string, - repo : string, - index : int, - body : AddTimeOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + body: AddTimeOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/times" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> AddTimeOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return TrackedTime.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueResetTime - (owner : string, repo : string, index : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/times" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueDeleteTime - (owner : string, repo : string, index : int, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/issues/{index}/times/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{index}", index.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListKeys ( - owner : string, - repo : string, - key_id : int, - fingerprint : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + key_id: int, + fingerprint: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/keys" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/keys".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/keys".IndexOf(char 63) >= 0 then "&" else "?") - + "key_id=" - + ((key_id.ToString ()) |> System.Uri.EscapeDataString) - + "&fingerprint=" - + ((fingerprint.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "key_id=" + + ((key_id.ToString()) |> System.Uri.EscapeDataString) + + "&fingerprint=" + + ((fingerprint.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return - jsonNode.AsArray () - |> Seq.map (fun elt -> DeployKey.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> DeployKey.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCreateKey - (owner : string, repo : string, body : CreateKeyOption, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + body: CreateKeyOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/keys" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateKeyOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return DeployKey.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoGetKey - (owner : string, repo : string, id : int, ct : System.Threading.CancellationToken option) - = + member _.RepoGetKey(owner: string, repo: string, id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/keys/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return DeployKey.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteKey - (owner : string, repo : string, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/keys/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueListLabels - (owner : string, repo : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/labels" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/labels".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/labels".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Label.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueCreateLabel - (owner : string, repo : string, body : CreateLabelOption, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + body: CreateLabelOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/labels" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateLabelOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Label.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueGetLabel - (owner : string, repo : string, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/labels/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Label.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueDeleteLabel - (owner : string, repo : string, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/labels/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueEditLabel ( - owner : string, - repo : string, - id : int, - body : EditLabelOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + id: int, + body: EditLabelOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/labels/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditLabelOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Label.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoGetLanguages (owner : string, repo : string, ct : System.Threading.CancellationToken option) = + member _.RepoGetLanguages(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/languages" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return LanguageStatistics.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetRawFileOrLFS ( - owner : string, - repo : string, - filepath : string, - ref : string, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + filepath: string, + ref: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/media/{filepath}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{filepath}", filepath.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/media/{filepath}".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{filepath}", filepath.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/media/{filepath}".IndexOf(char 63) >= 0 then "&" else "?") - + "ref=" - + ((ref.ToString ()) |> System.Uri.EscapeDataString)), + + "ref=" + + ((ref.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueGetMilestonesList ( - owner : string, - repo : string, - state : string, - name : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + state: string, + name: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/milestones" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/milestones".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/milestones".IndexOf(char 63) >= 0 then "&" else "?") - + "state=" - + ((state.ToString ()) |> System.Uri.EscapeDataString) - + "&name=" - + ((name.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "state=" + + ((state.ToString()) |> System.Uri.EscapeDataString) + + "&name=" + + ((name.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return - jsonNode.AsArray () - |> Seq.map (fun elt -> Milestone.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Milestone.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueCreateMilestone ( - owner : string, - repo : string, - body : CreateMilestoneOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + body: CreateMilestoneOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/milestones" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateMilestoneOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Milestone.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueGetMilestone - (owner : string, repo : string, id : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/milestones/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Milestone.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueDeleteMilestone - (owner : string, repo : string, id : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/milestones/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.IssueEditMilestone ( - owner : string, - repo : string, - id : string, - body : EditMilestoneOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + id: string, + body: EditMilestoneOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/milestones/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditMilestoneOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Milestone.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoMirrorSync (owner : string, repo : string, ct : System.Threading.CancellationToken option) = + member _.RepoMirrorSync(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/mirror-sync" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.NotifyGetRepoList ( - owner : string, - repo : string, - all : bool, - status_types : string list, - subject_type : string list, - since : string, - before : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + all: bool, + status_types: string list, + subject_type: string list, + since: string, + before: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/notifications" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/notifications".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/notifications".IndexOf(char 63) >= 0 then "&" else "?") - + "all=" - + ((all.ToString ()) |> System.Uri.EscapeDataString) - + "&status-types=" - + ((status_types.ToString ()) |> System.Uri.EscapeDataString) - + "&subject-type=" - + ((subject_type.ToString ()) |> System.Uri.EscapeDataString) - + "&since=" - + ((since.ToString ()) |> System.Uri.EscapeDataString) - + "&before=" - + ((before.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "all=" + + ((all.ToString()) |> System.Uri.EscapeDataString) + + "&status-types=" + + ((status_types.ToString()) |> System.Uri.EscapeDataString) + + "&subject-type=" + + ((subject_type.ToString()) |> System.Uri.EscapeDataString) + + "&since=" + + ((since.ToString()) |> System.Uri.EscapeDataString) + + "&before=" + + ((before.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> NotificationThread.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.NotifyReadRepoList ( - owner : string, - repo : string, - all : string, - status_types : string list, - to_status : string, - last_read_at : string, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + all: string, + status_types: string list, + to_status: string, + last_read_at: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/notifications" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/notifications".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/notifications".IndexOf(char 63) >= 0 then "&" else "?") - + "all=" - + ((all.ToString ()) |> System.Uri.EscapeDataString) - + "&status-types=" - + ((status_types.ToString ()) |> System.Uri.EscapeDataString) - + "&to-status=" - + ((to_status.ToString ()) |> System.Uri.EscapeDataString) - + "&last_read_at=" - + ((last_read_at.ToString ()) |> System.Uri.EscapeDataString)), + + "all=" + + ((all.ToString()) |> System.Uri.EscapeDataString) + + "&status-types=" + + ((status_types.ToString()) |> System.Uri.EscapeDataString) + + "&to-status=" + + ((to_status.ToString()) |> System.Uri.EscapeDataString) + + "&last_read_at=" + + ((last_read_at.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> NotificationThread.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListPullRequests ( - owner : string, - repo : string, - state : string, - sort : string, - milestone : int, - labels : int list, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + state: string, + sort: string, + milestone: int, + labels: int list, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/pulls" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/pulls".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/pulls".IndexOf(char 63) >= 0 then "&" else "?") - + "state=" - + ((state.ToString ()) |> System.Uri.EscapeDataString) - + "&sort=" - + ((sort.ToString ()) |> System.Uri.EscapeDataString) - + "&milestone=" - + ((milestone.ToString ()) |> System.Uri.EscapeDataString) - + "&labels=" - + ((labels.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "state=" + + ((state.ToString()) |> System.Uri.EscapeDataString) + + "&sort=" + + ((sort.ToString()) |> System.Uri.EscapeDataString) + + "&milestone=" + + ((milestone.ToString()) |> System.Uri.EscapeDataString) + + "&labels=" + + ((labels.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> PullRequest.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCreatePullRequest ( - owner : string, - repo : string, - body : CreatePullRequestOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + body: CreatePullRequestOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreatePullRequestOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return PullRequest.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetPullRequest - (owner : string, repo : string, index : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return PullRequest.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoEditPullRequest ( - owner : string, - repo : string, - index : int, - body : EditPullRequestOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + body: EditPullRequestOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditPullRequestOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return PullRequest.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDownloadPullDiffOrPatch ( - owner : string, - repo : string, - index : int, - diffType : string, - binary : bool, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + diffType: string, + binary: bool, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/pulls/{index}.{diffType}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{index}", index.ToString () |> System.Uri.EscapeDataString) - .Replace ("{diffType}", diffType.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/pulls/{index}.{diffType}".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + .Replace("{diffType}", diffType.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/pulls/{index}.{diffType}".IndexOf(char 63) >= 0 then "&" else "?") - + "binary=" - + ((binary.ToString ()) |> System.Uri.EscapeDataString)), + + "binary=" + + ((binary.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetPullRequestCommits ( - owner : string, - repo : string, - index : int, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/pulls/{index}/commits" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/pulls/{index}/commits".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/pulls/{index}/commits".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Commit.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Commit.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetPullRequestFiles ( - owner : string, - repo : string, - index : int, - skip_to : string, - whitespace : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + skip_to: string, + whitespace: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/pulls/{index}/files" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/pulls/{index}/files".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/pulls/{index}/files".IndexOf(char 63) >= 0 then "&" else "?") - + "skip-to=" - + ((skip_to.ToString ()) |> System.Uri.EscapeDataString) - + "&whitespace=" - + ((whitespace.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "skip-to=" + + ((skip_to.ToString()) |> System.Uri.EscapeDataString) + + "&whitespace=" + + ((whitespace.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> ChangedFile.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoPullRequestIsMerged - (owner : string, repo : string, index : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}/merge" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoMergePullRequest ( - owner : string, - repo : string, - index : int, - body : MergePullRequestOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + body: MergePullRequestOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}/merge" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> MergePullRequestOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCancelScheduledAutoMerge - (owner : string, repo : string, index : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}/merge" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCreatePullReviewRequests ( - owner : string, - repo : string, - index : int, - body : PullReviewRequestOptions, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + body: PullReviewRequestOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}/requested_reviewers" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> PullReviewRequestOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> PullReview.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeletePullReviewRequests ( - owner : string, - repo : string, - index : int, - body : PullReviewRequestOptions, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + body: PullReviewRequestOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}/requested_reviewers" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> PullReviewRequestOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListPullReviews ( - owner : string, - repo : string, - index : int, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/pulls/{index}/reviews" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/pulls/{index}/reviews".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/pulls/{index}/reviews".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> PullReview.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCreatePullReview ( - owner : string, - repo : string, - index : int, - body : CreatePullReviewOptions, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + body: CreatePullReviewOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}/reviews" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreatePullReviewOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return PullReview.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetPullReview - (owner : string, repo : string, index : int, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}/reviews/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{index}", index.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return PullReview.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoSubmitPullReview ( - owner : string, - repo : string, - index : int, - id : int, - body : SubmitPullReviewOptions, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + id: int, + body: SubmitPullReviewOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}/reviews/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{index}", index.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> SubmitPullReviewOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return PullReview.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeletePullReview - (owner : string, repo : string, index : int, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}/reviews/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{index}", index.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetPullReviewComments - (owner : string, repo : string, index : int, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}/reviews/{id}/comments" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{index}", index.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> PullReviewComment.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDismissPullReview ( - owner : string, - repo : string, - index : int, - id : int, - body : DismissPullReviewOptions, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + id: int, + body: DismissPullReviewOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{index}", index.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> DismissPullReviewOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return PullReview.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoUnDismissPullReview - (owner : string, repo : string, index : int, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + index: int, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{index}", index.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return PullReview.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoUpdatePullRequest ( - owner : string, - repo : string, - index : int, - style : string, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + index: int, + style: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/pulls/{index}/update" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{index}", index.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/pulls/{index}/update".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{index}", index.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/pulls/{index}/update".IndexOf(char 63) >= 0 then "&" else "?") - + "style=" - + ((style.ToString ()) |> System.Uri.EscapeDataString)), + + "style=" + + ((style.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListPushMirrors - (owner : string, repo : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/push_mirrors" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/push_mirrors".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/push_mirrors".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> PushMirror.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoAddPushMirror ( - owner : string, - repo : string, - body : CreatePushMirrorOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + body: CreatePushMirrorOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/push_mirrors" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreatePushMirrorOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return PushMirror.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoPushMirrorSync - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + member _.RepoPushMirrorSync(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/push_mirrors-sync" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetPushMirrorByRemoteName - (owner : string, repo : string, name : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + name: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/push_mirrors/{name}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{name}", name.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{name}", name.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return PushMirror.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeletePushMirror - (owner : string, repo : string, name : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + name: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/push_mirrors/{name}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{name}", name.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{name}", name.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetRawFile ( - owner : string, - repo : string, - filepath : string, - ref : string, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + filepath: string, + ref: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/raw/{filepath}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{filepath}", filepath.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/raw/{filepath}".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{filepath}", filepath.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/raw/{filepath}".IndexOf(char 63) >= 0 then "&" else "?") - + "ref=" - + ((ref.ToString ()) |> System.Uri.EscapeDataString)), + + "ref=" + + ((ref.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListReleases ( - owner : string, - repo : string, - draft : bool, - pre_release : bool, - per_page : int, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + draft: bool, + pre_release: bool, + per_page: int, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/releases" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/releases".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/releases".IndexOf(char 63) >= 0 then "&" else "?") - + "draft=" - + ((draft.ToString ()) |> System.Uri.EscapeDataString) - + "&pre-release=" - + ((pre_release.ToString ()) |> System.Uri.EscapeDataString) - + "&per_page=" - + ((per_page.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "draft=" + + ((draft.ToString()) |> System.Uri.EscapeDataString) + + "&pre-release=" + + ((pre_release.ToString()) |> System.Uri.EscapeDataString) + + "&per_page=" + + ((per_page.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Release.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Release.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCreateRelease ( - owner : string, - repo : string, - body : CreateReleaseOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + body: CreateReleaseOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/releases" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateReleaseOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Release.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoGetLatestRelease - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + member _.RepoGetLatestRelease(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/releases/latest" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Release.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetReleaseByTag - (owner : string, repo : string, tag : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + tag: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/releases/tags/{tag}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{tag}", tag.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{tag}", tag.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Release.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteReleaseByTag - (owner : string, repo : string, tag : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + tag: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/releases/tags/{tag}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{tag}", tag.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{tag}", tag.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetRelease - (owner : string, repo : string, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/releases/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Release.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteRelease - (owner : string, repo : string, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/releases/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoEditRelease ( - owner : string, - repo : string, - id : int, - body : EditReleaseOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + id: int, + body: EditReleaseOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/releases/{id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditReleaseOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Release.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListReleaseAttachments - (owner : string, repo : string, id : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/releases/{id}/assets" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Attachment.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetReleaseAttachment ( - owner : string, - repo : string, - id : int, - attachment_id : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + id: int, + attachment_id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{id}", id.ToString () |> System.Uri.EscapeDataString) - .Replace ( - "{attachment_id}", - attachment_id.ToString () |> System.Uri.EscapeDataString - ), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + .Replace("{attachment_id}", attachment_id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Attachment.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteReleaseAttachment ( - owner : string, - repo : string, - id : int, - attachment_id : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + id: int, + attachment_id: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{id}", id.ToString () |> System.Uri.EscapeDataString) - .Replace ( - "{attachment_id}", - attachment_id.ToString () |> System.Uri.EscapeDataString - ), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + .Replace("{attachment_id}", attachment_id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoEditReleaseAttachment ( - owner : string, - repo : string, - id : int, - attachment_id : int, - body : EditAttachmentOptions, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + id: int, + attachment_id: int, + body: EditAttachmentOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace("{id}", id.ToString () |> System.Uri.EscapeDataString) - .Replace ( - "{attachment_id}", - attachment_id.ToString () |> System.Uri.EscapeDataString - ), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + .Replace("{attachment_id}", attachment_id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditAttachmentOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Attachment.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoGetReviewers (owner : string, repo : string, ct : System.Threading.CancellationToken option) = + member _.RepoGetReviewers(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/reviewers" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoSigningKey (owner : string, repo : string, ct : System.Threading.CancellationToken option) = + member _.RepoSigningKey(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/signing-key.gpg" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListStargazers - (owner : string, repo : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/stargazers" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/stargazers".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/stargazers".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListStatuses ( - owner : string, - repo : string, - sha : string, - sort : string, - state : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + sha: string, + sort: string, + state: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/statuses/{sha}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{sha}", sha.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/statuses/{sha}".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{sha}", sha.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/statuses/{sha}".IndexOf(char 63) >= 0 then "&" else "?") - + "sort=" - + ((sort.ToString ()) |> System.Uri.EscapeDataString) - + "&state=" - + ((state.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "sort=" + + ((sort.ToString()) |> System.Uri.EscapeDataString) + + "&state=" + + ((state.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> CommitStatus.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCreateStatus ( - owner : string, - repo : string, - sha : string, - body : CreateStatusOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + sha: string, + body: CreateStatusOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/statuses/{sha}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{sha}", sha.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{sha}", sha.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateStatusOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return CommitStatus.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListSubscribers - (owner : string, repo : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/subscribers" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/subscribers".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/subscribers".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserCurrentCheckSubscription - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/subscription" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return WatchInfo.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserCurrentDeleteSubscription - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/subscription" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserCurrentPutSubscription - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/subscription" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return WatchInfo.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListTags - (owner : string, repo : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/tags" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/tags".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/tags".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Tag.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Tag.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCreateTag - (owner : string, repo : string, body : CreateTagOption, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + body: CreateTagOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/tags" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateTagOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Tag.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetTag - (owner : string, repo : string, tag : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + tag: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/tags/{tag}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{tag}", tag.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{tag}", tag.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Tag.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteTag - (owner : string, repo : string, tag : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + tag: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/tags/{tag}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{tag}", tag.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{tag}", tag.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoListTeams (owner : string, repo : string, ct : System.Threading.CancellationToken option) = + member _.RepoListTeams(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/teams" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCheckTeam - (owner : string, repo : string, team : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + team: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/teams/{team}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{team}", team.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{team}", team.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Team.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteTeam - (owner : string, repo : string, team : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + team: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/teams/{team}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{team}", team.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{team}", team.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoAddTeam - (owner : string, repo : string, team : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + team: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/teams/{team}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{team}", team.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{team}", team.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoTrackedTimes ( - owner : string, - repo : string, - user : string, - since : string, - before : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + user: string, + since: string, + before: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/times" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/times".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/times".IndexOf(char 63) >= 0 then "&" else "?") - + "user=" - + ((user.ToString ()) |> System.Uri.EscapeDataString) - + "&since=" - + ((since.ToString ()) |> System.Uri.EscapeDataString) - + "&before=" - + ((before.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "user=" + + ((user.ToString()) |> System.Uri.EscapeDataString) + + "&since=" + + ((since.ToString()) |> System.Uri.EscapeDataString) + + "&before=" + + ((before.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> TrackedTime.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserTrackedTimes - (owner : string, repo : string, user : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + user: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/times/{user}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{user}", user.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{user}", user.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> TrackedTime.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoListTopics - (owner : string, repo : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/topics" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/topics".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/topics".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return TopicName.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoUpdateTopics - (owner : string, repo : string, body : RepoTopicOptions, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + body: RepoTopicOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/topics" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> RepoTopicOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteTopic - (owner : string, repo : string, topic : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + topic: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/topics/{topic}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{topic}", topic.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{topic}", topic.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoAddTopic - (owner : string, repo : string, topic : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + topic: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/topics/{topic}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{topic}", topic.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{topic}", topic.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoTransfer ( - owner : string, - repo : string, - body : TransferRepoOption, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + body: TransferRepoOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/transfer" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> TransferRepoOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.AcceptRepoTransfer - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + member _.AcceptRepoTransfer(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/transfer/accept" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RejectRepoTransfer - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + member _.RejectRepoTransfer(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/transfer/reject" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoCreateWikiPage ( - owner : string, - repo : string, - body : CreateWikiPageOptions, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + body: CreateWikiPageOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/wiki/new" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateWikiPageOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return WikiPage.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetWikiPage - (owner : string, repo : string, pageName : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + pageName: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/wiki/page/{pageName}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{pageName}", pageName.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{pageName}", pageName.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return WikiPage.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoDeleteWikiPage - (owner : string, repo : string, pageName : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + pageName: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/wiki/page/{pageName}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{pageName}", pageName.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{pageName}", pageName.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoEditWikiPage ( - owner : string, - repo : string, - pageName : string, - body : CreateWikiPageOptions, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + pageName: string, + body: CreateWikiPageOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{owner}/{repo}/wiki/page/{pageName}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{pageName}", pageName.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{pageName}", pageName.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateWikiPageOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return WikiPage.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetWikiPages - (owner : string, repo : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/wiki/pages" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/wiki/pages".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/wiki/pages".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> WikiPageMetaData.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.RepoGetWikiPageRevisions ( - owner : string, - repo : string, - pageName : string, - page : int, - ct : System.Threading.CancellationToken option - ) - = + owner: string, + repo: string, + pageName: string, + page: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("repos/{owner}/{repo}/wiki/revisions/{pageName}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace("{repo}", repo.ToString () |> System.Uri.EscapeDataString) - .Replace ("{pageName}", pageName.ToString () |> System.Uri.EscapeDataString) - + (if "repos/{owner}/{repo}/wiki/revisions/{pageName}".IndexOf (char 63) >= 0 then + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString) + .Replace("{pageName}", pageName.ToString() |> System.Uri.EscapeDataString) + + (if "repos/{owner}/{repo}/wiki/revisions/{pageName}".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return WikiCommitList.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.GenerateRepo ( - template_owner : string, - template_repo : string, - body : GenerateRepoOption, - ct : System.Threading.CancellationToken option - ) - = + template_owner: string, + template_repo: string, + body: GenerateRepoOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repos/{template_owner}/{template_repo}/generate" .Replace( "{template_owner}", - template_owner.ToString () |> System.Uri.EscapeDataString + template_owner.ToString() |> System.Uri.EscapeDataString ) - .Replace ( - "{template_repo}", - template_repo.ToString () |> System.Uri.EscapeDataString - ), + .Replace("{template_repo}", template_repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> GenerateRepoOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.RepoGetByID (id : int, ct : System.Threading.CancellationToken option) = + member _.RepoGetByID(id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "repositories/{id}" - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetGeneralAPISettings (ct : System.Threading.CancellationToken option) = + member _.GetGeneralAPISettings(ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("settings/api", System.UriKind.Relative) + System.Uri("settings/api", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return GeneralAPISettings.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetGeneralAttachmentSettings (ct : System.Threading.CancellationToken option) = + member _.GetGeneralAttachmentSettings(ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("settings/attachment", System.UriKind.Relative) + System.Uri("settings/attachment", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return GeneralAttachmentSettings.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetGeneralRepositorySettings (ct : System.Threading.CancellationToken option) = + member _.GetGeneralRepositorySettings(ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("settings/repository", System.UriKind.Relative) + System.Uri("settings/repository", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return GeneralRepoSettings.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetGeneralUISettings (ct : System.Threading.CancellationToken option) = + member _.GetGeneralUISettings(ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("settings/ui", System.UriKind.Relative) + System.Uri("settings/ui", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return GeneralUISettings.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetSigningKey (ct : System.Threading.CancellationToken option) = + member _.GetSigningKey(ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("signing-key.gpg", System.UriKind.Relative) + System.Uri("signing-key.gpg", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgGetTeam (id : int, ct : System.Threading.CancellationToken option) = + member _.OrgGetTeam(id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( - "teams/{id}".Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + System.Uri( + "teams/{id}".Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Team.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgDeleteTeam (id : int, ct : System.Threading.CancellationToken option) = + member _.OrgDeleteTeam(id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( - "teams/{id}".Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + System.Uri( + "teams/{id}".Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgEditTeam (id : int, body : EditTeamOption, ct : System.Threading.CancellationToken option) = + member _.OrgEditTeam(id: int, body: EditTeamOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( - "teams/{id}".Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + System.Uri( + "teams/{id}".Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> EditTeamOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Team.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgListTeamMembers - (id : int, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + member _.OrgListTeamMembers(id: int, page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("teams/{id}/members" - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString) - + (if "teams/{id}/members".IndexOf (char 63) >= 0 then + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + + (if "teams/{id}/members".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgListTeamMember (id : int, username : string, ct : System.Threading.CancellationToken option) = + member _.OrgListTeamMember(id: int, username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "teams/{id}/members/{username}" - .Replace("{id}", id.ToString () |> System.Uri.EscapeDataString) - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return User.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgRemoveTeamMember (id : int, username : string, ct : System.Threading.CancellationToken option) = + member _.OrgRemoveTeamMember(id: int, username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "teams/{id}/members/{username}" - .Replace("{id}", id.ToString () |> System.Uri.EscapeDataString) - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgAddTeamMember (id : int, username : string, ct : System.Threading.CancellationToken option) = + member _.OrgAddTeamMember(id: int, username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "teams/{id}/members/{username}" - .Replace("{id}", id.ToString () |> System.Uri.EscapeDataString) - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgListTeamRepos - (id : int, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + member _.OrgListTeamRepos(id: int, page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( - ("teams/{id}/repos" - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString) - + (if "teams/{id}/repos".IndexOf (char 63) >= 0 then + System.Uri( + ("teams/{id}/repos".Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + + (if "teams/{id}/repos".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.OrgListTeamRepo - (id : int, org : string, repo : string, ct : System.Threading.CancellationToken option) - = + ( + id: int, + org: string, + repo: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "teams/{id}/repos/{org}/{repo}" - .Replace("{id}", id.ToString () |> System.Uri.EscapeDataString) - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.OrgRemoveTeamRepository - (id : int, org : string, repo : string, ct : System.Threading.CancellationToken option) - = + ( + id: int, + org: string, + repo: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "teams/{id}/repos/{org}/{repo}" - .Replace("{id}", id.ToString () |> System.Uri.EscapeDataString) - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.OrgAddTeamRepository - (id : int, org : string, repo : string, ct : System.Threading.CancellationToken option) - = + ( + id: int, + org: string, + repo: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "teams/{id}/repos/{org}/{repo}" - .Replace("{id}", id.ToString () |> System.Uri.EscapeDataString) - .Replace("{org}", org.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString) + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.TopicSearch (q : string, page : int, limit : int, ct : System.Threading.CancellationToken option) = + member _.TopicSearch(q: string, page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("topics/search" - + (if "topics/search".IndexOf (char 63) >= 0 then "&" else "?") - + "q=" - + ((q.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "topics/search".IndexOf(char 63) >= 0 then "&" else "?") + + "q=" + + ((q.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> TopicResponse.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserGetCurrent (ct : System.Threading.CancellationToken option) = + member _.UserGetCurrent(ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("user", System.UriKind.Relative) + System.Uri("user", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return User.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserGetOauth2Application - (page : int, limit : int, ct : System.Threading.CancellationToken option) - = + member _.UserGetOauth2Application(page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("user/applications/oauth2" - + (if "user/applications/oauth2".IndexOf (char 63) >= 0 then + + (if "user/applications/oauth2".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> OAuth2Application.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserCreateOAuth2Application - (body : CreateOAuth2ApplicationOptions, ct : System.Threading.CancellationToken option) - = + ( + body: CreateOAuth2ApplicationOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("user/applications/oauth2", System.UriKind.Relative) + System.Uri("user/applications/oauth2", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateOAuth2ApplicationOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return OAuth2Application.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserGetOAuth2Application (id : int, ct : System.Threading.CancellationToken option) = + member _.UserGetOAuth2Application(id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "user/applications/oauth2/{id}" - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return OAuth2Application.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserDeleteOAuth2Application (id : int, ct : System.Threading.CancellationToken option) = + member _.UserDeleteOAuth2Application(id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "user/applications/oauth2/{id}" - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserUpdateOAuth2Application - (id : int, body : CreateOAuth2ApplicationOptions, ct : System.Threading.CancellationToken option) - = + ( + id: int, + body: CreateOAuth2ApplicationOptions, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "user/applications/oauth2/{id}" - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateOAuth2ApplicationOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return OAuth2Application.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserListEmails (ct : System.Threading.CancellationToken option) = + member _.UserListEmails(ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("user/emails", System.UriKind.Relative) + System.Uri("user/emails", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Email.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Email.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserAddEmail (body : CreateEmailOption, ct : System.Threading.CancellationToken option) = + member _.UserAddEmail(body: CreateEmailOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("user/emails", System.UriKind.Relative) + System.Uri("user/emails", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateEmailOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Email.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Email.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserDeleteEmail (body : DeleteEmailOption, ct : System.Threading.CancellationToken option) = + member _.UserDeleteEmail(body: DeleteEmailOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("user/emails", System.UriKind.Relative) + System.Uri("user/emails", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> DeleteEmailOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserCurrentListFollowers - (page : int, limit : int, ct : System.Threading.CancellationToken option) - = + member _.UserCurrentListFollowers(page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("user/followers" - + (if "user/followers".IndexOf (char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "user/followers".IndexOf(char 63) >= 0 then "&" else "?") + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserCurrentListFollowing - (page : int, limit : int, ct : System.Threading.CancellationToken option) - = + member _.UserCurrentListFollowing(page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("user/following" - + (if "user/following".IndexOf (char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "user/following".IndexOf(char 63) >= 0 then "&" else "?") + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserCurrentCheckFollowing (username : string, ct : System.Threading.CancellationToken option) = + member _.UserCurrentCheckFollowing(username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "user/following/{username}" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserCurrentDeleteFollow (username : string, ct : System.Threading.CancellationToken option) = + member _.UserCurrentDeleteFollow(username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "user/following/{username}" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserCurrentPutFollow (username : string, ct : System.Threading.CancellationToken option) = + member _.UserCurrentPutFollow(username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "user/following/{username}" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetVerificationToken (ct : System.Threading.CancellationToken option) = + member _.GetVerificationToken(ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("user/gpg_key_token", System.UriKind.Relative) + System.Uri("user/gpg_key_token", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserCurrentDeleteGPGKey (id : int, ct : System.Threading.CancellationToken option) = + member _.UserCurrentDeleteGPGKey(id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "user/gpg_keys/{id}" - .Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + .Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserCurrentListKeys - (fingerprint : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + fingerprint: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("user/keys" - + (if "user/keys".IndexOf (char 63) >= 0 then "&" else "?") - + "fingerprint=" - + ((fingerprint.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "user/keys".IndexOf(char 63) >= 0 then "&" else "?") + + "fingerprint=" + + ((fingerprint.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return - jsonNode.AsArray () - |> Seq.map (fun elt -> PublicKey.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> PublicKey.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserCurrentPostKey (body : CreateKeyOption, ct : System.Threading.CancellationToken option) = + member _.UserCurrentPostKey(body: CreateKeyOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("user/keys", System.UriKind.Relative) + System.Uri("user/keys", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateKeyOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return PublicKey.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserCurrentGetKey (id : int, ct : System.Threading.CancellationToken option) = + member _.UserCurrentGetKey(id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( - "user/keys/{id}".Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + System.Uri( + "user/keys/{id}".Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return PublicKey.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserCurrentDeleteKey (id : int, ct : System.Threading.CancellationToken option) = + member _.UserCurrentDeleteKey(id: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( - "user/keys/{id}".Replace ("{id}", id.ToString () |> System.Uri.EscapeDataString), + System.Uri( + "user/keys/{id}".Replace("{id}", id.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.OrgListCurrentUserOrgs (page : int, limit : int, ct : System.Threading.CancellationToken option) = + member _.OrgListCurrentUserOrgs(page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("user/orgs" - + (if "user/orgs".IndexOf (char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "user/orgs".IndexOf(char 63) >= 0 then "&" else "?") + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Organization.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserCurrentListRepos (page : int, limit : int, ct : System.Threading.CancellationToken option) = + member _.UserCurrentListRepos(page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("user/repos" - + (if "user/repos".IndexOf (char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "user/repos".IndexOf(char 63) >= 0 then "&" else "?") + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.CreateCurrentUserRepo (body : CreateRepoOption, ct : System.Threading.CancellationToken option) = + member _.CreateCurrentUserRepo(body: CreateRepoOption, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("user/repos", System.UriKind.Relative) + System.Uri("user/repos", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateRepoOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Repository.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetUserSettings (ct : System.Threading.CancellationToken option) = + member _.GetUserSettings(ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("user/settings", System.UriKind.Relative) + System.Uri("user/settings", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> UserSettings.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UpdateUserSettings (body : UserSettingsOptions, ct : System.Threading.CancellationToken option) = + member _.UpdateUserSettings(body: UserSettingsOptions, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("user/settings", System.UriKind.Relative) + System.Uri("user/settings", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> UserSettingsOptions.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> UserSettings.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserCurrentListStarred (page : int, limit : int, ct : System.Threading.CancellationToken option) = + member _.UserCurrentListStarred(page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("user/starred" - + (if "user/starred".IndexOf (char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "user/starred".IndexOf(char 63) >= 0 then "&" else "?") + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserCurrentCheckStarring - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + ( + owner: string, + repo: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "user/starred/{owner}/{repo}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserCurrentDeleteStar - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + member _.UserCurrentDeleteStar(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "user/starred/{owner}/{repo}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserCurrentPutStar - (owner : string, repo : string, ct : System.Threading.CancellationToken option) - = + member _.UserCurrentPutStar(owner: string, repo: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "user/starred/{owner}/{repo}" - .Replace("{owner}", owner.ToString () |> System.Uri.EscapeDataString) - .Replace ("{repo}", repo.ToString () |> System.Uri.EscapeDataString), + .Replace("{owner}", owner.ToString() |> System.Uri.EscapeDataString) + .Replace("{repo}", repo.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Put, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserGetStopWatches (page : int, limit : int, ct : System.Threading.CancellationToken option) = + member _.UserGetStopWatches(page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("user/stopwatches" - + (if "user/stopwatches".IndexOf (char 63) >= 0 then + + (if "user/stopwatches".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return - jsonNode.AsArray () - |> Seq.map (fun elt -> StopWatch.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> StopWatch.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserCurrentListSubscriptions - (page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("user/subscriptions" - + (if "user/subscriptions".IndexOf (char 63) >= 0 then + + (if "user/subscriptions".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserListTeams (page : int, limit : int, ct : System.Threading.CancellationToken option) = + member _.UserListTeams(page: int, limit: int, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("user/teams" - + (if "user/teams".IndexOf (char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "user/teams".IndexOf(char 63) >= 0 then "&" else "?") + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Team.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserCurrentTrackedTimes ( - page : int, - limit : int, - since : string, - before : string, - ct : System.Threading.CancellationToken option - ) - = + page: int, + limit: int, + since: string, + before: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("user/times" - + (if "user/times".IndexOf (char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString) - + "&since=" - + ((since.ToString ()) |> System.Uri.EscapeDataString) - + "&before=" - + ((before.ToString ()) |> System.Uri.EscapeDataString)), + + (if "user/times".IndexOf(char 63) >= 0 then "&" else "?") + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString) + + "&since=" + + ((since.ToString()) |> System.Uri.EscapeDataString) + + "&before=" + + ((before.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> TrackedTime.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserSearch - (q : string, uid : int, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + q: string, + uid: int, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("users/search" - + (if "users/search".IndexOf (char 63) >= 0 then "&" else "?") - + "q=" - + ((q.ToString ()) |> System.Uri.EscapeDataString) - + "&uid=" - + ((uid.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + (if "users/search".IndexOf(char 63) >= 0 then "&" else "?") + + "q=" + + ((q.ToString()) |> System.Uri.EscapeDataString) + + "&uid=" + + ((uid.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserGet (username : string, ct : System.Threading.CancellationToken option) = + member _.UserGet(username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "users/{username}" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return User.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserListFollowers - (username : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + username: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("users/{username}/followers" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString) - + (if "users/{username}/followers".IndexOf (char 63) >= 0 then + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString) + + (if "users/{username}/followers".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserListFollowing - (username : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + username: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("users/{username}/following" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString) - + (if "users/{username}/following".IndexOf (char 63) >= 0 then + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString) + + (if "users/{username}/following".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> User.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserCheckFollowing - (username : string, target : string, ct : System.Threading.CancellationToken option) - = + ( + username: string, + target: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "users/{username}/following/{target}" - .Replace("{username}", username.ToString () |> System.Uri.EscapeDataString) - .Replace ("{target}", target.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString) + .Replace("{target}", target.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.UserGetHeatmapData (username : string, ct : System.Threading.CancellationToken option) = + member _.UserGetHeatmapData(username: string, ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "users/{username}/heatmap" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> UserHeatmapData.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserListKeys ( - username : string, - fingerprint : string, - page : int, - limit : int, - ct : System.Threading.CancellationToken option - ) - = + username: string, + fingerprint: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("users/{username}/keys" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString) - + (if "users/{username}/keys".IndexOf (char 63) >= 0 then + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString) + + (if "users/{username}/keys".IndexOf(char 63) >= 0 then "&" else "?") - + "fingerprint=" - + ((fingerprint.ToString ()) |> System.Uri.EscapeDataString) - + "&page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "fingerprint=" + + ((fingerprint.ToString()) |> System.Uri.EscapeDataString) + + "&page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return - jsonNode.AsArray () - |> Seq.map (fun elt -> PublicKey.jsonParse elt) - |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> PublicKey.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.OrgListUserOrgs - (username : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + username: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("users/{username}/orgs" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString) - + (if "users/{username}/orgs".IndexOf (char 63) >= 0 then + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString) + + (if "users/{username}/orgs".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Organization.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.OrgGetUserPermissions - (username : string, org : string, ct : System.Threading.CancellationToken option) - = + ( + username: string, + org: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "users/{username}/orgs/{org}/permissions" - .Replace("{username}", username.ToString () |> System.Uri.EscapeDataString) - .Replace ("{org}", org.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString) + .Replace("{org}", org.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return OrganizationPermissions.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserListRepos - (username : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + username: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("users/{username}/repos" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString) - + (if "users/{username}/repos".IndexOf (char 63) >= 0 then + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString) + + (if "users/{username}/repos".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserListStarred - (username : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + username: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("users/{username}/starred" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString) - + (if "users/{username}/starred".IndexOf (char 63) >= 0 then + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString) + + (if "users/{username}/starred".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserListSubscriptions - (username : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + username: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("users/{username}/subscriptions" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString) - + (if "users/{username}/subscriptions".IndexOf (char 63) >= 0 then + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString) + + (if "users/{username}/subscriptions".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> Repository.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserGetTokens - (username : string, page : int, limit : int, ct : System.Threading.CancellationToken option) - = + ( + username: string, + page: int, + limit: int, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( ("users/{username}/tokens" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString) - + (if "users/{username}/tokens".IndexOf (char 63) >= 0 then + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString) + + (if "users/{username}/tokens".IndexOf(char 63) >= 0 then "&" else "?") - + "page=" - + ((page.ToString ()) |> System.Uri.EscapeDataString) - + "&limit=" - + ((limit.ToString ()) |> System.Uri.EscapeDataString)), + + "page=" + + ((page.ToString()) |> System.Uri.EscapeDataString) + + "&limit=" + + ((limit.ToString()) |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - jsonNode.AsArray () + jsonNode.AsArray() |> Seq.map (fun elt -> AccessToken.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserCreateToken - (username : string, body : CreateAccessTokenOption, ct : System.Threading.CancellationToken option) - = + ( + username: string, + body: CreateAccessTokenOption, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "users/{username}/tokens" - .Replace ("{username}", username.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( body |> CreateAccessTokenOption.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()), + |> (fun node -> if isNull node then "null" else node.ToJsonString()), null, "application/json" ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return AccessToken.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) member _.UserDeleteAccessToken - (username : string, token : string, ct : System.Threading.CancellationToken option) - = + ( + username: string, + token: string, + ct: System.Threading.CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "users/{username}/tokens/{token}" - .Replace("{username}", username.ToString () |> System.Uri.EscapeDataString) - .Replace ("{token}", token.ToString () |> System.Uri.EscapeDataString), + .Replace("{username}", username.ToString() |> System.Uri.EscapeDataString) + .Replace("{token}", token.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Delete, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return () } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetVersion (ct : System.Threading.CancellationToken option) = + member _.GetVersion(ct: System.Threading.CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/api/v1/", System.UriKind.Relative) + System.Uri("/api/v1/", System.UriKind.Relative) ), - System.Uri ("version", System.UriKind.Relative) + System.Uri("version", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return ServerVersion.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) } + diff --git a/ConsumePlugin/GeneratedArgs.fs b/ConsumePlugin/GeneratedArgs.fs index 309fdc0..fd88aab 100644 --- a/ConsumePlugin/GeneratedArgs.fs +++ b/ConsumePlugin/GeneratedArgs.fs @@ -1,12 +1,4 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ - - - - - +// Source generated by Whippet. Changes will be overwritten on next build. namespace ConsumePlugin open System @@ -14,96 +6,94 @@ open System.IO open WoofWare.Myriad.Plugins /// Methods to parse arguments for the type BasicNoPositionals -[] +[] module BasicNoPositionals = type private ParseState_BasicNoPositionals = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string - let parse' (getEnvironmentVariable : string -> string) (args : string list) : BasicNoPositionals = - let ArgParser_errors = ResizeArray () + let parse' (getEnvironmentVariable: string -> string) (args: string list) : BasicNoPositionals = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s int32%s%s" (sprintf "--%s" "foo") "" "") - (sprintf "%s string%s%s" (sprintf "--%s" "bar") "" "") - (sprintf "%s bool%s%s" (sprintf "--%s" "baz") "" "") - (sprintf "%s int32%s%s" (sprintf "--%s" "rest") " (can be repeated)" "") - ] + [ (sprintf "%s int32%s%s" (sprintf "--%s" "foo") "" "") + (sprintf "%s string%s%s" (sprintf "--%s" "bar") "" "") + (sprintf "%s bool%s%s" (sprintf "--%s" "baz") "" "") + (sprintf "%s int32%s%s" (sprintf "--%s" "rest") " (can be repeated)" "") ] |> String.concat "\n" - let parser_LeftoverArgs : string ResizeArray = ResizeArray () - let mutable arg_0 : int option = None - let mutable arg_1 : string option = None - let mutable arg_2 : bool option = None - let arg_3 : int ResizeArray = ResizeArray () + let parser_LeftoverArgs: string ResizeArray = ResizeArray() + let mutable arg_0: int option = None + let mutable arg_1: string option = None + let mutable arg_2: bool option = None + let arg_3: int ResizeArray = ResizeArray() /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "rest", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "rest", System.StringComparison.OrdinalIgnoreCase) then value |> (fun x -> System.Int32.Parse x) |> arg_3.Add () |> Ok - else if System.String.Equals (key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "baz") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_2 <- value |> (fun x -> System.Boolean.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "bar", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "bar", System.StringComparison.OrdinalIgnoreCase) then match arg_1 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "bar") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_1 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "foo", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "foo", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "foo") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> System.Int32.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = - if System.String.Equals (key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then + let setFlagValue (key: string) : bool = + if System.String.Equals(key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> sprintf "Flag '%s' was supplied multiple times" (sprintf "--%s" "baz") @@ -116,7 +106,7 @@ module BasicNoPositionals = else false - let rec go (state : ParseState_BasicNoPositionals) (args : string list) = + let rec go (state: ParseState_BasicNoPositionals) (args: string list) = match args with | [] -> match state with @@ -129,15 +119,15 @@ module BasicNoPositionals = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> parser_LeftoverArgs.AddRange (rest |> Seq.map (fun x -> x)) + | "--" :: rest -> parser_LeftoverArgs.AddRange(rest |> Seq.map (fun x -> x)) | arg :: args -> match state with | ParseState_BasicNoPositionals.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_BasicNoPositionals.AwaitingValue arg) @@ -212,16 +202,14 @@ module BasicNoPositionals = let arg_3 = arg_3 |> Seq.toList if 0 = ArgParser_errors.Count then - { - Bar = arg_1 - Baz = arg_2 - Foo = arg_0 - Rest = arg_3 - } + { Bar = arg_1 + Baz = arg_2 + Foo = arg_0 + Rest = arg_3 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - let parse (args : string list) : BasicNoPositionals = + let parse (args: string list) : BasicNoPositionals = parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -230,99 +218,97 @@ open System.IO open WoofWare.Myriad.Plugins /// Methods to parse arguments for the type Basic -[] +[] module Basic = type private ParseState_Basic = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string - let parse' (getEnvironmentVariable : string -> string) (args : string list) : Basic = - let ArgParser_errors = ResizeArray () + let parse' (getEnvironmentVariable: string -> string) (args: string list) : Basic = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s int32%s%s" (sprintf "--%s" "foo") "" (sprintf " : %s" ("This is a foo!"))) - (sprintf "%s string%s%s" (sprintf "--%s" "bar") "" "") - (sprintf "%s bool%s%s" (sprintf "--%s" "baz") "" "") - (sprintf - "%s string%s%s" - (sprintf "--%s" "rest") - " (positional args) (can be repeated)" - (sprintf " : %s" ("Here's where the rest of the args go"))) - ] + [ (sprintf "%s int32%s%s" (sprintf "--%s" "foo") "" (sprintf " : %s" ("This is a foo!"))) + (sprintf "%s string%s%s" (sprintf "--%s" "bar") "" "") + (sprintf "%s bool%s%s" (sprintf "--%s" "baz") "" "") + (sprintf + "%s string%s%s" + (sprintf "--%s" "rest") + " (positional args) (can be repeated)" + (sprintf " : %s" ("Here's where the rest of the args go"))) ] |> String.concat "\n" - let arg_3 : string ResizeArray = ResizeArray () - let mutable arg_0 : int option = None - let mutable arg_1 : string option = None - let mutable arg_2 : bool option = None + let arg_3: string ResizeArray = ResizeArray() + let mutable arg_0: int option = None + let mutable arg_1: string option = None + let mutable arg_2: bool option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "baz") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_2 <- value |> (fun x -> System.Boolean.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "bar", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "bar", System.StringComparison.OrdinalIgnoreCase) then match arg_1 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "bar") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_1 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "foo", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "foo", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "foo") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> System.Int32.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "rest", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "rest", System.StringComparison.OrdinalIgnoreCase) then value |> (fun x -> x) |> arg_3.Add () |> Ok else Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = - if System.String.Equals (key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then + let setFlagValue (key: string) : bool = + if System.String.Equals(key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> sprintf "Flag '%s' was supplied multiple times" (sprintf "--%s" "baz") @@ -335,7 +321,7 @@ module Basic = else false - let rec go (state : ParseState_Basic) (args : string list) = + let rec go (state: ParseState_Basic) (args: string list) = match args with | [] -> match state with @@ -348,15 +334,15 @@ module Basic = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> arg_3.AddRange (rest |> Seq.map (fun x -> x)) + | "--" :: rest -> arg_3.AddRange(rest |> Seq.map (fun x -> x)) | arg :: args -> match state with | ParseState_Basic.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_Basic.AwaitingValue arg) @@ -419,16 +405,14 @@ module Basic = | Some x -> x if 0 = ArgParser_errors.Count then - { - Bar = arg_1 - Baz = arg_2 - Foo = arg_0 - Rest = arg_3 - } + { Bar = arg_1 + Baz = arg_2 + Foo = arg_0 + Rest = arg_3 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - let parse (args : string list) : Basic = + let parse (args: string list) : Basic = parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -437,95 +421,93 @@ open System.IO open WoofWare.Myriad.Plugins /// Methods to parse arguments for the type BasicWithIntPositionals -[] +[] module BasicWithIntPositionals = type private ParseState_BasicWithIntPositionals = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string - let parse' (getEnvironmentVariable : string -> string) (args : string list) : BasicWithIntPositionals = - let ArgParser_errors = ResizeArray () + let parse' (getEnvironmentVariable: string -> string) (args: string list) : BasicWithIntPositionals = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s int32%s%s" (sprintf "--%s" "foo") "" "") - (sprintf "%s string%s%s" (sprintf "--%s" "bar") "" "") - (sprintf "%s bool%s%s" (sprintf "--%s" "baz") "" "") - (sprintf "%s int32%s%s" (sprintf "--%s" "rest") " (positional args) (can be repeated)" "") - ] + [ (sprintf "%s int32%s%s" (sprintf "--%s" "foo") "" "") + (sprintf "%s string%s%s" (sprintf "--%s" "bar") "" "") + (sprintf "%s bool%s%s" (sprintf "--%s" "baz") "" "") + (sprintf "%s int32%s%s" (sprintf "--%s" "rest") " (positional args) (can be repeated)" "") ] |> String.concat "\n" - let arg_3 : int ResizeArray = ResizeArray () - let mutable arg_0 : int option = None - let mutable arg_1 : string option = None - let mutable arg_2 : bool option = None + let arg_3: int ResizeArray = ResizeArray() + let mutable arg_0: int option = None + let mutable arg_1: string option = None + let mutable arg_2: bool option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "baz") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_2 <- value |> (fun x -> System.Boolean.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "bar", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "bar", System.StringComparison.OrdinalIgnoreCase) then match arg_1 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "bar") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_1 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "foo", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "foo", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "foo") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> System.Int32.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "rest", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "rest", System.StringComparison.OrdinalIgnoreCase) then value |> (fun x -> System.Int32.Parse x) |> arg_3.Add () |> Ok else Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = - if System.String.Equals (key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then + let setFlagValue (key: string) : bool = + if System.String.Equals(key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> sprintf "Flag '%s' was supplied multiple times" (sprintf "--%s" "baz") @@ -538,7 +520,7 @@ module BasicWithIntPositionals = else false - let rec go (state : ParseState_BasicWithIntPositionals) (args : string list) = + let rec go (state: ParseState_BasicWithIntPositionals) (args: string list) = match args with | [] -> match state with @@ -551,15 +533,15 @@ module BasicWithIntPositionals = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> arg_3.AddRange (rest |> Seq.map (fun x -> System.Int32.Parse x)) + | "--" :: rest -> arg_3.AddRange(rest |> Seq.map (fun x -> System.Int32.Parse x)) | arg :: args -> match state with | ParseState_BasicWithIntPositionals.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_BasicWithIntPositionals.AwaitingValue arg) @@ -622,16 +604,14 @@ module BasicWithIntPositionals = | Some x -> x if 0 = ArgParser_errors.Count then - { - Bar = arg_1 - Baz = arg_2 - Foo = arg_0 - Rest = arg_3 - } + { Bar = arg_1 + Baz = arg_2 + Foo = arg_0 + Rest = arg_3 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - let parse (args : string list) : BasicWithIntPositionals = + let parse (args: string list) : BasicWithIntPositionals = parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -640,70 +620,68 @@ open System.IO open WoofWare.Myriad.Plugins /// Methods to parse arguments for the type LoadsOfTypes -[] +[] module LoadsOfTypes = type private ParseState_LoadsOfTypes = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string - let parse' (getEnvironmentVariable : string -> string) (args : string list) : LoadsOfTypes = - let ArgParser_errors = ResizeArray () + let parse' (getEnvironmentVariable: string -> string) (args: string list) : LoadsOfTypes = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s int32%s%s" (sprintf "--%s" "foo") "" "") - (sprintf "%s string%s%s" (sprintf "--%s" "bar") "" "") - (sprintf "%s bool%s%s" (sprintf "--%s" "baz") "" "") - (sprintf "%s FileInfo%s%s" (sprintf "--%s" "some-file") "" "") - (sprintf "%s DirectoryInfo%s%s" (sprintf "--%s" "some-directory") "" "") - (sprintf "%s DirectoryInfo%s%s" (sprintf "--%s" "some-list") " (can be repeated)" "") - (sprintf "%s int32%s%s" (sprintf "--%s" "optional-thing-with-no-default") " (optional)" "") - - (sprintf - "%s bool%s%s" - (sprintf "--%s" "optional-thing") - (LoadsOfTypes.DefaultOptionalThing () - |> (fun x -> x.ToString ()) - |> sprintf " (default value: %s)") - "") - - (sprintf - "%s int32%s%s" - (sprintf "--%s" "another-optional-thing") - (LoadsOfTypes.DefaultAnotherOptionalThing () - |> (fun x -> x.ToString ()) - |> sprintf " (default value: %s)") - "") - - (sprintf - "%s string%s%s" - (sprintf "--%s" "yet-another-optional-thing") - ("CONSUMEPLUGIN_THINGS" |> sprintf " (default value populated from env var %s)") - "") - (sprintf "%s int32%s%s" (sprintf "--%s" "positionals") " (positional args) (can be repeated)" "") - ] + [ (sprintf "%s int32%s%s" (sprintf "--%s" "foo") "" "") + (sprintf "%s string%s%s" (sprintf "--%s" "bar") "" "") + (sprintf "%s bool%s%s" (sprintf "--%s" "baz") "" "") + (sprintf "%s FileInfo%s%s" (sprintf "--%s" "some-file") "" "") + (sprintf "%s DirectoryInfo%s%s" (sprintf "--%s" "some-directory") "" "") + (sprintf "%s DirectoryInfo%s%s" (sprintf "--%s" "some-list") " (can be repeated)" "") + (sprintf "%s int32%s%s" (sprintf "--%s" "optional-thing-with-no-default") " (optional)" "") + + (sprintf + "%s bool%s%s" + (sprintf "--%s" "optional-thing") + (LoadsOfTypes.DefaultOptionalThing() + |> (fun x -> x.ToString()) + |> sprintf " (default value: %s)") + "") + + (sprintf + "%s int32%s%s" + (sprintf "--%s" "another-optional-thing") + (LoadsOfTypes.DefaultAnotherOptionalThing() + |> (fun x -> x.ToString()) + |> sprintf " (default value: %s)") + "") + + (sprintf + "%s string%s%s" + (sprintf "--%s" "yet-another-optional-thing") + ("CONSUMEPLUGIN_THINGS" |> sprintf " (default value populated from env var %s)") + "") + (sprintf "%s int32%s%s" (sprintf "--%s" "positionals") " (positional args) (can be repeated)" "") ] |> String.concat "\n" - let arg_7 : int ResizeArray = ResizeArray () - let mutable arg_0 : int option = None - let mutable arg_1 : string option = None - let mutable arg_2 : bool option = None - let mutable arg_3 : FileInfo option = None - let mutable arg_4 : DirectoryInfo option = None - let arg_5 : DirectoryInfo ResizeArray = ResizeArray () - let mutable arg_6 : int option = None - let mutable arg_8 : bool option = None - let mutable arg_9 : int option = None - let mutable arg_10 : string option = None + let arg_7: int ResizeArray = ResizeArray() + let mutable arg_0: int option = None + let mutable arg_1: string option = None + let mutable arg_2: bool option = None + let mutable arg_3: FileInfo option = None + let mutable arg_4: DirectoryInfo option = None + let arg_5: DirectoryInfo ResizeArray = ResizeArray() + let mutable arg_6: int option = None + let mutable arg_8: bool option = None + let mutable arg_9: int option = None + let mutable arg_10: string option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = + let processKeyValue (key: string) (value: string) : Result = if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "yet-another-optional-thing", System.StringComparison.OrdinalIgnoreCase @@ -714,19 +692,19 @@ module LoadsOfTypes = sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "yet-another-optional-thing") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_10 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "another-optional-thing", System.StringComparison.OrdinalIgnoreCase @@ -737,38 +715,38 @@ module LoadsOfTypes = sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "another-optional-thing") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_9 <- value |> (fun x -> System.Int32.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "optional-thing", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "optional-thing", System.StringComparison.OrdinalIgnoreCase) then match arg_8 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "optional-thing") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_8 <- value |> (fun x -> System.Boolean.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "optional-thing-with-no-default", System.StringComparison.OrdinalIgnoreCase @@ -779,113 +757,113 @@ module LoadsOfTypes = sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "optional-thing-with-no-default") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_6 <- value |> (fun x -> System.Int32.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "some-list", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "some-list", System.StringComparison.OrdinalIgnoreCase) then value |> (fun x -> System.IO.DirectoryInfo x) |> arg_5.Add () |> Ok else if - System.String.Equals (key, sprintf "--%s" "some-directory", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "some-directory", System.StringComparison.OrdinalIgnoreCase) then match arg_4 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "some-directory") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_4 <- value |> (fun x -> System.IO.DirectoryInfo x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "some-file", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "some-file", System.StringComparison.OrdinalIgnoreCase) then match arg_3 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "some-file") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_3 <- value |> (fun x -> System.IO.FileInfo x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "baz") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_2 <- value |> (fun x -> System.Boolean.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "bar", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "bar", System.StringComparison.OrdinalIgnoreCase) then match arg_1 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "bar") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_1 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "foo", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "foo", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "foo") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> System.Int32.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "positionals", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "positionals", System.StringComparison.OrdinalIgnoreCase) then value |> (fun x -> System.Int32.Parse x) |> arg_7.Add () |> Ok @@ -893,9 +871,9 @@ module LoadsOfTypes = Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = + let setFlagValue (key: string) : bool = if - System.String.Equals (key, sprintf "--%s" "optional-thing", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "optional-thing", System.StringComparison.OrdinalIgnoreCase) then match arg_8 with | Some x -> @@ -906,7 +884,7 @@ module LoadsOfTypes = | None -> arg_8 <- true |> Some true - else if System.String.Equals (key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> sprintf "Flag '%s' was supplied multiple times" (sprintf "--%s" "baz") @@ -919,7 +897,7 @@ module LoadsOfTypes = else false - let rec go (state : ParseState_LoadsOfTypes) (args : string list) = + let rec go (state: ParseState_LoadsOfTypes) (args: string list) = match args with | [] -> match state with @@ -932,15 +910,15 @@ module LoadsOfTypes = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> arg_7.AddRange (rest |> Seq.map (fun x -> System.Int32.Parse x)) + | "--" :: rest -> arg_7.AddRange(rest |> Seq.map (fun x -> System.Int32.Parse x)) | arg :: args -> match state with | ParseState_LoadsOfTypes.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_LoadsOfTypes.AwaitingValue arg) @@ -1025,12 +1003,12 @@ module LoadsOfTypes = let arg_8 = match arg_8 with - | None -> LoadsOfTypes.DefaultOptionalThing () |> Choice2Of2 + | None -> LoadsOfTypes.DefaultOptionalThing() |> Choice2Of2 | Some x -> Choice1Of2 x let arg_9 = match arg_9 with - | None -> LoadsOfTypes.DefaultAnotherOptionalThing () |> Choice2Of2 + | None -> LoadsOfTypes.DefaultAnotherOptionalThing() |> Choice2Of2 | Some x -> Choice1Of2 x let arg_10 = @@ -1050,23 +1028,21 @@ module LoadsOfTypes = | Some x -> Choice1Of2 x if 0 = ArgParser_errors.Count then - { - AnotherOptionalThing = arg_9 - Bar = arg_1 - Baz = arg_2 - Foo = arg_0 - OptionalThing = arg_8 - OptionalThingWithNoDefault = arg_6 - Positionals = arg_7 - SomeDirectory = arg_4 - SomeFile = arg_3 - SomeList = arg_5 - YetAnotherOptionalThing = arg_10 - } + { AnotherOptionalThing = arg_9 + Bar = arg_1 + Baz = arg_2 + Foo = arg_0 + OptionalThing = arg_8 + OptionalThingWithNoDefault = arg_6 + Positionals = arg_7 + SomeDirectory = arg_4 + SomeFile = arg_3 + SomeList = arg_5 + YetAnotherOptionalThing = arg_10 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - let parse (args : string list) : LoadsOfTypes = + let parse (args: string list) : LoadsOfTypes = parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -1075,68 +1051,66 @@ open System.IO open WoofWare.Myriad.Plugins /// Methods to parse arguments for the type LoadsOfTypesNoPositionals -[] +[] module LoadsOfTypesNoPositionals = type private ParseState_LoadsOfTypesNoPositionals = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string - let parse' (getEnvironmentVariable : string -> string) (args : string list) : LoadsOfTypesNoPositionals = - let ArgParser_errors = ResizeArray () + let parse' (getEnvironmentVariable: string -> string) (args: string list) : LoadsOfTypesNoPositionals = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s int32%s%s" (sprintf "--%s" "foo") "" "") - (sprintf "%s string%s%s" (sprintf "--%s" "bar") "" "") - (sprintf "%s bool%s%s" (sprintf "--%s" "baz") "" "") - (sprintf "%s FileInfo%s%s" (sprintf "--%s" "some-file") "" "") - (sprintf "%s DirectoryInfo%s%s" (sprintf "--%s" "some-directory") "" "") - (sprintf "%s DirectoryInfo%s%s" (sprintf "--%s" "some-list") " (can be repeated)" "") - (sprintf "%s int32%s%s" (sprintf "--%s" "optional-thing-with-no-default") " (optional)" "") - - (sprintf - "%s bool%s%s" - (sprintf "--%s" "optional-thing") - (LoadsOfTypesNoPositionals.DefaultOptionalThing () - |> (fun x -> x.ToString ()) - |> sprintf " (default value: %s)") - "") - - (sprintf - "%s int32%s%s" - (sprintf "--%s" "another-optional-thing") - (LoadsOfTypesNoPositionals.DefaultAnotherOptionalThing () - |> (fun x -> x.ToString ()) - |> sprintf " (default value: %s)") - "") - (sprintf - "%s string%s%s" - (sprintf "--%s" "yet-another-optional-thing") - ("CONSUMEPLUGIN_THINGS" |> sprintf " (default value populated from env var %s)") - "") - ] + [ (sprintf "%s int32%s%s" (sprintf "--%s" "foo") "" "") + (sprintf "%s string%s%s" (sprintf "--%s" "bar") "" "") + (sprintf "%s bool%s%s" (sprintf "--%s" "baz") "" "") + (sprintf "%s FileInfo%s%s" (sprintf "--%s" "some-file") "" "") + (sprintf "%s DirectoryInfo%s%s" (sprintf "--%s" "some-directory") "" "") + (sprintf "%s DirectoryInfo%s%s" (sprintf "--%s" "some-list") " (can be repeated)" "") + (sprintf "%s int32%s%s" (sprintf "--%s" "optional-thing-with-no-default") " (optional)" "") + + (sprintf + "%s bool%s%s" + (sprintf "--%s" "optional-thing") + (LoadsOfTypesNoPositionals.DefaultOptionalThing() + |> (fun x -> x.ToString()) + |> sprintf " (default value: %s)") + "") + + (sprintf + "%s int32%s%s" + (sprintf "--%s" "another-optional-thing") + (LoadsOfTypesNoPositionals.DefaultAnotherOptionalThing() + |> (fun x -> x.ToString()) + |> sprintf " (default value: %s)") + "") + (sprintf + "%s string%s%s" + (sprintf "--%s" "yet-another-optional-thing") + ("CONSUMEPLUGIN_THINGS" |> sprintf " (default value populated from env var %s)") + "") ] |> String.concat "\n" - let parser_LeftoverArgs : string ResizeArray = ResizeArray () - let mutable arg_0 : int option = None - let mutable arg_1 : string option = None - let mutable arg_2 : bool option = None - let mutable arg_3 : FileInfo option = None - let mutable arg_4 : DirectoryInfo option = None - let arg_5 : DirectoryInfo ResizeArray = ResizeArray () - let mutable arg_6 : int option = None - let mutable arg_7 : bool option = None - let mutable arg_8 : int option = None - let mutable arg_9 : string option = None + let parser_LeftoverArgs: string ResizeArray = ResizeArray() + let mutable arg_0: int option = None + let mutable arg_1: string option = None + let mutable arg_2: bool option = None + let mutable arg_3: FileInfo option = None + let mutable arg_4: DirectoryInfo option = None + let arg_5: DirectoryInfo ResizeArray = ResizeArray() + let mutable arg_6: int option = None + let mutable arg_7: bool option = None + let mutable arg_8: int option = None + let mutable arg_9: string option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = + let processKeyValue (key: string) (value: string) : Result = if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "yet-another-optional-thing", System.StringComparison.OrdinalIgnoreCase @@ -1147,19 +1121,19 @@ module LoadsOfTypesNoPositionals = sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "yet-another-optional-thing") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_9 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "another-optional-thing", System.StringComparison.OrdinalIgnoreCase @@ -1170,38 +1144,38 @@ module LoadsOfTypesNoPositionals = sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "another-optional-thing") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_8 <- value |> (fun x -> System.Int32.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "optional-thing", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "optional-thing", System.StringComparison.OrdinalIgnoreCase) then match arg_7 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "optional-thing") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_7 <- value |> (fun x -> System.Boolean.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "optional-thing-with-no-default", System.StringComparison.OrdinalIgnoreCase @@ -1212,118 +1186,118 @@ module LoadsOfTypesNoPositionals = sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "optional-thing-with-no-default") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_6 <- value |> (fun x -> System.Int32.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "some-list", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "some-list", System.StringComparison.OrdinalIgnoreCase) then value |> (fun x -> System.IO.DirectoryInfo x) |> arg_5.Add () |> Ok else if - System.String.Equals (key, sprintf "--%s" "some-directory", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "some-directory", System.StringComparison.OrdinalIgnoreCase) then match arg_4 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "some-directory") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_4 <- value |> (fun x -> System.IO.DirectoryInfo x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "some-file", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "some-file", System.StringComparison.OrdinalIgnoreCase) then match arg_3 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "some-file") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_3 <- value |> (fun x -> System.IO.FileInfo x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "baz") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_2 <- value |> (fun x -> System.Boolean.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "bar", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "bar", System.StringComparison.OrdinalIgnoreCase) then match arg_1 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "bar") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_1 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error - else if System.String.Equals (key, sprintf "--%s" "foo", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "foo", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "foo") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> System.Int32.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = + let setFlagValue (key: string) : bool = if - System.String.Equals (key, sprintf "--%s" "optional-thing", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "optional-thing", System.StringComparison.OrdinalIgnoreCase) then match arg_7 with | Some x -> @@ -1334,7 +1308,7 @@ module LoadsOfTypesNoPositionals = | None -> arg_7 <- true |> Some true - else if System.String.Equals (key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(key, sprintf "--%s" "baz", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> sprintf "Flag '%s' was supplied multiple times" (sprintf "--%s" "baz") @@ -1347,7 +1321,7 @@ module LoadsOfTypesNoPositionals = else false - let rec go (state : ParseState_LoadsOfTypesNoPositionals) (args : string list) = + let rec go (state: ParseState_LoadsOfTypesNoPositionals) (args: string list) = match args with | [] -> match state with @@ -1360,15 +1334,15 @@ module LoadsOfTypesNoPositionals = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> parser_LeftoverArgs.AddRange (rest |> Seq.map (fun x -> x)) + | "--" :: rest -> parser_LeftoverArgs.AddRange(rest |> Seq.map (fun x -> x)) | arg :: args -> match state with | ParseState_LoadsOfTypesNoPositionals.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_LoadsOfTypesNoPositionals.AwaitingValue arg) @@ -1463,12 +1437,12 @@ module LoadsOfTypesNoPositionals = let arg_7 = match arg_7 with - | None -> LoadsOfTypesNoPositionals.DefaultOptionalThing () |> Choice2Of2 + | None -> LoadsOfTypesNoPositionals.DefaultOptionalThing() |> Choice2Of2 | Some x -> Choice1Of2 x let arg_8 = match arg_8 with - | None -> LoadsOfTypesNoPositionals.DefaultAnotherOptionalThing () |> Choice2Of2 + | None -> LoadsOfTypesNoPositionals.DefaultAnotherOptionalThing() |> Choice2Of2 | Some x -> Choice1Of2 x let arg_9 = @@ -1488,22 +1462,20 @@ module LoadsOfTypesNoPositionals = | Some x -> Choice1Of2 x if 0 = ArgParser_errors.Count then - { - AnotherOptionalThing = arg_8 - Bar = arg_1 - Baz = arg_2 - Foo = arg_0 - OptionalThing = arg_7 - OptionalThingWithNoDefault = arg_6 - SomeDirectory = arg_4 - SomeFile = arg_3 - SomeList = arg_5 - YetAnotherOptionalThing = arg_9 - } + { AnotherOptionalThing = arg_8 + Bar = arg_1 + Baz = arg_2 + Foo = arg_0 + OptionalThing = arg_7 + OptionalThingWithNoDefault = arg_6 + SomeDirectory = arg_4 + SomeFile = arg_3 + SomeList = arg_5 + YetAnotherOptionalThing = arg_9 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - let parse (args : string list) : LoadsOfTypesNoPositionals = + let parse (args: string list) : LoadsOfTypesNoPositionals = parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -1518,44 +1490,42 @@ module DatesAndTimesArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type DatesAndTimes with - static member parse' (getEnvironmentVariable : string -> string) (args : string list) : DatesAndTimes = - let ArgParser_errors = ResizeArray () + static member parse' (getEnvironmentVariable: string -> string) (args: string list) : DatesAndTimes = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s TimeSpan%s%s" (sprintf "--%s" "plain") "" "") - (sprintf "%s TimeSpan%s%s" (sprintf "--%s" "invariant") "" "") - - (sprintf - "%s TimeSpan%s%s" - (sprintf "--%s" "exact") - "" - (sprintf " : %s" (sprintf "%s [Parse format (.NET): %s]" "An exact time please" @"hh\:mm\:ss"))) - (sprintf - "%s TimeSpan%s%s" - (sprintf "--%s" "invariant-exact") - "" - (sprintf " : %s" (sprintf "[Parse format (.NET): %s]" @"hh\:mm\:ss"))) - ] + [ (sprintf "%s TimeSpan%s%s" (sprintf "--%s" "plain") "" "") + (sprintf "%s TimeSpan%s%s" (sprintf "--%s" "invariant") "" "") + + (sprintf + "%s TimeSpan%s%s" + (sprintf "--%s" "exact") + "" + (sprintf " : %s" (sprintf "%s [Parse format (.NET): %s]" "An exact time please" @"hh\:mm\:ss"))) + (sprintf + "%s TimeSpan%s%s" + (sprintf "--%s" "invariant-exact") + "" + (sprintf " : %s" (sprintf "[Parse format (.NET): %s]" @"hh\:mm\:ss"))) ] |> String.concat "\n" - let parser_LeftoverArgs : string ResizeArray = ResizeArray () - let mutable arg_0 : TimeSpan option = None - let mutable arg_1 : TimeSpan option = None - let mutable arg_2 : TimeSpan option = None - let mutable arg_3 : TimeSpan option = None + let parser_LeftoverArgs: string ResizeArray = ResizeArray() + let mutable arg_0: TimeSpan option = None + let mutable arg_1: TimeSpan option = None + let mutable arg_2: TimeSpan option = None + let mutable arg_3: TimeSpan option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = + let processKeyValue (key: string) (value: string) : Result = if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "invariant-exact", System.StringComparison.OrdinalIgnoreCase @@ -1566,107 +1536,104 @@ module DatesAndTimesArgParse = sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "invariant-exact") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_3 <- value |> (fun x -> - System.TimeSpan.ParseExact ( + System.TimeSpan.ParseExact( x, @"hh\:mm\:ss", System.Globalization.CultureInfo.InvariantCulture - ) - ) + )) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "exact", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "exact", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "exact") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_2 <- value |> (fun x -> - System.TimeSpan.ParseExact ( + System.TimeSpan.ParseExact( x, @"hh\:mm\:ss", System.Globalization.CultureInfo.CurrentCulture - ) - ) + )) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "invariant", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "invariant", System.StringComparison.OrdinalIgnoreCase) then match arg_1 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "invariant") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_1 <- value |> (fun x -> - System.TimeSpan.Parse (x, System.Globalization.CultureInfo.InvariantCulture) - ) + System.TimeSpan.Parse(x, System.Globalization.CultureInfo.InvariantCulture)) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "plain", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "plain", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "plain") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> System.TimeSpan.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = false + let setFlagValue (key: string) : bool = false - let rec go (state : ParseState_DatesAndTimes) (args : string list) = + let rec go (state: ParseState_DatesAndTimes) (args: string list) = match args with | [] -> match state with @@ -1679,15 +1646,15 @@ module DatesAndTimesArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> parser_LeftoverArgs.AddRange (rest |> Seq.map (fun x -> x)) + | "--" :: rest -> parser_LeftoverArgs.AddRange(rest |> Seq.map (fun x -> x)) | arg :: args -> match state with | ParseState_DatesAndTimes.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_DatesAndTimes.AwaitingValue arg) @@ -1776,16 +1743,14 @@ module DatesAndTimesArgParse = | Some x -> x if 0 = ArgParser_errors.Count then - { - Exact = arg_2 - Invariant = arg_1 - InvariantExact = arg_3 - Plain = arg_0 - } + { Exact = arg_2 + Invariant = arg_1 + InvariantExact = arg_3 + Plain = arg_0 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : DatesAndTimes = + static member parse(args: string list) : DatesAndTimes = DatesAndTimes.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -1800,95 +1765,93 @@ module ParentRecordArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type ParentRecord with - static member parse' (getEnvironmentVariable : string -> string) (args : string list) : ParentRecord = - let ArgParser_errors = ResizeArray () + static member parse' (getEnvironmentVariable: string -> string) (args: string list) : ParentRecord = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s int32%s%s" (sprintf "--%s" "thing1") "" "") - (sprintf "%s string%s%s" (sprintf "--%s" "thing2") "" "") - (sprintf "%s bool%s%s" (sprintf "--%s" "and-another") "" "") - ] + [ (sprintf "%s int32%s%s" (sprintf "--%s" "thing1") "" "") + (sprintf "%s string%s%s" (sprintf "--%s" "thing2") "" "") + (sprintf "%s bool%s%s" (sprintf "--%s" "and-another") "" "") ] |> String.concat "\n" - let parser_LeftoverArgs : string ResizeArray = ResizeArray () - let mutable arg_0 : int option = None - let mutable arg_1 : string option = None - let mutable arg_2 : bool option = None + let parser_LeftoverArgs: string ResizeArray = ResizeArray() + let mutable arg_0: int option = None + let mutable arg_1: string option = None + let mutable arg_2: bool option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = + let processKeyValue (key: string) (value: string) : Result = if - System.String.Equals (key, sprintf "--%s" "and-another", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "and-another", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "and-another") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_2 <- value |> (fun x -> System.Boolean.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "thing2", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "thing2", System.StringComparison.OrdinalIgnoreCase) then match arg_1 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "thing2") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_1 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "thing1", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "thing1", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "thing1") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> System.Int32.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = + let setFlagValue (key: string) : bool = if - System.String.Equals (key, sprintf "--%s" "and-another", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "and-another", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> @@ -1902,7 +1865,7 @@ module ParentRecordArgParse = else false - let rec go (state : ParseState_ParentRecord) (args : string list) = + let rec go (state: ParseState_ParentRecord) (args: string list) = match args with | [] -> match state with @@ -1915,15 +1878,15 @@ module ParentRecordArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> parser_LeftoverArgs.AddRange (rest |> Seq.map (fun x -> x)) + | "--" :: rest -> parser_LeftoverArgs.AddRange(rest |> Seq.map (fun x -> x)) | arg :: args -> match state with | ParseState_ParentRecord.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_ParentRecord.AwaitingValue arg) @@ -2003,18 +1966,12 @@ module ParentRecordArgParse = | Some x -> x if 0 = ArgParser_errors.Count then - { - AndAnother = arg_2 - Child = - { - Thing1 = arg_0 - Thing2 = arg_1 - } - } + { AndAnother = arg_2 + Child = { Thing1 = arg_0; Thing2 = arg_1 } } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : ParentRecord = + static member parse(args: string list) : ParentRecord = ParentRecord.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -2029,68 +1986,66 @@ module ParentRecordChildPosArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type ParentRecordChildPos with - static member parse' (getEnvironmentVariable : string -> string) (args : string list) : ParentRecordChildPos = - let ArgParser_errors = ResizeArray () + static member parse' (getEnvironmentVariable: string -> string) (args: string list) : ParentRecordChildPos = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s bool%s%s" (sprintf "--%s" "and-another") "" "") - (sprintf "%s int32%s%s" (sprintf "--%s" "thing1") "" "") - (sprintf "%s URI%s%s" (sprintf "--%s" "thing2") " (positional args) (can be repeated)" "") - ] + [ (sprintf "%s bool%s%s" (sprintf "--%s" "and-another") "" "") + (sprintf "%s int32%s%s" (sprintf "--%s" "thing1") "" "") + (sprintf "%s URI%s%s" (sprintf "--%s" "thing2") " (positional args) (can be repeated)" "") ] |> String.concat "\n" - let arg_1 : Uri ResizeArray = ResizeArray () - let mutable arg_2 : bool option = None - let mutable arg_0 : int option = None + let arg_1: Uri ResizeArray = ResizeArray() + let mutable arg_2: bool option = None + let mutable arg_0: int option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "thing1", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "thing1", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "thing1") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> System.Int32.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "and-another", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "and-another", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "and-another") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_2 <- value |> (fun x -> System.Boolean.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "thing2", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "thing2", System.StringComparison.OrdinalIgnoreCase) then value |> (fun x -> System.Uri x) |> arg_1.Add () |> Ok @@ -2098,9 +2053,9 @@ module ParentRecordChildPosArgParse = Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = + let setFlagValue (key: string) : bool = if - System.String.Equals (key, sprintf "--%s" "and-another", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "and-another", System.StringComparison.OrdinalIgnoreCase) then match arg_2 with | Some x -> @@ -2114,7 +2069,7 @@ module ParentRecordChildPosArgParse = else false - let rec go (state : ParseState_ParentRecordChildPos) (args : string list) = + let rec go (state: ParseState_ParentRecordChildPos) (args: string list) = match args with | [] -> match state with @@ -2127,15 +2082,15 @@ module ParentRecordChildPosArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> arg_1.AddRange (rest |> Seq.map (fun x -> System.Uri x)) + | "--" :: rest -> arg_1.AddRange(rest |> Seq.map (fun x -> System.Uri x)) | arg :: args -> match state with | ParseState_ParentRecordChildPos.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_ParentRecordChildPos.AwaitingValue arg) @@ -2196,18 +2151,12 @@ module ParentRecordChildPosArgParse = | Some x -> x if 0 = ArgParser_errors.Count then - { - AndAnother = arg_2 - Child = - { - Thing1 = arg_0 - Thing2 = arg_1 - } - } + { AndAnother = arg_2 + Child = { Thing1 = arg_0; Thing2 = arg_1 } } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : ParentRecordChildPos = + static member parse(args: string list) : ParentRecordChildPos = ParentRecordChildPos.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -2222,68 +2171,66 @@ module ParentRecordSelfPosArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type ParentRecordSelfPos with - static member parse' (getEnvironmentVariable : string -> string) (args : string list) : ParentRecordSelfPos = - let ArgParser_errors = ResizeArray () + static member parse' (getEnvironmentVariable: string -> string) (args: string list) : ParentRecordSelfPos = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s int32%s%s" (sprintf "--%s" "thing1") "" "") - (sprintf "%s string%s%s" (sprintf "--%s" "thing2") "" "") - (sprintf "%s bool%s%s" (sprintf "--%s" "and-another") " (positional args) (can be repeated)" "") - ] + [ (sprintf "%s int32%s%s" (sprintf "--%s" "thing1") "" "") + (sprintf "%s string%s%s" (sprintf "--%s" "thing2") "" "") + (sprintf "%s bool%s%s" (sprintf "--%s" "and-another") " (positional args) (can be repeated)" "") ] |> String.concat "\n" - let arg_2 : bool ResizeArray = ResizeArray () - let mutable arg_0 : int option = None - let mutable arg_1 : string option = None + let arg_2: bool ResizeArray = ResizeArray() + let mutable arg_0: int option = None + let mutable arg_1: string option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "thing2", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "thing2", System.StringComparison.OrdinalIgnoreCase) then match arg_1 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "thing2") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_1 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "thing1", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "thing1", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "thing1") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> System.Int32.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "and-another", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "and-another", System.StringComparison.OrdinalIgnoreCase) then value |> (fun x -> System.Boolean.Parse x) |> arg_2.Add () |> Ok @@ -2291,9 +2238,9 @@ module ParentRecordSelfPosArgParse = Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = false + let setFlagValue (key: string) : bool = false - let rec go (state : ParseState_ParentRecordSelfPos) (args : string list) = + let rec go (state: ParseState_ParentRecordSelfPos) (args: string list) = match args with | [] -> match state with @@ -2306,15 +2253,15 @@ module ParentRecordSelfPosArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> arg_2.AddRange (rest |> Seq.map (fun x -> System.Boolean.Parse x)) + | "--" :: rest -> arg_2.AddRange(rest |> Seq.map (fun x -> System.Boolean.Parse x)) | arg :: args -> match state with | ParseState_ParentRecordSelfPos.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_ParentRecordSelfPos.AwaitingValue arg) @@ -2375,18 +2322,12 @@ module ParentRecordSelfPosArgParse = | Some x -> x if 0 = ArgParser_errors.Count then - { - AndAnother = arg_2 - Child = - { - Thing1 = arg_0 - Thing2 = arg_1 - } - } + { AndAnother = arg_2 + Child = { Thing1 = arg_0; Thing2 = arg_1 } } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : ParentRecordSelfPos = + static member parse(args: string list) : ParentRecordSelfPos = ParentRecordSelfPos.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -2401,36 +2342,34 @@ module ChoicePositionalsArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type ChoicePositionals with - static member parse' (getEnvironmentVariable : string -> string) (args : string list) : ChoicePositionals = - let ArgParser_errors = ResizeArray () + static member parse' (getEnvironmentVariable: string -> string) (args: string list) : ChoicePositionals = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s string%s%s" (sprintf "--%s" "args") " (positional args) (can be repeated)" "") - ] + [ (sprintf "%s string%s%s" (sprintf "--%s" "args") " (positional args) (can be repeated)" "") ] |> String.concat "\n" - let arg_0 : Choice ResizeArray = ResizeArray () + let arg_0: Choice ResizeArray = ResizeArray() /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "args", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "args", System.StringComparison.OrdinalIgnoreCase) then value |> (fun x -> x) |> Choice1Of2 |> arg_0.Add () |> Ok else Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = false + let setFlagValue (key: string) : bool = false - let rec go (state : ParseState_ChoicePositionals) (args : string list) = + let rec go (state: ParseState_ChoicePositionals) (args: string list) = match args with | [] -> match state with @@ -2443,15 +2382,15 @@ module ChoicePositionalsArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> arg_0.AddRange (rest |> Seq.map (fun x -> x) |> Seq.map Choice2Of2) + | "--" :: rest -> arg_0.AddRange(rest |> Seq.map (fun x -> x) |> Seq.map Choice2Of2) | arg :: args -> match state with | ParseState_ChoicePositionals.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_ChoicePositionals.AwaitingValue arg) @@ -2494,13 +2433,11 @@ module ChoicePositionalsArgParse = let arg_0 = arg_0 |> Seq.toList if 0 = ArgParser_errors.Count then - { - Args = arg_0 - } + { Args = arg_0 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : ChoicePositionals = + static member parse(args: string list) : ChoicePositionals = ChoicePositionals.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -2515,54 +2452,52 @@ module ContainsBoolEnvVarArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type ContainsBoolEnvVar with - static member parse' (getEnvironmentVariable : string -> string) (args : string list) : ContainsBoolEnvVar = - let ArgParser_errors = ResizeArray () + static member parse' (getEnvironmentVariable: string -> string) (args: string list) : ContainsBoolEnvVar = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf - "%s bool%s%s" - (sprintf "--%s" "bool-var") - ("CONSUMEPLUGIN_THINGS" |> sprintf " (default value populated from env var %s)") - "") - ] + [ (sprintf + "%s bool%s%s" + (sprintf "--%s" "bool-var") + ("CONSUMEPLUGIN_THINGS" |> sprintf " (default value populated from env var %s)") + "") ] |> String.concat "\n" - let parser_LeftoverArgs : string ResizeArray = ResizeArray () - let mutable arg_0 : bool option = None + let parser_LeftoverArgs: string ResizeArray = ResizeArray() + let mutable arg_0: bool option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "bool-var", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "bool-var", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "bool-var") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> System.Boolean.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = - if System.String.Equals (key, sprintf "--%s" "bool-var", System.StringComparison.OrdinalIgnoreCase) then + let setFlagValue (key: string) : bool = + if System.String.Equals(key, sprintf "--%s" "bool-var", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Flag '%s' was supplied multiple times" (sprintf "--%s" "bool-var") @@ -2575,7 +2510,7 @@ module ContainsBoolEnvVarArgParse = else false - let rec go (state : ParseState_ContainsBoolEnvVar) (args : string list) = + let rec go (state: ParseState_ContainsBoolEnvVar) (args: string list) = match args with | [] -> match state with @@ -2588,15 +2523,15 @@ module ContainsBoolEnvVarArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> parser_LeftoverArgs.AddRange (rest |> Seq.map (fun x -> x)) + | "--" :: rest -> parser_LeftoverArgs.AddRange(rest |> Seq.map (fun x -> x)) | arg :: args -> match state with | ParseState_ContainsBoolEnvVar.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_ContainsBoolEnvVar.AwaitingValue arg) @@ -2661,9 +2596,9 @@ module ContainsBoolEnvVarArgParse = Unchecked.defaultof<_> | x -> - if System.String.Equals (x, "1", System.StringComparison.OrdinalIgnoreCase) then + if System.String.Equals(x, "1", System.StringComparison.OrdinalIgnoreCase) then true - else if System.String.Equals (x, "0", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(x, "0", System.StringComparison.OrdinalIgnoreCase) then false else x |> (fun x -> System.Boolean.Parse x) @@ -2671,13 +2606,11 @@ module ContainsBoolEnvVarArgParse = | Some x -> Choice1Of2 x if 0 = ArgParser_errors.Count then - { - BoolVar = arg_0 - } + { BoolVar = arg_0 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : ContainsBoolEnvVar = + static member parse(args: string list) : ContainsBoolEnvVar = ContainsBoolEnvVar.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -2692,36 +2625,36 @@ module WithFlagDuArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type WithFlagDu with - static member parse' (getEnvironmentVariable : string -> string) (args : string list) : WithFlagDu = - let ArgParser_errors = ResizeArray () + static member parse' (getEnvironmentVariable: string -> string) (args: string list) : WithFlagDu = + let ArgParser_errors = ResizeArray() let helpText () = [ (sprintf "%s bool%s%s" (sprintf "--%s" "dry-run") "" "") ] |> String.concat "\n" - let parser_LeftoverArgs : string ResizeArray = ResizeArray () - let mutable arg_0 : DryRunMode option = None + let parser_LeftoverArgs: string ResizeArray = ResizeArray() + let mutable arg_0: DryRunMode option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "dry-run", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "dry-run", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "dry-run") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- @@ -2730,19 +2663,18 @@ module WithFlagDuArgParse = if System.Boolean.Parse x = Consts.FALSE then DryRunMode.Wet else - DryRunMode.Dry - ) + DryRunMode.Dry) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = - if System.String.Equals (key, sprintf "--%s" "dry-run", System.StringComparison.OrdinalIgnoreCase) then + let setFlagValue (key: string) : bool = + if System.String.Equals(key, sprintf "--%s" "dry-run", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Flag '%s' was supplied multiple times" (sprintf "--%s" "dry-run") @@ -2761,7 +2693,7 @@ module WithFlagDuArgParse = else false - let rec go (state : ParseState_WithFlagDu) (args : string list) = + let rec go (state: ParseState_WithFlagDu) (args: string list) = match args with | [] -> match state with @@ -2774,15 +2706,15 @@ module WithFlagDuArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> parser_LeftoverArgs.AddRange (rest |> Seq.map (fun x -> x)) + | "--" :: rest -> parser_LeftoverArgs.AddRange(rest |> Seq.map (fun x -> x)) | arg :: args -> match state with | ParseState_WithFlagDu.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_WithFlagDu.AwaitingValue arg) @@ -2844,13 +2776,11 @@ module WithFlagDuArgParse = | Some x -> x if 0 = ArgParser_errors.Count then - { - DryRun = arg_0 - } + { DryRun = arg_0 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : WithFlagDu = + static member parse(args: string list) : WithFlagDu = WithFlagDu.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -2865,42 +2795,40 @@ module ContainsFlagEnvVarArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type ContainsFlagEnvVar with - static member parse' (getEnvironmentVariable : string -> string) (args : string list) : ContainsFlagEnvVar = - let ArgParser_errors = ResizeArray () + static member parse' (getEnvironmentVariable: string -> string) (args: string list) : ContainsFlagEnvVar = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf - "%s bool%s%s" - (sprintf "--%s" "dry-run") - ("CONSUMEPLUGIN_THINGS" |> sprintf " (default value populated from env var %s)") - "") - ] + [ (sprintf + "%s bool%s%s" + (sprintf "--%s" "dry-run") + ("CONSUMEPLUGIN_THINGS" |> sprintf " (default value populated from env var %s)") + "") ] |> String.concat "\n" - let parser_LeftoverArgs : string ResizeArray = ResizeArray () - let mutable arg_0 : DryRunMode option = None + let parser_LeftoverArgs: string ResizeArray = ResizeArray() + let mutable arg_0: DryRunMode option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "dry-run", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "dry-run", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "dry-run") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- @@ -2909,19 +2837,18 @@ module ContainsFlagEnvVarArgParse = if System.Boolean.Parse x = Consts.FALSE then DryRunMode.Wet else - DryRunMode.Dry - ) + DryRunMode.Dry) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = - if System.String.Equals (key, sprintf "--%s" "dry-run", System.StringComparison.OrdinalIgnoreCase) then + let setFlagValue (key: string) : bool = + if System.String.Equals(key, sprintf "--%s" "dry-run", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Flag '%s' was supplied multiple times" (sprintf "--%s" "dry-run") @@ -2940,7 +2867,7 @@ module ContainsFlagEnvVarArgParse = else false - let rec go (state : ParseState_ContainsFlagEnvVar) (args : string list) = + let rec go (state: ParseState_ContainsFlagEnvVar) (args: string list) = match args with | [] -> match state with @@ -2953,15 +2880,15 @@ module ContainsFlagEnvVarArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> parser_LeftoverArgs.AddRange (rest |> Seq.map (fun x -> x)) + | "--" :: rest -> parser_LeftoverArgs.AddRange(rest |> Seq.map (fun x -> x)) | arg :: args -> match state with | ParseState_ContainsFlagEnvVar.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_ContainsFlagEnvVar.AwaitingValue arg) @@ -3026,12 +2953,12 @@ module ContainsFlagEnvVarArgParse = Unchecked.defaultof<_> | x -> - if System.String.Equals (x, "1", System.StringComparison.OrdinalIgnoreCase) then + if System.String.Equals(x, "1", System.StringComparison.OrdinalIgnoreCase) then if true = Consts.FALSE then DryRunMode.Wet else DryRunMode.Dry - else if System.String.Equals (x, "0", System.StringComparison.OrdinalIgnoreCase) then + else if System.String.Equals(x, "0", System.StringComparison.OrdinalIgnoreCase) then if false = Consts.FALSE then DryRunMode.Wet else @@ -3042,19 +2969,16 @@ module ContainsFlagEnvVarArgParse = if System.Boolean.Parse x = Consts.FALSE then DryRunMode.Wet else - DryRunMode.Dry - ) + DryRunMode.Dry) |> Choice2Of2 | Some x -> Choice1Of2 x if 0 = ArgParser_errors.Count then - { - DryRun = arg_0 - } + { DryRun = arg_0 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : ContainsFlagEnvVar = + static member parse(args: string list) : ContainsFlagEnvVar = ContainsFlagEnvVar.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -3069,50 +2993,44 @@ module ContainsFlagDefaultValueArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type ContainsFlagDefaultValue with - static member parse' - (getEnvironmentVariable : string -> string) - (args : string list) - : ContainsFlagDefaultValue - = - let ArgParser_errors = ResizeArray () + static member parse' (getEnvironmentVariable: string -> string) (args: string list) : ContainsFlagDefaultValue = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf - "%s bool%s%s" - (sprintf "--%s" "dry-run") - (match ContainsFlagDefaultValue.DefaultDryRun () with - | DryRunMode.Wet -> if Consts.FALSE = true then "true" else "false" - | DryRunMode.Dry -> if true = true then "true" else "false" - |> (fun x -> x.ToString ()) - |> sprintf " (default value: %s)") - "") - ] + [ (sprintf + "%s bool%s%s" + (sprintf "--%s" "dry-run") + (match ContainsFlagDefaultValue.DefaultDryRun() with + | DryRunMode.Wet -> if Consts.FALSE = true then "true" else "false" + | DryRunMode.Dry -> if true = true then "true" else "false" + |> (fun x -> x.ToString()) + |> sprintf " (default value: %s)") + "") ] |> String.concat "\n" - let parser_LeftoverArgs : string ResizeArray = ResizeArray () - let mutable arg_0 : DryRunMode option = None + let parser_LeftoverArgs: string ResizeArray = ResizeArray() + let mutable arg_0: DryRunMode option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "dry-run", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "dry-run", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "dry-run") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- @@ -3121,19 +3039,18 @@ module ContainsFlagDefaultValueArgParse = if System.Boolean.Parse x = Consts.FALSE then DryRunMode.Wet else - DryRunMode.Dry - ) + DryRunMode.Dry) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = - if System.String.Equals (key, sprintf "--%s" "dry-run", System.StringComparison.OrdinalIgnoreCase) then + let setFlagValue (key: string) : bool = + if System.String.Equals(key, sprintf "--%s" "dry-run", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Flag '%s' was supplied multiple times" (sprintf "--%s" "dry-run") @@ -3152,7 +3069,7 @@ module ContainsFlagDefaultValueArgParse = else false - let rec go (state : ParseState_ContainsFlagDefaultValue) (args : string list) = + let rec go (state: ParseState_ContainsFlagDefaultValue) (args: string list) = match args with | [] -> match state with @@ -3165,15 +3082,15 @@ module ContainsFlagDefaultValueArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> parser_LeftoverArgs.AddRange (rest |> Seq.map (fun x -> x)) + | "--" :: rest -> parser_LeftoverArgs.AddRange(rest |> Seq.map (fun x -> x)) | arg :: args -> match state with | ParseState_ContainsFlagDefaultValue.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_ContainsFlagDefaultValue.AwaitingValue arg) @@ -3227,17 +3144,15 @@ module ContainsFlagDefaultValueArgParse = let arg_0 = match arg_0 with - | None -> ContainsFlagDefaultValue.DefaultDryRun () |> Choice2Of2 + | None -> ContainsFlagDefaultValue.DefaultDryRun() |> Choice2Of2 | Some x -> Choice1Of2 x if 0 = ArgParser_errors.Count then - { - DryRun = arg_0 - } + { DryRun = arg_0 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : ContainsFlagDefaultValue = + static member parse(args: string list) : ContainsFlagDefaultValue = ContainsFlagDefaultValue.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -3252,31 +3167,29 @@ module ManyLongFormsArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type ManyLongForms with - static member parse' (getEnvironmentVariable : string -> string) (args : string list) : ManyLongForms = - let ArgParser_errors = ResizeArray () + static member parse' (getEnvironmentVariable: string -> string) (args: string list) : ManyLongForms = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s string%s%s" (sprintf "--%s / --%s" "do-something-else" "anotherarg") "" "") - (sprintf "%s bool%s%s" (sprintf "--%s / --%s" "turn-it-on" "dont-turn-it-off") "" "") - ] + [ (sprintf "%s string%s%s" (sprintf "--%s / --%s" "do-something-else" "anotherarg") "" "") + (sprintf "%s bool%s%s" (sprintf "--%s / --%s" "turn-it-on" "dont-turn-it-off") "" "") ] |> String.concat "\n" - let parser_LeftoverArgs : string ResizeArray = ResizeArray () - let mutable arg_0 : string option = None - let mutable arg_1 : bool option = None + let parser_LeftoverArgs: string ResizeArray = ResizeArray() + let mutable arg_0: string option = None + let mutable arg_1: bool option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = + let processKeyValue (key: string) (value: string) : Result = if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "dont-turn-it-off", System.StringComparison.OrdinalIgnoreCase @@ -3287,57 +3200,57 @@ module ManyLongFormsArgParse = sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s / --%s" "turn-it-on" "dont-turn-it-off") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_1 <- value |> (fun x -> System.Boolean.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "turn-it-on", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "turn-it-on", System.StringComparison.OrdinalIgnoreCase) then match arg_1 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s / --%s" "turn-it-on" "dont-turn-it-off") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_1 <- value |> (fun x -> System.Boolean.Parse x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals (key, sprintf "--%s" "anotherarg", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "anotherarg", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s / --%s" "do-something-else" "anotherarg") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "do-something-else", System.StringComparison.OrdinalIgnoreCase @@ -3348,24 +3261,24 @@ module ManyLongFormsArgParse = sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s / --%s" "do-something-else" "anotherarg") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = + let setFlagValue (key: string) : bool = if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "dont-turn-it-off", System.StringComparison.OrdinalIgnoreCase @@ -3383,7 +3296,7 @@ module ManyLongFormsArgParse = arg_1 <- true |> Some true else if - System.String.Equals (key, sprintf "--%s" "turn-it-on", System.StringComparison.OrdinalIgnoreCase) + System.String.Equals(key, sprintf "--%s" "turn-it-on", System.StringComparison.OrdinalIgnoreCase) then match arg_1 with | Some x -> @@ -3399,7 +3312,7 @@ module ManyLongFormsArgParse = else false - let rec go (state : ParseState_ManyLongForms) (args : string list) = + let rec go (state: ParseState_ManyLongForms) (args: string list) = match args with | [] -> match state with @@ -3412,15 +3325,15 @@ module ManyLongFormsArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> parser_LeftoverArgs.AddRange (rest |> Seq.map (fun x -> x)) + | "--" :: rest -> parser_LeftoverArgs.AddRange(rest |> Seq.map (fun x -> x)) | arg :: args -> match state with | ParseState_ManyLongForms.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_ManyLongForms.AwaitingValue arg) @@ -3495,14 +3408,11 @@ module ManyLongFormsArgParse = | Some x -> x if 0 = ArgParser_errors.Count then - { - DoTheThing = arg_0 - SomeFlag = arg_1 - } + { DoTheThing = arg_0; SomeFlag = arg_1 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : ManyLongForms = + static member parse(args: string list) : ManyLongForms = ManyLongForms.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -3517,55 +3427,45 @@ module FlagsIntoPositionalArgsArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type FlagsIntoPositionalArgs with - static member parse' - (getEnvironmentVariable : string -> string) - (args : string list) - : FlagsIntoPositionalArgs - = - let ArgParser_errors = ResizeArray () + static member parse' (getEnvironmentVariable: string -> string) (args: string list) : FlagsIntoPositionalArgs = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s string%s%s" (sprintf "--%s" "a") "" "") - (sprintf - "%s string%s%s" - (sprintf "--%s" "grab-everything") - " (positional args) (can be repeated)" - "") - ] + [ (sprintf "%s string%s%s" (sprintf "--%s" "a") "" "") + (sprintf "%s string%s%s" (sprintf "--%s" "grab-everything") " (positional args) (can be repeated)" "") ] |> String.concat "\n" - let arg_1 : string ResizeArray = ResizeArray () - let mutable arg_0 : string option = None + let arg_1: string ResizeArray = ResizeArray() + let mutable arg_0: string option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "a", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "a", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "a") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "grab-everything", System.StringComparison.OrdinalIgnoreCase @@ -3577,9 +3477,9 @@ module FlagsIntoPositionalArgsArgParse = Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = false + let setFlagValue (key: string) : bool = false - let rec go (state : ParseState_FlagsIntoPositionalArgs) (args : string list) = + let rec go (state: ParseState_FlagsIntoPositionalArgs) (args: string list) = match args with | [] -> match state with @@ -3592,15 +3492,15 @@ module FlagsIntoPositionalArgsArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> arg_1.AddRange (rest |> Seq.map (fun x -> x)) + | "--" :: rest -> arg_1.AddRange(rest |> Seq.map (fun x -> x)) | arg :: args -> match state with | ParseState_FlagsIntoPositionalArgs.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_FlagsIntoPositionalArgs.AwaitingValue arg) @@ -3659,14 +3559,11 @@ module FlagsIntoPositionalArgsArgParse = | Some x -> x if 0 = ArgParser_errors.Count then - { - A = arg_0 - GrabEverything = arg_1 - } + { A = arg_0; GrabEverything = arg_1 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : FlagsIntoPositionalArgs = + static member parse(args: string list) : FlagsIntoPositionalArgs = FlagsIntoPositionalArgs.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -3681,55 +3578,48 @@ module FlagsIntoPositionalArgsChoiceArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type FlagsIntoPositionalArgsChoice with static member parse' - (getEnvironmentVariable : string -> string) - (args : string list) - : FlagsIntoPositionalArgsChoice - = - let ArgParser_errors = ResizeArray () + (getEnvironmentVariable: string -> string) + (args: string list) + : FlagsIntoPositionalArgsChoice = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s string%s%s" (sprintf "--%s" "a") "" "") - (sprintf - "%s string%s%s" - (sprintf "--%s" "grab-everything") - " (positional args) (can be repeated)" - "") - ] + [ (sprintf "%s string%s%s" (sprintf "--%s" "a") "" "") + (sprintf "%s string%s%s" (sprintf "--%s" "grab-everything") " (positional args) (can be repeated)" "") ] |> String.concat "\n" - let arg_1 : Choice ResizeArray = ResizeArray () - let mutable arg_0 : string option = None + let arg_1: Choice ResizeArray = ResizeArray() + let mutable arg_0: string option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "a", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "a", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "a") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "grab-everything", System.StringComparison.OrdinalIgnoreCase @@ -3741,9 +3631,9 @@ module FlagsIntoPositionalArgsChoiceArgParse = Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = false + let setFlagValue (key: string) : bool = false - let rec go (state : ParseState_FlagsIntoPositionalArgsChoice) (args : string list) = + let rec go (state: ParseState_FlagsIntoPositionalArgsChoice) (args: string list) = match args with | [] -> match state with @@ -3756,15 +3646,15 @@ module FlagsIntoPositionalArgsChoiceArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> arg_1.AddRange (rest |> Seq.map (fun x -> x) |> Seq.map Choice2Of2) + | "--" :: rest -> arg_1.AddRange(rest |> Seq.map (fun x -> x) |> Seq.map Choice2Of2) | arg :: args -> match state with | ParseState_FlagsIntoPositionalArgsChoice.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_FlagsIntoPositionalArgsChoice.AwaitingValue arg) @@ -3823,14 +3713,11 @@ module FlagsIntoPositionalArgsChoiceArgParse = | Some x -> x if 0 = ArgParser_errors.Count then - { - A = arg_0 - GrabEverything = arg_1 - } + { A = arg_0; GrabEverything = arg_1 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : FlagsIntoPositionalArgsChoice = + static member parse(args: string list) : FlagsIntoPositionalArgsChoice = FlagsIntoPositionalArgsChoice.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -3845,55 +3732,48 @@ module FlagsIntoPositionalArgsIntArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type FlagsIntoPositionalArgsInt with static member parse' - (getEnvironmentVariable : string -> string) - (args : string list) - : FlagsIntoPositionalArgsInt - = - let ArgParser_errors = ResizeArray () + (getEnvironmentVariable: string -> string) + (args: string list) + : FlagsIntoPositionalArgsInt = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s string%s%s" (sprintf "--%s" "a") "" "") - (sprintf - "%s int32%s%s" - (sprintf "--%s" "grab-everything") - " (positional args) (can be repeated)" - "") - ] + [ (sprintf "%s string%s%s" (sprintf "--%s" "a") "" "") + (sprintf "%s int32%s%s" (sprintf "--%s" "grab-everything") " (positional args) (can be repeated)" "") ] |> String.concat "\n" - let arg_1 : int ResizeArray = ResizeArray () - let mutable arg_0 : string option = None + let arg_1: int ResizeArray = ResizeArray() + let mutable arg_0: string option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "a", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "a", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "a") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "grab-everything", System.StringComparison.OrdinalIgnoreCase @@ -3905,9 +3785,9 @@ module FlagsIntoPositionalArgsIntArgParse = Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = false + let setFlagValue (key: string) : bool = false - let rec go (state : ParseState_FlagsIntoPositionalArgsInt) (args : string list) = + let rec go (state: ParseState_FlagsIntoPositionalArgsInt) (args: string list) = match args with | [] -> match state with @@ -3920,15 +3800,15 @@ module FlagsIntoPositionalArgsIntArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> arg_1.AddRange (rest |> Seq.map (fun x -> System.Int32.Parse x)) + | "--" :: rest -> arg_1.AddRange(rest |> Seq.map (fun x -> System.Int32.Parse x)) | arg :: args -> match state with | ParseState_FlagsIntoPositionalArgsInt.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_FlagsIntoPositionalArgsInt.AwaitingValue arg) @@ -3987,14 +3867,11 @@ module FlagsIntoPositionalArgsIntArgParse = | Some x -> x if 0 = ArgParser_errors.Count then - { - A = arg_0 - GrabEverything = arg_1 - } + { A = arg_0; GrabEverything = arg_1 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : FlagsIntoPositionalArgsInt = + static member parse(args: string list) : FlagsIntoPositionalArgsInt = FlagsIntoPositionalArgsInt.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -4009,55 +3886,48 @@ module FlagsIntoPositionalArgsIntChoiceArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type FlagsIntoPositionalArgsIntChoice with static member parse' - (getEnvironmentVariable : string -> string) - (args : string list) - : FlagsIntoPositionalArgsIntChoice - = - let ArgParser_errors = ResizeArray () + (getEnvironmentVariable: string -> string) + (args: string list) + : FlagsIntoPositionalArgsIntChoice = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s string%s%s" (sprintf "--%s" "a") "" "") - (sprintf - "%s int32%s%s" - (sprintf "--%s" "grab-everything") - " (positional args) (can be repeated)" - "") - ] + [ (sprintf "%s string%s%s" (sprintf "--%s" "a") "" "") + (sprintf "%s int32%s%s" (sprintf "--%s" "grab-everything") " (positional args) (can be repeated)" "") ] |> String.concat "\n" - let arg_1 : Choice ResizeArray = ResizeArray () - let mutable arg_0 : string option = None + let arg_1: Choice ResizeArray = ResizeArray() + let mutable arg_0: string option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "a", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "a", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "a") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "grab-everything", System.StringComparison.OrdinalIgnoreCase @@ -4069,9 +3939,9 @@ module FlagsIntoPositionalArgsIntChoiceArgParse = Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = false + let setFlagValue (key: string) : bool = false - let rec go (state : ParseState_FlagsIntoPositionalArgsIntChoice) (args : string list) = + let rec go (state: ParseState_FlagsIntoPositionalArgsIntChoice) (args: string list) = match args with | [] -> match state with @@ -4084,15 +3954,17 @@ module FlagsIntoPositionalArgsIntChoiceArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> arg_1.AddRange (rest |> Seq.map (fun x -> System.Int32.Parse x) |> Seq.map Choice2Of2) + | "--" :: rest -> + arg_1 + .AddRange(rest |> Seq.map (fun x -> System.Int32.Parse x) |> Seq.map Choice2Of2) | arg :: args -> match state with | ParseState_FlagsIntoPositionalArgsIntChoice.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_FlagsIntoPositionalArgsIntChoice.AwaitingValue arg) @@ -4151,14 +4023,11 @@ module FlagsIntoPositionalArgsIntChoiceArgParse = | Some x -> x if 0 = ArgParser_errors.Count then - { - A = arg_0 - GrabEverything = arg_1 - } + { A = arg_0; GrabEverything = arg_1 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : FlagsIntoPositionalArgsIntChoice = + static member parse(args: string list) : FlagsIntoPositionalArgsIntChoice = FlagsIntoPositionalArgsIntChoice.parse' System.Environment.GetEnvironmentVariable args namespace ConsumePlugin @@ -4173,55 +4042,49 @@ module FlagsIntoPositionalArgs'ArgParse = /// Ready to consume a key or positional arg | AwaitingKey /// Waiting to receive a value for the key we've already consumed - | AwaitingValue of key : string + | AwaitingValue of key: string /// Extension methods for argument parsing type FlagsIntoPositionalArgs' with - static member parse' - (getEnvironmentVariable : string -> string) - (args : string list) - : FlagsIntoPositionalArgs' - = - let ArgParser_errors = ResizeArray () + static member parse' (getEnvironmentVariable: string -> string) (args: string list) : FlagsIntoPositionalArgs' = + let ArgParser_errors = ResizeArray() let helpText () = - [ - (sprintf "%s string%s%s" (sprintf "--%s" "a") "" "") - (sprintf - "%s string%s%s" - (sprintf "--%s" "dont-grab-everything") - " (positional args) (can be repeated)" - "") - ] + [ (sprintf "%s string%s%s" (sprintf "--%s" "a") "" "") + (sprintf + "%s string%s%s" + (sprintf "--%s" "dont-grab-everything") + " (positional args) (can be repeated)" + "") ] |> String.concat "\n" - let arg_1 : string ResizeArray = ResizeArray () - let mutable arg_0 : string option = None + let arg_1: string ResizeArray = ResizeArray() + let mutable arg_0: string option = None /// Processes the key-value pair, returning Error if no key was matched. /// If the key is an arg which can have arity 1, but throws when consuming that arg, we return Error(). /// This can nevertheless be a successful parse, e.g. when the key may have arity 0. - let processKeyValue (key : string) (value : string) : Result = - if System.String.Equals (key, sprintf "--%s" "a", System.StringComparison.OrdinalIgnoreCase) then + let processKeyValue (key: string) (value: string) : Result = + if System.String.Equals(key, sprintf "--%s" "a", System.StringComparison.OrdinalIgnoreCase) then match arg_0 with | Some x -> sprintf "Argument '%s' was supplied multiple times: %s and %s" (sprintf "--%s" "a") - (x.ToString ()) - (value.ToString ()) + (x.ToString()) + (value.ToString()) |> ArgParser_errors.Add - Ok () + Ok() | None -> try arg_0 <- value |> (fun x -> x) |> Some - Ok () + Ok() with _ as exc -> exc.Message |> Some |> Error else if - System.String.Equals ( + System.String.Equals( key, sprintf "--%s" "dont-grab-everything", System.StringComparison.OrdinalIgnoreCase @@ -4233,9 +4096,9 @@ module FlagsIntoPositionalArgs'ArgParse = Error None /// Returns false if we didn't set a value. - let setFlagValue (key : string) : bool = false + let setFlagValue (key: string) : bool = false - let rec go (state : ParseState_FlagsIntoPositionalArgs') (args : string list) = + let rec go (state: ParseState_FlagsIntoPositionalArgs') (args: string list) = match args with | [] -> match state with @@ -4248,15 +4111,15 @@ module FlagsIntoPositionalArgs'ArgParse = "Trailing argument %s had no value. Use a double-dash to separate positional args from key-value args." key |> ArgParser_errors.Add - | "--" :: rest -> arg_1.AddRange (rest |> Seq.map (fun x -> x)) + | "--" :: rest -> arg_1.AddRange(rest |> Seq.map (fun x -> x)) | arg :: args -> match state with | ParseState_FlagsIntoPositionalArgs'.AwaitingKey -> - if arg.StartsWith ("--", System.StringComparison.Ordinal) then + if arg.StartsWith("--", System.StringComparison.Ordinal) then if arg = "--help" then helpText () |> failwithf "Help text requested.\n%s" else - let equals = arg.IndexOf (char 61) + let equals = arg.IndexOf(char 61) if equals < 0 then args |> go (ParseState_FlagsIntoPositionalArgs'.AwaitingValue arg) @@ -4315,12 +4178,11 @@ module FlagsIntoPositionalArgs'ArgParse = | Some x -> x if 0 = ArgParser_errors.Count then - { - A = arg_0 - DontGrabEverything = arg_1 - } + { A = arg_0 + DontGrabEverything = arg_1 } else ArgParser_errors |> String.concat "\n" |> failwithf "Errors during parse!\n%s" - static member parse (args : string list) : FlagsIntoPositionalArgs' = + static member parse(args: string list) : FlagsIntoPositionalArgs' = FlagsIntoPositionalArgs'.parse' System.Environment.GetEnvironmentVariable args + diff --git a/ConsumePlugin/GeneratedCatamorphism.fs b/ConsumePlugin/GeneratedCatamorphism.fs index a3144eb..17c2012 100644 --- a/ConsumePlugin/GeneratedCatamorphism.fs +++ b/ConsumePlugin/GeneratedCatamorphism.fs @@ -1,40 +1,51 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ - - - - +// Source generated by Whippet. Changes will be overwritten on next build. namespace ConsumePlugin open WoofWare.Myriad.Plugins /// Description of how to combine cases during a fold -type TreeBuilderCataCase<'b, 'a, 'TreeBuilder, 'Tree> = +type TreeBuilderCataCase<'b, 'a, 'TreeBuilder, 'Tree, 'PairOpKind, 'Const> = /// How to operate on the Child case - abstract Child : 'TreeBuilder -> 'TreeBuilder + abstract Child: 'TreeBuilder -> 'TreeBuilder /// How to operate on the Parent case - abstract Parent : 'Tree -> 'TreeBuilder + abstract Parent: 'Tree -> 'TreeBuilder /// Description of how to combine cases during a fold -type TreeCataCase<'a, 'b, 'TreeBuilder, 'Tree> = +type TreeCataCase<'a, 'b, 'TreeBuilder, 'Tree, 'PairOpKind, 'Const> = /// How to operate on the Const case - abstract Const : Const<'a> -> 'b -> 'Tree + abstract Const: 'Const -> 'b -> 'Tree /// How to operate on the Pair case - abstract Pair : 'Tree -> 'Tree -> PairOpKind -> 'Tree + abstract Pair: 'Tree -> 'Tree -> 'PairOpKind -> 'Tree /// How to operate on the Sequential case - abstract Sequential : 'Tree list -> 'Tree + abstract Sequential: 'Tree list -> 'Tree /// How to operate on the Builder case - abstract Builder : 'Tree -> 'TreeBuilder -> 'Tree + abstract Builder: 'Tree -> 'TreeBuilder -> 'Tree + +/// Description of how to combine cases during a fold +type PairOpKindCataCase<'TreeBuilder, 'Tree, 'PairOpKind, 'Const> = + /// How to operate on the NormalSeq case + abstract NormalSeq: 'PairOpKind + /// How to operate on the ThenDoSeq case + abstract ThenDoSeq: 'PairOpKind + +/// Description of how to combine cases during a fold +type ConstCataCase<'a, 'TreeBuilder, 'Tree, 'PairOpKind, 'Const> = + /// How to operate on the Verbatim case + abstract Verbatim: 'a -> 'Const + /// How to operate on the String case + abstract String: string -> 'Const /// Specifies how to perform a fold (catamorphism) over the type Tree and its friends. -type TreeCata<'b, 'a, 'TreeBuilder, 'Tree> = +type TreeCata<'b, 'a, 'TreeBuilder, 'Tree, 'PairOpKind, 'Const> = { /// How to perform a fold (catamorphism) over the type TreeBuilder - TreeBuilder : TreeBuilderCataCase<'b, 'a, 'TreeBuilder, 'Tree> + TreeBuilder: TreeBuilderCataCase<'b, 'a, 'TreeBuilder, 'Tree, 'PairOpKind, 'Const> /// How to perform a fold (catamorphism) over the type Tree - Tree : TreeCataCase<'a, 'b, 'TreeBuilder, 'Tree> + Tree: TreeCataCase<'a, 'b, 'TreeBuilder, 'Tree, 'PairOpKind, 'Const> + /// How to perform a fold (catamorphism) over the type PairOpKind + PairOpKind: PairOpKindCataCase<'TreeBuilder, 'Tree, 'PairOpKind, 'Const> + /// How to perform a fold (catamorphism) over the type Const + Const: ConstCataCase<'a, 'TreeBuilder, 'Tree, 'PairOpKind, 'Const> } /// Methods to perform a catamorphism over the type Tree @@ -44,58 +55,83 @@ module TreeCata = type private Instruction<'b, 'a> = | Process__TreeBuilder of TreeBuilder<'b, 'a> | Process__Tree of Tree<'a, 'b> + | Process__PairOpKind of PairOpKind + | Process__Const of Const<'a> | TreeBuilder_Child | TreeBuilder_Parent - | Tree_Pair of PairOpKind + | Tree_Const of 'b + | Tree_Pair | Tree_Sequential of int | Tree_Builder - let private loop (cata : TreeCata<'b, 'a, 'TreeBuilder, 'Tree>) (instructions : ResizeArray>) = - let treeStack = ResizeArray<'Tree> () - let treeBuilderStack = ResizeArray<'TreeBuilder> () + let private loop + (cata: TreeCata<'b, 'a, 'TreeBuilder, 'Tree, 'PairOpKind, 'Const>) + (instructions: ResizeArray>) + = + let constStack = ResizeArray<'Const>() + let pairOpKindStack = ResizeArray<'PairOpKind>() + let treeStack = ResizeArray<'Tree>() + let treeBuilderStack = ResizeArray<'TreeBuilder>() while instructions.Count > 0 do let currentInstruction = instructions.[instructions.Count - 1] - instructions.RemoveAt (instructions.Count - 1) + instructions.RemoveAt(instructions.Count - 1) match currentInstruction with | Instruction.Process__TreeBuilder x -> match x with - | TreeBuilder.Child (arg0_0) -> + | TreeBuilder.Child(arg0_0) -> instructions.Add Instruction.TreeBuilder_Child - instructions.Add (Instruction.Process__TreeBuilder arg0_0) - | TreeBuilder.Parent (arg0_0) -> + instructions.Add(Instruction.Process__TreeBuilder arg0_0) + | TreeBuilder.Parent(arg0_0) -> instructions.Add Instruction.TreeBuilder_Parent - instructions.Add (Instruction.Process__Tree arg0_0) + instructions.Add(Instruction.Process__Tree arg0_0) | Instruction.Process__Tree x -> match x with - | Tree.Const (arg0_0, arg1_0) -> cata.Tree.Const arg0_0 arg1_0 |> treeStack.Add - | Tree.Pair (arg0_0, arg1_0, arg2_0) -> - instructions.Add (Instruction.Tree_Pair (arg2_0)) - instructions.Add (Instruction.Process__Tree arg0_0) - instructions.Add (Instruction.Process__Tree arg1_0) - | Tree.Sequential (arg0_0) -> - instructions.Add (Instruction.Tree_Sequential ((List.length arg0_0))) + | Tree.Const(arg0_0, arg1_0) -> + instructions.Add(Instruction.Tree_Const(arg1_0)) + instructions.Add(Instruction.Process__Const arg0_0) + | Tree.Pair(arg0_0, arg1_0, arg2_0) -> + instructions.Add Instruction.Tree_Pair + instructions.Add(Instruction.Process__Tree arg0_0) + instructions.Add(Instruction.Process__Tree arg1_0) + instructions.Add(Instruction.Process__PairOpKind arg2_0) + | Tree.Sequential(arg0_0) -> + instructions.Add(Instruction.Tree_Sequential((List.length arg0_0))) for elt in arg0_0 do - instructions.Add (Instruction.Process__Tree elt) - | Tree.Builder (arg0_0, arg1_0) -> + instructions.Add(Instruction.Process__Tree elt) + | Tree.Builder(arg0_0, arg1_0) -> instructions.Add Instruction.Tree_Builder - instructions.Add (Instruction.Process__Tree arg0_0) - instructions.Add (Instruction.Process__TreeBuilder arg1_0) + instructions.Add(Instruction.Process__Tree arg0_0) + instructions.Add(Instruction.Process__TreeBuilder arg1_0) + | Instruction.Process__PairOpKind x -> + match x with + | PairOpKind.NormalSeq -> cata.PairOpKind.NormalSeq |> pairOpKindStack.Add + | PairOpKind.ThenDoSeq -> cata.PairOpKind.ThenDoSeq |> pairOpKindStack.Add + | Instruction.Process__Const x -> + match x with + | Const.Verbatim(arg0_0) -> cata.Const.Verbatim arg0_0 |> constStack.Add + | Const.String(arg0_0) -> cata.Const.String arg0_0 |> constStack.Add | Instruction.TreeBuilder_Child -> let arg0_0 = treeBuilderStack.[treeBuilderStack.Count - 1] - treeBuilderStack.RemoveAt (treeBuilderStack.Count - 1) + treeBuilderStack.RemoveAt(treeBuilderStack.Count - 1) cata.TreeBuilder.Child arg0_0 |> treeBuilderStack.Add | Instruction.TreeBuilder_Parent -> let arg0_0 = treeStack.[treeStack.Count - 1] - treeStack.RemoveAt (treeStack.Count - 1) + treeStack.RemoveAt(treeStack.Count - 1) cata.TreeBuilder.Parent arg0_0 |> treeBuilderStack.Add - | Instruction.Tree_Pair arg2_0 -> + | Instruction.Tree_Const arg1_0 -> + let arg0_0 = constStack.[constStack.Count - 1] + constStack.RemoveAt(constStack.Count - 1) + cata.Tree.Const arg0_0 arg1_0 |> treeStack.Add + | Instruction.Tree_Pair -> let arg0_0 = treeStack.[treeStack.Count - 1] - treeStack.RemoveAt (treeStack.Count - 1) + treeStack.RemoveAt(treeStack.Count - 1) let arg1_0 = treeStack.[treeStack.Count - 1] - treeStack.RemoveAt (treeStack.Count - 1) + treeStack.RemoveAt(treeStack.Count - 1) + let arg2_0 = pairOpKindStack.[pairOpKindStack.Count - 1] + pairOpKindStack.RemoveAt(pairOpKindStack.Count - 1) cata.Tree.Pair arg0_0 arg1_0 arg2_0 |> treeStack.Add | Instruction.Tree_Sequential arg0_0 -> let arg0_0_len = arg0_0 @@ -107,31 +143,66 @@ module TreeCata = } |> Seq.toList - treeStack.RemoveRange (treeStack.Count - arg0_0_len, arg0_0_len) + treeStack.RemoveRange(treeStack.Count - arg0_0_len, arg0_0_len) cata.Tree.Sequential arg0_0 |> treeStack.Add | Instruction.Tree_Builder -> let arg0_0 = treeStack.[treeStack.Count - 1] - treeStack.RemoveAt (treeStack.Count - 1) + treeStack.RemoveAt(treeStack.Count - 1) let arg1_0 = treeBuilderStack.[treeBuilderStack.Count - 1] - treeBuilderStack.RemoveAt (treeBuilderStack.Count - 1) + treeBuilderStack.RemoveAt(treeBuilderStack.Count - 1) cata.Tree.Builder arg0_0 arg1_0 |> treeStack.Add - treeBuilderStack, treeStack + treeBuilderStack, treeStack, pairOpKindStack, constStack /// Execute the catamorphism. let runTreeBuilder - (cata : TreeCata<'b, 'a, 'TreeBuilderRet, 'TreeRet>) - (x : TreeBuilder<'b, 'a>) - : 'TreeBuilderRet - = - let instructions = ResizeArray () - instructions.Add (Instruction.Process__TreeBuilder x) - let treeBuilderRetStack, treeRetStack = loop cata instructions + (cata: TreeCata<'b, 'a, 'TreeBuilderRet, 'TreeRet, 'PairOpKindRet, 'ConstRet>) + (x: TreeBuilder<'b, 'a>) + : 'TreeBuilderRet = + let instructions = ResizeArray() + instructions.Add(Instruction.Process__TreeBuilder x) + + let treeBuilderRetStack, treeRetStack, pairOpKindRetStack, constRetStack = + loop cata instructions + Seq.exactlyOne treeBuilderRetStack /// Execute the catamorphism. - let runTree (cata : TreeCata<'b, 'a, 'TreeBuilderRet, 'TreeRet>) (x : Tree<'a, 'b>) : 'TreeRet = - let instructions = ResizeArray () - instructions.Add (Instruction.Process__Tree x) - let treeBuilderRetStack, treeRetStack = loop cata instructions + let runTree + (cata: TreeCata<'b, 'a, 'TreeBuilderRet, 'TreeRet, 'PairOpKindRet, 'ConstRet>) + (x: Tree<'b, 'a>) + : 'TreeRet = + let instructions = ResizeArray() + instructions.Add(Instruction.Process__Tree x) + + let treeBuilderRetStack, treeRetStack, pairOpKindRetStack, constRetStack = + loop cata instructions + Seq.exactlyOne treeRetStack + + /// Execute the catamorphism. + let runPairOpKind + (cata: TreeCata<'b, 'a, 'TreeBuilderRet, 'TreeRet, 'PairOpKindRet, 'ConstRet>) + (x: PairOpKind<'b, 'a>) + : 'PairOpKindRet = + let instructions = ResizeArray() + instructions.Add(Instruction.Process__PairOpKind x) + + let treeBuilderRetStack, treeRetStack, pairOpKindRetStack, constRetStack = + loop cata instructions + + Seq.exactlyOne pairOpKindRetStack + + /// Execute the catamorphism. + let runConst + (cata: TreeCata<'b, 'a, 'TreeBuilderRet, 'TreeRet, 'PairOpKindRet, 'ConstRet>) + (x: Const<'b, 'a>) + : 'ConstRet = + let instructions = ResizeArray() + instructions.Add(Instruction.Process__Const x) + + let treeBuilderRetStack, treeRetStack, pairOpKindRetStack, constRetStack = + loop cata instructions + + Seq.exactlyOne constRetStack + diff --git a/ConsumePlugin/GeneratedFileSystem.fs b/ConsumePlugin/GeneratedFileSystem.fs index d2d4dfa..4a93591 100644 --- a/ConsumePlugin/GeneratedFileSystem.fs +++ b/ConsumePlugin/GeneratedFileSystem.fs @@ -1,27 +1,57 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ - +// Source generated by Whippet. Changes will be overwritten on next build. +namespace ConsumePlugin +open WoofWare.Myriad.Plugins +/// Description of how to combine cases during a fold +type GiftCataCase<'Gift, 'WrappingPaperStyle, 'ChocolateType, 'FileSystemItem> = + /// How to operate on the Book case + abstract Book: title: string -> price: decimal -> 'Gift + /// How to operate on the Chocolate case + abstract Chocolate: chocType: 'ChocolateType -> price: decimal -> 'Gift + /// How to operate on the Wrapped case + abstract Wrapped: 'Gift -> 'WrappingPaperStyle -> 'Gift + /// How to operate on the Boxed case + abstract Boxed: 'Gift -> 'Gift + /// How to operate on the WithACard case + abstract WithACard: 'Gift -> message: string -> 'Gift -namespace ConsumePlugin +/// Description of how to combine cases during a fold +type WrappingPaperStyleCataCase<'Gift, 'WrappingPaperStyle, 'ChocolateType, 'FileSystemItem> = + /// How to operate on the HappyBirthday case + abstract HappyBirthday: 'WrappingPaperStyle + /// How to operate on the HappyHolidays case + abstract HappyHolidays: 'WrappingPaperStyle + /// How to operate on the SolidColor case + abstract SolidColor: 'WrappingPaperStyle -open WoofWare.Myriad.Plugins +/// Description of how to combine cases during a fold +type ChocolateTypeCataCase<'Gift, 'WrappingPaperStyle, 'ChocolateType, 'FileSystemItem> = + /// How to operate on the Dark case + abstract Dark: 'ChocolateType + /// How to operate on the Milk case + abstract Milk: 'ChocolateType + /// How to operate on the SeventyPercent case + abstract SeventyPercent: 'ChocolateType /// Description of how to combine cases during a fold -type FileSystemItemCataCase<'FileSystemItem> = +type FileSystemItemCataCase<'Gift, 'WrappingPaperStyle, 'ChocolateType, 'FileSystemItem> = /// How to operate on the Directory case - abstract Directory : name : string -> dirSize : int -> contents : 'FileSystemItem list -> 'FileSystemItem + abstract Directory: name: string -> dirSize: int -> contents: 'FileSystemItem list -> 'FileSystemItem /// How to operate on the File case - abstract File : File -> 'FileSystemItem + abstract File: name: string -> fileSize: int -> 'FileSystemItem /// Specifies how to perform a fold (catamorphism) over the type FileSystemItem and its friends. -type FileSystemCata<'FileSystemItem> = +type FileSystemCata<'Gift, 'WrappingPaperStyle, 'ChocolateType, 'FileSystemItem> = { + /// How to perform a fold (catamorphism) over the type Gift + Gift: GiftCataCase<'Gift, 'WrappingPaperStyle, 'ChocolateType, 'FileSystemItem> + /// How to perform a fold (catamorphism) over the type WrappingPaperStyle + WrappingPaperStyle: WrappingPaperStyleCataCase<'Gift, 'WrappingPaperStyle, 'ChocolateType, 'FileSystemItem> + /// How to perform a fold (catamorphism) over the type ChocolateType + ChocolateType: ChocolateTypeCataCase<'Gift, 'WrappingPaperStyle, 'ChocolateType, 'FileSystemItem> /// How to perform a fold (catamorphism) over the type FileSystemItem - FileSystemItem : FileSystemItemCataCase<'FileSystemItem> + FileSystemItem: FileSystemItemCataCase<'Gift, 'WrappingPaperStyle, 'ChocolateType, 'FileSystemItem> } /// Methods to perform a catamorphism over the type FileSystemItem @@ -29,30 +59,88 @@ type FileSystemCata<'FileSystemItem> = module FileSystemItemCata = [] type private Instruction = + | Process__Gift of Gift + | Process__WrappingPaperStyle of WrappingPaperStyle + | Process__ChocolateType of ChocolateType | Process__FileSystemItem of FileSystemItem - | FileSystemItem_Directory of name : string * dirSize : int * contents : int - - let private loop (cata : FileSystemCata<'FileSystemItem>) (instructions : ResizeArray) = - let fileSystemItemStack = ResizeArray<'FileSystemItem> () + | Gift_Chocolate of price: decimal + | Gift_Wrapped + | Gift_Boxed + | Gift_WithACard of message: string + | FileSystemItem_Directory of name: string * dirSize: int * contents: int + + let private loop + (cata: FileSystemCata<'Gift, 'WrappingPaperStyle, 'ChocolateType, 'FileSystemItem>) + (instructions: ResizeArray) + = + let fileSystemItemStack = ResizeArray<'FileSystemItem>() + let chocolateTypeStack = ResizeArray<'ChocolateType>() + let wrappingPaperStyleStack = ResizeArray<'WrappingPaperStyle>() + let giftStack = ResizeArray<'Gift>() while instructions.Count > 0 do let currentInstruction = instructions.[instructions.Count - 1] - instructions.RemoveAt (instructions.Count - 1) + instructions.RemoveAt(instructions.Count - 1) match currentInstruction with + | Instruction.Process__Gift x -> + match x with + | Gift.Book({ title = title; price = price }) -> cata.Gift.Book title price |> giftStack.Add + | Gift.Chocolate({ chocType = chocType; price = price }) -> + instructions.Add(Instruction.Gift_Chocolate(price)) + instructions.Add(Instruction.Process__ChocolateType chocType) + | Gift.Wrapped(arg0_0, arg1_0) -> + instructions.Add Instruction.Gift_Wrapped + instructions.Add(Instruction.Process__Gift arg0_0) + instructions.Add(Instruction.Process__WrappingPaperStyle arg1_0) + | Gift.Boxed(arg0_0) -> + instructions.Add Instruction.Gift_Boxed + instructions.Add(Instruction.Process__Gift arg0_0) + | Gift.WithACard(arg0_0, message) -> + instructions.Add(Instruction.Gift_WithACard(message)) + instructions.Add(Instruction.Process__Gift arg0_0) + | Instruction.Process__WrappingPaperStyle x -> + match x with + | WrappingPaperStyle.HappyBirthday -> + cata.WrappingPaperStyle.HappyBirthday |> wrappingPaperStyleStack.Add + | WrappingPaperStyle.HappyHolidays -> + cata.WrappingPaperStyle.HappyHolidays |> wrappingPaperStyleStack.Add + | WrappingPaperStyle.SolidColor -> cata.WrappingPaperStyle.SolidColor |> wrappingPaperStyleStack.Add + | Instruction.Process__ChocolateType x -> + match x with + | ChocolateType.Dark -> cata.ChocolateType.Dark |> chocolateTypeStack.Add + | ChocolateType.Milk -> cata.ChocolateType.Milk |> chocolateTypeStack.Add + | ChocolateType.SeventyPercent -> cata.ChocolateType.SeventyPercent |> chocolateTypeStack.Add | Instruction.Process__FileSystemItem x -> match x with - | FileSystemItem.Directory ({ - Name = name - DirSize = dirSize - Contents = contents - }) -> - instructions.Add (Instruction.FileSystemItem_Directory (name, dirSize, (List.length contents))) + | FileSystemItem.Directory({ Name = name + DirSize = dirSize + Contents = contents }) -> + instructions.Add(Instruction.FileSystemItem_Directory(name, dirSize, (List.length contents))) for elt in contents do - instructions.Add (Instruction.Process__FileSystemItem elt) - | FileSystemItem.File (arg0_0) -> cata.FileSystemItem.File arg0_0 |> fileSystemItemStack.Add - | Instruction.FileSystemItem_Directory (name, dirSize, contents) -> + instructions.Add(Instruction.Process__FileSystemItem elt) + | FileSystemItem.File({ Name = name; FileSize = fileSize }) -> + cata.FileSystemItem.File name fileSize |> fileSystemItemStack.Add + | Instruction.Gift_Chocolate price -> + let chocType = chocolateTypeStack.[chocolateTypeStack.Count - 1] + chocolateTypeStack.RemoveAt(chocolateTypeStack.Count - 1) + cata.Gift.Chocolate chocType price |> giftStack.Add + | Instruction.Gift_Wrapped -> + let arg0_0 = giftStack.[giftStack.Count - 1] + giftStack.RemoveAt(giftStack.Count - 1) + let arg1_0 = wrappingPaperStyleStack.[wrappingPaperStyleStack.Count - 1] + wrappingPaperStyleStack.RemoveAt(wrappingPaperStyleStack.Count - 1) + cata.Gift.Wrapped arg0_0 arg1_0 |> giftStack.Add + | Instruction.Gift_Boxed -> + let arg0_0 = giftStack.[giftStack.Count - 1] + giftStack.RemoveAt(giftStack.Count - 1) + cata.Gift.Boxed arg0_0 |> giftStack.Add + | Instruction.Gift_WithACard message -> + let arg0_0 = giftStack.[giftStack.Count - 1] + giftStack.RemoveAt(giftStack.Count - 1) + cata.Gift.WithACard arg0_0 message |> giftStack.Add + | Instruction.FileSystemItem_Directory(name, dirSize, contents) -> let contents_len = contents let contents = @@ -62,90 +150,60 @@ module FileSystemItemCata = } |> Seq.toList - fileSystemItemStack.RemoveRange (fileSystemItemStack.Count - contents_len, contents_len) + fileSystemItemStack.RemoveRange(fileSystemItemStack.Count - contents_len, contents_len) cata.FileSystemItem.Directory name dirSize contents |> fileSystemItemStack.Add - fileSystemItemStack + giftStack, wrappingPaperStyleStack, chocolateTypeStack, fileSystemItemStack /// Execute the catamorphism. - let runFileSystemItem (cata : FileSystemCata<'FileSystemItemRet>) (x : FileSystemItem) : 'FileSystemItemRet = - let instructions = ResizeArray () - instructions.Add (Instruction.Process__FileSystemItem x) - let fileSystemItemRetStack = loop cata instructions - Seq.exactlyOne fileSystemItemRetStack -namespace ConsumePlugin + let runGift + (cata: FileSystemCata<'GiftRet, 'WrappingPaperStyleRet, 'ChocolateTypeRet, 'FileSystemItemRet>) + (x: Gift) + : 'GiftRet = + let instructions = ResizeArray() + instructions.Add(Instruction.Process__Gift x) -open WoofWare.Myriad.Plugins + let giftRetStack, wrappingPaperStyleRetStack, chocolateTypeRetStack, fileSystemItemRetStack = + loop cata instructions -/// Description of how to combine cases during a fold -type GiftCataCase<'Gift> = - /// How to operate on the Book case - abstract Book : Book -> 'Gift - /// How to operate on the Chocolate case - abstract Chocolate : Chocolate -> 'Gift - /// How to operate on the Wrapped case - abstract Wrapped : 'Gift -> WrappingPaperStyle -> 'Gift - /// How to operate on the Boxed case - abstract Boxed : 'Gift -> 'Gift - /// How to operate on the WithACard case - abstract WithACard : 'Gift -> message : string -> 'Gift + Seq.exactlyOne giftRetStack -/// Specifies how to perform a fold (catamorphism) over the type Gift and its friends. -type GiftCata<'Gift> = - { - /// How to perform a fold (catamorphism) over the type Gift - Gift : GiftCataCase<'Gift> - } + /// Execute the catamorphism. + let runWrappingPaperStyle + (cata: FileSystemCata<'GiftRet, 'WrappingPaperStyleRet, 'ChocolateTypeRet, 'FileSystemItemRet>) + (x: WrappingPaperStyle) + : 'WrappingPaperStyleRet = + let instructions = ResizeArray() + instructions.Add(Instruction.Process__WrappingPaperStyle x) -/// Methods to perform a catamorphism over the type Gift -[] -module GiftCata = - [] - type private Instruction = - | Process__Gift of Gift - | Gift_Wrapped of WrappingPaperStyle - | Gift_Boxed - | Gift_WithACard of message : string + let giftRetStack, wrappingPaperStyleRetStack, chocolateTypeRetStack, fileSystemItemRetStack = + loop cata instructions - let private loop (cata : GiftCata<'Gift>) (instructions : ResizeArray) = - let giftStack = ResizeArray<'Gift> () + Seq.exactlyOne wrappingPaperStyleRetStack - while instructions.Count > 0 do - let currentInstruction = instructions.[instructions.Count - 1] - instructions.RemoveAt (instructions.Count - 1) + /// Execute the catamorphism. + let runChocolateType + (cata: FileSystemCata<'GiftRet, 'WrappingPaperStyleRet, 'ChocolateTypeRet, 'FileSystemItemRet>) + (x: ChocolateType) + : 'ChocolateTypeRet = + let instructions = ResizeArray() + instructions.Add(Instruction.Process__ChocolateType x) - match currentInstruction with - | Instruction.Process__Gift x -> - match x with - | Gift.Book (arg0_0) -> cata.Gift.Book arg0_0 |> giftStack.Add - | Gift.Chocolate (arg0_0) -> cata.Gift.Chocolate arg0_0 |> giftStack.Add - | Gift.Wrapped (arg0_0, arg1_0) -> - instructions.Add (Instruction.Gift_Wrapped (arg1_0)) - instructions.Add (Instruction.Process__Gift arg0_0) - | Gift.Boxed (arg0_0) -> - instructions.Add Instruction.Gift_Boxed - instructions.Add (Instruction.Process__Gift arg0_0) - | Gift.WithACard (arg0_0, message) -> - instructions.Add (Instruction.Gift_WithACard (message)) - instructions.Add (Instruction.Process__Gift arg0_0) - | Instruction.Gift_Wrapped arg1_0 -> - let arg0_0 = giftStack.[giftStack.Count - 1] - giftStack.RemoveAt (giftStack.Count - 1) - cata.Gift.Wrapped arg0_0 arg1_0 |> giftStack.Add - | Instruction.Gift_Boxed -> - let arg0_0 = giftStack.[giftStack.Count - 1] - giftStack.RemoveAt (giftStack.Count - 1) - cata.Gift.Boxed arg0_0 |> giftStack.Add - | Instruction.Gift_WithACard message -> - let arg0_0 = giftStack.[giftStack.Count - 1] - giftStack.RemoveAt (giftStack.Count - 1) - cata.Gift.WithACard arg0_0 message |> giftStack.Add + let giftRetStack, wrappingPaperStyleRetStack, chocolateTypeRetStack, fileSystemItemRetStack = + loop cata instructions - giftStack + Seq.exactlyOne chocolateTypeRetStack /// Execute the catamorphism. - let runGift (cata : GiftCata<'GiftRet>) (x : Gift) : 'GiftRet = - let instructions = ResizeArray () - instructions.Add (Instruction.Process__Gift x) - let giftRetStack = loop cata instructions - Seq.exactlyOne giftRetStack + let runFileSystemItem + (cata: FileSystemCata<'GiftRet, 'WrappingPaperStyleRet, 'ChocolateTypeRet, 'FileSystemItemRet>) + (x: FileSystemItem) + : 'FileSystemItemRet = + let instructions = ResizeArray() + instructions.Add(Instruction.Process__FileSystemItem x) + + let giftRetStack, wrappingPaperStyleRetStack, chocolateTypeRetStack, fileSystemItemRetStack = + loop cata instructions + + Seq.exactlyOne fileSystemItemRetStack + diff --git a/ConsumePlugin/GeneratedJson.fs b/ConsumePlugin/GeneratedJson.fs index d1dd965..8de99e6 100644 --- a/ConsumePlugin/GeneratedJson.fs +++ b/ConsumePlugin/GeneratedJson.fs @@ -1,19 +1,15 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ - +// Source generated by Whippet. Changes will be overwritten on next build. namespace ConsumePlugin open System.Text.Json.Serialization /// Module containing JSON serializing methods for the InternalTypeNotExtensionSerial type -[] +[] 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 |> System.Text.Json.Nodes.JsonValue.Create)) + let toJsonNode (input: InternalTypeNotExtensionSerial) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() + do node.Add((Literals.something), (input.InternalThing2 |> System.Text.Json.Nodes.JsonValue.Create)) node :> _ namespace ConsumePlugin @@ -26,64 +22,63 @@ module internal InternalTypeExtensionJsonSerializeExtension = 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 |> System.Text.Json.Nodes.JsonValue.Create)) + static member toJsonNode(input: InternalTypeExtension) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() + do node.Add((Literals.something), (input.ExternalThing |> System.Text.Json.Nodes.JsonValue.Create)) node :> _ +// Source generated by Whippet. Changes will be overwritten on next build. namespace ConsumePlugin /// Module containing JSON parsing methods for the InnerType type -[] +[] module InnerType = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : InnerType = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : InnerType = let arg_0 = (match node.[(Literals.something)] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ((Literals.something)) ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() - { - Thing = arg_0 - } + { Thing = arg_0 } namespace ConsumePlugin /// Module containing JSON parsing methods for the JsonRecordType type -[] +[] module JsonRecordType = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : JsonRecordType = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : JsonRecordType = let arg_5 = (match node.["f"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("f") ) ) | v -> v) - .AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + .AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> Array.ofSeq let arg_4 = (match node.["e"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("e") ) ) | v -> v) - .AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + .AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> Array.ofSeq let arg_3 = @@ -91,7 +86,7 @@ module JsonRecordType = match node.["d"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("d") ) ) @@ -102,69 +97,65 @@ module JsonRecordType = (match node.["hi"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("hi") ) ) | v -> v) - .AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + .AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq let arg_1 = (match node.["another-thing"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("another-thing") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = (match node.["a"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("a") ) ) | v -> v) .AsValue() - .GetValue () - - { - A = arg_0 - B = arg_1 - C = arg_2 - D = arg_3 - E = arg_4 - F = arg_5 - } + .GetValue() + + { 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 -[] +[] module internal InternalTypeNotExtension = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : InternalTypeNotExtension = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : InternalTypeNotExtension = let arg_0 = (match node.[(Literals.something)] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ((Literals.something)) ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() - { - InternalThing = arg_0 - } + { InternalThing = arg_0 } namespace ConsumePlugin /// Module containing JSON parsing extension members for the InternalTypeExtension type @@ -174,22 +165,20 @@ module internal InternalTypeExtensionJsonParseExtension = type InternalTypeExtension with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : InternalTypeExtension = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : InternalTypeExtension = let arg_0 = (match node.[(Literals.something)] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ((Literals.something)) ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() - { - ExternalThing = arg_0 - } + { ExternalThing = arg_0 } namespace ConsumePlugin /// Module containing JSON parsing extension members for the ToGetExtensionMethod type @@ -199,270 +188,269 @@ module ToGetExtensionMethodJsonParseExtension = type ToGetExtensionMethod with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : ToGetExtensionMethod = - let arg_20 = System.Numerics.BigInteger.Parse (node.["whiskey"].ToJsonString ()) + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : ToGetExtensionMethod = + let arg_20 = System.Numerics.BigInteger.Parse(node.["whiskey"].ToJsonString()) let arg_19 = (match node.["victor"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("victor") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_18 = (match node.["uniform"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("uniform") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_17 = (match node.["tango"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("tango") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_16 = (match node.["quebec"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("quebec") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_15 = (match node.["papa"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("papa") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_14 = (match node.["oscar"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("oscar") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_13 = (match node.["november"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("november") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_12 = (match node.["mike"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("mike") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_11 = (match node.["lima"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("lima") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_10 = (match node.["kilo"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("kilo") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_9 = (match node.["juliette"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("juliette") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_8 = (match node.["india"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("india") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_7 = (match node.["hotel"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("hotel") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_6 = (match node.["golf"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("golf") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_5 = (match node.["foxtrot"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("foxtrot") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_4 = (match node.["echo"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("echo") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_3 = (match node.["delta"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("delta") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_2 = (match node.["charlie"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("charlie") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_1 = (match node.["bravo"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("bravo") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> System.Uri let arg_0 = (match node.["alpha"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("alpha") ) ) | v -> v) .AsValue() - .GetValue () - - { - 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 - } + .GetValue() + + { 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 } + diff --git a/ConsumePlugin/GeneratedMock.fs b/ConsumePlugin/GeneratedMock.fs index bd68a1a..96d9712 100644 --- a/ConsumePlugin/GeneratedMock.fs +++ b/ConsumePlugin/GeneratedMock.fs @@ -1,7 +1,4 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ +// Source generated by Whippet. Changes will be overwritten on next build. namespace SomeNamespace open System @@ -9,24 +6,20 @@ open WoofWare.Myriad.Plugins /// Mock record type for an interface type internal PublicTypeMock = - { - Mem1 : string * int -> string list - Mem2 : string -> int - Mem3 : int * option -> string - } + { Mem1: string * int -> string list + Mem2: string -> int + Mem3: int * option -> string } /// An implementation where every method throws. - static member Empty : PublicTypeMock = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - Mem3 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem3")) - } + static member Empty: PublicTypeMock = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) + Mem3 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem3")) } interface IPublicType with - member this.Mem1 (arg_0_0, arg_0_1) = this.Mem1 (arg_0_0, arg_0_1) - member this.Mem2 arg_0_0 = this.Mem2 (arg_0_0) - member this.Mem3 (arg_0_0, arg_0_1) = this.Mem3 (arg_0_0, arg_0_1) + member this.Mem1(arg_0_0, arg_0_1) = this.Mem1(arg_0_0, arg_0_1) + member this.Mem2 arg_0_0 = this.Mem2(arg_0_0) + member this.Mem3(arg_0_0, arg_0_1) = this.Mem3(arg_0_0, arg_0_1) namespace SomeNamespace open System @@ -34,24 +27,20 @@ open WoofWare.Myriad.Plugins /// Mock record type for an interface type public PublicTypeInternalFalseMock = - { - Mem1 : string * int -> string list - Mem2 : string -> int - Mem3 : int * option -> string - } + { Mem1: string * int -> string list + Mem2: string -> int + Mem3: int * option -> string } /// An implementation where every method throws. - static member Empty : PublicTypeInternalFalseMock = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - Mem3 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem3")) - } + static member Empty: PublicTypeInternalFalseMock = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) + Mem3 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem3")) } interface IPublicTypeInternalFalse with - member this.Mem1 (arg_0_0, arg_0_1) = this.Mem1 (arg_0_0, arg_0_1) - member this.Mem2 arg_0_0 = this.Mem2 (arg_0_0) - member this.Mem3 (arg_0_0, arg_0_1) = this.Mem3 (arg_0_0, arg_0_1) + member this.Mem1(arg_0_0, arg_0_1) = this.Mem1(arg_0_0, arg_0_1) + member this.Mem2 arg_0_0 = this.Mem2(arg_0_0) + member this.Mem3(arg_0_0, arg_0_1) = this.Mem3(arg_0_0, arg_0_1) namespace SomeNamespace open System @@ -59,21 +48,17 @@ open WoofWare.Myriad.Plugins /// Mock record type for an interface type internal InternalTypeMock = - { - Mem1 : string * int -> unit - Mem2 : string -> int - } + { Mem1: string * int -> unit + Mem2: string -> int } /// An implementation where every method throws. - static member Empty : InternalTypeMock = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - } + static member Empty: InternalTypeMock = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) } interface InternalType with - member this.Mem1 (arg_0_0, arg_0_1) = this.Mem1 (arg_0_0, arg_0_1) - member this.Mem2 arg_0_0 = this.Mem2 (arg_0_0) + member this.Mem1(arg_0_0, arg_0_1) = this.Mem1(arg_0_0, arg_0_1) + member this.Mem2 arg_0_0 = this.Mem2(arg_0_0) namespace SomeNamespace open System @@ -81,21 +66,17 @@ open WoofWare.Myriad.Plugins /// Mock record type for an interface type private PrivateTypeMock = - { - Mem1 : string * int -> unit - Mem2 : string -> int - } + { Mem1: string * int -> unit + Mem2: string -> int } /// An implementation where every method throws. - static member Empty : PrivateTypeMock = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - } + static member Empty: PrivateTypeMock = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) } interface PrivateType with - member this.Mem1 (arg_0_0, arg_0_1) = this.Mem1 (arg_0_0, arg_0_1) - member this.Mem2 arg_0_0 = this.Mem2 (arg_0_0) + member this.Mem1(arg_0_0, arg_0_1) = this.Mem1(arg_0_0, arg_0_1) + member this.Mem2 arg_0_0 = this.Mem2(arg_0_0) namespace SomeNamespace open System @@ -103,21 +84,17 @@ open WoofWare.Myriad.Plugins /// Mock record type for an interface type private PrivateTypeInternalFalseMock = - { - Mem1 : string * int -> unit - Mem2 : string -> int - } + { Mem1: string * int -> unit + Mem2: string -> int } /// An implementation where every method throws. - static member Empty : PrivateTypeInternalFalseMock = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - } + static member Empty: PrivateTypeInternalFalseMock = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) } interface PrivateTypeInternalFalse with - member this.Mem1 (arg_0_0, arg_0_1) = this.Mem1 (arg_0_0, arg_0_1) - member this.Mem2 arg_0_0 = this.Mem2 (arg_0_0) + member this.Mem1(arg_0_0, arg_0_1) = this.Mem1(arg_0_0, arg_0_1) + member this.Mem2 arg_0_0 = this.Mem2(arg_0_0) namespace SomeNamespace open System @@ -125,18 +102,14 @@ open WoofWare.Myriad.Plugins /// Mock record type for an interface type internal VeryPublicTypeMock<'a, 'b> = - { - Mem1 : 'a -> 'b - } + { Mem1: 'a -> 'b } /// An implementation where every method throws. - static member Empty () : VeryPublicTypeMock<'a, 'b> = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - } + static member Empty() : VeryPublicTypeMock<'a, 'b> = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) } interface VeryPublicType<'a, 'b> with - member this.Mem1 arg_0_0 = this.Mem1 (arg_0_0) + member this.Mem1 arg_0_0 = this.Mem1(arg_0_0) namespace SomeNamespace open System @@ -144,25 +117,21 @@ open WoofWare.Myriad.Plugins /// Mock record type for an interface type internal CurriedMock<'a> = - { - Mem1 : int -> 'a -> string - Mem2 : int * string -> 'a -> string - Mem3 : (int * string) -> 'a -> string - Mem4 : (int * string) -> ('a * int) -> string - Mem5 : int * string -> ('a * int) -> string - Mem6 : int * string -> 'a * int -> string - } + { Mem1: int -> 'a -> string + Mem2: int * string -> 'a -> string + Mem3: (int * string) -> 'a -> string + Mem4: (int * string) -> ('a * int) -> string + Mem5: int * string -> ('a * int) -> string + Mem6: int * string -> 'a * int -> string } /// An implementation where every method throws. - static member Empty () : CurriedMock<'a> = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - Mem3 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem3")) - Mem4 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem4")) - Mem5 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem5")) - Mem6 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem6")) - } + static member Empty() : CurriedMock<'a> = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) + Mem3 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem3")) + Mem4 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem4")) + Mem5 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem5")) + Mem6 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem6")) } interface Curried<'a> with member this.Mem1 arg_0_0 arg_1_0 = this.Mem1 (arg_0_0) (arg_1_0) @@ -186,22 +155,21 @@ open WoofWare.Myriad.Plugins type internal TypeWithInterfaceMock = { /// Implementation of IDisposable.Dispose - Dispose : unit -> unit - Mem1 : string option -> string[] Async - Mem2 : unit -> string[] Async + Dispose: unit -> unit + Mem1: string option -> string[] Async + Mem2: unit -> string[] Async } /// An implementation where every method throws. - static member Empty : TypeWithInterfaceMock = - { - Dispose = (fun () -> ()) - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - } + static member Empty: TypeWithInterfaceMock = + { Dispose = (fun () -> ()) + Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) } interface TypeWithInterface with - member this.Mem1 arg_0_0 = this.Mem1 (arg_0_0) - member this.Mem2 () = this.Mem2 (()) + member this.Mem1 arg_0_0 = this.Mem1(arg_0_0) + member this.Mem2() = this.Mem2(()) interface System.IDisposable with - member this.Dispose () : unit = this.Dispose () + member this.Dispose() : unit = this.Dispose() + diff --git a/ConsumePlugin/GeneratedMockNoAttributes.fs b/ConsumePlugin/GeneratedMockNoAttributes.fs index 443e714..724e233 100644 --- a/ConsumePlugin/GeneratedMockNoAttributes.fs +++ b/ConsumePlugin/GeneratedMockNoAttributes.fs @@ -1,161 +1,130 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ +// Source generated by Whippet. Changes will be overwritten on next build. namespace SomeNamespace open System /// Mock record type for an interface type internal PublicTypeNoAttrMock = - { - Mem1 : string * int -> string list - Mem2 : string -> int - Mem3 : int * option -> string - } + { Mem1: string * int -> string list + Mem2: string -> int + Mem3: int * option -> string } /// An implementation where every method throws. - static member Empty : PublicTypeNoAttrMock = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - Mem3 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem3")) - } + static member Empty: PublicTypeNoAttrMock = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) + Mem3 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem3")) } interface IPublicTypeNoAttr with - member this.Mem1 (arg_0_0, arg_0_1) = this.Mem1 (arg_0_0, arg_0_1) - member this.Mem2 arg_0_0 = this.Mem2 (arg_0_0) - member this.Mem3 (arg_0_0, arg_0_1) = this.Mem3 (arg_0_0, arg_0_1) + member this.Mem1(arg_0_0, arg_0_1) = this.Mem1(arg_0_0, arg_0_1) + member this.Mem2 arg_0_0 = this.Mem2(arg_0_0) + member this.Mem3(arg_0_0, arg_0_1) = this.Mem3(arg_0_0, arg_0_1) namespace SomeNamespace open System /// Mock record type for an interface type public PublicTypeInternalFalseNoAttrMock = - { - Mem1 : string * int -> string list - Mem2 : string -> int - Mem3 : int * option -> string - } + { Mem1: string * int -> string list + Mem2: string -> int + Mem3: int * option -> string } /// An implementation where every method throws. - static member Empty : PublicTypeInternalFalseNoAttrMock = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - Mem3 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem3")) - } + static member Empty: PublicTypeInternalFalseNoAttrMock = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) + Mem3 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem3")) } interface IPublicTypeInternalFalseNoAttr with - member this.Mem1 (arg_0_0, arg_0_1) = this.Mem1 (arg_0_0, arg_0_1) - member this.Mem2 arg_0_0 = this.Mem2 (arg_0_0) - member this.Mem3 (arg_0_0, arg_0_1) = this.Mem3 (arg_0_0, arg_0_1) + member this.Mem1(arg_0_0, arg_0_1) = this.Mem1(arg_0_0, arg_0_1) + member this.Mem2 arg_0_0 = this.Mem2(arg_0_0) + member this.Mem3(arg_0_0, arg_0_1) = this.Mem3(arg_0_0, arg_0_1) namespace SomeNamespace open System /// Mock record type for an interface type internal InternalTypeNoAttrMock = - { - Mem1 : string * int -> unit - Mem2 : string -> int - } + { Mem1: string * int -> unit + Mem2: string -> int } /// An implementation where every method throws. - static member Empty : InternalTypeNoAttrMock = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - } + static member Empty: InternalTypeNoAttrMock = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) } interface InternalTypeNoAttr with - member this.Mem1 (arg_0_0, arg_0_1) = this.Mem1 (arg_0_0, arg_0_1) - member this.Mem2 arg_0_0 = this.Mem2 (arg_0_0) + member this.Mem1(arg_0_0, arg_0_1) = this.Mem1(arg_0_0, arg_0_1) + member this.Mem2 arg_0_0 = this.Mem2(arg_0_0) namespace SomeNamespace open System /// Mock record type for an interface type private PrivateTypeNoAttrMock = - { - Mem1 : string * int -> unit - Mem2 : string -> int - } + { Mem1: string * int -> unit + Mem2: string -> int } /// An implementation where every method throws. - static member Empty : PrivateTypeNoAttrMock = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - } + static member Empty: PrivateTypeNoAttrMock = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) } interface PrivateTypeNoAttr with - member this.Mem1 (arg_0_0, arg_0_1) = this.Mem1 (arg_0_0, arg_0_1) - member this.Mem2 arg_0_0 = this.Mem2 (arg_0_0) + member this.Mem1(arg_0_0, arg_0_1) = this.Mem1(arg_0_0, arg_0_1) + member this.Mem2 arg_0_0 = this.Mem2(arg_0_0) namespace SomeNamespace open System /// Mock record type for an interface type private PrivateTypeInternalFalseNoAttrMock = - { - Mem1 : string * int -> unit - Mem2 : string -> int - } + { Mem1: string * int -> unit + Mem2: string -> int } /// An implementation where every method throws. - static member Empty : PrivateTypeInternalFalseNoAttrMock = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - } + static member Empty: PrivateTypeInternalFalseNoAttrMock = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) } interface PrivateTypeInternalFalseNoAttr with - member this.Mem1 (arg_0_0, arg_0_1) = this.Mem1 (arg_0_0, arg_0_1) - member this.Mem2 arg_0_0 = this.Mem2 (arg_0_0) + member this.Mem1(arg_0_0, arg_0_1) = this.Mem1(arg_0_0, arg_0_1) + member this.Mem2 arg_0_0 = this.Mem2(arg_0_0) namespace SomeNamespace open System /// Mock record type for an interface type internal VeryPublicTypeNoAttrMock<'a, 'b> = - { - Mem1 : 'a -> 'b - } + { Mem1: 'a -> 'b } /// An implementation where every method throws. - static member Empty () : VeryPublicTypeNoAttrMock<'a, 'b> = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - } + static member Empty() : VeryPublicTypeNoAttrMock<'a, 'b> = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) } interface VeryPublicTypeNoAttr<'a, 'b> with - member this.Mem1 arg_0_0 = this.Mem1 (arg_0_0) + member this.Mem1 arg_0_0 = this.Mem1(arg_0_0) namespace SomeNamespace open System /// Mock record type for an interface type internal CurriedNoAttrMock<'a> = - { - Mem1 : int -> 'a -> string - Mem2 : int * string -> 'a -> string - Mem3 : (int * string) -> 'a -> string - Mem4 : (int * string) -> ('a * int) -> string - Mem5 : int * string -> ('a * int) -> string - Mem6 : int * string -> 'a * int -> string - } + { Mem1: int -> 'a -> string + Mem2: int * string -> 'a -> string + Mem3: (int * string) -> 'a -> string + Mem4: (int * string) -> ('a * int) -> string + Mem5: int * string -> ('a * int) -> string + Mem6: int * string -> 'a * int -> string } /// An implementation where every method throws. - static member Empty () : CurriedNoAttrMock<'a> = - { - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - Mem3 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem3")) - Mem4 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem4")) - Mem5 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem5")) - Mem6 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem6")) - } + static member Empty() : CurriedNoAttrMock<'a> = + { Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) + Mem3 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem3")) + Mem4 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem4")) + Mem5 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem5")) + Mem6 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem6")) } interface CurriedNoAttr<'a> with member this.Mem1 arg_0_0 arg_1_0 = this.Mem1 (arg_0_0) (arg_1_0) @@ -178,22 +147,21 @@ open System type internal TypeWithInterfaceNoAttrMock = { /// Implementation of IDisposable.Dispose - Dispose : unit -> unit - Mem1 : string option -> string[] Async - Mem2 : unit -> string[] Async + Dispose: unit -> unit + Mem1: string option -> string[] Async + Mem2: unit -> string[] Async } /// An implementation where every method throws. - static member Empty : TypeWithInterfaceNoAttrMock = - { - Dispose = (fun () -> ()) - Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) - Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) - } + static member Empty: TypeWithInterfaceNoAttrMock = + { Dispose = (fun () -> ()) + Mem1 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem1")) + Mem2 = (fun _ -> raise (System.NotImplementedException "Unimplemented mock function: Mem2")) } interface TypeWithInterfaceNoAttr with - member this.Mem1 arg_0_0 = this.Mem1 (arg_0_0) - member this.Mem2 () = this.Mem2 (()) + member this.Mem1 arg_0_0 = this.Mem1(arg_0_0) + member this.Mem2() = this.Mem2(()) interface System.IDisposable with - member this.Dispose () : unit = this.Dispose () + member this.Dispose() : unit = this.Dispose() + diff --git a/ConsumePlugin/GeneratedPureGymDto.fs b/ConsumePlugin/GeneratedPureGymDto.fs index c9b0c7c..e1732a5 100644 --- a/ConsumePlugin/GeneratedPureGymDto.fs +++ b/ConsumePlugin/GeneratedPureGymDto.fs @@ -1,8 +1,4 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ - +// Source generated by Whippet. Changes will be overwritten on next build. namespace PureGym open System @@ -15,123 +11,120 @@ module MemberJsonSerializeExtension = type Member with /// Serialize to a JSON node - static member toJsonNode (input : Member) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Member) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - node.Add ("id", (input.Id |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("id", (input.Id |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "compoundMemberId", (input.CompoundMemberId |> System.Text.Json.Nodes.JsonValue.Create) ) - node.Add ("firstName", (input.FirstName |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("lastName", (input.LastName |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("homeGymId", (input.HomeGymId |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("homeGymName", (input.HomeGymName |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("emailAddress", (input.EmailAddress |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("gymAccessPin", (input.GymAccessPin |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("dateofBirth", (input.DateOfBirth |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("mobileNumber", (input.MobileNumber |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("postCode", (input.Postcode |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("membershipName", (input.MembershipName |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("membershipLevel", (input.MembershipLevel |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("suspendedReason", (input.SuspendedReason |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("memberStatus", (input.MemberStatus |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("firstName", (input.FirstName |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("lastName", (input.LastName |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("homeGymId", (input.HomeGymId |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("homeGymName", (input.HomeGymName |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("emailAddress", (input.EmailAddress |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("gymAccessPin", (input.GymAccessPin |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("dateofBirth", (input.DateOfBirth |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("mobileNumber", (input.MobileNumber |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("postCode", (input.Postcode |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("membershipName", (input.MembershipName |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("membershipLevel", (input.MembershipLevel |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("suspendedReason", (input.SuspendedReason |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("memberStatus", (input.MemberStatus |> System.Text.Json.Nodes.JsonValue.Create)) node :> _ +// Source generated by Whippet. Changes will be overwritten on next build. namespace PureGym /// Module containing JSON parsing methods for the GymOpeningHours type -[] +[] module GymOpeningHours = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : GymOpeningHours = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : GymOpeningHours = let arg_1 = (match node.["openingHours"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("openingHours") ) ) | v -> v) - .AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + .AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq let arg_0 = (match node.["isAlwaysOpen"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("isAlwaysOpen") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() - { - IsAlwaysOpen = arg_0 - OpeningHours = arg_1 - } + { IsAlwaysOpen = arg_0 + OpeningHours = arg_1 } namespace PureGym /// Module containing JSON parsing methods for the GymAccessOptions type -[] +[] module GymAccessOptions = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : GymAccessOptions = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : GymAccessOptions = let arg_1 = (match node.["qrCodeAccess"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("qrCodeAccess") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = (match node.["pinAccess"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("pinAccess") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() - { - PinAccess = arg_0 - QrCodeAccess = arg_1 - } + { PinAccess = arg_0 + QrCodeAccess = arg_1 } namespace PureGym /// Module containing JSON parsing methods for the GymLocation type -[] +[] module GymLocation = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : GymLocation = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : GymLocation = let arg_1 = try (match node.["latitude"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("latitude") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() with :? System.InvalidOperationException as exc -> if exc.Message.Contains "cannot be converted to" then if @@ -140,13 +133,13 @@ module GymLocation = (match node.["latitude"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("latitude") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> System.Double.Parse else reraise () @@ -159,13 +152,13 @@ module GymLocation = (match node.["longitude"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("longitude") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() with :? System.InvalidOperationException as exc -> if exc.Message.Contains "cannot be converted to" then if @@ -174,126 +167,121 @@ module GymLocation = (match node.["longitude"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("longitude") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> System.Double.Parse else reraise () else reraise () - { - Longitude = arg_0 - Latitude = arg_1 - } + { Longitude = arg_0; Latitude = arg_1 } namespace PureGym /// Module containing JSON parsing methods for the GymAddress type -[] +[] module GymAddress = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : GymAddress = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : GymAddress = let arg_5 = (match node.["postcode"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("postcode") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_4 = match node.["county"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_3 = (match node.["town"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("town") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_2 = match node.["addressLine3"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_1 = match node.["addressLine2"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_0 = (match node.["addressLine1"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("addressLine1") ) ) | v -> v) .AsValue() - .GetValue () - - { - AddressLine1 = arg_0 - AddressLine2 = arg_1 - AddressLine3 = arg_2 - Town = arg_3 - County = arg_4 - Postcode = arg_5 - } + .GetValue() + + { AddressLine1 = arg_0 + AddressLine2 = arg_1 + AddressLine3 = arg_2 + Town = arg_3 + County = arg_4 + Postcode = arg_5 } namespace PureGym /// Module containing JSON parsing methods for the Gym type -[] +[] module Gym = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : Gym = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : Gym = let arg_10 = (match node.["reopenDate"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("reopenDate") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_9 = (match node.["timeZone"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("timeZone") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_8 = GymLocation.jsonParse ( match node.["location"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("location") ) ) @@ -305,7 +293,7 @@ module Gym = match node.["accessOptions"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("accessOptions") ) ) @@ -317,7 +305,7 @@ module Gym = match node.["gymOpeningHours"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("gymOpeningHours") ) ) @@ -328,32 +316,32 @@ module Gym = (match node.["emailAddress"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("emailAddress") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_4 = (match node.["phoneNumber"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("phoneNumber") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_3 = GymAddress.jsonParse ( match node.["address"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("address") ) ) @@ -364,51 +352,49 @@ module Gym = (match node.["status"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("status") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_1 = (match node.["id"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("id") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = (match node.["name"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("name") ) ) | v -> v) .AsValue() - .GetValue () - - { - Name = arg_0 - Id = arg_1 - Status = arg_2 - Address = arg_3 - PhoneNumber = arg_4 - EmailAddress = arg_5 - GymOpeningHours = arg_6 - AccessOptions = arg_7 - Location = arg_8 - TimeZone = arg_9 - ReopenDate = arg_10 - } + .GetValue() + + { Name = arg_0 + Id = arg_1 + Status = arg_2 + Address = arg_3 + PhoneNumber = arg_4 + EmailAddress = arg_5 + GymOpeningHours = arg_6 + AccessOptions = arg_7 + Location = arg_8 + TimeZone = arg_9 + ReopenDate = arg_10 } namespace PureGym /// Module containing JSON parsing extension members for the Member type @@ -418,524 +404,514 @@ module MemberJsonParseExtension = type Member with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Member = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Member = let arg_14 = (match node.["memberStatus"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("memberStatus") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_13 = (match node.["suspendedReason"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("suspendedReason") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_12 = (match node.["membershipLevel"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("membershipLevel") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_11 = (match node.["membershipName"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("membershipName") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_10 = (match node.["postCode"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("postCode") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_9 = (match node.["mobileNumber"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("mobileNumber") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_8 = (match node.["dateofBirth"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("dateofBirth") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> System.DateOnly.Parse let arg_7 = (match node.["gymAccessPin"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("gymAccessPin") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_6 = (match node.["emailAddress"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("emailAddress") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_5 = (match node.["homeGymName"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("homeGymName") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_4 = (match node.["homeGymId"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("homeGymId") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_3 = (match node.["lastName"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("lastName") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_2 = (match node.["firstName"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("firstName") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_1 = (match node.["compoundMemberId"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("compoundMemberId") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = (match node.["id"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("id") ) ) | v -> v) .AsValue() - .GetValue () - - { - Id = arg_0 - CompoundMemberId = arg_1 - FirstName = arg_2 - LastName = arg_3 - HomeGymId = arg_4 - HomeGymName = arg_5 - EmailAddress = arg_6 - GymAccessPin = arg_7 - DateOfBirth = arg_8 - MobileNumber = arg_9 - Postcode = arg_10 - MembershipName = arg_11 - MembershipLevel = arg_12 - SuspendedReason = arg_13 - MemberStatus = arg_14 - } + .GetValue() + + { Id = arg_0 + CompoundMemberId = arg_1 + FirstName = arg_2 + LastName = arg_3 + HomeGymId = arg_4 + HomeGymName = arg_5 + EmailAddress = arg_6 + GymAccessPin = arg_7 + DateOfBirth = arg_8 + MobileNumber = arg_9 + Postcode = arg_10 + MembershipName = arg_11 + MembershipLevel = arg_12 + SuspendedReason = arg_13 + MemberStatus = arg_14 } namespace PureGym /// Module containing JSON parsing methods for the GymAttendance type -[] +[] module GymAttendance = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : GymAttendance = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : GymAttendance = let arg_8 = (match node.["maximumCapacity"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("maximumCapacity") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_7 = (match node.["lastRefreshedPeopleInClasses"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("lastRefreshedPeopleInClasses") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> System.DateTime.Parse let arg_6 = (match node.["lastRefreshed"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("lastRefreshed") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> System.DateTime.Parse let arg_5 = (match node.["attendanceTime"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("attendanceTime") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> System.DateTime.Parse let arg_4 = (match node.["isApproximate"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("isApproximate") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_3 = match node.["totalPeopleSuffix"] with | null -> None - | v -> v.AsValue().GetValue () |> Some + | v -> v.AsValue().GetValue() |> Some let arg_2 = (match node.["totalPeopleInClasses"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("totalPeopleInClasses") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_1 = (match node.["totalPeopleInGym"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("totalPeopleInGym") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = (match node.["description"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("description") ) ) | v -> v) .AsValue() - .GetValue () - - { - Description = arg_0 - TotalPeopleInGym = arg_1 - TotalPeopleInClasses = arg_2 - TotalPeopleSuffix = arg_3 - IsApproximate = arg_4 - AttendanceTime = arg_5 - LastRefreshed = arg_6 - LastRefreshedPeopleInClasses = arg_7 - MaximumCapacity = arg_8 - } + .GetValue() + + { Description = arg_0 + TotalPeopleInGym = arg_1 + TotalPeopleInClasses = arg_2 + TotalPeopleSuffix = arg_3 + IsApproximate = arg_4 + AttendanceTime = arg_5 + LastRefreshed = arg_6 + LastRefreshedPeopleInClasses = arg_7 + MaximumCapacity = arg_8 } namespace PureGym /// Module containing JSON parsing methods for the MemberActivityDto type -[] +[] module MemberActivityDto = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : MemberActivityDto = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : MemberActivityDto = let arg_5 = (match node.["lastRefreshed"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("lastRefreshed") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> System.DateTime.Parse let arg_4 = (match node.["isEstimated"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("isEstimated") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_3 = (match node.["totalClasses"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("totalClasses") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_2 = (match node.["totalVisits"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("totalVisits") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_1 = (match node.["averageDuration"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("averageDuration") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = (match node.["totalDuration"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("totalDuration") ) ) | v -> v) .AsValue() - .GetValue () - - { - TotalDuration = arg_0 - AverageDuration = arg_1 - TotalVisits = arg_2 - TotalClasses = arg_3 - IsEstimated = arg_4 - LastRefreshed = arg_5 - } + .GetValue() + + { TotalDuration = arg_0 + AverageDuration = arg_1 + TotalVisits = arg_2 + TotalClasses = arg_3 + IsEstimated = arg_4 + LastRefreshed = arg_5 } namespace PureGym /// Module containing JSON parsing methods for the SessionsAggregate type -[] +[] module SessionsAggregate = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : SessionsAggregate = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : SessionsAggregate = let arg_2 = (match node.["Duration"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("Duration") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_1 = (match node.["Visits"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("Visits") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = (match node.["Activities"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("Activities") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() - { - Activities = arg_0 - Visits = arg_1 - Duration = arg_2 - } + { Activities = arg_0 + Visits = arg_1 + Duration = arg_2 } namespace PureGym /// Module containing JSON parsing methods for the VisitGym type -[] +[] module VisitGym = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : VisitGym = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : VisitGym = let arg_2 = (match node.["Status"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("Status") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_1 = (match node.["Name"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("Name") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = (match node.["Id"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("Id") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() - { - Id = arg_0 - Name = arg_1 - Status = arg_2 - } + { Id = arg_0 + Name = arg_1 + Status = arg_2 } namespace PureGym /// Module containing JSON parsing methods for the Visit type -[] +[] module Visit = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : Visit = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : Visit = let arg_3 = VisitGym.jsonParse ( match node.["Gym"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("Gym") ) ) @@ -946,58 +922,56 @@ module Visit = (match node.["Duration"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("Duration") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_1 = (match node.["StartTime"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("StartTime") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> System.DateTime.Parse let arg_0 = (match node.["IsDurationEstimated"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("IsDurationEstimated") ) ) | v -> v) .AsValue() - .GetValue () - - { - IsDurationEstimated = arg_0 - StartTime = arg_1 - Duration = arg_2 - Gym = arg_3 - } + .GetValue() + + { IsDurationEstimated = arg_0 + StartTime = arg_1 + Duration = arg_2 + Gym = arg_3 } namespace PureGym /// Module containing JSON parsing methods for the SessionsSummary type -[] +[] module SessionsSummary = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : SessionsSummary = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : SessionsSummary = let arg_1 = SessionsAggregate.jsonParse ( match node.["ThisWeek"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("ThisWeek") ) ) @@ -1009,34 +983,31 @@ module SessionsSummary = match node.["Total"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("Total") ) ) | v -> v ) - { - Total = arg_0 - ThisWeek = arg_1 - } + { Total = arg_0; ThisWeek = arg_1 } namespace PureGym /// Module containing JSON parsing methods for the Sessions type -[] +[] module Sessions = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : Sessions = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : Sessions = let arg_1 = (match node.["Visits"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("Visits") ) ) | v -> v) - .AsArray () + .AsArray() |> Seq.map (fun elt -> Visit.jsonParse elt) |> List.ofSeq @@ -1045,37 +1016,33 @@ module Sessions = match node.["Summary"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("Summary") ) ) | v -> v ) - { - Summary = arg_0 - Visits = arg_1 - } + { Summary = arg_0; Visits = arg_1 } namespace PureGym /// Module containing JSON parsing methods for the UriThing type -[] +[] module UriThing = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : UriThing = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : UriThing = let arg_0 = (match node.["someUri"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("someUri") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> System.Uri - { - SomeUri = arg_0 - } + { SomeUri = arg_0 } + diff --git a/ConsumePlugin/GeneratedRecord.fs b/ConsumePlugin/GeneratedRecord.fs index e69de29..b2d5d16 100644 --- a/ConsumePlugin/GeneratedRecord.fs +++ b/ConsumePlugin/GeneratedRecord.fs @@ -0,0 +1,24 @@ +// Source generated by Whippet. Changes will be overwritten on next build. +namespace ConsumePlugin + +/// Module containing an option-truncated version of the RecordType type +[] +[] +module RecordType = + /// My whatnot + type Short = + { + /// A thing! + A: int + /// Another thing! + B: string + /// Yet another thing! + C: float list + } + + /// Remove the optional members of the input. + let shorten (input: RecordType) : Short = + { A = input.A |> Option.defaultWith RecordType.DefaultA + B = input.B + C = input.C } + diff --git a/ConsumePlugin/GeneratedRestClient.fs b/ConsumePlugin/GeneratedRestClient.fs index db09325..1777cc3 100644 --- a/ConsumePlugin/GeneratedRestClient.fs +++ b/ConsumePlugin/GeneratedRestClient.fs @@ -1,10 +1,4 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ - - - +// Source generated by Whippet. Changes will be overwritten on next build. namespace PureGym open System @@ -16,1032 +10,1027 @@ open System.Net.Http open RestEase /// Module for constructing a REST client. -[] +[] module PureGymApi = /// Create a REST client. - let make (client : System.Net.Http.HttpClient) : IPureGymApi = + let make (client: System.Net.Http.HttpClient) : IPureGymApi = { new IPureGymApi with - member _.GetGyms (ct : CancellationToken option) = + member _.GetGyms(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri (("v1/gyms/"), System.UriKind.Relative) + System.Uri(("v1/gyms/"), System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask - return jsonNode.AsArray () |> Seq.map (fun elt -> Gym.jsonParse elt) |> List.ofSeq + return jsonNode.AsArray() |> Seq.map (fun elt -> Gym.jsonParse elt) |> List.ofSeq } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetGymAttendance (gymId : int, ct : CancellationToken option) = + member _.GetGymAttendance(gymId: int, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ( + System.Uri( "v1/gyms/{gym_id}/attendance" - .Replace ("{gym_id}", gymId.ToString () |> System.Uri.EscapeDataString), + .Replace("{gym_id}", gymId.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return GymAttendance.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetGymAttendance' (gymId : int, ct : CancellationToken option) = + member _.GetGymAttendance'(gymId: int, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ( + System.Uri( "v1/gyms/{gym_id}/attendance" - .Replace ("{gym_id}", gymId.ToString () |> System.Uri.EscapeDataString), + .Replace("{gym_id}", gymId.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return GymAttendance.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetMember (ct : CancellationToken option) = + member _.GetMember(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("v1/member", System.UriKind.Relative) + System.Uri("v1/member", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Member.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetGym (gym : int, ct : CancellationToken option) = + member _.GetGym(gym: int, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ( - "v1/gyms/{gym}" - .Replace ("{gym}", gym.ToString () |> System.Uri.EscapeDataString), + System.Uri( + "v1/gyms/{gym}".Replace("{gym}", gym.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Gym.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetMemberActivity (ct : CancellationToken option) = + member _.GetMemberActivity(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("v1/member/activity", System.UriKind.Relative) + System.Uri("v1/member/activity", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return MemberActivityDto.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetUrl (ct : CancellationToken option) = + member _.GetUrl(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("some/url", System.UriKind.Relative) + System.Uri("some/url", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return UriThing.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.PostStringToString (foo : Map option, ct : CancellationToken option) = + member _.PostStringToString(foo: Map option, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("some/url", System.UriKind.Relative) + System.Uri("some/url", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( foo |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> ((fun field -> - let ret = System.Text.Json.Nodes.JsonObject () + let ret = System.Text.Json.Nodes.JsonObject() - for (KeyValue (key, value)) in field do - ret.Add ( - key.ToString (), + for (KeyValue(key, value)) in field do + ret.Add( + key.ToString(), System.Text.Json.Nodes.JsonValue.Create value ) - ret - ) + ret) field) - :> System.Text.Json.Nodes.JsonNode - ) - |> (fun node -> if isNull node then "null" else node.ToJsonString ()) + :> System.Text.Json.Nodes.JsonNode) + |> (fun node -> if isNull node then "null" else node.ToJsonString()) ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return match jsonNode with | null -> None | v -> - v.AsObject () + v.AsObject() |> Seq.map (fun kvp -> let key = (kvp.Key) - let value = (kvp.Value).AsValue().GetValue () - key, value - ) + let value = (kvp.Value).AsValue().GetValue() + key, value) |> Map.ofSeq |> Some } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetSessions (fromDate : DateOnly, toDate : DateOnly, ct : CancellationToken option) = + member _.GetSessions(fromDate: DateOnly, toDate: DateOnly, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ( + System.Uri( ("/v2/gymSessions/member" - + (if "/v2/gymSessions/member".IndexOf (char 63) >= 0 then + + (if "/v2/gymSessions/member".IndexOf(char 63) >= 0 then "&" else "?") - + "fromDate=" - + ((fromDate.ToString "yyyy-MM-dd") |> System.Uri.EscapeDataString) - + "&toDate=" - + ((toDate.ToString "yyyy-MM-dd") |> System.Uri.EscapeDataString)), + + "fromDate=" + + ((fromDate.ToString "yyyy-MM-dd") |> System.Uri.EscapeDataString) + + "&toDate=" + + ((toDate.ToString "yyyy-MM-dd") |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Sessions.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetSessionsWithQuery (fromDate : DateOnly, toDate : DateOnly, ct : CancellationToken option) = + member _.GetSessionsWithQuery(fromDate: DateOnly, toDate: DateOnly, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ( + System.Uri( ("/v2/gymSessions/member?foo=1" - + (if "/v2/gymSessions/member?foo=1".IndexOf (char 63) >= 0 then + + (if "/v2/gymSessions/member?foo=1".IndexOf(char 63) >= 0 then "&" else "?") - + "fromDate=" - + ((fromDate.ToString "yyyy-MM-dd") |> System.Uri.EscapeDataString) - + "&toDate=" - + ((toDate.ToString "yyyy-MM-dd") |> System.Uri.EscapeDataString)), + + "fromDate=" + + ((fromDate.ToString "yyyy-MM-dd") |> System.Uri.EscapeDataString) + + "&toDate=" + + ((toDate.ToString "yyyy-MM-dd") |> System.Uri.EscapeDataString)), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return Sessions.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.CreateUserString (user : string, ct : CancellationToken option) = + member _.CreateUserString(user: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("users/new", System.UriKind.Relative) + System.Uri("users/new", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let queryParams = new System.Net.Http.StringContent (user) + let queryParams = new System.Net.Http.StringContent(user) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.CreateUserStream (user : System.IO.Stream, ct : CancellationToken option) = + member _.CreateUserStream(user: System.IO.Stream, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("users/new", System.UriKind.Relative) + System.Uri("users/new", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let queryParams = new System.Net.Http.StreamContent (user) + let queryParams = new System.Net.Http.StreamContent(user) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask return responseStream } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.CreateUserByteArr (user : byte[], ct : CancellationToken option) = + member _.CreateUserByteArr(user: byte[], ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("users/new", System.UriKind.Relative) + System.Uri("users/new", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let queryParams = new System.Net.Http.ByteArrayContent (user) + let queryParams = new System.Net.Http.ByteArrayContent(user) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask return responseStream } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.CreateUserByteArr' (user : array, ct : CancellationToken option) = + member _.CreateUserByteArr'(user: array, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("users/new", System.UriKind.Relative) + System.Uri("users/new", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let queryParams = new System.Net.Http.ByteArrayContent (user) + let queryParams = new System.Net.Http.ByteArrayContent(user) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask return responseStream } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.CreateUserByteArr'' (user : byte array, ct : CancellationToken option) = + member _.CreateUserByteArr''(user: byte array, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("users/new", System.UriKind.Relative) + System.Uri("users/new", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) - let queryParams = new System.Net.Http.ByteArrayContent (user) + let queryParams = new System.Net.Http.ByteArrayContent(user) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask return responseStream } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.CreateUserSerialisedBody (user : PureGym.Member, ct : CancellationToken option) = + member _.CreateUserSerialisedBody(user: PureGym.Member, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("users/new", System.UriKind.Relative) + System.Uri("users/new", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( user |> PureGym.Member.toJsonNode - |> (fun node -> if isNull node then "null" else node.ToJsonString ()) + |> (fun node -> if isNull node then "null" else node.ToJsonString()) ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.CreateUserSerialisedUrlBody (user : Uri, ct : CancellationToken option) = + member _.CreateUserSerialisedUrlBody(user: Uri, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("users/new", System.UriKind.Relative) + System.Uri("users/new", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( user |> System.Text.Json.Nodes.JsonValue.Create - |> (fun node -> if isNull node then "null" else node.ToJsonString ()) + |> (fun node -> if isNull node then "null" else node.ToJsonString()) ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.CreateUserSerialisedIntBody (user : int, ct : CancellationToken option) = + member _.CreateUserSerialisedIntBody(user: int, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("users/new", System.UriKind.Relative) + System.Uri("users/new", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) let queryParams = - new System.Net.Http.StringContent ( + new System.Net.Http.StringContent( user |> System.Text.Json.Nodes.JsonValue.Create - |> (fun node -> if isNull node then "null" else node.ToJsonString ()) + |> (fun node -> if isNull node then "null" else node.ToJsonString()) ) do httpMessage.Content <- queryParams - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.CreateUserHttpContent (user : System.Net.Http.HttpContent, ct : CancellationToken option) = + member _.CreateUserHttpContent(user: System.Net.Http.HttpContent, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("users/new", System.UriKind.Relative) + System.Uri("users/new", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Post, RequestUri = uri ) do httpMessage.Content <- user - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetPathParam (parameter : string, ct : CancellationToken option) = + member _.GetPathParam(parameter: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ( + System.Uri( "endpoint/{param}" - .Replace ("{param}", parameter.ToString () |> System.Uri.EscapeDataString), + .Replace("{param}", parameter.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetStream (ct : CancellationToken option) = + member _.GetStream(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("endpoint", System.UriKind.Relative) + System.Uri("endpoint", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask return responseStream } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetStream' (ct : CancellationToken option) = + member _.GetStream'(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("endpoint", System.UriKind.Relative) + System.Uri("endpoint", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask return responseStream } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetStream'' (ct : CancellationToken option) = + member _.GetStream''(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("endpoint", System.UriKind.Relative) + System.Uri("endpoint", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask return responseStream } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetResponseMessage (ct : CancellationToken option) = + member _.GetResponseMessage(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("endpoint", System.UriKind.Relative) + System.Uri("endpoint", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return response } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetResponseMessage' (ct : CancellationToken option) = + member _.GetResponseMessage'(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("endpoint", System.UriKind.Relative) + System.Uri("endpoint", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return response } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetResponseMessage'' (ct : CancellationToken option) = + member _.GetResponseMessage''(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("endpoint", System.UriKind.Relative) + System.Uri("endpoint", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return response } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetResponseMessage''' (ct : CancellationToken option) = + member _.GetResponseMessage'''(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("endpoint", System.UriKind.Relative) + System.Uri("endpoint", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return response } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetResponse (ct : CancellationToken option) = + member _.GetResponse(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("endpoint", System.UriKind.Relative) + System.Uri("endpoint", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - new RestEase.Response<_> ( + new RestEase.Response<_>( responseString, response, (fun () -> (MemberActivityDto.jsonParse jsonNode)) ) } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetResponse' (ct : CancellationToken option) = + member _.GetResponse'(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("endpoint", System.UriKind.Relative) + System.Uri("endpoint", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - new RestEase.Response<_> ( + new RestEase.Response<_>( responseString, response, (fun () -> (MemberActivityDto.jsonParse jsonNode)) ) } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetResponse'' (ct : CancellationToken option) = + member _.GetResponse''(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("endpoint", System.UriKind.Relative) + System.Uri("endpoint", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - new RestEase.Response<_> ( + new RestEase.Response<_>( responseString, response, (fun () -> (MemberActivityDto.jsonParse jsonNode)) ) } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetResponse''' (ct : CancellationToken option) = + member _.GetResponse'''(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("endpoint", System.UriKind.Relative) + System.Uri("endpoint", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return - new RestEase.Response<_> ( + new RestEase.Response<_>( responseString, response, (fun () -> (MemberActivityDto.jsonParse jsonNode)) ) } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetWithAnyReturnCode (ct : CancellationToken option) = + member _.GetWithAnyReturnCode(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("endpoint", System.UriKind.Relative) + System.Uri("endpoint", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask return response } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetWithoutAnyReturnCode (ct : CancellationToken option) = + member _.GetWithoutAnyReturnCode(ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/" | v -> v), - System.Uri ("endpoint", System.UriKind.Relative) + System.Uri("endpoint", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() return response } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) } namespace PureGym open System @@ -1053,46 +1042,45 @@ open System.Net.Http open RestEase /// Module for constructing a REST client. -[] +[] module internal ApiWithoutBaseAddress = /// Create a REST client. - let make (client : System.Net.Http.HttpClient) : IApiWithoutBaseAddress = + let make (client: System.Net.Http.HttpClient) : IApiWithoutBaseAddress = { new IApiWithoutBaseAddress with - member _.GetPathParam (parameter : string, ct : CancellationToken option) = + member _.GetPathParam(parameter: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ( + System.Uri( "endpoint/{param}" - .Replace ("{param}", parameter.ToString () |> System.Uri.EscapeDataString), + .Replace("{param}", parameter.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) } namespace PureGym open System @@ -1104,49 +1092,48 @@ open System.Net.Http open RestEase /// Module for constructing a REST client. -[] +[] module ApiWithBasePath = /// Create a REST client. - let make (client : System.Net.Http.HttpClient) : IApiWithBasePath = + let make (client: System.Net.Http.HttpClient) : IApiWithBasePath = { new IApiWithBasePath with - member _.GetPathParam (parameter : string, cancellationToken : CancellationToken option) = + member _.GetPathParam(parameter: string, cancellationToken: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("foo/", System.UriKind.Relative) + System.Uri("foo/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "endpoint/{param}" - .Replace ("{param}", parameter.ToString () |> System.Uri.EscapeDataString), + .Replace("{param}", parameter.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = cancellationToken)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = cancellationToken)) } namespace PureGym open System @@ -1158,43 +1145,42 @@ open System.Net.Http open RestEase /// Module for constructing a REST client. -[] +[] module ApiWithBasePathAndAddress = /// Create a REST client. - let make (client : System.Net.Http.HttpClient) : IApiWithBasePathAndAddress = + let make (client: System.Net.Http.HttpClient) : IApiWithBasePathAndAddress = { new IApiWithBasePathAndAddress with - member _.GetPathParam (parameter : string, ct : CancellationToken option) = + member _.GetPathParam(parameter: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/thing/" | v -> v), - System.Uri ("foo/", System.UriKind.Relative) + System.Uri("foo/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "endpoint/{param}" - .Replace ("{param}", parameter.ToString () |> System.Uri.EscapeDataString), + .Replace("{param}", parameter.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) } namespace PureGym open System @@ -1206,49 +1192,48 @@ open System.Net.Http open RestEase /// Module for constructing a REST client. -[] +[] module ApiWithAbsoluteBasePath = /// Create a REST client. - let make (client : System.Net.Http.HttpClient) : IApiWithAbsoluteBasePath = + let make (client: System.Net.Http.HttpClient) : IApiWithAbsoluteBasePath = { new IApiWithAbsoluteBasePath with - member _.GetPathParam (parameter : string, cancellationToken : CancellationToken option) = + member _.GetPathParam(parameter: string, cancellationToken: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/foo/", System.UriKind.Relative) + System.Uri("/foo/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "endpoint/{param}" - .Replace ("{param}", parameter.ToString () |> System.Uri.EscapeDataString), + .Replace("{param}", parameter.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = cancellationToken)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = cancellationToken)) } namespace PureGym open System @@ -1260,43 +1245,42 @@ open System.Net.Http open RestEase /// Module for constructing a REST client. -[] +[] module ApiWithAbsoluteBasePathAndAddress = /// Create a REST client. - let make (client : System.Net.Http.HttpClient) : IApiWithAbsoluteBasePathAndAddress = + let make (client: System.Net.Http.HttpClient) : IApiWithAbsoluteBasePathAndAddress = { new IApiWithAbsoluteBasePathAndAddress with - member _.GetPathParam (parameter : string, ct : CancellationToken option) = + member _.GetPathParam(parameter: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/thing/" | v -> v), - System.Uri ("/foo/", System.UriKind.Relative) + System.Uri("/foo/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "endpoint/{param}" - .Replace ("{param}", parameter.ToString () |> System.Uri.EscapeDataString), + .Replace("{param}", parameter.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) } namespace PureGym open System @@ -1308,49 +1292,48 @@ open System.Net.Http open RestEase /// Module for constructing a REST client. -[] +[] module ApiWithBasePathAndAbsoluteEndpoint = /// Create a REST client. - let make (client : System.Net.Http.HttpClient) : IApiWithBasePathAndAbsoluteEndpoint = + let make (client: System.Net.Http.HttpClient) : IApiWithBasePathAndAbsoluteEndpoint = { new IApiWithBasePathAndAbsoluteEndpoint with - member _.GetPathParam (parameter : string, cancellationToken : CancellationToken option) = + member _.GetPathParam(parameter: string, cancellationToken: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("foo/", System.UriKind.Relative) + System.Uri("foo/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "/endpoint/{param}" - .Replace ("{param}", parameter.ToString () |> System.Uri.EscapeDataString), + .Replace("{param}", parameter.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = cancellationToken)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = cancellationToken)) } namespace PureGym open System @@ -1362,43 +1345,42 @@ open System.Net.Http open RestEase /// Module for constructing a REST client. -[] +[] module ApiWithBasePathAndAddressAndAbsoluteEndpoint = /// Create a REST client. - let make (client : System.Net.Http.HttpClient) : IApiWithBasePathAndAddressAndAbsoluteEndpoint = + let make (client: System.Net.Http.HttpClient) : IApiWithBasePathAndAddressAndAbsoluteEndpoint = { new IApiWithBasePathAndAddressAndAbsoluteEndpoint with - member _.GetPathParam (parameter : string, ct : CancellationToken option) = + member _.GetPathParam(parameter: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/thing/" | v -> v), - System.Uri ("foo/", System.UriKind.Relative) + System.Uri("foo/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "/endpoint/{param}" - .Replace ("{param}", parameter.ToString () |> System.Uri.EscapeDataString), + .Replace("{param}", parameter.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) } namespace PureGym open System @@ -1410,49 +1392,48 @@ open System.Net.Http open RestEase /// Module for constructing a REST client. -[] +[] module ApiWithAbsoluteBasePathAndAbsoluteEndpoint = /// Create a REST client. - let make (client : System.Net.Http.HttpClient) : IApiWithAbsoluteBasePathAndAbsoluteEndpoint = + let make (client: System.Net.Http.HttpClient) : IApiWithAbsoluteBasePathAndAbsoluteEndpoint = { new IApiWithAbsoluteBasePathAndAbsoluteEndpoint with - member _.GetPathParam (parameter : string, cancellationToken : CancellationToken option) = + member _.GetPathParam(parameter: string, cancellationToken: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("/foo/", System.UriKind.Relative) + System.Uri("/foo/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "/endpoint/{param}" - .Replace ("{param}", parameter.ToString () |> System.Uri.EscapeDataString), + .Replace("{param}", parameter.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = cancellationToken)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = cancellationToken)) } namespace PureGym open System @@ -1464,43 +1445,42 @@ open System.Net.Http open RestEase /// Module for constructing a REST client. -[] +[] module ApiWithAbsoluteBasePathAndAddressAndAbsoluteEndpoint = /// Create a REST client. - let make (client : System.Net.Http.HttpClient) : IApiWithAbsoluteBasePathAndAddressAndAbsoluteEndpoint = + let make (client: System.Net.Http.HttpClient) : IApiWithAbsoluteBasePathAndAddressAndAbsoluteEndpoint = { new IApiWithAbsoluteBasePathAndAddressAndAbsoluteEndpoint with - member _.GetPathParam (parameter : string, ct : CancellationToken option) = + member _.GetPathParam(parameter: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( - System.Uri ( + System.Uri( + System.Uri( (match client.BaseAddress with | null -> System.Uri "https://whatnot.com/thing/" | v -> v), - System.Uri ("/foo/", System.UriKind.Relative) + System.Uri("/foo/", System.UriKind.Relative) ), - System.Uri ( + System.Uri( "/endpoint/{param}" - .Replace ("{param}", parameter.ToString () |> System.Uri.EscapeDataString), + .Replace("{param}", parameter.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) } namespace PureGym open System @@ -1512,58 +1492,56 @@ open System.Net.Http open RestEase /// Module for constructing a REST client. -[] +[] module ApiWithHeaders = /// Create a REST client. The input functions will be re-evaluated on every HTTP request to obtain the required values for the corresponding header properties. let make - (someHeader : unit -> string) - (someOtherHeader : unit -> int) - (client : System.Net.Http.HttpClient) - : IApiWithHeaders - = + (someHeader: unit -> string) + (someOtherHeader: unit -> int) + (client: System.Net.Http.HttpClient) + : IApiWithHeaders = { new IApiWithHeaders with - member _.SomeHeader : string = someHeader () - member _.SomeOtherHeader : int = someOtherHeader () + member _.SomeHeader: string = someHeader () + member _.SomeOtherHeader: int = someOtherHeader () - member this.GetPathParam (parameter : string, ct : CancellationToken option) = + member this.GetPathParam(parameter: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ( + System.Uri( "endpoint/{param}" - .Replace ("{param}", parameter.ToString () |> System.Uri.EscapeDataString), + .Replace("{param}", parameter.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - do httpMessage.Headers.Add ("X-Foo", this.SomeHeader.ToString ()) - do httpMessage.Headers.Add ("Authorization", this.SomeOtherHeader.ToString ()) - do httpMessage.Headers.Add ("Header-Name", "Header-Value") - do httpMessage.Headers.Add ("Something-Else", "val") - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + do httpMessage.Headers.Add("X-Foo", this.SomeHeader.ToString()) + do httpMessage.Headers.Add("Authorization", this.SomeOtherHeader.ToString()) + do httpMessage.Headers.Add("Header-Name", "Header-Value") + do httpMessage.Headers.Add("Something-Else", "val") + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) } namespace PureGym open System @@ -1575,54 +1553,53 @@ open System.Net.Http open RestEase /// Module for constructing a REST client. -[] +[] module ApiWithHeaders2 = /// Create a REST client. The input functions will be re-evaluated on every HTTP request to obtain the required values for the corresponding header properties. let make - (someHeader : unit -> string) - (someOtherHeader : unit -> int) - (client : System.Net.Http.HttpClient) - : IApiWithHeaders2 - = + (someHeader: unit -> string) + (someOtherHeader: unit -> int) + (client: System.Net.Http.HttpClient) + : IApiWithHeaders2 = { new IApiWithHeaders2 with - member _.SomeHeader : string = someHeader () - member _.SomeOtherHeader : int = someOtherHeader () + member _.SomeHeader: string = someHeader () + member _.SomeOtherHeader: int = someOtherHeader () - member this.GetPathParam (parameter : string, ct : CancellationToken option) = + member this.GetPathParam(parameter: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ( + System.Uri( "endpoint/{param}" - .Replace ("{param}", parameter.ToString () |> System.Uri.EscapeDataString), + .Replace("{param}", parameter.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - do httpMessage.Headers.Add ("X-Foo", this.SomeHeader.ToString ()) - do httpMessage.Headers.Add ("Authorization", this.SomeOtherHeader.ToString ()) - do httpMessage.Headers.Add ("Header-Name", "Header-Value") - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + do httpMessage.Headers.Add("X-Foo", this.SomeHeader.ToString()) + do httpMessage.Headers.Add("Authorization", this.SomeOtherHeader.ToString()) + do httpMessage.Headers.Add("Header-Name", "Header-Value") + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseString = response.Content.ReadAsStringAsync ct |> Async.AwaitTask return responseString } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) } + diff --git a/ConsumePlugin/GeneratedSerde.fs b/ConsumePlugin/GeneratedSerde.fs index 7febc5c..0205787 100644 --- a/ConsumePlugin/GeneratedSerde.fs +++ b/ConsumePlugin/GeneratedSerde.fs @@ -1,8 +1,4 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ - +// Source generated by Whippet. Changes will be overwritten on next build. namespace ConsumePlugin open System @@ -16,73 +12,68 @@ module InnerTypeWithBothJsonSerializeExtension = type InnerTypeWithBoth with /// Serialize to a JSON node - static member toJsonNode (input : InnerTypeWithBoth) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: InnerTypeWithBoth) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - node.Add (("it's-a-me"), (input.Thing |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add(("it's-a-me"), (input.Thing |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "map", (input.Map |> (fun field -> - let ret = System.Text.Json.Nodes.JsonObject () + let ret = System.Text.Json.Nodes.JsonObject() - for (KeyValue (key, value)) in field do - ret.Add (key.ToString (), System.Text.Json.Nodes.JsonValue.Create value) + for (KeyValue(key, value)) in field do + ret.Add(key.ToString(), System.Text.Json.Nodes.JsonValue.Create value) - ret - )) + ret)) ) - node.Add ( + node.Add( "readOnlyDict", (input.ReadOnlyDict |> (fun field -> - let ret = System.Text.Json.Nodes.JsonObject () + let ret = System.Text.Json.Nodes.JsonObject() - for (KeyValue (key, value)) in field do - ret.Add ( - key.ToString (), + for (KeyValue(key, value)) in field do + ret.Add( + key.ToString(), (fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - ) + arr) value ) - ret - )) + ret)) ) - node.Add ( + node.Add( "dict", (input.Dict |> (fun field -> - let ret = System.Text.Json.Nodes.JsonObject () + let ret = System.Text.Json.Nodes.JsonObject() - for (KeyValue (key, value)) in field do - ret.Add (key.ToString (), System.Text.Json.Nodes.JsonValue.Create value) + for (KeyValue(key, value)) in field do + ret.Add(key.ToString(), System.Text.Json.Nodes.JsonValue.Create value) - ret - )) + ret)) ) - node.Add ( + node.Add( "concreteDict", (input.ConcreteDict |> (fun field -> - let ret = System.Text.Json.Nodes.JsonObject () + let ret = System.Text.Json.Nodes.JsonObject() - for (KeyValue (key, value)) in field do - ret.Add (key.ToString (), InnerTypeWithBoth.toJsonNode value) + for (KeyValue(key, value)) in field do + ret.Add(key.ToString(), InnerTypeWithBoth.toJsonNode value) - ret - )) + ret)) ) node :> _ @@ -99,7 +90,7 @@ module SomeEnumJsonSerializeExtension = type SomeEnum with /// Serialize to a JSON node - static member toJsonNode (input : SomeEnum) : System.Text.Json.Nodes.JsonNode = + static member toJsonNode(input: SomeEnum) : System.Text.Json.Nodes.JsonNode = match input with | SomeEnum.Blah -> System.Text.Json.Nodes.JsonValue.Create 1 | SomeEnum.Thing -> System.Text.Json.Nodes.JsonValue.Create 0 @@ -117,67 +108,64 @@ module JsonRecordTypeWithBothJsonSerializeExtension = type JsonRecordTypeWithBoth with /// Serialize to a JSON node - static member toJsonNode (input : JsonRecordTypeWithBoth) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: JsonRecordTypeWithBoth) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - node.Add ("a", (input.A |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("b", (input.B |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("a", (input.A |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("b", (input.B |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ( + node.Add( "c", (input.C |> (fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - )) + arr)) ) - node.Add ("d", (input.D |> InnerTypeWithBoth.toJsonNode)) + node.Add("d", (input.D |> InnerTypeWithBoth.toJsonNode)) - node.Add ( + node.Add( "e", (input.E |> (fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - )) + arr)) ) - node.Add ( + node.Add( "arr", (input.Arr |> (fun field -> - let arr = System.Text.Json.Nodes.JsonArray () + let arr = System.Text.Json.Nodes.JsonArray() for mem in field do - arr.Add (System.Text.Json.Nodes.JsonValue.Create mem) + arr.Add(System.Text.Json.Nodes.JsonValue.Create mem) - arr - )) + arr)) ) - node.Add ("byte", (input.Byte |> System.Text.Json.Nodes.JsonValue.Create>)) - node.Add ("sbyte", (input.Sbyte |> System.Text.Json.Nodes.JsonValue.Create>)) - node.Add ("i", (input.I |> System.Text.Json.Nodes.JsonValue.Create>)) - node.Add ("i32", (input.I32 |> System.Text.Json.Nodes.JsonValue.Create>)) - node.Add ("i64", (input.I64 |> System.Text.Json.Nodes.JsonValue.Create>)) - node.Add ("u", (input.U |> System.Text.Json.Nodes.JsonValue.Create>)) - node.Add ("u32", (input.U32 |> System.Text.Json.Nodes.JsonValue.Create>)) - node.Add ("u64", (input.U64 |> System.Text.Json.Nodes.JsonValue.Create>)) - node.Add ("f", (input.F |> System.Text.Json.Nodes.JsonValue.Create>)) - node.Add ("f32", (input.F32 |> System.Text.Json.Nodes.JsonValue.Create>)) - node.Add ("single", (input.Single |> System.Text.Json.Nodes.JsonValue.Create>)) - - node.Add ( + node.Add("byte", (input.Byte |> System.Text.Json.Nodes.JsonValue.Create>)) + node.Add("sbyte", (input.Sbyte |> System.Text.Json.Nodes.JsonValue.Create>)) + node.Add("i", (input.I |> System.Text.Json.Nodes.JsonValue.Create>)) + node.Add("i32", (input.I32 |> System.Text.Json.Nodes.JsonValue.Create>)) + node.Add("i64", (input.I64 |> System.Text.Json.Nodes.JsonValue.Create>)) + node.Add("u", (input.U |> System.Text.Json.Nodes.JsonValue.Create>)) + node.Add("u32", (input.U32 |> System.Text.Json.Nodes.JsonValue.Create>)) + node.Add("u64", (input.U64 |> System.Text.Json.Nodes.JsonValue.Create>)) + node.Add("f", (input.F |> System.Text.Json.Nodes.JsonValue.Create>)) + node.Add("f32", (input.F32 |> System.Text.Json.Nodes.JsonValue.Create>)) + node.Add("single", (input.Single |> System.Text.Json.Nodes.JsonValue.Create>)) + + node.Add( "intMeasureOption", (input.IntMeasureOption |> (fun field -> @@ -185,11 +173,10 @@ module JsonRecordTypeWithBothJsonSerializeExtension = | None -> null :> System.Text.Json.Nodes.JsonNode | Some field -> (System.Text.Json.Nodes.JsonValue.Create> field) - :> System.Text.Json.Nodes.JsonNode - )) + :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ( + node.Add( "intMeasureNullable", (input.IntMeasureNullable |> (fun field -> @@ -197,19 +184,18 @@ module JsonRecordTypeWithBothJsonSerializeExtension = System.Text.Json.Nodes.JsonValue.Create> field.Value :> System.Text.Json.Nodes.JsonNode else - null :> System.Text.Json.Nodes.JsonNode - )) + null :> System.Text.Json.Nodes.JsonNode)) ) - node.Add ("enum", (input.Enum |> SomeEnum.toJsonNode)) + node.Add("enum", (input.Enum |> SomeEnum.toJsonNode)) - node.Add ( + node.Add( "timestamp", (input.Timestamp |> (fun field -> field.ToString "o" |> System.Text.Json.Nodes.JsonValue.Create)) ) - node.Add ("unit", (input.Unit |> (fun value -> System.Text.Json.Nodes.JsonObject ()))) + node.Add("unit", (input.Unit |> (fun value -> System.Text.Json.Nodes.JsonObject()))) node :> _ namespace ConsumePlugin @@ -225,22 +211,22 @@ module FirstDuJsonSerializeExtension = type FirstDu with /// Serialize to a JSON node - static member toJsonNode (input : FirstDu) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: FirstDu) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() match input with - | FirstDu.EmptyCase -> node.Add ("type", System.Text.Json.Nodes.JsonValue.Create "emptyCase") + | FirstDu.EmptyCase -> node.Add("type", System.Text.Json.Nodes.JsonValue.Create "emptyCase") | FirstDu.Case1 arg0 -> - node.Add ("type", System.Text.Json.Nodes.JsonValue.Create "case1") - let dataNode = System.Text.Json.Nodes.JsonObject () - dataNode.Add ("data", System.Text.Json.Nodes.JsonValue.Create arg0) - node.Add ("data", dataNode) - | FirstDu.Case2 (arg0, arg1) -> - node.Add ("type", System.Text.Json.Nodes.JsonValue.Create "case2") - let dataNode = System.Text.Json.Nodes.JsonObject () - dataNode.Add ("record", JsonRecordTypeWithBoth.toJsonNode arg0) - dataNode.Add ("i", System.Text.Json.Nodes.JsonValue.Create arg1) - node.Add ("data", dataNode) + node.Add("type", System.Text.Json.Nodes.JsonValue.Create "case1") + let dataNode = System.Text.Json.Nodes.JsonObject() + dataNode.Add("data", System.Text.Json.Nodes.JsonValue.Create arg0) + node.Add("data", dataNode) + | FirstDu.Case2(arg0, arg1) -> + node.Add("type", System.Text.Json.Nodes.JsonValue.Create "case2") + let dataNode = System.Text.Json.Nodes.JsonObject() + dataNode.Add("record", JsonRecordTypeWithBoth.toJsonNode arg0) + dataNode.Add("i", System.Text.Json.Nodes.JsonValue.Create arg1) + node.Add("data", dataNode) node :> _ namespace ConsumePlugin @@ -256,12 +242,12 @@ module HeaderAndValueJsonSerializeExtension = type HeaderAndValue with /// Serialize to a JSON node - static member toJsonNode (input : HeaderAndValue) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: HeaderAndValue) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - node.Add ("header", (input.Header |> System.Text.Json.Nodes.JsonValue.Create)) - node.Add ("value", (input.Value |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("header", (input.Header |> System.Text.Json.Nodes.JsonValue.Create)) + node.Add("value", (input.Value |> System.Text.Json.Nodes.JsonValue.Create)) node :> _ namespace ConsumePlugin @@ -277,18 +263,17 @@ module FooJsonSerializeExtension = type Foo with /// Serialize to a JSON node - static member toJsonNode (input : Foo) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: Foo) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> HeaderAndValue.toJsonNode field - )) + | Some field -> HeaderAndValue.toJsonNode field)) ) node :> _ @@ -305,22 +290,21 @@ module CollectRemainingJsonSerializeExtension = type CollectRemaining with /// Serialize to a JSON node - static member toJsonNode (input : CollectRemaining) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: CollectRemaining) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - node.Add ( + node.Add( "message", (input.Message |> (fun field -> match field with | None -> null :> System.Text.Json.Nodes.JsonNode - | Some field -> HeaderAndValue.toJsonNode field - )) + | Some field -> HeaderAndValue.toJsonNode field)) ) - for KeyValue (key, value) in input.Rest do - node.Add (key, id value) + for KeyValue(key, value) in input.Rest do + node.Add(key, id value) node :> _ namespace ConsumePlugin @@ -336,17 +320,18 @@ module OuterCollectRemainingJsonSerializeExtension = type OuterCollectRemaining with /// Serialize to a JSON node - static member toJsonNode (input : OuterCollectRemaining) : System.Text.Json.Nodes.JsonNode = - let node = System.Text.Json.Nodes.JsonObject () + static member toJsonNode(input: OuterCollectRemaining) : System.Text.Json.Nodes.JsonNode = + let node = System.Text.Json.Nodes.JsonObject() do - for KeyValue (key, value) in input.Others do - node.Add (key, System.Text.Json.Nodes.JsonValue.Create value) + for KeyValue(key, value) in input.Others do + node.Add(key, System.Text.Json.Nodes.JsonValue.Create value) - node.Add ("remaining", (input.Remaining |> CollectRemaining.toJsonNode)) + node.Add("remaining", (input.Remaining |> CollectRemaining.toJsonNode)) node :> _ +// Source generated by Whippet. Changes will be overwritten on next build. namespace ConsumePlugin /// Module containing JSON parsing extension members for the InnerTypeWithBoth type @@ -356,22 +341,21 @@ module InnerTypeWithBothJsonParseExtension = type InnerTypeWithBoth with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : InnerTypeWithBoth = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : InnerTypeWithBoth = let arg_4 = (match node.["concreteDict"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("concreteDict") ) ) | v -> v) - .AsObject () + .AsObject() |> Seq.map (fun kvp -> let key = (kvp.Key) let value = InnerTypeWithBoth.jsonParse (kvp.Value) - key, value - ) + key, value) |> Seq.map System.Collections.Generic.KeyValuePair |> System.Collections.Generic.Dictionary @@ -379,78 +363,73 @@ module InnerTypeWithBothJsonParseExtension = (match node.["dict"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("dict") ) ) | v -> v) - .AsObject () + .AsObject() |> Seq.map (fun kvp -> let key = (kvp.Key) |> System.Uri - let value = (kvp.Value).AsValue().GetValue () - key, value - ) + let value = (kvp.Value).AsValue().GetValue() + key, value) |> dict let arg_2 = (match node.["readOnlyDict"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("readOnlyDict") ) ) | v -> v) - .AsObject () + .AsObject() |> Seq.map (fun kvp -> let key = (kvp.Key) let value = - (kvp.Value).AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + (kvp.Value).AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq - key, value - ) + key, value) |> readOnlyDict let arg_1 = (match node.["map"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("map") ) ) | v -> v) - .AsObject () + .AsObject() |> Seq.map (fun kvp -> let key = (kvp.Key) - let value = (kvp.Value).AsValue().GetValue () |> System.Uri - key, value - ) + let value = (kvp.Value).AsValue().GetValue() |> System.Uri + key, value) |> Map.ofSeq let arg_0 = (match node.[("it's-a-me")] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" (("it's-a-me")) ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> System.Guid.Parse - { - Thing = arg_0 - Map = arg_1 - ReadOnlyDict = arg_2 - Dict = arg_3 - ConcreteDict = arg_4 - } + { Thing = arg_0 + Map = arg_1 + ReadOnlyDict = arg_2 + Dict = arg_3 + ConcreteDict = arg_4 } namespace ConsumePlugin /// Module containing JSON parsing extension members for the SomeEnum type @@ -460,11 +439,11 @@ module SomeEnumJsonParseExtension = type SomeEnum with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : SomeEnum = - match node.GetValueKind () with - | System.Text.Json.JsonValueKind.Number -> node.AsValue().GetValue () |> enum + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : SomeEnum = + match node.GetValueKind() with + | System.Text.Json.JsonValueKind.Number -> node.AsValue().GetValue() |> enum | System.Text.Json.JsonValueKind.String -> - match node.AsValue().GetValue().ToLowerInvariant () with + match node.AsValue().GetValue().ToLowerInvariant() with | "blah" -> SomeEnum.Blah | "thing" -> SomeEnum.Thing | v -> failwith ("Unrecognised value for enum: %i" + v) @@ -478,20 +457,20 @@ module JsonRecordTypeWithBothJsonParseExtension = type JsonRecordTypeWithBoth with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : JsonRecordTypeWithBoth = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : JsonRecordTypeWithBoth = let arg_21 = () let arg_20 = (match node.["timestamp"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("timestamp") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> System.DateTimeOffset.Parse let arg_19 = @@ -499,7 +478,7 @@ module JsonRecordTypeWithBothJsonParseExtension = match node.["enum"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("enum") ) ) @@ -508,9 +487,9 @@ module JsonRecordTypeWithBothJsonParseExtension = let arg_18 = match node.["intMeasureNullable"] with - | null -> System.Nullable () + | null -> System.Nullable() | v -> - v.AsValue().GetValue () + v.AsValue().GetValue() |> LanguagePrimitives.Int32WithMeasure |> System.Nullable @@ -518,7 +497,7 @@ module JsonRecordTypeWithBothJsonParseExtension = match node.["intMeasureOption"] with | null -> None | v -> - v.AsValue().GetValue () + v.AsValue().GetValue() |> LanguagePrimitives.Int32WithMeasure |> Some @@ -526,169 +505,169 @@ module JsonRecordTypeWithBothJsonParseExtension = (match node.["single"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("single") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> LanguagePrimitives.Float32WithMeasure let arg_15 = (match node.["f32"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("f32") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> LanguagePrimitives.Float32WithMeasure let arg_14 = (match node.["f"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("f") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> LanguagePrimitives.FloatWithMeasure let arg_13 = (match node.["u64"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("u64") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> LanguagePrimitives.UInt64WithMeasure let arg_12 = (match node.["u32"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("u32") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> LanguagePrimitives.UInt32WithMeasure let arg_11 = (match node.["u"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("u") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> LanguagePrimitives.UInt32WithMeasure let arg_10 = (match node.["i64"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("i64") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> LanguagePrimitives.Int64WithMeasure let arg_9 = (match node.["i32"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("i32") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> LanguagePrimitives.Int32WithMeasure let arg_8 = (match node.["i"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("i") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> LanguagePrimitives.Int32WithMeasure let arg_7 = (match node.["sbyte"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("sbyte") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> LanguagePrimitives.SByteWithMeasure let arg_6 = (match node.["byte"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("byte") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() |> LanguagePrimitives.ByteWithMeasure let arg_5 = (match node.["arr"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("arr") ) ) | v -> v) - .AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + .AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> Array.ofSeq let arg_4 = (match node.["e"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("e") ) ) | v -> v) - .AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + .AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> Array.ofSeq let arg_3 = @@ -696,7 +675,7 @@ module JsonRecordTypeWithBothJsonParseExtension = match node.["d"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("d") ) ) @@ -707,63 +686,61 @@ module JsonRecordTypeWithBothJsonParseExtension = (match node.["c"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("c") ) ) | v -> v) - .AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + .AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq let arg_1 = (match node.["b"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("b") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = (match node.["a"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("a") ) ) | v -> v) .AsValue() - .GetValue () - - { - A = arg_0 - B = arg_1 - C = arg_2 - D = arg_3 - E = arg_4 - Arr = arg_5 - Byte = arg_6 - Sbyte = arg_7 - I = arg_8 - I32 = arg_9 - I64 = arg_10 - U = arg_11 - U32 = arg_12 - U64 = arg_13 - F = arg_14 - F32 = arg_15 - Single = arg_16 - IntMeasureOption = arg_17 - IntMeasureNullable = arg_18 - Enum = arg_19 - Timestamp = arg_20 - Unit = arg_21 - } + .GetValue() + + { A = arg_0 + B = arg_1 + C = arg_2 + D = arg_3 + E = arg_4 + Arr = arg_5 + Byte = arg_6 + Sbyte = arg_7 + I = arg_8 + I32 = arg_9 + I64 = arg_10 + U = arg_11 + U32 = arg_12 + U64 = arg_13 + F = arg_14 + F32 = arg_15 + Single = arg_16 + IntMeasureOption = arg_17 + IntMeasureNullable = arg_18 + Enum = arg_19 + Timestamp = arg_20 + Unit = arg_21 } namespace ConsumePlugin /// Module containing JSON parsing extension members for the FirstDu type @@ -773,17 +750,17 @@ module FirstDuJsonParseExtension = type FirstDu with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : FirstDu = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : FirstDu = let ty = (match node.["type"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("type") ) ) | v -> v) - |> (fun v -> v.GetValue ()) + |> (fun v -> v.GetValue()) match ty with | "emptyCase" -> FirstDu.EmptyCase @@ -792,41 +769,41 @@ module FirstDuJsonParseExtension = (match node.["data"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("data") ) ) | v -> v) - FirstDu.Case1 ( + FirstDu.Case1( (match node.["data"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("data") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() ) | "case2" -> let node = (match node.["data"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("data") ) ) | v -> v) - FirstDu.Case2 ( + FirstDu.Case2( JsonRecordTypeWithBoth.jsonParse ( match node.["record"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("record") ) ) @@ -835,13 +812,13 @@ module FirstDuJsonParseExtension = (match node.["i"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("i") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() ) | v -> failwith ("Unrecognised 'type' field value: " + v) namespace ConsumePlugin @@ -853,35 +830,32 @@ module HeaderAndValueJsonParseExtension = type HeaderAndValue with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : HeaderAndValue = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : HeaderAndValue = let arg_1 = (match node.["value"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("value") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = (match node.["header"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("header") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() - { - Header = arg_0 - Value = arg_1 - } + { Header = arg_0; Value = arg_1 } namespace ConsumePlugin /// Module containing JSON parsing extension members for the Foo type @@ -891,15 +865,13 @@ module FooJsonParseExtension = type Foo with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : Foo = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : Foo = let arg_0 = match node.["message"] with | null -> None | v -> HeaderAndValue.jsonParse v |> Some - { - Message = arg_0 - } + { Message = arg_0 } namespace ConsumePlugin /// Module containing JSON parsing extension members for the CollectRemaining type @@ -909,15 +881,15 @@ module CollectRemainingJsonParseExtension = type CollectRemaining with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : CollectRemaining = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : CollectRemaining = let arg_1 = let result = - System.Collections.Generic.Dictionary () + System.Collections.Generic.Dictionary() - let node = node.AsObject () + let node = node.AsObject() - for KeyValue (key, value) in node do - if key = "message" then () else result.Add (key, node.[key]) + for KeyValue(key, value) in node do + if key = "message" then () else result.Add(key, node.[key]) result @@ -926,10 +898,7 @@ module CollectRemainingJsonParseExtension = | null -> None | v -> HeaderAndValue.jsonParse v |> Some - { - Message = arg_0 - Rest = arg_1 - } + { Message = arg_0; Rest = arg_1 } namespace ConsumePlugin /// Module containing JSON parsing extension members for the OuterCollectRemaining type @@ -939,13 +908,13 @@ module OuterCollectRemainingJsonParseExtension = type OuterCollectRemaining with /// Parse from a JSON node. - static member jsonParse (node : System.Text.Json.Nodes.JsonNode) : OuterCollectRemaining = + static member jsonParse(node: System.Text.Json.Nodes.JsonNode) : OuterCollectRemaining = let arg_1 = CollectRemaining.jsonParse ( match node.["remaining"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("remaining") ) ) @@ -953,30 +922,29 @@ module OuterCollectRemainingJsonParseExtension = ) let arg_0 = - let result = System.Collections.Generic.Dictionary () - let node = node.AsObject () + let result = System.Collections.Generic.Dictionary() + let node = node.AsObject() - for KeyValue (key, value) in node do + for KeyValue(key, value) in node do if key = "remaining" then () else - result.Add ( - key, - (match node.[key] with - | null -> - raise ( - System.Collections.Generic.KeyNotFoundException ( - sprintf "Required key '%s' not found on JSON object" (key) + result + .Add( + key, + (match node.[key] with + | null -> + raise ( + System.Collections.Generic.KeyNotFoundException( + sprintf "Required key '%s' not found on JSON object" (key) + ) ) - ) - | v -> v) - .AsValue() - .GetValue () - ) + | v -> v) + .AsValue() + .GetValue() + ) result - { - Others = arg_0 - Remaining = arg_1 - } + { Others = arg_0; Remaining = arg_1 } + diff --git a/ConsumePlugin/GeneratedSwaggerGitea.fs b/ConsumePlugin/GeneratedSwaggerGitea.fs index 7937cd6..c220f74 100644 --- a/ConsumePlugin/GeneratedSwaggerGitea.fs +++ b/ConsumePlugin/GeneratedSwaggerGitea.fs @@ -1,6431 +1,6085 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ - - - - - - +// Source generated by Whippet. Changes will be overwritten on next build. namespace Gitea open WoofWare.Myriad.Plugins /// APIError is an api error with a message -[] +[] type APIError = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Message : string option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Message: string option + [] + Url: string option } /// AccessToken represents an API access token. -[] +[] type AccessToken = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Id : int option - [] - Name : string option - [] - Scopes : string list option - [] - Sha1 : string option - [] - TokenLastEight : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Id: int option + [] + Name: string option + [] + Scopes: string list option + [] + Sha1: string option + [] + TokenLastEight: string option } /// ActivityPub type -[] +[] type ActivityPub = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Context : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Context: string option } /// AddCollaboratorOption options when adding a user as a collaborator of a repository -[] +[] type AddCollaboratorOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Permission : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Permission: string option } /// AddTimeOption options for adding time to an issue -[] +[] type AddTimeOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Created : string option - [] - Time : int - [] - UserName : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Created: string option + [] + Time: int + [] + UserName: string option } /// AnnotatedTagObject contains meta information of the tag object -[] +[] type AnnotatedTagObject = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Sha : string option - [] - Type : string option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Sha: string option + [] + Type: string option + [] + Url: string option } /// Attachment a generic attachment -[] +[] type Attachment = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - BrowserDownloadUrl : string option - [] - CreatedAt : string option - [] - DownloadCount : int option - [] - Id : int option - [] - Name : string option - [] - Size : int option - [] - Uuid : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + BrowserDownloadUrl: string option + [] + CreatedAt: string option + [] + DownloadCount: int option + [] + Id: int option + [] + Name: string option + [] + Size: int option + [] + Uuid: string option } /// BranchProtection represents a branch protection for a repository -[] +[] type BranchProtection = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - ApprovalsWhitelistTeams : string list option - [] - ApprovalsWhitelistUsername : string list option - [] - BlockOnOfficialReviewRequests : bool option - [] - BlockOnOutdatedBranch : bool option - [] - BlockOnRejectedReviews : bool option - [] - BranchName : string option - [] - CreatedAt : string option - [] - DismissStaleApprovals : bool option - [] - EnableApprovalsWhitelist : bool option - [] - EnableMergeWhitelist : bool option - [] - EnablePush : bool option - [] - EnablePushWhitelist : bool option - [] - EnableStatusCheck : bool option - [] - MergeWhitelistTeams : string list option - [] - MergeWhitelistUsernames : string list option - [] - ProtectedFilePatterns : string option - [] - PushWhitelistDeployKeys : bool option - [] - PushWhitelistTeams : string list option - [] - PushWhitelistUsernames : string list option - [] - RequireSignedCommits : bool option - [] - RequiredApprovals : int option - [] - RuleName : string option - [] - StatusCheckContexts : string list option - [] - UnprotectedFilePatterns : string option - [] - UpdatedAt : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + ApprovalsWhitelistTeams: string list option + [] + ApprovalsWhitelistUsername: string list option + [] + BlockOnOfficialReviewRequests: bool option + [] + BlockOnOutdatedBranch: bool option + [] + BlockOnRejectedReviews: bool option + [] + BranchName: string option + [] + CreatedAt: string option + [] + DismissStaleApprovals: bool option + [] + EnableApprovalsWhitelist: bool option + [] + EnableMergeWhitelist: bool option + [] + EnablePush: bool option + [] + EnablePushWhitelist: bool option + [] + EnableStatusCheck: bool option + [] + MergeWhitelistTeams: string list option + [] + MergeWhitelistUsernames: string list option + [] + ProtectedFilePatterns: string option + [] + PushWhitelistDeployKeys: bool option + [] + PushWhitelistTeams: string list option + [] + PushWhitelistUsernames: string list option + [] + RequireSignedCommits: bool option + [] + RequiredApprovals: int option + [] + RuleName: string option + [] + StatusCheckContexts: string list option + [] + UnprotectedFilePatterns: string option + [] + UpdatedAt: string option } /// ChangedFile store information about files affected by the pull request -[] +[] type ChangedFile = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Additions : int option - [] - Changes : int option - [] - ContentsUrl : string option - [] - Deletions : int option - [] - Filename : string option - [] - HtmlUrl : string option - [] - PreviousFilename : string option - [] - RawUrl : string option - [] - Status : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Additions: int option + [] + Changes: int option + [] + ContentsUrl: string option + [] + Deletions: int option + [] + Filename: string option + [] + HtmlUrl: string option + [] + PreviousFilename: string option + [] + RawUrl: string option + [] + Status: string option } /// CommitAffectedFiles store information about files affected by the commit -[] +[] type CommitAffectedFiles = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Filename : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Filename: string option } /// CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE -[] +[] type CommitDateOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Author : string option - [] - Committer : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Author: string option + [] + Committer: string option } /// CommitMeta contains meta information of a commit in terms of API. -[] +[] type CommitMeta = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Created : string option - [] - Sha : string option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Created: string option + [] + Sha: string option + [] + Url: string option } /// CommitStats is statistics for a RepoCommit -[] +[] type CommitStats = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Additions : int option - [] - Deletions : int option - [] - Total : int option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Additions: int option + [] + Deletions: int option + [] + Total: int option } /// CommitUser contains information of a user in the context of a commit. -[] +[] type CommitUser = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Date : string option - [] - Email : string option - [] - Name : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Date: string option + [] + Email: string option + [] + Name: string option } /// CreateAccessTokenOption options when create access token -[] +[] type CreateAccessTokenOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Name : string - [] - Scopes : string list option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Name: string + [] + Scopes: string list option } /// CreateBranchProtectionOption options for creating a branch protection -[] +[] type CreateBranchProtectionOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - ApprovalsWhitelistTeams : string list option - [] - ApprovalsWhitelistUsername : string list option - [] - BlockOnOfficialReviewRequests : bool option - [] - BlockOnOutdatedBranch : bool option - [] - BlockOnRejectedReviews : bool option - [] - BranchName : string option - [] - DismissStaleApprovals : bool option - [] - EnableApprovalsWhitelist : bool option - [] - EnableMergeWhitelist : bool option - [] - EnablePush : bool option - [] - EnablePushWhitelist : bool option - [] - EnableStatusCheck : bool option - [] - MergeWhitelistTeams : string list option - [] - MergeWhitelistUsernames : string list option - [] - ProtectedFilePatterns : string option - [] - PushWhitelistDeployKeys : bool option - [] - PushWhitelistTeams : string list option - [] - PushWhitelistUsernames : string list option - [] - RequireSignedCommits : bool option - [] - RequiredApprovals : int option - [] - RuleName : string option - [] - StatusCheckContexts : string list option - [] - UnprotectedFilePatterns : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + ApprovalsWhitelistTeams: string list option + [] + ApprovalsWhitelistUsername: string list option + [] + BlockOnOfficialReviewRequests: bool option + [] + BlockOnOutdatedBranch: bool option + [] + BlockOnRejectedReviews: bool option + [] + BranchName: string option + [] + DismissStaleApprovals: bool option + [] + EnableApprovalsWhitelist: bool option + [] + EnableMergeWhitelist: bool option + [] + EnablePush: bool option + [] + EnablePushWhitelist: bool option + [] + EnableStatusCheck: bool option + [] + MergeWhitelistTeams: string list option + [] + MergeWhitelistUsernames: string list option + [] + ProtectedFilePatterns: string option + [] + PushWhitelistDeployKeys: bool option + [] + PushWhitelistTeams: string list option + [] + PushWhitelistUsernames: string list option + [] + RequireSignedCommits: bool option + [] + RequiredApprovals: int option + [] + RuleName: string option + [] + StatusCheckContexts: string list option + [] + UnprotectedFilePatterns: string option } /// CreateBranchRepoOption options when creating a branch in a repository -[] +[] type CreateBranchRepoOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - NewBranchName : string - [] - OldBranchName : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + NewBranchName: string + [] + OldBranchName: string option } /// CreateEmailOption options when creating email addresses -[] +[] type CreateEmailOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Emails : string list option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Emails: string list option } /// CreateForkOption options for creating a fork -[] +[] type CreateForkOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Name : string option - [] - Organization : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Name: string option + [] + Organization: string option } /// CreateGPGKeyOption options create user GPG key -[] +[] type CreateGPGKeyOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - ArmoredPublicKey : string - [] - ArmoredSignature : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + ArmoredPublicKey: string + [] + ArmoredSignature: string option } /// CreateHookOptionConfig has all config options in it /// required are "content_type" and "url" Required -[] +[] type CreateHookOptionConfig = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary } /// CreateIssueCommentOption options for creating a comment on an issue -[] +[] type CreateIssueCommentOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Body : string - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Body: string } /// CreateIssueOption options to create one issue -[] +[] type CreateIssueOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Assignee : string option - [] - Assignees : string list option - [] - Body : string option - [] - Closed : bool option - [] - DueDate : string option - [] - Labels : int list option - [] - Milestone : int option - [] - Ref : string option - [] - Title : string - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Assignee: string option + [] + Assignees: string list option + [] + Body: string option + [] + Closed: bool option + [] + DueDate: string option + [] + Labels: int list option + [] + Milestone: int option + [] + Ref: string option + [] + Title: string } /// CreateKeyOption options when creating a key -[] +[] type CreateKeyOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Key : string - [] - ReadOnly : bool option - [] - Title : string - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Key: string + [] + ReadOnly: bool option + [] + Title: string } /// CreateLabelOption options for creating a label -[] +[] type CreateLabelOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Color : string - [] - Description : string option - [] - Exclusive : bool option - [] - Name : string - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Color: string + [] + Description: string option + [] + Exclusive: bool option + [] + Name: string } /// CreateMilestoneOption options for creating a milestone -[] +[] type CreateMilestoneOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Description : string option - [] - DueOn : string option - [] - State : string option - [] - Title : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Description: string option + [] + DueOn: string option + [] + State: string option + [] + Title: string option } /// CreateOAuth2ApplicationOptions holds options to create an oauth2 application -[] +[] type CreateOAuth2ApplicationOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - ConfidentialClient : bool option - [] - Name : string option - [] - RedirectUris : string list option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + ConfidentialClient: bool option + [] + Name: string option + [] + RedirectUris: string list option } /// CreateOrgOption options for creating an organization -[] +[] type CreateOrgOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Description : string option - [] - FullName : string option - [] - Location : string option - [] - RepoAdminChangeTeamAccess : bool option - [] - Username : string - [] - Visibility : string option - [] - Website : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Description: string option + [] + FullName: string option + [] + Location: string option + [] + RepoAdminChangeTeamAccess: bool option + [] + Username: string + [] + Visibility: string option + [] + Website: string option } /// CreatePullRequestOption options when creating a pull request -[] +[] type CreatePullRequestOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Assignee : string option - [] - Assignees : string list option - [] - Base : string option - [] - Body : string option - [] - DueDate : string option - [] - Head : string option - [] - Labels : int list option - [] - Milestone : int option - [] - Title : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Assignee: string option + [] + Assignees: string list option + [] + Base: string option + [] + Body: string option + [] + DueDate: string option + [] + Head: string option + [] + Labels: int list option + [] + Milestone: int option + [] + Title: string option } /// CreatePullReviewComment represent a review comment for creation api -[] +[] type CreatePullReviewComment = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Body : string option - [] - NewPosition : int option - [] - OldPosition : int option - [] - Path : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Body: string option + [] + NewPosition: int option + [] + OldPosition: int option + [] + Path: string option } /// CreatePushMirrorOption represents need information to create a push mirror of a repository. -[] +[] type CreatePushMirrorOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Interval : string option - [] - RemoteAddress : string option - [] - RemotePassword : string option - [] - RemoteUsername : string option - [] - SyncOnCommit : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Interval: string option + [] + RemoteAddress: string option + [] + RemotePassword: string option + [] + RemoteUsername: string option + [] + SyncOnCommit: bool option } /// CreateReleaseOption options when creating a release -[] +[] type CreateReleaseOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Body : string option - [] - Draft : bool option - [] - Name : string option - [] - Prerelease : bool option - [] - TagName : string - [] - TargetCommitish : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Body: string option + [] + Draft: bool option + [] + Name: string option + [] + Prerelease: bool option + [] + TagName: string + [] + TargetCommitish: string option } /// CreateRepoOption options when creating repository -[] +[] type CreateRepoOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - AutoInit : bool option - [] - DefaultBranch : string option - [] - Description : string option - [] - Gitignores : string option - [] - IssueLabels : string option - [] - License : string option - [] - Name : string - [] - Private : bool option - [] - Readme : string option - [] - Template : bool option - [] - TrustModel : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + AutoInit: bool option + [] + DefaultBranch: string option + [] + Description: string option + [] + Gitignores: string option + [] + IssueLabels: string option + [] + License: string option + [] + Name: string + [] + Private: bool option + [] + Readme: string option + [] + Template: bool option + [] + TrustModel: string option } /// CreateStatusOption holds the information needed to create a new CommitStatus for a Commit -[] +[] type CreateStatusOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Context : string option - [] - Description : string option - [] - State : string option - [] - TargetUrl : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Context: string option + [] + Description: string option + [] + State: string option + [] + TargetUrl: string option } /// CreateTagOption options when creating a tag -[] +[] type CreateTagOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Message : string option - [] - TagName : string - [] - Target : string option - } - -[] + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Message: string option + [] + TagName: string + [] + Target: string option } + +[] type Type1 = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary } /// CreateTeamOption options for creating a team -[] +[] type CreateTeamOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - CanCreateOrgRepo : bool option - [] - Description : string option - [] - IncludesAllRepositories : bool option - [] - Name : string - [] - Permission : string option - [] - Units : string list option - [] - UnitsMap : Type1 option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + CanCreateOrgRepo: bool option + [] + Description: string option + [] + IncludesAllRepositories: bool option + [] + Name: string + [] + Permission: string option + [] + Units: string list option + [] + UnitsMap: Type1 option } /// CreateUserOption create user options -[] +[] type CreateUserOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - CreatedAt : string option - [] - Email : string - [] - FullName : string option - [] - LoginName : string option - [] - MustChangePassword : bool option - [] - Password : string - [] - Restricted : bool option - [] - SendNotify : bool option - [] - SourceId : int option - [] - Username : string - [] - Visibility : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + CreatedAt: string option + [] + Email: string + [] + FullName: string option + [] + LoginName: string option + [] + MustChangePassword: bool option + [] + Password: string + [] + Restricted: bool option + [] + SendNotify: bool option + [] + SourceId: int option + [] + Username: string + [] + Visibility: string option } /// CreateWikiPageOptions form for creating wiki -[] +[] type CreateWikiPageOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - ContentBase64 : string option - [] - Message : string option - [] - Title : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + ContentBase64: string option + [] + Message: string option + [] + Title: string option } /// Cron represents a Cron task -[] +[] type Cron = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - ExecTimes : int option - [] - Name : string option - [] - Next : string option - [] - Prev : string option - [] - Schedule : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + ExecTimes: int option + [] + Name: string option + [] + Next: string option + [] + Prev: string option + [] + Schedule: string option } /// DeleteEmailOption options when deleting email addresses -[] +[] type DeleteEmailOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Emails : string list option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Emails: string list option } /// DismissPullReviewOptions are options to dismiss a pull review -[] +[] type DismissPullReviewOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Message : string option - [] - Priors : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Message: string option + [] + Priors: bool option } /// EditAttachmentOptions options for editing attachments -[] +[] type EditAttachmentOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Name : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Name: string option } /// EditBranchProtectionOption options for editing a branch protection -[] +[] type EditBranchProtectionOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - ApprovalsWhitelistTeams : string list option - [] - ApprovalsWhitelistUsername : string list option - [] - BlockOnOfficialReviewRequests : bool option - [] - BlockOnOutdatedBranch : bool option - [] - BlockOnRejectedReviews : bool option - [] - DismissStaleApprovals : bool option - [] - EnableApprovalsWhitelist : bool option - [] - EnableMergeWhitelist : bool option - [] - EnablePush : bool option - [] - EnablePushWhitelist : bool option - [] - EnableStatusCheck : bool option - [] - MergeWhitelistTeams : string list option - [] - MergeWhitelistUsernames : string list option - [] - ProtectedFilePatterns : string option - [] - PushWhitelistDeployKeys : bool option - [] - PushWhitelistTeams : string list option - [] - PushWhitelistUsernames : string list option - [] - RequireSignedCommits : bool option - [] - RequiredApprovals : int option - [] - StatusCheckContexts : string list option - [] - UnprotectedFilePatterns : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + ApprovalsWhitelistTeams: string list option + [] + ApprovalsWhitelistUsername: string list option + [] + BlockOnOfficialReviewRequests: bool option + [] + BlockOnOutdatedBranch: bool option + [] + BlockOnRejectedReviews: bool option + [] + DismissStaleApprovals: bool option + [] + EnableApprovalsWhitelist: bool option + [] + EnableMergeWhitelist: bool option + [] + EnablePush: bool option + [] + EnablePushWhitelist: bool option + [] + EnableStatusCheck: bool option + [] + MergeWhitelistTeams: string list option + [] + MergeWhitelistUsernames: string list option + [] + ProtectedFilePatterns: string option + [] + PushWhitelistDeployKeys: bool option + [] + PushWhitelistTeams: string list option + [] + PushWhitelistUsernames: string list option + [] + RequireSignedCommits: bool option + [] + RequiredApprovals: int option + [] + StatusCheckContexts: string list option + [] + UnprotectedFilePatterns: string option } /// EditDeadlineOption options for creating a deadline -[] +[] type EditDeadlineOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - DueDate : string - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + DueDate: string } /// EditGitHookOption options when modifying one Git hook -[] +[] type EditGitHookOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Content : string option - } - -[] + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Content: string option } + +[] type Type2 = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary } /// EditHookOption options when modify one hook -[] +[] type EditHookOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Active : bool option - [] - AuthorizationHeader : string option - [] - BranchFilter : string option - [] - Config : Type2 option - [] - Events : string list option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Active: bool option + [] + AuthorizationHeader: string option + [] + BranchFilter: string option + [] + Config: Type2 option + [] + Events: string list option } /// EditIssueCommentOption options for editing a comment -[] +[] type EditIssueCommentOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Body : string - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Body: string } /// EditIssueOption options for editing an issue -[] +[] type EditIssueOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Assignee : string option - [] - Assignees : string list option - [] - Body : string option - [] - DueDate : string option - [] - Milestone : int option - [] - Ref : string option - [] - State : string option - [] - Title : string option - [] - UnsetDueDate : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Assignee: string option + [] + Assignees: string list option + [] + Body: string option + [] + DueDate: string option + [] + Milestone: int option + [] + Ref: string option + [] + State: string option + [] + Title: string option + [] + UnsetDueDate: bool option } /// EditLabelOption options for editing a label -[] +[] type EditLabelOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Color : string option - [] - Description : string option - [] - Exclusive : bool option - [] - Name : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Color: string option + [] + Description: string option + [] + Exclusive: bool option + [] + Name: string option } /// EditMilestoneOption options for editing a milestone -[] +[] type EditMilestoneOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Description : string option - [] - DueOn : string option - [] - State : string option - [] - Title : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Description: string option + [] + DueOn: string option + [] + State: string option + [] + Title: string option } /// EditOrgOption options for editing an organization -[] +[] type EditOrgOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Description : string option - [] - FullName : string option - [] - Location : string option - [] - RepoAdminChangeTeamAccess : bool option - [] - Visibility : string option - [] - Website : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Description: string option + [] + FullName: string option + [] + Location: string option + [] + RepoAdminChangeTeamAccess: bool option + [] + Visibility: string option + [] + Website: string option } /// EditPullRequestOption options when modify pull request -[] +[] type EditPullRequestOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - AllowMaintainerEdit : bool option - [] - Assignee : string option - [] - Assignees : string list option - [] - Base : string option - [] - Body : string option - [] - DueDate : string option - [] - Labels : int list option - [] - Milestone : int option - [] - State : string option - [] - Title : string option - [] - UnsetDueDate : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + AllowMaintainerEdit: bool option + [] + Assignee: string option + [] + Assignees: string list option + [] + Base: string option + [] + Body: string option + [] + DueDate: string option + [] + Labels: int list option + [] + Milestone: int option + [] + State: string option + [] + Title: string option + [] + UnsetDueDate: bool option } /// EditReactionOption contain the reaction type -[] +[] type EditReactionOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Content : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Content: string option } /// EditReleaseOption options when editing a release -[] +[] type EditReleaseOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Body : string option - [] - Draft : bool option - [] - Name : string option - [] - Prerelease : bool option - [] - TagName : string option - [] - TargetCommitish : string option - } - -[] + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Body: string option + [] + Draft: bool option + [] + Name: string option + [] + Prerelease: bool option + [] + TagName: string option + [] + TargetCommitish: string option } + +[] type Type3 = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary } /// EditTeamOption options for editing a team -[] +[] type EditTeamOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - CanCreateOrgRepo : bool option - [] - Description : string option - [] - IncludesAllRepositories : bool option - [] - Name : string - [] - Permission : string option - [] - Units : string list option - [] - UnitsMap : Type3 option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + CanCreateOrgRepo: bool option + [] + Description: string option + [] + IncludesAllRepositories: bool option + [] + Name: string + [] + Permission: string option + [] + Units: string list option + [] + UnitsMap: Type3 option } /// EditUserOption edit user options -[] +[] type EditUserOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Active : bool option - [] - Admin : bool option - [] - AllowCreateOrganization : bool option - [] - AllowGitHook : bool option - [] - AllowImportLocal : bool option - [] - Description : string option - [] - Email : string option - [] - FullName : string option - [] - Location : string option - [] - LoginName : string - [] - MaxRepoCreation : int option - [] - MustChangePassword : bool option - [] - Password : string option - [] - ProhibitLogin : bool option - [] - Restricted : bool option - [] - SourceId : int - [] - Visibility : string option - [] - Website : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Active: bool option + [] + Admin: bool option + [] + AllowCreateOrganization: bool option + [] + AllowGitHook: bool option + [] + AllowImportLocal: bool option + [] + Description: string option + [] + Email: string option + [] + FullName: string option + [] + Location: string option + [] + LoginName: string + [] + MaxRepoCreation: int option + [] + MustChangePassword: bool option + [] + Password: string option + [] + ProhibitLogin: bool option + [] + Restricted: bool option + [] + SourceId: int + [] + Visibility: string option + [] + Website: string option } /// Email an email address belonging to a user -[] +[] type Email = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Email : string option - [] - Primary : bool option - [] - Verified : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Email: string option + [] + Primary: bool option + [] + Verified: bool option } /// ExternalTracker represents settings for external tracker -[] +[] type ExternalTracker = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - ExternalTrackerFormat : string option - [] - ExternalTrackerRegexpPattern : string option - [] - ExternalTrackerStyle : string option - [] - ExternalTrackerUrl : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + ExternalTrackerFormat: string option + [] + ExternalTrackerRegexpPattern: string option + [] + ExternalTrackerStyle: string option + [] + ExternalTrackerUrl: string option } /// ExternalWiki represents setting for external wiki -[] +[] type ExternalWiki = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - ExternalWikiUrl : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + ExternalWikiUrl: string option } /// FileCommitResponse contains information generated from a Git commit for a repo's file. -[] +[] type FileCommitResponse = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Author : CommitUser option - [] - Committer : CommitUser option - [] - Created : string option - [] - HtmlUrl : string option - [] - Message : string option - [] - Parents : CommitMeta list option - [] - Sha : string option - [] - Tree : CommitMeta option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Author: CommitUser option + [] + Committer: CommitUser option + [] + Created: string option + [] + HtmlUrl: string option + [] + Message: string option + [] + Parents: CommitMeta list option + [] + Sha: string option + [] + Tree: CommitMeta option + [] + Url: string option } /// FileLinksResponse contains the links for a repo's file -[] +[] type FileLinksResponse = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Git : string option - [] - Html : string option - [] - Self : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Git: string option + [] + Html: string option + [] + Self: string option } /// GPGKeyEmail an email attached to a GPGKey -[] +[] type GPGKeyEmail = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Email : string option - [] - Verified : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Email: string option + [] + Verified: bool option } /// GeneralAPISettings contains global api settings exposed by it -[] +[] type GeneralAPISettings = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - DefaultGitTreesPerPage : int option - [] - DefaultMaxBlobSize : int option - [] - DefaultPagingNum : int option - [] - MaxResponseItems : int option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + DefaultGitTreesPerPage: int option + [] + DefaultMaxBlobSize: int option + [] + DefaultPagingNum: int option + [] + MaxResponseItems: int option } /// GeneralAttachmentSettings contains global Attachment settings exposed by API -[] +[] type GeneralAttachmentSettings = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - AllowedTypes : string option - [] - Enabled : bool option - [] - MaxFiles : int option - [] - MaxSize : int option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + AllowedTypes: string option + [] + Enabled: bool option + [] + MaxFiles: int option + [] + MaxSize: int option } /// GeneralRepoSettings contains global repository settings exposed by API -[] +[] type GeneralRepoSettings = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - HttpGitDisabled : bool option - [] - LfsDisabled : bool option - [] - MigrationsDisabled : bool option - [] - MirrorsDisabled : bool option - [] - StarsDisabled : bool option - [] - TimeTrackingDisabled : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + HttpGitDisabled: bool option + [] + LfsDisabled: bool option + [] + MigrationsDisabled: bool option + [] + MirrorsDisabled: bool option + [] + StarsDisabled: bool option + [] + TimeTrackingDisabled: bool option } /// GeneralUISettings contains global ui settings exposed by API -[] +[] type GeneralUISettings = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - AllowedReactions : string list option - [] - CustomEmojis : string list option - [] - DefaultTheme : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + AllowedReactions: string list option + [] + CustomEmojis: string list option + [] + DefaultTheme: string option } /// GenerateRepoOption options when creating repository using a template -[] +[] type GenerateRepoOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Avatar : bool option - [] - DefaultBranch : string option - [] - Description : string option - [] - GitContent : bool option - [] - GitHooks : bool option - [] - Labels : bool option - [] - Name : string - [] - Owner : string - [] - Private : bool option - [] - Topics : bool option - [] - Webhooks : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Avatar: bool option + [] + DefaultBranch: string option + [] + Description: string option + [] + GitContent: bool option + [] + GitHooks: bool option + [] + Labels: bool option + [] + Name: string + [] + Owner: string + [] + Private: bool option + [] + Topics: bool option + [] + Webhooks: bool option } /// GitBlobResponse represents a git blob -[] +[] type GitBlobResponse = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Content : string option - [] - Encoding : string option - [] - Sha : string option - [] - Size : int option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Content: string option + [] + Encoding: string option + [] + Sha: string option + [] + Size: int option + [] + Url: string option } /// GitEntry represents a git tree -[] +[] type GitEntry = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Mode : string option - [] - Path : string option - [] - Sha : string option - [] - Size : int option - [] - Type : string option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Mode: string option + [] + Path: string option + [] + Sha: string option + [] + Size: int option + [] + Type: string option + [] + Url: string option } /// GitHook represents a Git repository hook -[] +[] type GitHook = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Content : string option - [] - IsActive : bool option - [] - Name : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Content: string option + [] + IsActive: bool option + [] + Name: string option } /// GitObject represents a Git object. -[] +[] type GitObject = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Sha : string option - [] - Type : string option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Sha: string option + [] + Type: string option + [] + Url: string option } /// GitTreeResponse returns a git tree -[] +[] type GitTreeResponse = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Page : int option - [] - Sha : string option - [] - TotalCount : int option - [] - Tree : GitEntry list option - [] - Truncated : bool option - [] - Url : string option - } - -[] + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Page: int option + [] + Sha: string option + [] + TotalCount: int option + [] + Tree: GitEntry list option + [] + Truncated: bool option + [] + Url: string option } + +[] type Type4 = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary } /// Hook a hook is a web hook when one repository changed -[] +[] type Hook = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Active : bool option - [] - AuthorizationHeader : string option - [] - Config : Type4 option - [] - CreatedAt : string option - [] - Events : string list option - [] - Id : int option - [] - Type : string option - [] - UpdatedAt : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Active: bool option + [] + AuthorizationHeader: string option + [] + Config: Type4 option + [] + CreatedAt: string option + [] + Events: string list option + [] + Id: int option + [] + Type: string option + [] + UpdatedAt: string option } /// Identity for a person's identity like an author or committer -[] +[] type Identity = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Email : string option - [] - Name : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Email: string option + [] + Name: string option } /// InternalTracker represents settings for internal tracker -[] +[] type InternalTracker = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - AllowOnlyContributorsToTrackTime : bool option - [] - EnableIssueDependencies : bool option - [] - EnableTimeTracker : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + AllowOnlyContributorsToTrackTime: bool option + [] + EnableIssueDependencies: bool option + [] + EnableTimeTracker: bool option } /// IssueDeadline represents an issue deadline -[] +[] type IssueDeadline = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - DueDate : string option - } - -[] + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + DueDate: string option } + +[] type Type5 = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary } -[] +[] type Type6 = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary } /// IssueLabelsOption a collection of labels -[] +[] type IssueLabelsOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Labels : int list option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Labels: int list option } /// Label a label to an issue or a pr -[] +[] type Label = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Color : string option - [] - Description : string option - [] - Exclusive : bool option - [] - Id : int option - [] - Name : string option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Color: string option + [] + Description: string option + [] + Exclusive: bool option + [] + Id: int option + [] + Name: string option + [] + Url: string option } /// MarkdownOption markdown options -[] +[] type MarkdownOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Context : string option - [] - Mode : string option - [] - Text : string option - [] - Wiki : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Context: string option + [] + Mode: string option + [] + Text: string option + [] + Wiki: bool option } /// MergePullRequestForm form for merging Pull Request -[] +[] type MergePullRequestOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Do : string - [] - MergeCommitID : string option - [] - MergeMessageField : string option - [] - MergeTitleField : string option - [] - DeleteBranchAfterMerge : bool option - [] - ForceMerge : bool option - [] - HeadCommitId : string option - [] - MergeWhenChecksSucceed : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Do: string + [] + MergeCommitID: string option + [] + MergeMessageField: string option + [] + MergeTitleField: string option + [] + DeleteBranchAfterMerge: bool option + [] + ForceMerge: bool option + [] + HeadCommitId: string option + [] + MergeWhenChecksSucceed: bool option } /// MigrateRepoOptions options for migrating repository's /// this is used to interact with api v1 -[] +[] type MigrateRepoOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - AuthPassword : string option - [] - AuthToken : string option - [] - AuthUsername : string option - [] - CloneAddr : string - [] - Description : string option - [] - Issues : bool option - [] - Labels : bool option - [] - Lfs : bool option - [] - LfsEndpoint : string option - [] - Milestones : bool option - [] - Mirror : bool option - [] - MirrorInterval : string option - [] - Private : bool option - [] - PullRequests : bool option - [] - Releases : bool option - [] - RepoName : string - [] - RepoOwner : string option - [] - Service : string option - [] - Uid : int option - [] - Wiki : bool option - } - -[] + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + AuthPassword: string option + [] + AuthToken: string option + [] + AuthUsername: string option + [] + CloneAddr: string + [] + Description: string option + [] + Issues: bool option + [] + Labels: bool option + [] + Lfs: bool option + [] + LfsEndpoint: string option + [] + Milestones: bool option + [] + Mirror: bool option + [] + MirrorInterval: string option + [] + Private: bool option + [] + PullRequests: bool option + [] + Releases: bool option + [] + RepoName: string + [] + RepoOwner: string option + [] + Service: string option + [] + Uid: int option + [] + Wiki: bool option } + +[] type Type7 = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary } /// NodeInfoServices contains the third party sites this server can connect to via their application API -[] +[] type NodeInfoServices = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Inbound : string list option - [] - Outbound : string list option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Inbound: string list option + [] + Outbound: string list option } /// NodeInfoSoftware contains Metadata about server software in use -[] +[] type NodeInfoSoftware = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Homepage : string option - [] - Name : string option - [] - Repository : string option - [] - Version : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Homepage: string option + [] + Name: string option + [] + Repository: string option + [] + Version: string option } /// NodeInfoUsageUsers contains statistics about the users of this server -[] +[] type NodeInfoUsageUsers = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - ActiveHalfyear : int option - [] - ActiveMonth : int option - [] - Total : int option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + ActiveHalfyear: int option + [] + ActiveMonth: int option + [] + Total: int option } /// NotificationCount number of unread notifications -[] +[] type NotificationCount = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - New : int option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + New: int option } /// OAuth2Application represents an OAuth2 application. -[] +[] type OAuth2Application = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - ClientId : string option - [] - ClientSecret : string option - [] - ConfidentialClient : bool option - [] - Created : string option - [] - Id : int option - [] - Name : string option - [] - RedirectUris : string list option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + ClientId: string option + [] + ClientSecret: string option + [] + ConfidentialClient: bool option + [] + Created: string option + [] + Id: int option + [] + Name: string option + [] + RedirectUris: string list option } /// Organization represents an organization -[] +[] type Organization = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - AvatarUrl : string option - [] - Description : string option - [] - FullName : string option - [] - Id : int option - [] - Location : string option - [] - Name : string option - [] - RepoAdminChangeTeamAccess : bool option - [] - Username : string option - [] - Visibility : string option - [] - Website : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + AvatarUrl: string option + [] + Description: string option + [] + FullName: string option + [] + Id: int option + [] + Location: string option + [] + Name: string option + [] + RepoAdminChangeTeamAccess: bool option + [] + Username: string option + [] + Visibility: string option + [] + Website: string option } /// OrganizationPermissions list different users permissions on an organization -[] +[] type OrganizationPermissions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - CanCreateRepository : bool option - [] - CanRead : bool option - [] - CanWrite : bool option - [] - IsAdmin : bool option - [] - IsOwner : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + CanCreateRepository: bool option + [] + CanRead: bool option + [] + CanWrite: bool option + [] + IsAdmin: bool option + [] + IsOwner: bool option } /// PackageFile represents a package file -[] +[] type PackageFile = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Size : int option - [] - Id : int option - [] - Md5 : string option - [] - Name : string option - [] - Sha1 : string option - [] - Sha256 : string option - [] - Sha512 : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Size: int option + [] + Id: int option + [] + Md5: string option + [] + Name: string option + [] + Sha1: string option + [] + Sha256: string option + [] + Sha512: string option } /// PayloadUser represents the author or committer of a commit -[] +[] type PayloadUser = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Email : string option - [] - Name : string option - [] - Username : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Email: string option + [] + Name: string option + [] + Username: string option } /// Permission represents a set of permissions -[] +[] type Permission = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Admin : bool option - [] - Pull : bool option - [] - Push : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Admin: bool option + [] + Pull: bool option + [] + Push: bool option } /// PullRequestMeta PR info if an issue is a PR -[] +[] type PullRequestMeta = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Merged : bool option - [] - MergedAt : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Merged: bool option + [] + MergedAt: string option } /// PullReviewRequestOptions are options to add or remove pull review requests -[] +[] type PullReviewRequestOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Reviewers : string list option - [] - TeamReviewers : string list option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Reviewers: string list option + [] + TeamReviewers: string list option } /// PushMirror represents information of a push mirror -[] +[] type PushMirror = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Created : string option - [] - Interval : string option - [] - LastError : string option - [] - LastUpdate : string option - [] - RemoteAddress : string option - [] - RemoteName : string option - [] - RepoName : string option - [] - SyncOnCommit : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Created: string option + [] + Interval: string option + [] + LastError: string option + [] + LastUpdate: string option + [] + RemoteAddress: string option + [] + RemoteName: string option + [] + RepoName: string option + [] + SyncOnCommit: bool option } /// Reference represents a Git reference. -[] +[] type Reference = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Object : GitObject option - [] - Ref : string option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Object: GitObject option + [] + Ref: string option + [] + Url: string option } /// RepoTopicOptions a collection of repo topic names -[] +[] type RepoTopicOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Topics : string list option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Topics: string list option } /// RepositoryMeta basic repository information -[] +[] type RepositoryMeta = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - FullName : string option - [] - Id : int option - [] - Name : string option - [] - Owner : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + FullName: string option + [] + Id: int option + [] + Name: string option + [] + Owner: string option } /// ServerVersion wraps the version of the server -[] +[] type ServerVersion = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Version : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Version: string option } /// StopWatch represent a running stopwatch -[] +[] type StopWatch = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Created : string option - [] - Duration : string option - [] - IssueIndex : int option - [] - IssueTitle : string option - [] - RepoName : string option - [] - RepoOwnerName : string option - [] - Seconds : int option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Created: string option + [] + Duration: string option + [] + IssueIndex: int option + [] + IssueTitle: string option + [] + RepoName: string option + [] + RepoOwnerName: string option + [] + Seconds: int option } /// SubmitPullReviewOptions are options to submit a pending pull review -[] +[] type SubmitPullReviewOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Body : string option - [] - Event : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Body: string option + [] + Event: string option } /// Tag represents a repository tag -[] +[] type Tag = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Commit : CommitMeta option - [] - Id : string option - [] - Message : string option - [] - Name : string option - [] - TarballUrl : string option - [] - ZipballUrl : string option - } - -[] + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Commit: CommitMeta option + [] + Id: string option + [] + Message: string option + [] + Name: string option + [] + TarballUrl: string option + [] + ZipballUrl: string option } + +[] type Type8 = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary } /// Team represents a team in an organization -[] +[] type Team = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - CanCreateOrgRepo : bool option - [] - Description : string option - [] - Id : int option - [] - IncludesAllRepositories : bool option - [] - Name : string option - [] - Organization : Organization option - [] - Permission : string option - [] - Units : string list option - [] - UnitsMap : Type8 option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + CanCreateOrgRepo: bool option + [] + Description: string option + [] + Id: int option + [] + IncludesAllRepositories: bool option + [] + Name: string option + [] + Organization: Organization option + [] + Permission: string option + [] + Units: string list option + [] + UnitsMap: Type8 option } /// TopicName a list of repo topic names -[] +[] type TopicName = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Topics : string list option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Topics: string list option } /// TopicResponse for returning topics -[] +[] type TopicResponse = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Created : string option - [] - Id : int option - [] - RepoCount : int option - [] - TopicName : string option - [] - Updated : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Created: string option + [] + Id: int option + [] + RepoCount: int option + [] + TopicName: string option + [] + Updated: string option } /// TransferRepoOption options when transfer a repository's ownership -[] +[] type TransferRepoOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - NewOwner : string - [] - TeamIds : int list option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + NewOwner: string + [] + TeamIds: int list option } /// UpdateFileOptions options for updating files /// Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used) -[] +[] type UpdateFileOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Author : Identity option - [] - Branch : string option - [] - Committer : Identity option - [] - Content : string - [] - Dates : CommitDateOptions option - [] - FromPath : string option - [] - Message : string option - [] - NewBranch : string option - [] - Sha : string - [] - Signoff : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Author: Identity option + [] + Branch: string option + [] + Committer: Identity option + [] + Content: string + [] + Dates: CommitDateOptions option + [] + FromPath: string option + [] + Message: string option + [] + NewBranch: string option + [] + Sha: string + [] + Signoff: bool option } /// User represents a user -[] +[] type User = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Active : bool option - [] - AvatarUrl : string option - [] - Created : string option - [] - Description : string option - [] - Email : string option - [] - FollowersCount : int option - [] - FollowingCount : int option - [] - FullName : string option - [] - Id : int option - [] - IsAdmin : bool option - [] - Language : string option - [] - LastLogin : string option - [] - Location : string option - [] - Login : string option - [] - LoginName : string option - [] - ProhibitLogin : bool option - [] - Restricted : bool option - [] - StarredReposCount : int option - [] - Visibility : string option - [] - Website : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Active: bool option + [] + AvatarUrl: string option + [] + Created: string option + [] + Description: string option + [] + Email: string option + [] + FollowersCount: int option + [] + FollowingCount: int option + [] + FullName: string option + [] + Id: int option + [] + IsAdmin: bool option + [] + Language: string option + [] + LastLogin: string option + [] + Location: string option + [] + Login: string option + [] + LoginName: string option + [] + ProhibitLogin: bool option + [] + Restricted: bool option + [] + StarredReposCount: int option + [] + Visibility: string option + [] + Website: string option } /// UserHeatmapData represents the data needed to create a heatmap -[] +[] type UserHeatmapData = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Contributions : int option - [] - Timestamp : int option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Contributions: int option + [] + Timestamp: int option } /// UserSettings represents user settings -[] +[] type UserSettings = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Description : string option - [] - DiffViewStyle : string option - [] - FullName : string option - [] - HideActivity : bool option - [] - HideEmail : bool option - [] - Language : string option - [] - Location : string option - [] - Theme : string option - [] - Website : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Description: string option + [] + DiffViewStyle: string option + [] + FullName: string option + [] + HideActivity: bool option + [] + HideEmail: bool option + [] + Language: string option + [] + Location: string option + [] + Theme: string option + [] + Website: string option } /// UserSettingsOptions represents options to change user settings -[] +[] type UserSettingsOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Description : string option - [] - DiffViewStyle : string option - [] - FullName : string option - [] - HideActivity : bool option - [] - HideEmail : bool option - [] - Language : string option - [] - Location : string option - [] - Theme : string option - [] - Website : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Description: string option + [] + DiffViewStyle: string option + [] + FullName: string option + [] + HideActivity: bool option + [] + HideEmail: bool option + [] + Language: string option + [] + Location: string option + [] + Theme: string option + [] + Website: string option } /// WatchInfo represents an API watch status of one repository -[] +[] type WatchInfo = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - CreatedAt : string option - [] - Ignored : bool option - [] - Reason : unit option - [] - RepositoryUrl : string option - [] - Subscribed : bool option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + CreatedAt: string option + [] + Ignored: bool option + [] + Reason: unit option + [] + RepositoryUrl: string option + [] + Subscribed: bool option + [] + Url: string option } /// WikiCommit page commit/revision -[] +[] type WikiCommit = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Author : CommitUser option - [] - Commiter : CommitUser option - [] - Message : string option - [] - Sha : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Author: CommitUser option + [] + Commiter: CommitUser option + [] + Message: string option + [] + Sha: string option } /// WikiCommitList commit/revision list -[] +[] type WikiCommitList = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Commits : WikiCommit list option - [] - Count : int option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Commits: WikiCommit list option + [] + Count: int option } /// WikiPage a wiki page -[] +[] type WikiPage = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - CommitCount : int option - [] - ContentBase64 : string option - [] - Footer : string option - [] - HtmlUrl : string option - [] - LastCommit : WikiCommit option - [] - Sidebar : string option - [] - SubUrl : string option - [] - Title : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + CommitCount: int option + [] + ContentBase64: string option + [] + Footer: string option + [] + HtmlUrl: string option + [] + LastCommit: WikiCommit option + [] + Sidebar: string option + [] + SubUrl: string option + [] + Title: string option } /// WikiPageMetaData wiki page meta information -[] +[] type WikiPageMetaData = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - HtmlUrl : string option - [] - LastCommit : WikiCommit option - [] - SubUrl : string option - [] - Title : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + HtmlUrl: string option + [] + LastCommit: WikiCommit option + [] + SubUrl: string option + [] + Title: string option } /// Comment represents a comment on a commit or issue -[] +[] type Comment = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Assets : Attachment list option - [] - Body : string option - [] - CreatedAt : string option - [] - HtmlUrl : string option - [] - Id : int option - [] - IssueUrl : string option - [] - OriginalAuthor : string option - [] - OriginalAuthorId : int option - [] - PullRequestUrl : string option - [] - UpdatedAt : string option - [] - User : User option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Assets: Attachment list option + [] + Body: string option + [] + CreatedAt: string option + [] + HtmlUrl: string option + [] + Id: int option + [] + IssueUrl: string option + [] + OriginalAuthor: string option + [] + OriginalAuthorId: int option + [] + PullRequestUrl: string option + [] + UpdatedAt: string option + [] + User: User option } /// CommitStatus holds a single status of a single Commit -[] +[] type CommitStatus = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Context : string option - [] - CreatedAt : string option - [] - Creator : User option - [] - Description : string option - [] - Id : int option - [] - Status : string option - [] - TargetUrl : string option - [] - UpdatedAt : string option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Context: string option + [] + CreatedAt: string option + [] + Creator: User option + [] + Description: string option + [] + Id: int option + [] + Status: string option + [] + TargetUrl: string option + [] + UpdatedAt: string option + [] + Url: string option } /// ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content -[] +[] type ContentsResponse = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Links : FileLinksResponse option - [] - Content : string option - [] - DownloadUrl : string option - [] - Encoding : string option - [] - GitUrl : string option - [] - HtmlUrl : string option - [] - LastCommitSha : string option - [] - Name : string option - [] - Path : string option - [] - Sha : string option - [] - Size : int option - [] - SubmoduleGitUrl : string option - [] - Target : string option - [] - Type : string option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Links: FileLinksResponse option + [] + Content: string option + [] + DownloadUrl: string option + [] + Encoding: string option + [] + GitUrl: string option + [] + HtmlUrl: string option + [] + LastCommitSha: string option + [] + Name: string option + [] + Path: string option + [] + Sha: string option + [] + Size: int option + [] + SubmoduleGitUrl: string option + [] + Target: string option + [] + Type: string option + [] + Url: string option } /// CreateFileOptions options for creating files /// Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used) -[] +[] type CreateFileOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Author : Identity option - [] - Branch : string option - [] - Committer : Identity option - [] - Content : string - [] - Dates : CommitDateOptions option - [] - Message : string option - [] - NewBranch : string option - [] - Signoff : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Author: Identity option + [] + Branch: string option + [] + Committer: Identity option + [] + Content: string + [] + Dates: CommitDateOptions option + [] + Message: string option + [] + NewBranch: string option + [] + Signoff: bool option } /// CreateHookOption options when create a hook -[] +[] type CreateHookOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Active : bool option - [] - AuthorizationHeader : string option - [] - BranchFilter : string option - [] - Config : CreateHookOptionConfig - [] - Events : string list option - [] - Type : string - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Active: bool option + [] + AuthorizationHeader: string option + [] + BranchFilter: string option + [] + Config: CreateHookOptionConfig + [] + Events: string list option + [] + Type: string } /// CreatePullReviewOptions are options to create a pull review -[] +[] type CreatePullReviewOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Body : string option - [] - Comments : CreatePullReviewComment list option - [] - CommitId : string option - [] - Event : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Body: string option + [] + Comments: CreatePullReviewComment list option + [] + CommitId: string option + [] + Event: string option } /// DeleteFileOptions options for deleting files (used for other File structs below) /// Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used) -[] +[] type DeleteFileOptions = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Author : Identity option - [] - Branch : string option - [] - Committer : Identity option - [] - Dates : CommitDateOptions option - [] - Message : string option - [] - NewBranch : string option - [] - Sha : string - [] - Signoff : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Author: Identity option + [] + Branch: string option + [] + Committer: Identity option + [] + Dates: CommitDateOptions option + [] + Message: string option + [] + NewBranch: string option + [] + Sha: string + [] + Signoff: bool option } /// EditRepoOption options when editing a repository's properties -[] +[] type EditRepoOption = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - AllowManualMerge : bool option - [] - AllowMergeCommits : bool option - [] - AllowRebase : bool option - [] - AllowRebaseExplicit : bool option - [] - AllowRebaseUpdate : bool option - [] - AllowSquashMerge : bool option - [] - Archived : bool option - [] - AutodetectManualMerge : bool option - [] - DefaultAllowMaintainerEdit : bool option - [] - DefaultBranch : string option - [] - DefaultDeleteBranchAfterMerge : bool option - [] - DefaultMergeStyle : string option - [] - Description : string option - [] - EnablePrune : bool option - [] - ExternalTracker : ExternalTracker option - [] - ExternalWiki : ExternalWiki option - [] - HasIssues : bool option - [] - HasProjects : bool option - [] - HasPullRequests : bool option - [] - HasWiki : bool option - [] - IgnoreWhitespaceConflicts : bool option - [] - InternalTracker : InternalTracker option - [] - MirrorInterval : string option - [] - Name : string option - [] - Private : bool option - [] - Template : bool option - [] - Website : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + AllowManualMerge: bool option + [] + AllowMergeCommits: bool option + [] + AllowRebase: bool option + [] + AllowRebaseExplicit: bool option + [] + AllowRebaseUpdate: bool option + [] + AllowSquashMerge: bool option + [] + Archived: bool option + [] + AutodetectManualMerge: bool option + [] + DefaultAllowMaintainerEdit: bool option + [] + DefaultBranch: string option + [] + DefaultDeleteBranchAfterMerge: bool option + [] + DefaultMergeStyle: string option + [] + Description: string option + [] + EnablePrune: bool option + [] + ExternalTracker: ExternalTracker option + [] + ExternalWiki: ExternalWiki option + [] + HasIssues: bool option + [] + HasProjects: bool option + [] + HasPullRequests: bool option + [] + HasWiki: bool option + [] + IgnoreWhitespaceConflicts: bool option + [] + InternalTracker: InternalTracker option + [] + MirrorInterval: string option + [] + Name: string option + [] + Private: bool option + [] + Template: bool option + [] + Website: string option } /// IssueFormField represents a form field -[] +[] type IssueFormField = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Attributes : Type5 option - [] - Id : string option - [] - Type : string option - [] - Validations : Type6 option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Attributes: Type5 option + [] + Id: string option + [] + Type: string option + [] + Validations: Type6 option } /// IssueTemplate represents an issue template for a repository -[] +[] type IssueTemplate = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - About : string option - [] - Body : IssueFormField list option - [] - Content : string option - [] - FileName : string option - [] - Labels : string list option - [] - Name : string option - [] - Ref : string option - [] - Title : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + About: string option + [] + Body: IssueFormField list option + [] + Content: string option + [] + FileName: string option + [] + Labels: string list option + [] + Name: string option + [] + Ref: string option + [] + Title: string option } /// Milestone milestone is a collection of issues on one repository -[] +[] type Milestone = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - ClosedAt : string option - [] - ClosedIssues : int option - [] - CreatedAt : string option - [] - Description : string option - [] - DueOn : string option - [] - Id : int option - [] - OpenIssues : int option - [] - State : string option - [] - Title : string option - [] - UpdatedAt : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + ClosedAt: string option + [] + ClosedIssues: int option + [] + CreatedAt: string option + [] + Description: string option + [] + DueOn: string option + [] + Id: int option + [] + OpenIssues: int option + [] + State: string option + [] + Title: string option + [] + UpdatedAt: string option } /// NodeInfoUsage contains usage statistics for this server -[] +[] type NodeInfoUsage = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - LocalComments : int option - [] - LocalPosts : int option - [] - Users : NodeInfoUsageUsers option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + LocalComments: int option + [] + LocalPosts: int option + [] + Users: NodeInfoUsageUsers option } /// NotificationSubject contains the notification subject (Issue/Pull/Commit) -[] +[] type NotificationSubject = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - HtmlUrl : string option - [] - LatestCommentHtmlUrl : string option - [] - LatestCommentUrl : string option - [] - State : string option - [] - Title : string option - [] - Type : string option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + HtmlUrl: string option + [] + LatestCommentHtmlUrl: string option + [] + LatestCommentUrl: string option + [] + State: string option + [] + Title: string option + [] + Type: string option + [] + Url: string option } /// PayloadCommitVerification represents the GPG verification of a commit -[] +[] type PayloadCommitVerification = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Payload : string option - [] - Reason : string option - [] - Signature : string option - [] - Signer : PayloadUser option - [] - Verified : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Payload: string option + [] + Reason: string option + [] + Signature: string option + [] + Signer: PayloadUser option + [] + Verified: bool option } /// PublicKey publickey is a user key to push code to repository -[] +[] type PublicKey = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - CreatedAt : string option - [] - Fingerprint : string option - [] - Id : int option - [] - Key : string option - [] - KeyType : string option - [] - ReadOnly : bool option - [] - Title : string option - [] - Url : string option - [] - User : User option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + CreatedAt: string option + [] + Fingerprint: string option + [] + Id: int option + [] + Key: string option + [] + KeyType: string option + [] + ReadOnly: bool option + [] + Title: string option + [] + Url: string option + [] + User: User option } /// PullReview represents a pull request review -[] +[] type PullReview = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Body : string option - [] - CommentsCount : int option - [] - CommitId : string option - [] - Dismissed : bool option - [] - HtmlUrl : string option - [] - Id : int option - [] - Official : bool option - [] - PullRequestUrl : string option - [] - Stale : bool option - [] - State : string option - [] - SubmittedAt : string option - [] - Team : Team option - [] - UpdatedAt : string option - [] - User : User option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Body: string option + [] + CommentsCount: int option + [] + CommitId: string option + [] + Dismissed: bool option + [] + HtmlUrl: string option + [] + Id: int option + [] + Official: bool option + [] + PullRequestUrl: string option + [] + Stale: bool option + [] + State: string option + [] + SubmittedAt: string option + [] + Team: Team option + [] + UpdatedAt: string option + [] + User: User option } /// PullReviewComment represents a comment on a pull request review -[] +[] type PullReviewComment = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Body : string option - [] - CommitId : string option - [] - CreatedAt : string option - [] - DiffHunk : string option - [] - HtmlUrl : string option - [] - Id : int option - [] - OriginalCommitId : string option - [] - OriginalPosition : int option - [] - Path : string option - [] - Position : int option - [] - PullRequestReviewId : int option - [] - PullRequestUrl : string option - [] - Resolver : User option - [] - UpdatedAt : string option - [] - User : User option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Body: string option + [] + CommitId: string option + [] + CreatedAt: string option + [] + DiffHunk: string option + [] + HtmlUrl: string option + [] + Id: int option + [] + OriginalCommitId: string option + [] + OriginalPosition: int option + [] + Path: string option + [] + Position: int option + [] + PullRequestReviewId: int option + [] + PullRequestUrl: string option + [] + Resolver: User option + [] + UpdatedAt: string option + [] + User: User option } /// Reaction contain one reaction -[] +[] type Reaction = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Content : string option - [] - CreatedAt : string option - [] - User : User option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Content: string option + [] + CreatedAt: string option + [] + User: User option } /// Release represents a repository release -[] +[] type Release = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Assets : Attachment list option - [] - Author : User option - [] - Body : string option - [] - CreatedAt : string option - [] - Draft : bool option - [] - HtmlUrl : string option - [] - Id : int option - [] - Name : string option - [] - Prerelease : bool option - [] - PublishedAt : string option - [] - TagName : string option - [] - TarballUrl : string option - [] - TargetCommitish : string option - [] - Url : string option - [] - ZipballUrl : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Assets: Attachment list option + [] + Author: User option + [] + Body: string option + [] + CreatedAt: string option + [] + Draft: bool option + [] + HtmlUrl: string option + [] + Id: int option + [] + Name: string option + [] + Prerelease: bool option + [] + PublishedAt: string option + [] + TagName: string option + [] + TarballUrl: string option + [] + TargetCommitish: string option + [] + Url: string option + [] + ZipballUrl: string option } /// RepoCollaboratorPermission to get repository permission for a collaborator -[] +[] type RepoCollaboratorPermission = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Permission : string option - [] - RoleName : string option - [] - User : User option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Permission: string option + [] + RoleName: string option + [] + User: User option } /// RepoCommit contains information of a commit in the context of a repository. -[] +[] type RepoCommit = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Author : CommitUser option - [] - Committer : CommitUser option - [] - Message : string option - [] - Tree : CommitMeta option - [] - Url : string option - [] - Verification : PayloadCommitVerification option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Author: CommitUser option + [] + Committer: CommitUser option + [] + Message: string option + [] + Tree: CommitMeta option + [] + Url: string option + [] + Verification: PayloadCommitVerification option } /// RepoTransfer represents a pending repo transfer -[] +[] type RepoTransfer = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Doer : User option - [] - Recipient : User option - [] - Teams : Team list option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Doer: User option + [] + Recipient: User option + [] + Teams: Team list option } /// Repository represents a repository -[] +[] type Repository = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - AllowMergeCommits : bool option - [] - AllowRebase : bool option - [] - AllowRebaseExplicit : bool option - [] - AllowRebaseUpdate : bool option - [] - AllowSquashMerge : bool option - [] - Archived : bool option - [] - AvatarUrl : string option - [] - CloneUrl : string option - [] - CreatedAt : string option - [] - DefaultAllowMaintainerEdit : bool option - [] - DefaultBranch : string option - [] - DefaultDeleteBranchAfterMerge : bool option - [] - DefaultMergeStyle : string option - [] - Description : string option - [] - Empty : bool option - [] - ExternalTracker : ExternalTracker option - [] - ExternalWiki : ExternalWiki option - [] - Fork : bool option - [] - ForksCount : int option - [] - FullName : string option - [] - HasIssues : bool option - [] - HasProjects : bool option - [] - HasPullRequests : bool option - [] - HasWiki : bool option - [] - HtmlUrl : string option - [] - Id : int option - [] - IgnoreWhitespaceConflicts : bool option - [] - Internal : bool option - [] - InternalTracker : InternalTracker option - [] - Language : string option - [] - LanguagesUrl : string option - [] - Link : string option - [] - Mirror : bool option - [] - MirrorInterval : string option - [] - MirrorUpdated : string option - [] - Name : string option - [] - OpenIssuesCount : int option - [] - OpenPrCounter : int option - [] - OriginalUrl : string option - [] - Owner : User option - [] - Parent : Repository option - [] - Permissions : Permission option - [] - Private : bool option - [] - ReleaseCounter : int option - [] - RepoTransfer : RepoTransfer option - [] - Size : int option - [] - SshUrl : string option - [] - StarsCount : int option - [] - Template : bool option - [] - UpdatedAt : string option - [] - WatchersCount : int option - [] - Website : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + AllowMergeCommits: bool option + [] + AllowRebase: bool option + [] + AllowRebaseExplicit: bool option + [] + AllowRebaseUpdate: bool option + [] + AllowSquashMerge: bool option + [] + Archived: bool option + [] + AvatarUrl: string option + [] + CloneUrl: string option + [] + CreatedAt: string option + [] + DefaultAllowMaintainerEdit: bool option + [] + DefaultBranch: string option + [] + DefaultDeleteBranchAfterMerge: bool option + [] + DefaultMergeStyle: string option + [] + Description: string option + [] + Empty: bool option + [] + ExternalTracker: ExternalTracker option + [] + ExternalWiki: ExternalWiki option + [] + Fork: bool option + [] + ForksCount: int option + [] + FullName: string option + [] + HasIssues: bool option + [] + HasProjects: bool option + [] + HasPullRequests: bool option + [] + HasWiki: bool option + [] + HtmlUrl: string option + [] + Id: int option + [] + IgnoreWhitespaceConflicts: bool option + [] + Internal: bool option + [] + InternalTracker: InternalTracker option + [] + Language: string option + [] + LanguagesUrl: string option + [] + Link: string option + [] + Mirror: bool option + [] + MirrorInterval: string option + [] + MirrorUpdated: string option + [] + Name: string option + [] + OpenIssuesCount: int option + [] + OpenPrCounter: int option + [] + OriginalUrl: string option + [] + Owner: User option + [] + Parent: Repository option + [] + Permissions: Permission option + [] + Private: bool option + [] + ReleaseCounter: int option + [] + RepoTransfer: RepoTransfer option + [] + Size: int option + [] + SshUrl: string option + [] + StarsCount: int option + [] + Template: bool option + [] + UpdatedAt: string option + [] + WatchersCount: int option + [] + Website: string option } /// SearchResults results of a successful search -[] +[] type SearchResults = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Data : Repository list option - [] - Ok : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Data: Repository list option + [] + Ok: bool option } /// AnnotatedTag represents an annotated tag -[] +[] type AnnotatedTag = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Message : string option - [] - Object : AnnotatedTagObject option - [] - Sha : string option - [] - Tag : string option - [] - Tagger : CommitUser option - [] - Url : string option - [] - Verification : PayloadCommitVerification option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Message: string option + [] + Object: AnnotatedTagObject option + [] + Sha: string option + [] + Tag: string option + [] + Tagger: CommitUser option + [] + Url: string option + [] + Verification: PayloadCommitVerification option } /// CombinedStatus holds the combined state of several statuses for a single commit -[] +[] type CombinedStatus = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - CommitUrl : string option - [] - Repository : Repository option - [] - Sha : string option - [] - State : string option - [] - Statuses : CommitStatus list option - [] - TotalCount : int option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + CommitUrl: string option + [] + Repository: Repository option + [] + Sha: string option + [] + State: string option + [] + Statuses: CommitStatus list option + [] + TotalCount: int option + [] + Url: string option } /// Commit contains information generated from a Git commit. -[] +[] type Commit = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Author : User option - [] - Commit : RepoCommit option - [] - Committer : User option - [] - Created : string option - [] - Files : CommitAffectedFiles list option - [] - HtmlUrl : string option - [] - Parents : CommitMeta list option - [] - Sha : string option - [] - Stats : CommitStats option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Author: User option + [] + Commit: RepoCommit option + [] + Committer: User option + [] + Created: string option + [] + Files: CommitAffectedFiles list option + [] + HtmlUrl: string option + [] + Parents: CommitMeta list option + [] + Sha: string option + [] + Stats: CommitStats option + [] + Url: string option } /// DeployKey a deploy key -[] +[] type DeployKey = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - CreatedAt : string option - [] - Fingerprint : string option - [] - Id : int option - [] - Key : string option - [] - KeyId : int option - [] - ReadOnly : bool option - [] - Repository : Repository option - [] - Title : string option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + CreatedAt: string option + [] + Fingerprint: string option + [] + Id: int option + [] + Key: string option + [] + KeyId: int option + [] + ReadOnly: bool option + [] + Repository: Repository option + [] + Title: string option + [] + Url: string option } /// FileDeleteResponse contains information about a repo's file that was deleted -[] +[] type FileDeleteResponse = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Commit : FileCommitResponse option - [] - Content : unit option - [] - Verification : PayloadCommitVerification option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Commit: FileCommitResponse option + [] + Content: unit option + [] + Verification: PayloadCommitVerification option } /// FileResponse contains information about a repo's file -[] +[] type FileResponse = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Commit : FileCommitResponse option - [] - Content : ContentsResponse option - [] - Verification : PayloadCommitVerification option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Commit: FileCommitResponse option + [] + Content: ContentsResponse option + [] + Verification: PayloadCommitVerification option } /// Issue represents an issue in a repository -[] +[] type Issue = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Assets : Attachment list option - [] - Assignee : User option - [] - Assignees : User list option - [] - Body : string option - [] - ClosedAt : string option - [] - Comments : int option - [] - CreatedAt : string option - [] - DueDate : string option - [] - HtmlUrl : string option - [] - Id : int option - [] - IsLocked : bool option - [] - Labels : Label list option - [] - Milestone : Milestone option - [] - Number : int option - [] - OriginalAuthor : string option - [] - OriginalAuthorId : int option - [] - PullRequest : PullRequestMeta option - [] - Ref : string option - [] - Repository : RepositoryMeta option - [] - State : string option - [] - Title : string option - [] - UpdatedAt : string option - [] - Url : string option - [] - User : User option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Assets: Attachment list option + [] + Assignee: User option + [] + Assignees: User list option + [] + Body: string option + [] + ClosedAt: string option + [] + Comments: int option + [] + CreatedAt: string option + [] + DueDate: string option + [] + HtmlUrl: string option + [] + Id: int option + [] + IsLocked: bool option + [] + Labels: Label list option + [] + Milestone: Milestone option + [] + Number: int option + [] + OriginalAuthor: string option + [] + OriginalAuthorId: int option + [] + PullRequest: PullRequestMeta option + [] + Ref: string option + [] + Repository: RepositoryMeta option + [] + State: string option + [] + Title: string option + [] + UpdatedAt: string option + [] + Url: string option + [] + User: User option } /// NodeInfo contains standardized way of exposing metadata about a server running one of the distributed social networks -[] +[] type NodeInfo = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Metadata : Type7 option - [] - OpenRegistrations : bool option - [] - Protocols : string list option - [] - Services : NodeInfoServices option - [] - Software : NodeInfoSoftware option - [] - Usage : NodeInfoUsage option - [] - Version : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Metadata: Type7 option + [] + OpenRegistrations: bool option + [] + Protocols: string list option + [] + Services: NodeInfoServices option + [] + Software: NodeInfoSoftware option + [] + Usage: NodeInfoUsage option + [] + Version: string option } /// Note contains information related to a git note -[] +[] type Note = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Commit : Commit option - [] - Message : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Commit: Commit option + [] + Message: string option } /// NotificationThread expose Notification on API -[] +[] type NotificationThread = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Id : int option - [] - Pinned : bool option - [] - Repository : Repository option - [] - Subject : NotificationSubject option - [] - Unread : bool option - [] - UpdatedAt : string option - [] - Url : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Id: int option + [] + Pinned: bool option + [] + Repository: Repository option + [] + Subject: NotificationSubject option + [] + Unread: bool option + [] + UpdatedAt: string option + [] + Url: string option } /// PRBranchInfo information about a branch -[] +[] type PRBranchInfo = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Label : string option - [] - Ref : string option - [] - Repo : Repository option - [] - RepoId : int option - [] - Sha : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Label: string option + [] + Ref: string option + [] + Repo: Repository option + [] + RepoId: int option + [] + Sha: string option } /// Package represents a package -[] +[] type Package = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - CreatedAt : string option - [] - Creator : User option - [] - Id : int option - [] - Name : string option - [] - Owner : User option - [] - Repository : Repository option - [] - Type : string option - [] - Version : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + CreatedAt: string option + [] + Creator: User option + [] + Id: int option + [] + Name: string option + [] + Owner: User option + [] + Repository: Repository option + [] + Type: string option + [] + Version: string option } /// PayloadCommit represents a commit -[] +[] type PayloadCommit = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Added : string list option - [] - Author : PayloadUser option - [] - Committer : PayloadUser option - [] - Id : string option - [] - Message : string option - [] - Modified : string list option - [] - Removed : string list option - [] - Timestamp : string option - [] - Url : string option - [] - Verification : PayloadCommitVerification option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Added: string list option + [] + Author: PayloadUser option + [] + Committer: PayloadUser option + [] + Id: string option + [] + Message: string option + [] + Modified: string list option + [] + Removed: string list option + [] + Timestamp: string option + [] + Url: string option + [] + Verification: PayloadCommitVerification option } /// PullRequest represents a pull request -[] +[] type PullRequest = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - AllowMaintainerEdit : bool option - [] - Assignee : User option - [] - Assignees : User list option - [] - Base : PRBranchInfo option - [] - Body : string option - [] - ClosedAt : string option - [] - Comments : int option - [] - CreatedAt : string option - [] - DiffUrl : string option - [] - DueDate : string option - [] - Head : PRBranchInfo option - [] - HtmlUrl : string option - [] - Id : int option - [] - IsLocked : bool option - [] - Labels : Label list option - [] - MergeBase : string option - [] - MergeCommitSha : string option - [] - Mergeable : bool option - [] - Merged : bool option - [] - MergedAt : string option - [] - MergedBy : User option - [] - Milestone : Milestone option - [] - Number : int option - [] - PatchUrl : string option - [] - State : string option - [] - Title : string option - [] - UpdatedAt : string option - [] - Url : string option - [] - User : User option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + AllowMaintainerEdit: bool option + [] + Assignee: User option + [] + Assignees: User list option + [] + Base: PRBranchInfo option + [] + Body: string option + [] + ClosedAt: string option + [] + Comments: int option + [] + CreatedAt: string option + [] + DiffUrl: string option + [] + DueDate: string option + [] + Head: PRBranchInfo option + [] + HtmlUrl: string option + [] + Id: int option + [] + IsLocked: bool option + [] + Labels: Label list option + [] + MergeBase: string option + [] + MergeCommitSha: string option + [] + Mergeable: bool option + [] + Merged: bool option + [] + MergedAt: string option + [] + MergedBy: User option + [] + Milestone: Milestone option + [] + Number: int option + [] + PatchUrl: string option + [] + State: string option + [] + Title: string option + [] + UpdatedAt: string option + [] + Url: string option + [] + User: User option } /// TrackedTime worked time for an issue / pr -[] +[] type TrackedTime = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Created : string option - [] - Id : int option - [] - Issue : Issue option - [] - IssueId : int option - [] - Time : int option - [] - UserId : int option - [] - UserName : string option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Created: string option + [] + Id: int option + [] + Issue: Issue option + [] + IssueId: int option + [] + Time: int option + [] + UserId: int option + [] + UserName: string option } /// Branch represents a repository branch -[] +[] type Branch = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Commit : PayloadCommit option - [] - EffectiveBranchProtectionName : string option - [] - EnableStatusCheck : bool option - [] - Name : string option - [] - Protected : bool option - [] - RequiredApprovals : int option - [] - StatusCheckContexts : string list option - [] - UserCanMerge : bool option - [] - UserCanPush : bool option - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Commit: PayloadCommit option + [] + EffectiveBranchProtectionName: string option + [] + EnableStatusCheck: bool option + [] + Name: string option + [] + Protected: bool option + [] + RequiredApprovals: int option + [] + StatusCheckContexts: string list option + [] + UserCanMerge: bool option + [] + UserCanPush: bool option } /// TimelineComment represents a timeline comment (comment of any type) on a commit or issue -[] +[] type TimelineComment = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - [] - Assignee : User option - [] - AssigneeTeam : Team option - [] - Body : string option - [] - CreatedAt : string option - [] - DependentIssue : Issue option - [] - HtmlUrl : string option - [] - Id : int option - [] - IssueUrl : string option - [] - Label : Label option - [] - Milestone : Milestone option - [] - NewRef : string option - [] - NewTitle : string option - [] - OldMilestone : Milestone option - [] - OldProjectId : int option - [] - OldRef : string option - [] - OldTitle : string option - [] - ProjectId : int option - [] - PullRequestUrl : string option - [] - RefAction : string option - [] - RefComment : Comment option - [] - RefCommitSha : string option - [] - RefIssue : Issue option - [] - RemovedAssignee : bool option - [] - ResolveDoer : User option - [] - ReviewId : int option - [] - TrackedTime : TrackedTime option - [] - Type : string option - [] - UpdatedAt : string option - [] - User : User option - } - -[] + { [] + AdditionalProperties: System.Collections.Generic.Dictionary + [] + Assignee: User option + [] + AssigneeTeam: Team option + [] + Body: string option + [] + CreatedAt: string option + [] + DependentIssue: Issue option + [] + HtmlUrl: string option + [] + Id: int option + [] + IssueUrl: string option + [] + Label: Label option + [] + Milestone: Milestone option + [] + NewRef: string option + [] + NewTitle: string option + [] + OldMilestone: Milestone option + [] + OldProjectId: int option + [] + OldRef: string option + [] + OldTitle: string option + [] + ProjectId: int option + [] + PullRequestUrl: string option + [] + RefAction: string option + [] + RefComment: Comment option + [] + RefCommitSha: string option + [] + RefIssue: Issue option + [] + RemovedAssignee: bool option + [] + ResolveDoer: User option + [] + ReviewId: int option + [] + TrackedTime: TrackedTime option + [] + Type: string option + [] + UpdatedAt: string option + [] + User: User option } + +[] type LanguageStatistics = - { - [] - AdditionalProperties : System.Collections.Generic.Dictionary - } + { [] + AdditionalProperties: System.Collections.Generic.Dictionary } /// This documentation describes the Gitea API. -[] +[] type IGitea = /// Returns the Person actor for a user [] [] - abstract ActivitypubPerson : - [] username : string * ?ct : System.Threading.CancellationToken -> + abstract ActivitypubPerson: + [] username: string * ?ct: System.Threading.CancellationToken -> ActivityPub System.Threading.Tasks.Task /// Send to the inbox [] [] - abstract ActivitypubPersonInbox : - [] username : string * ?ct : System.Threading.CancellationToken -> + abstract ActivitypubPersonInbox: + [] username: string * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List cron tasks [] [] - abstract AdminCronList : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract AdminCronList: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Cron list System.Threading.Tasks.Task /// Run cron task [] [] - abstract AdminCronRun : - [] task : string * ?ct : System.Threading.CancellationToken -> + abstract AdminCronRun: + [] task: string * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List system's webhooks [] [] - abstract AdminListHooks : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract AdminListHooks: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Hook list System.Threading.Tasks.Task /// Create a hook [] [] - abstract AdminCreateHook : - [] body : CreateHookOption * ?ct : System.Threading.CancellationToken -> + abstract AdminCreateHook: + [] body: CreateHookOption * ?ct: System.Threading.CancellationToken -> Hook System.Threading.Tasks.Task /// Get a hook [] [] - abstract AdminGetHook : - [] id : int * ?ct : System.Threading.CancellationToken -> Hook System.Threading.Tasks.Task + abstract AdminGetHook: + [] id: int * ?ct: System.Threading.CancellationToken -> Hook System.Threading.Tasks.Task /// Update a hook [] [] - abstract AdminEditHook : - [] id : int * - [] body : EditHookOption * - ?ct : System.Threading.CancellationToken -> + abstract AdminEditHook: + [] id: int * + [] body: EditHookOption * + ?ct: System.Threading.CancellationToken -> Hook System.Threading.Tasks.Task /// List all organizations [] [] - abstract AdminGetAllOrgs : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract AdminGetAllOrgs: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Organization list System.Threading.Tasks.Task /// List unadopted repositories [] [] - abstract AdminUnadoptedList : - [] page : int * - [] limit : int * - [] pattern : string * - ?ct : System.Threading.CancellationToken -> + abstract AdminUnadoptedList: + [] page: int * + [] limit: int * + [] pattern: string * + ?ct: System.Threading.CancellationToken -> string list System.Threading.Tasks.Task /// Adopt unadopted files as a repository [] [] - abstract AdminAdoptRepository : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract AdminAdoptRepository: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Delete unadopted files [] [] - abstract AdminDeleteUnadoptedRepository : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract AdminDeleteUnadoptedRepository: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List all users [] [] - abstract AdminGetAllUsers : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract AdminGetAllUsers: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// Create a user [] [] - abstract AdminCreateUser : - [] body : CreateUserOption * ?ct : System.Threading.CancellationToken -> + abstract AdminCreateUser: + [] body: CreateUserOption * ?ct: System.Threading.CancellationToken -> User System.Threading.Tasks.Task /// Delete a user [] [] - abstract AdminDeleteUser : - [] username : string * - [] purge : bool * - ?ct : System.Threading.CancellationToken -> + abstract AdminDeleteUser: + [] username: string * + [] purge: bool * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit an existing user [] [] - abstract AdminEditUser : - [] username : string * - [] body : EditUserOption * - ?ct : System.Threading.CancellationToken -> + abstract AdminEditUser: + [] username: string * + [] body: EditUserOption * + ?ct: System.Threading.CancellationToken -> User System.Threading.Tasks.Task /// Add a public key on behalf of a user [] [] - abstract AdminCreatePublicKey : - [] username : string * - [] key : CreateKeyOption * - ?ct : System.Threading.CancellationToken -> + abstract AdminCreatePublicKey: + [] username: string * + [] key: CreateKeyOption * + ?ct: System.Threading.CancellationToken -> PublicKey System.Threading.Tasks.Task /// Delete a user's public key [] [] - abstract AdminDeleteUserPublicKey : - [] username : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract AdminDeleteUserPublicKey: + [] username: string * + [] id: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Create an organization [] [] - abstract AdminCreateOrg : - [] username : string * - [] organization : CreateOrgOption * - ?ct : System.Threading.CancellationToken -> + abstract AdminCreateOrg: + [] username: string * + [] organization: CreateOrgOption * + ?ct: System.Threading.CancellationToken -> Organization System.Threading.Tasks.Task /// Create a repository on behalf of a user [] [] - abstract AdminCreateRepo : - [] username : string * - [] repository : CreateRepoOption * - ?ct : System.Threading.CancellationToken -> + abstract AdminCreateRepo: + [] username: string * + [] repository: CreateRepoOption * + ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// Delete a hook [] [] - abstract AdminDeleteHook : - [] id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + abstract AdminDeleteHook: + [] id: int * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Render a markdown document as HTML [] [] - abstract RenderMarkdown : - [] body : MarkdownOption * ?ct : System.Threading.CancellationToken -> + abstract RenderMarkdown: + [] body: MarkdownOption * ?ct: System.Threading.CancellationToken -> string System.Threading.Tasks.Task /// Render raw markdown as HTML [] [] - abstract RenderMarkdownRaw : - [] body : string * ?ct : System.Threading.CancellationToken -> string System.Threading.Tasks.Task + abstract RenderMarkdownRaw: + [] body: string * ?ct: System.Threading.CancellationToken -> string System.Threading.Tasks.Task /// Returns the nodeinfo of the Gitea application [] [] - abstract GetNodeInfo : ?ct : System.Threading.CancellationToken -> NodeInfo System.Threading.Tasks.Task + abstract GetNodeInfo: ?ct: System.Threading.CancellationToken -> NodeInfo System.Threading.Tasks.Task /// List users's notification threads [] [] - abstract NotifyGetList : - [] all : bool * - [] status_types : string list * - [] subject_type : string list * - [] since : string * - [] before : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract NotifyGetList: + [] all: bool * + [] status_types: string list * + [] subject_type: string list * + [] since: string * + [] before: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> NotificationThread list System.Threading.Tasks.Task /// Mark notification threads as read, pinned or unread [] [] - abstract NotifyReadList : - [] last_read_at : string * - [] all : string * - [] status_types : string list * - [] to_status : string * - ?ct : System.Threading.CancellationToken -> + abstract NotifyReadList: + [] last_read_at: string * + [] all: string * + [] status_types: string list * + [] to_status: string * + ?ct: System.Threading.CancellationToken -> NotificationThread list System.Threading.Tasks.Task /// Check if unread notifications exist [] [] - abstract NotifyNewAvailable : - ?ct : System.Threading.CancellationToken -> NotificationCount System.Threading.Tasks.Task + abstract NotifyNewAvailable: + ?ct: System.Threading.CancellationToken -> NotificationCount System.Threading.Tasks.Task /// Get notification thread by ID [] [] - abstract NotifyGetThread : - [] id : string * ?ct : System.Threading.CancellationToken -> + abstract NotifyGetThread: + [] id: string * ?ct: System.Threading.CancellationToken -> NotificationThread System.Threading.Tasks.Task /// Mark notification thread as read by ID [] [] - abstract NotifyReadThread : - [] id : string * - [] to_status : string * - ?ct : System.Threading.CancellationToken -> + abstract NotifyReadThread: + [] id: string * + [] to_status: string * + ?ct: System.Threading.CancellationToken -> NotificationThread System.Threading.Tasks.Task /// Create a repository in an organization [] [] - abstract CreateOrgRepoDeprecated : - [] org : string * - [] body : CreateRepoOption * - ?ct : System.Threading.CancellationToken -> + abstract CreateOrgRepoDeprecated: + [] org: string * + [] body: CreateRepoOption * + ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// Get list of organizations [] [] - abstract OrgGetAll : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgGetAll: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Organization list System.Threading.Tasks.Task /// Create an organization [] [] - abstract OrgCreate : - [] organization : CreateOrgOption * ?ct : System.Threading.CancellationToken -> + abstract OrgCreate: + [] organization: CreateOrgOption * ?ct: System.Threading.CancellationToken -> Organization System.Threading.Tasks.Task /// Get an organization [] [] - abstract OrgGet : - [] org : string * ?ct : System.Threading.CancellationToken -> + abstract OrgGet: + [] org: string * ?ct: System.Threading.CancellationToken -> Organization System.Threading.Tasks.Task /// Delete an organization [] [] - abstract OrgDelete : - [] org : string * ?ct : System.Threading.CancellationToken -> + abstract OrgDelete: + [] org: string * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit an organization [] [] - abstract OrgEdit : - [] org : string * - [] body : EditOrgOption * - ?ct : System.Threading.CancellationToken -> + abstract OrgEdit: + [] org: string * + [] body: EditOrgOption * + ?ct: System.Threading.CancellationToken -> Organization System.Threading.Tasks.Task /// List an organization's webhooks [] [] - abstract OrgListHooks : - [] org : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgListHooks: + [] org: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Hook list System.Threading.Tasks.Task /// Create a hook [] [] - abstract OrgCreateHook : - [] org : string * - [] body : CreateHookOption * - ?ct : System.Threading.CancellationToken -> + abstract OrgCreateHook: + [] org: string * + [] body: CreateHookOption * + ?ct: System.Threading.CancellationToken -> Hook System.Threading.Tasks.Task /// Get a hook [] [] - abstract OrgGetHook : - [] org : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgGetHook: + [] org: string * [] id: int * ?ct: System.Threading.CancellationToken -> Hook System.Threading.Tasks.Task /// Delete a hook [] [] - abstract OrgDeleteHook : - [] org : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgDeleteHook: + [] org: string * [] id: int * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Update a hook [] [] - abstract OrgEditHook : - [] org : string * - [] id : int * - [] body : EditHookOption * - ?ct : System.Threading.CancellationToken -> + abstract OrgEditHook: + [] org: string * + [] id: int * + [] body: EditHookOption * + ?ct: System.Threading.CancellationToken -> Hook System.Threading.Tasks.Task /// List an organization's labels [] [] - abstract OrgListLabels : - [] org : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgListLabels: + [] org: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Label list System.Threading.Tasks.Task /// Create a label for an organization [] [] - abstract OrgCreateLabel : - [] org : string * - [] body : CreateLabelOption * - ?ct : System.Threading.CancellationToken -> + abstract OrgCreateLabel: + [] org: string * + [] body: CreateLabelOption * + ?ct: System.Threading.CancellationToken -> Label System.Threading.Tasks.Task /// Get a single label [] [] - abstract OrgGetLabel : - [] org : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgGetLabel: + [] org: string * [] id: int * ?ct: System.Threading.CancellationToken -> Label System.Threading.Tasks.Task /// Delete a label [] [] - abstract OrgDeleteLabel : - [] org : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgDeleteLabel: + [] org: string * [] id: int * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Update a label [] [] - abstract OrgEditLabel : - [] org : string * - [] id : int * - [] body : EditLabelOption * - ?ct : System.Threading.CancellationToken -> + abstract OrgEditLabel: + [] org: string * + [] id: int * + [] body: EditLabelOption * + ?ct: System.Threading.CancellationToken -> Label System.Threading.Tasks.Task /// List an organization's members [] [] - abstract OrgListMembers : - [] org : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgListMembers: + [] org: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// Check if a user is a member of an organization [] [] - abstract OrgIsMember : - [] org : string * - [] username : string * - ?ct : System.Threading.CancellationToken -> + abstract OrgIsMember: + [] org: string * + [] username: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Remove a member from an organization [] [] - abstract OrgDeleteMember : - [] org : string * - [] username : string * - ?ct : System.Threading.CancellationToken -> + abstract OrgDeleteMember: + [] org: string * + [] username: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List an organization's public members [] [] - abstract OrgListPublicMembers : - [] org : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgListPublicMembers: + [] org: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// Check if a user is a public member of an organization [] [] - abstract OrgIsPublicMember : - [] org : string * - [] username : string * - ?ct : System.Threading.CancellationToken -> + abstract OrgIsPublicMember: + [] org: string * + [] username: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Conceal a user's membership [] [] - abstract OrgConcealMember : - [] org : string * - [] username : string * - ?ct : System.Threading.CancellationToken -> + abstract OrgConcealMember: + [] org: string * + [] username: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Publicize a user's membership [] [] - abstract OrgPublicizeMember : - [] org : string * - [] username : string * - ?ct : System.Threading.CancellationToken -> + abstract OrgPublicizeMember: + [] org: string * + [] username: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List an organization's repos [] [] - abstract OrgListRepos : - [] org : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgListRepos: + [] org: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Repository list System.Threading.Tasks.Task /// Create a repository in an organization [] [] - abstract CreateOrgRepo : - [] org : string * - [] body : CreateRepoOption * - ?ct : System.Threading.CancellationToken -> + abstract CreateOrgRepo: + [] org: string * + [] body: CreateRepoOption * + ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// List an organization's teams [] [] - abstract OrgListTeams : - [] org : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgListTeams: + [] org: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Team list System.Threading.Tasks.Task /// Create a team [] [] - abstract OrgCreateTeam : - [] org : string * - [] body : CreateTeamOption * - ?ct : System.Threading.CancellationToken -> + abstract OrgCreateTeam: + [] org: string * + [] body: CreateTeamOption * + ?ct: System.Threading.CancellationToken -> Team System.Threading.Tasks.Task /// Search for teams within an organization [] [] - abstract TeamSearch : - [] org : string * - [] q : string * - [] include_desc : bool * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract TeamSearch: + [] org: string * + [] q: string * + [] include_desc: bool * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Gets all packages of an owner [] [] - abstract ListPackages : - [] owner : string * - [] page : int * - [] limit : int * - [] type' : string * - [] q : string * - ?ct : System.Threading.CancellationToken -> + abstract ListPackages: + [] owner: string * + [] page: int * + [] limit: int * + [] type': string * + [] q: string * + ?ct: System.Threading.CancellationToken -> Package list System.Threading.Tasks.Task /// Gets a package [] [] - abstract GetPackage : - [] owner : string * - [] type' : string * - [] name : string * - [] version : string * - ?ct : System.Threading.CancellationToken -> + abstract GetPackage: + [] owner: string * + [] type': string * + [] name: string * + [] version: string * + ?ct: System.Threading.CancellationToken -> Package System.Threading.Tasks.Task /// Delete a package [] [] - abstract DeletePackage : - [] owner : string * - [] type' : string * - [] name : string * - [] version : string * - ?ct : System.Threading.CancellationToken -> + abstract DeletePackage: + [] owner: string * + [] type': string * + [] name: string * + [] version: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Gets all files of a package [] [] - abstract ListPackageFiles : - [] owner : string * - [] type' : string * - [] name : string * - [] version : string * - ?ct : System.Threading.CancellationToken -> + abstract ListPackageFiles: + [] owner: string * + [] type': string * + [] name: string * + [] version: string * + ?ct: System.Threading.CancellationToken -> PackageFile list System.Threading.Tasks.Task /// Search for issues across the repositories that the user has access to [] [] - abstract IssueSearchIssues : - [] state : string * - [] labels : string * - [] milestones : string * - [] q : string * - [] priority_repo_id : int * - [] type' : string * - [] since : string * - [] before : string * - [] assigned : bool * - [] created : bool * - [] mentioned : bool * - [] review_requested : bool * - [] owner : string * - [] team : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueSearchIssues: + [] state: string * + [] labels: string * + [] milestones: string * + [] q: string * + [] priority_repo_id: int * + [] type': string * + [] since: string * + [] before: string * + [] assigned: bool * + [] created: bool * + [] mentioned: bool * + [] review_requested: bool * + [] owner: string * + [] team: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Issue list System.Threading.Tasks.Task /// Migrate a remote git repository [] [] - abstract RepoMigrate : - [] body : MigrateRepoOptions * ?ct : System.Threading.CancellationToken -> + abstract RepoMigrate: + [] body: MigrateRepoOptions * ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// Search for repositories [] [] - abstract RepoSearch : - [] q : string * - [] topic : bool * - [] includeDesc : bool * - [] uid : int * - [] priority_owner_id : int * - [] team_id : int * - [] starredBy : int * - [] private' : bool * - [] is_private : bool * - [] template : bool * - [] archived : bool * - [] mode : string * - [] exclusive : bool * - [] sort : string * - [] order : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoSearch: + [] q: string * + [] topic: bool * + [] includeDesc: bool * + [] uid: int * + [] priority_owner_id: int * + [] team_id: int * + [] starredBy: int * + [] private': bool * + [] is_private: bool * + [] template: bool * + [] archived: bool * + [] mode: string * + [] exclusive: bool * + [] sort: string * + [] order: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> SearchResults System.Threading.Tasks.Task /// Get a repository [] [] - abstract RepoGet : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGet: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// Delete a repository [] [] - abstract RepoDelete : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoDelete: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit a repository's properties. Only fields that are set will be changed. [] [] - abstract RepoEdit : - [] owner : string * - [] repo : string * - [] body : EditRepoOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoEdit: + [] owner: string * + [] repo: string * + [] body: EditRepoOption * + ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// Get an archive of a repository [] [] - abstract RepoGetArchive : - [] owner : string * - [] repo : string * - [] archive : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetArchive: + [] owner: string * + [] repo: string * + [] archive: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Return all users that have write access and can be assigned to issues [] [] - abstract RepoGetAssignees : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetAssignees: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// List branch protections for a repository [] [] - abstract RepoListBranchProtection : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoListBranchProtection: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> BranchProtection list System.Threading.Tasks.Task /// Create a branch protections for a repository [] [] - abstract RepoCreateBranchProtection : - [] owner : string * - [] repo : string * - [] body : CreateBranchProtectionOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoCreateBranchProtection: + [] owner: string * + [] repo: string * + [] body: CreateBranchProtectionOption * + ?ct: System.Threading.CancellationToken -> BranchProtection System.Threading.Tasks.Task /// Get a specific branch protection for the repository [] [] - abstract RepoGetBranchProtection : - [] owner : string * - [] repo : string * - [] name : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetBranchProtection: + [] owner: string * + [] repo: string * + [] name: string * + ?ct: System.Threading.CancellationToken -> BranchProtection System.Threading.Tasks.Task /// Delete a specific branch protection for the repository [] [] - abstract RepoDeleteBranchProtection : - [] owner : string * - [] repo : string * - [] name : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteBranchProtection: + [] owner: string * + [] repo: string * + [] name: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit a branch protections for a repository. Only fields that are set will be changed [] [] - abstract RepoEditBranchProtection : - [] owner : string * - [] repo : string * - [] name : string * - [] body : EditBranchProtectionOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoEditBranchProtection: + [] owner: string * + [] repo: string * + [] name: string * + [] body: EditBranchProtectionOption * + ?ct: System.Threading.CancellationToken -> BranchProtection System.Threading.Tasks.Task /// List a repository's branches [] [] - abstract RepoListBranches : - [] owner : string * - [] repo : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListBranches: + [] owner: string * + [] repo: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Branch list System.Threading.Tasks.Task /// Create a branch [] [] - abstract RepoCreateBranch : - [] owner : string * - [] repo : string * - [] body : CreateBranchRepoOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoCreateBranch: + [] owner: string * + [] repo: string * + [] body: CreateBranchRepoOption * + ?ct: System.Threading.CancellationToken -> Branch System.Threading.Tasks.Task /// Retrieve a specific branch from a repository, including its effective branch protection [] [] - abstract RepoGetBranch : - [] owner : string * - [] repo : string * - [] branch : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetBranch: + [] owner: string * + [] repo: string * + [] branch: string * + ?ct: System.Threading.CancellationToken -> Branch System.Threading.Tasks.Task /// Delete a specific branch from a repository [] [] - abstract RepoDeleteBranch : - [] owner : string * - [] repo : string * - [] branch : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteBranch: + [] owner: string * + [] repo: string * + [] branch: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List a repository's collaborators [] [] - abstract RepoListCollaborators : - [] owner : string * - [] repo : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListCollaborators: + [] owner: string * + [] repo: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// Check if a user is a collaborator of a repository [] [] - abstract RepoCheckCollaborator : - [] owner : string * - [] repo : string * - [] collaborator : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoCheckCollaborator: + [] owner: string * + [] repo: string * + [] collaborator: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Delete a collaborator from a repository [] [] - abstract RepoDeleteCollaborator : - [] owner : string * - [] repo : string * - [] collaborator : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteCollaborator: + [] owner: string * + [] repo: string * + [] collaborator: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Add a collaborator to a repository [] [] - abstract RepoAddCollaborator : - [] owner : string * - [] repo : string * - [] collaborator : string * - [] body : AddCollaboratorOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoAddCollaborator: + [] owner: string * + [] repo: string * + [] collaborator: string * + [] body: AddCollaboratorOption * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get repository permissions for a user [] [] - abstract RepoGetRepoPermissions : - [] owner : string * - [] repo : string * - [] collaborator : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetRepoPermissions: + [] owner: string * + [] repo: string * + [] collaborator: string * + ?ct: System.Threading.CancellationToken -> RepoCollaboratorPermission System.Threading.Tasks.Task /// Get a list of all commits from a repository [] [] - abstract RepoGetAllCommits : - [] owner : string * - [] repo : string * - [] sha : string * - [] path : string * - [] stat : bool * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetAllCommits: + [] owner: string * + [] repo: string * + [] sha: string * + [] path: string * + [] stat: bool * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Commit list System.Threading.Tasks.Task /// Get a commit's combined status, by branch/tag/commit reference [] [] - abstract RepoGetCombinedStatusByRef : - [] owner : string * - [] repo : string * - [] ref : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetCombinedStatusByRef: + [] owner: string * + [] repo: string * + [] ref: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> CombinedStatus System.Threading.Tasks.Task /// Get a commit's statuses, by branch/tag/commit reference [] [] - abstract RepoListStatusesByRef : - [] owner : string * - [] repo : string * - [] ref : string * - [] sort : string * - [] state : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListStatusesByRef: + [] owner: string * + [] repo: string * + [] ref: string * + [] sort: string * + [] state: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> CommitStatus list System.Threading.Tasks.Task /// Gets the metadata of all the entries of the root dir [] [] - abstract RepoGetContentsList : - [] owner : string * - [] repo : string * - [] ref : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetContentsList: + [] owner: string * + [] repo: string * + [] ref: string * + ?ct: System.Threading.CancellationToken -> ContentsResponse list System.Threading.Tasks.Task /// Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir [] [] - abstract RepoGetContents : - [] owner : string * - [] repo : string * - [] filepath : string * - [] ref : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetContents: + [] owner: string * + [] repo: string * + [] filepath: string * + [] ref: string * + ?ct: System.Threading.CancellationToken -> ContentsResponse System.Threading.Tasks.Task /// Create a file in a repository [] [] - abstract RepoCreateFile : - [] owner : string * - [] repo : string * - [] filepath : string * - [] body : CreateFileOptions * - ?ct : System.Threading.CancellationToken -> + abstract RepoCreateFile: + [] owner: string * + [] repo: string * + [] filepath: string * + [] body: CreateFileOptions * + ?ct: System.Threading.CancellationToken -> FileResponse System.Threading.Tasks.Task /// Delete a file in a repository [] [] - abstract RepoDeleteFile : - [] owner : string * - [] repo : string * - [] filepath : string * - [] body : DeleteFileOptions * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteFile: + [] owner: string * + [] repo: string * + [] filepath: string * + [] body: DeleteFileOptions * + ?ct: System.Threading.CancellationToken -> FileDeleteResponse System.Threading.Tasks.Task /// Update a file in a repository [] [] - abstract RepoUpdateFile : - [] owner : string * - [] repo : string * - [] filepath : string * - [] body : UpdateFileOptions * - ?ct : System.Threading.CancellationToken -> + abstract RepoUpdateFile: + [] owner: string * + [] repo: string * + [] filepath: string * + [] body: UpdateFileOptions * + ?ct: System.Threading.CancellationToken -> FileResponse System.Threading.Tasks.Task /// Apply diff patch to repository [] [] - abstract RepoApplyDiffPatch : - [] owner : string * - [] repo : string * - [] body : UpdateFileOptions * - ?ct : System.Threading.CancellationToken -> + abstract RepoApplyDiffPatch: + [] owner: string * + [] repo: string * + [] body: UpdateFileOptions * + ?ct: System.Threading.CancellationToken -> FileResponse System.Threading.Tasks.Task /// Get the EditorConfig definitions of a file in a repository [] [] - abstract RepoGetEditorConfig : - [] owner : string * - [] repo : string * - [] filepath : string * - [] ref : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetEditorConfig: + [] owner: string * + [] repo: string * + [] filepath: string * + [] ref: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List a repository's forks [] [] - abstract ListForks : - [] owner : string * - [] repo : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract ListForks: + [] owner: string * + [] repo: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Repository list System.Threading.Tasks.Task /// Fork a repository [] [] - abstract CreateFork : - [] owner : string * - [] repo : string * - [] body : CreateForkOption * - ?ct : System.Threading.CancellationToken -> + abstract CreateFork: + [] owner: string * + [] repo: string * + [] body: CreateForkOption * + ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// Gets the blob of a repository. [] [] - abstract GetBlob : - [] owner : string * - [] repo : string * - [] sha : string * - ?ct : System.Threading.CancellationToken -> + abstract GetBlob: + [] owner: string * + [] repo: string * + [] sha: string * + ?ct: System.Threading.CancellationToken -> GitBlobResponse System.Threading.Tasks.Task /// Get a single commit from a repository [] [] - abstract RepoGetSingleCommit : - [] owner : string * - [] repo : string * - [] sha : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetSingleCommit: + [] owner: string * + [] repo: string * + [] sha: string * + ?ct: System.Threading.CancellationToken -> Commit System.Threading.Tasks.Task /// Get a commit's diff or patch [] [] - abstract RepoDownloadCommitDiffOrPatch : - [] owner : string * - [] repo : string * - [] sha : string * - [] diffType : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoDownloadCommitDiffOrPatch: + [] owner: string * + [] repo: string * + [] sha: string * + [] diffType: string * + ?ct: System.Threading.CancellationToken -> string System.Threading.Tasks.Task /// Get a note corresponding to a single commit from a repository [] [] - abstract RepoGetNote : - [] owner : string * - [] repo : string * - [] sha : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetNote: + [] owner: string * + [] repo: string * + [] sha: string * + ?ct: System.Threading.CancellationToken -> Note System.Threading.Tasks.Task /// Get specified ref or filtered repository's refs [] [] - abstract RepoListAllGitRefs : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoListAllGitRefs: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> Reference list System.Threading.Tasks.Task /// Get specified ref or filtered repository's refs [] [] - abstract RepoListGitRefs : - [] owner : string * - [] repo : string * - [] ref : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoListGitRefs: + [] owner: string * + [] repo: string * + [] ref: string * + ?ct: System.Threading.CancellationToken -> Reference list System.Threading.Tasks.Task /// Gets the tag object of an annotated tag (not lightweight tags) [] [] - abstract GetAnnotatedTag : - [] owner : string * - [] repo : string * - [] sha : string * - ?ct : System.Threading.CancellationToken -> + abstract GetAnnotatedTag: + [] owner: string * + [] repo: string * + [] sha: string * + ?ct: System.Threading.CancellationToken -> AnnotatedTag System.Threading.Tasks.Task /// Gets the tree of a repository. [] [] - abstract GetTree : - [] owner : string * - [] repo : string * - [] sha : string * - [] recursive : bool * - [] page : int * - [] per_page : int * - ?ct : System.Threading.CancellationToken -> + abstract GetTree: + [] owner: string * + [] repo: string * + [] sha: string * + [] recursive: bool * + [] page: int * + [] per_page: int * + ?ct: System.Threading.CancellationToken -> GitTreeResponse System.Threading.Tasks.Task /// List the hooks in a repository [] [] - abstract RepoListHooks : - [] owner : string * - [] repo : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListHooks: + [] owner: string * + [] repo: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Hook list System.Threading.Tasks.Task /// Create a hook [] [] - abstract RepoCreateHook : - [] owner : string * - [] repo : string * - [] body : CreateHookOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoCreateHook: + [] owner: string * + [] repo: string * + [] body: CreateHookOption * + ?ct: System.Threading.CancellationToken -> Hook System.Threading.Tasks.Task /// List the Git hooks in a repository [] [] - abstract RepoListGitHooks : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoListGitHooks: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> GitHook list System.Threading.Tasks.Task /// Get a Git hook [] [] - abstract RepoGetGitHook : - [] owner : string * - [] repo : string * - [] id : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetGitHook: + [] owner: string * + [] repo: string * + [] id: string * + ?ct: System.Threading.CancellationToken -> GitHook System.Threading.Tasks.Task /// Delete a Git hook in a repository [] [] - abstract RepoDeleteGitHook : - [] owner : string * - [] repo : string * - [] id : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteGitHook: + [] owner: string * + [] repo: string * + [] id: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit a Git hook in a repository [] [] - abstract RepoEditGitHook : - [] owner : string * - [] repo : string * - [] id : string * - [] body : EditGitHookOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoEditGitHook: + [] owner: string * + [] repo: string * + [] id: string * + [] body: EditGitHookOption * + ?ct: System.Threading.CancellationToken -> GitHook System.Threading.Tasks.Task /// Get a hook [] [] - abstract RepoGetHook : - [] owner : string * - [] repo : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetHook: + [] owner: string * + [] repo: string * + [] id: int * + ?ct: System.Threading.CancellationToken -> Hook System.Threading.Tasks.Task /// Delete a hook in a repository [] [] - abstract RepoDeleteHook : - [] owner : string * - [] repo : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteHook: + [] owner: string * + [] repo: string * + [] id: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit a hook in a repository [] [] - abstract RepoEditHook : - [] owner : string * - [] repo : string * - [] id : int * - [] body : EditHookOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoEditHook: + [] owner: string * + [] repo: string * + [] id: int * + [] body: EditHookOption * + ?ct: System.Threading.CancellationToken -> Hook System.Threading.Tasks.Task /// Test a push webhook [] [] - abstract RepoTestHook : - [] owner : string * - [] repo : string * - [] id : int * - [] ref : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoTestHook: + [] owner: string * + [] repo: string * + [] id: int * + [] ref: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get available issue templates for a repository [] [] - abstract RepoGetIssueTemplates : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetIssueTemplates: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> IssueTemplate list System.Threading.Tasks.Task /// List a repository's issues [] [] - abstract IssueListIssues : - [] owner : string * - [] repo : string * - [] state : string * - [] labels : string * - [] q : string * - [] type' : string * - [] milestones : string * - [] since : string * - [] before : string * - [] created_by : string * - [] assigned_by : string * - [] mentioned_by : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueListIssues: + [] owner: string * + [] repo: string * + [] state: string * + [] labels: string * + [] q: string * + [] type': string * + [] milestones: string * + [] since: string * + [] before: string * + [] created_by: string * + [] assigned_by: string * + [] mentioned_by: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Issue list System.Threading.Tasks.Task /// Create an issue. If using deadline only the date will be taken into account, and time of day ignored. [] [] - abstract IssueCreateIssue : - [] owner : string * - [] repo : string * - [] body : CreateIssueOption * - ?ct : System.Threading.CancellationToken -> + abstract IssueCreateIssue: + [] owner: string * + [] repo: string * + [] body: CreateIssueOption * + ?ct: System.Threading.CancellationToken -> Issue System.Threading.Tasks.Task /// List all comments in a repository [] [] - abstract IssueGetRepoComments : - [] owner : string * - [] repo : string * - [] since : string * - [] before : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueGetRepoComments: + [] owner: string * + [] repo: string * + [] since: string * + [] before: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Comment list System.Threading.Tasks.Task /// Delete a comment [] [] - abstract IssueDeleteComment : - [] owner : string * - [] repo : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueDeleteComment: + [] owner: string * + [] repo: string * + [] id: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List comment's attachments [] [] - abstract IssueListIssueCommentAttachments : - [] owner : string * - [] repo : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueListIssueCommentAttachments: + [] owner: string * + [] repo: string * + [] id: int * + ?ct: System.Threading.CancellationToken -> Attachment list System.Threading.Tasks.Task /// Get a comment attachment [] [] - abstract IssueGetIssueCommentAttachment : - [] owner : string * - [] repo : string * - [] id : int * - [] attachment_id : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueGetIssueCommentAttachment: + [] owner: string * + [] repo: string * + [] id: int * + [] attachment_id: int * + ?ct: System.Threading.CancellationToken -> Attachment System.Threading.Tasks.Task /// Delete a comment attachment [] [] - abstract IssueDeleteIssueCommentAttachment : - [] owner : string * - [] repo : string * - [] id : int * - [] attachment_id : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueDeleteIssueCommentAttachment: + [] owner: string * + [] repo: string * + [] id: int * + [] attachment_id: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit a comment attachment [] [] - abstract IssueEditIssueCommentAttachment : - [] owner : string * - [] repo : string * - [] id : int * - [] attachment_id : int * - [] body : EditAttachmentOptions * - ?ct : System.Threading.CancellationToken -> + abstract IssueEditIssueCommentAttachment: + [] owner: string * + [] repo: string * + [] id: int * + [] attachment_id: int * + [] body: EditAttachmentOptions * + ?ct: System.Threading.CancellationToken -> Attachment System.Threading.Tasks.Task /// Get a list of reactions from a comment of an issue [] [] - abstract IssueGetCommentReactions : - [] owner : string * - [] repo : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueGetCommentReactions: + [] owner: string * + [] repo: string * + [] id: int * + ?ct: System.Threading.CancellationToken -> Reaction list System.Threading.Tasks.Task /// Remove a reaction from a comment of an issue [] [] - abstract IssueDeleteCommentReaction : - [] owner : string * - [] repo : string * - [] id : int * - [] content : EditReactionOption * - ?ct : System.Threading.CancellationToken -> + abstract IssueDeleteCommentReaction: + [] owner: string * + [] repo: string * + [] id: int * + [] content: EditReactionOption * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get an issue [] [] - abstract IssueGetIssue : - [] owner : string * - [] repo : string * - [] index : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueGetIssue: + [] owner: string * + [] repo: string * + [] index: int * + ?ct: System.Threading.CancellationToken -> Issue System.Threading.Tasks.Task /// Delete an issue [] [] - abstract IssueDelete : - [] owner : string * - [] repo : string * - [] index : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueDelete: + [] owner: string * + [] repo: string * + [] index: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. [] [] - abstract IssueEditIssue : - [] owner : string * - [] repo : string * - [] index : int * - [] body : EditIssueOption * - ?ct : System.Threading.CancellationToken -> + abstract IssueEditIssue: + [] owner: string * + [] repo: string * + [] index: int * + [] body: EditIssueOption * + ?ct: System.Threading.CancellationToken -> Issue System.Threading.Tasks.Task /// List issue's attachments [] [] - abstract IssueListIssueAttachments : - [] owner : string * - [] repo : string * - [] index : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueListIssueAttachments: + [] owner: string * + [] repo: string * + [] index: int * + ?ct: System.Threading.CancellationToken -> Attachment list System.Threading.Tasks.Task /// Get an issue attachment [] [] - abstract IssueGetIssueAttachment : - [] owner : string * - [] repo : string * - [] index : int * - [] attachment_id : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueGetIssueAttachment: + [] owner: string * + [] repo: string * + [] index: int * + [] attachment_id: int * + ?ct: System.Threading.CancellationToken -> Attachment System.Threading.Tasks.Task /// Delete an issue attachment [] [] - abstract IssueDeleteIssueAttachment : - [] owner : string * - [] repo : string * - [] index : int * - [] attachment_id : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueDeleteIssueAttachment: + [] owner: string * + [] repo: string * + [] index: int * + [] attachment_id: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit an issue attachment [] [] - abstract IssueEditIssueAttachment : - [] owner : string * - [] repo : string * - [] index : int * - [] attachment_id : int * - [] body : EditAttachmentOptions * - ?ct : System.Threading.CancellationToken -> + abstract IssueEditIssueAttachment: + [] owner: string * + [] repo: string * + [] index: int * + [] attachment_id: int * + [] body: EditAttachmentOptions * + ?ct: System.Threading.CancellationToken -> Attachment System.Threading.Tasks.Task /// List all comments on an issue [] [] - abstract IssueGetComments : - [] owner : string * - [] repo : string * - [] index : int * - [] since : string * - [] before : string * - ?ct : System.Threading.CancellationToken -> + abstract IssueGetComments: + [] owner: string * + [] repo: string * + [] index: int * + [] since: string * + [] before: string * + ?ct: System.Threading.CancellationToken -> Comment list System.Threading.Tasks.Task /// Add a comment to an issue [] [] - abstract IssueCreateComment : - [] owner : string * - [] repo : string * - [] index : int * - [] body : CreateIssueCommentOption * - ?ct : System.Threading.CancellationToken -> + abstract IssueCreateComment: + [] owner: string * + [] repo: string * + [] index: int * + [] body: CreateIssueCommentOption * + ?ct: System.Threading.CancellationToken -> Comment System.Threading.Tasks.Task /// Delete a comment [] [] - abstract IssueDeleteCommentDeprecated : - [] owner : string * - [] repo : string * - [] index : int * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueDeleteCommentDeprecated: + [] owner: string * + [] repo: string * + [] index: int * + [] id: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. [] [] - abstract IssueEditIssueDeadline : - [] owner : string * - [] repo : string * - [] index : int * - [] body : EditDeadlineOption * - ?ct : System.Threading.CancellationToken -> + abstract IssueEditIssueDeadline: + [] owner: string * + [] repo: string * + [] index: int * + [] body: EditDeadlineOption * + ?ct: System.Threading.CancellationToken -> IssueDeadline System.Threading.Tasks.Task /// Get an issue's labels [] [] - abstract IssueGetLabels : - [] owner : string * - [] repo : string * - [] index : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueGetLabels: + [] owner: string * + [] repo: string * + [] index: int * + ?ct: System.Threading.CancellationToken -> Label list System.Threading.Tasks.Task /// Add a label to an issue [] [] - abstract IssueAddLabel : - [] owner : string * - [] repo : string * - [] index : int * - [] body : IssueLabelsOption * - ?ct : System.Threading.CancellationToken -> + abstract IssueAddLabel: + [] owner: string * + [] repo: string * + [] index: int * + [] body: IssueLabelsOption * + ?ct: System.Threading.CancellationToken -> Label list System.Threading.Tasks.Task /// Remove all labels from an issue [] [] - abstract IssueClearLabels : - [] owner : string * - [] repo : string * - [] index : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueClearLabels: + [] owner: string * + [] repo: string * + [] index: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Replace an issue's labels [] [] - abstract IssueReplaceLabels : - [] owner : string * - [] repo : string * - [] index : int * - [] body : IssueLabelsOption * - ?ct : System.Threading.CancellationToken -> + abstract IssueReplaceLabels: + [] owner: string * + [] repo: string * + [] index: int * + [] body: IssueLabelsOption * + ?ct: System.Threading.CancellationToken -> Label list System.Threading.Tasks.Task /// Remove a label from an issue [] [] - abstract IssueRemoveLabel : - [] owner : string * - [] repo : string * - [] index : int * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueRemoveLabel: + [] owner: string * + [] repo: string * + [] index: int * + [] id: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get a list reactions of an issue [] [] - abstract IssueGetIssueReactions : - [] owner : string * - [] repo : string * - [] index : int * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueGetIssueReactions: + [] owner: string * + [] repo: string * + [] index: int * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Reaction list System.Threading.Tasks.Task /// Remove a reaction from an issue [] [] - abstract IssueDeleteIssueReaction : - [] owner : string * - [] repo : string * - [] index : int * - [] content : EditReactionOption * - ?ct : System.Threading.CancellationToken -> + abstract IssueDeleteIssueReaction: + [] owner: string * + [] repo: string * + [] index: int * + [] content: EditReactionOption * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Delete an issue's existing stopwatch. [] [] - abstract IssueDeleteStopWatch : - [] owner : string * - [] repo : string * - [] index : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueDeleteStopWatch: + [] owner: string * + [] repo: string * + [] index: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Start stopwatch on an issue. [] [] - abstract IssueStartStopWatch : - [] owner : string * - [] repo : string * - [] index : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueStartStopWatch: + [] owner: string * + [] repo: string * + [] index: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Stop an issue's existing stopwatch. [] [] - abstract IssueStopStopWatch : - [] owner : string * - [] repo : string * - [] index : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueStopStopWatch: + [] owner: string * + [] repo: string * + [] index: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get users who subscribed on an issue. [] [] - abstract IssueSubscriptions : - [] owner : string * - [] repo : string * - [] index : int * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueSubscriptions: + [] owner: string * + [] repo: string * + [] index: int * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// Check if user is subscribed to an issue [] [] - abstract IssueCheckSubscription : - [] owner : string * - [] repo : string * - [] index : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueCheckSubscription: + [] owner: string * + [] repo: string * + [] index: int * + ?ct: System.Threading.CancellationToken -> WatchInfo System.Threading.Tasks.Task /// List all comments and events on an issue [] [] - abstract IssueGetCommentsAndTimeline : - [] owner : string * - [] repo : string * - [] index : int * - [] since : string * - [] page : int * - [] limit : int * - [] before : string * - ?ct : System.Threading.CancellationToken -> + abstract IssueGetCommentsAndTimeline: + [] owner: string * + [] repo: string * + [] index: int * + [] since: string * + [] page: int * + [] limit: int * + [] before: string * + ?ct: System.Threading.CancellationToken -> TimelineComment list System.Threading.Tasks.Task /// List an issue's tracked times [] [] - abstract IssueTrackedTimes : - [] owner : string * - [] repo : string * - [] index : int * - [] user : string * - [] since : string * - [] before : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueTrackedTimes: + [] owner: string * + [] repo: string * + [] index: int * + [] user: string * + [] since: string * + [] before: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> TrackedTime list System.Threading.Tasks.Task /// Add tracked time to a issue [] [] - abstract IssueAddTime : - [] owner : string * - [] repo : string * - [] index : int * - [] body : AddTimeOption * - ?ct : System.Threading.CancellationToken -> + abstract IssueAddTime: + [] owner: string * + [] repo: string * + [] index: int * + [] body: AddTimeOption * + ?ct: System.Threading.CancellationToken -> TrackedTime System.Threading.Tasks.Task /// Reset a tracked time of an issue [] [] - abstract IssueResetTime : - [] owner : string * - [] repo : string * - [] index : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueResetTime: + [] owner: string * + [] repo: string * + [] index: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Delete specific tracked time [] [] - abstract IssueDeleteTime : - [] owner : string * - [] repo : string * - [] index : int * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueDeleteTime: + [] owner: string * + [] repo: string * + [] index: int * + [] id: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List a repository's keys [] [] - abstract RepoListKeys : - [] owner : string * - [] repo : string * - [] key_id : int * - [] fingerprint : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListKeys: + [] owner: string * + [] repo: string * + [] key_id: int * + [] fingerprint: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> DeployKey list System.Threading.Tasks.Task /// Add a key to a repository [] [] - abstract RepoCreateKey : - [] owner : string * - [] repo : string * - [] body : CreateKeyOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoCreateKey: + [] owner: string * + [] repo: string * + [] body: CreateKeyOption * + ?ct: System.Threading.CancellationToken -> DeployKey System.Threading.Tasks.Task /// Get a repository's key by id [] [] - abstract RepoGetKey : - [] owner : string * - [] repo : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetKey: + [] owner: string * + [] repo: string * + [] id: int * + ?ct: System.Threading.CancellationToken -> DeployKey System.Threading.Tasks.Task /// Delete a key from a repository [] [] - abstract RepoDeleteKey : - [] owner : string * - [] repo : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteKey: + [] owner: string * + [] repo: string * + [] id: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get all of a repository's labels [] [] - abstract IssueListLabels : - [] owner : string * - [] repo : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueListLabels: + [] owner: string * + [] repo: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Label list System.Threading.Tasks.Task /// Create a label [] [] - abstract IssueCreateLabel : - [] owner : string * - [] repo : string * - [] body : CreateLabelOption * - ?ct : System.Threading.CancellationToken -> + abstract IssueCreateLabel: + [] owner: string * + [] repo: string * + [] body: CreateLabelOption * + ?ct: System.Threading.CancellationToken -> Label System.Threading.Tasks.Task /// Get a single label [] [] - abstract IssueGetLabel : - [] owner : string * - [] repo : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueGetLabel: + [] owner: string * + [] repo: string * + [] id: int * + ?ct: System.Threading.CancellationToken -> Label System.Threading.Tasks.Task /// Delete a label [] [] - abstract IssueDeleteLabel : - [] owner : string * - [] repo : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueDeleteLabel: + [] owner: string * + [] repo: string * + [] id: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Update a label [] [] - abstract IssueEditLabel : - [] owner : string * - [] repo : string * - [] id : int * - [] body : EditLabelOption * - ?ct : System.Threading.CancellationToken -> + abstract IssueEditLabel: + [] owner: string * + [] repo: string * + [] id: int * + [] body: EditLabelOption * + ?ct: System.Threading.CancellationToken -> Label System.Threading.Tasks.Task /// Get languages and number of bytes of code written [] [] - abstract RepoGetLanguages : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetLanguages: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> LanguageStatistics System.Threading.Tasks.Task /// Get a file or it's LFS object from a repository [] [] - abstract RepoGetRawFileOrLFS : - [] owner : string * - [] repo : string * - [] filepath : string * - [] ref : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetRawFileOrLFS: + [] owner: string * + [] repo: string * + [] filepath: string * + [] ref: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get all of a repository's opened milestones [] [] - abstract IssueGetMilestonesList : - [] owner : string * - [] repo : string * - [] state : string * - [] name : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract IssueGetMilestonesList: + [] owner: string * + [] repo: string * + [] state: string * + [] name: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Milestone list System.Threading.Tasks.Task /// Create a milestone [] [] - abstract IssueCreateMilestone : - [] owner : string * - [] repo : string * - [] body : CreateMilestoneOption * - ?ct : System.Threading.CancellationToken -> + abstract IssueCreateMilestone: + [] owner: string * + [] repo: string * + [] body: CreateMilestoneOption * + ?ct: System.Threading.CancellationToken -> Milestone System.Threading.Tasks.Task /// Get a milestone [] [] - abstract IssueGetMilestone : - [] owner : string * - [] repo : string * - [] id : string * - ?ct : System.Threading.CancellationToken -> + abstract IssueGetMilestone: + [] owner: string * + [] repo: string * + [] id: string * + ?ct: System.Threading.CancellationToken -> Milestone System.Threading.Tasks.Task /// Delete a milestone [] [] - abstract IssueDeleteMilestone : - [] owner : string * - [] repo : string * - [] id : string * - ?ct : System.Threading.CancellationToken -> + abstract IssueDeleteMilestone: + [] owner: string * + [] repo: string * + [] id: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Update a milestone [] [] - abstract IssueEditMilestone : - [] owner : string * - [] repo : string * - [] id : string * - [] body : EditMilestoneOption * - ?ct : System.Threading.CancellationToken -> + abstract IssueEditMilestone: + [] owner: string * + [] repo: string * + [] id: string * + [] body: EditMilestoneOption * + ?ct: System.Threading.CancellationToken -> Milestone System.Threading.Tasks.Task /// Sync a mirrored repository [] [] - abstract RepoMirrorSync : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoMirrorSync: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List users's notification threads on a specific repo [] [] - abstract NotifyGetRepoList : - [] owner : string * - [] repo : string * - [] all : bool * - [] status_types : string list * - [] subject_type : string list * - [] since : string * - [] before : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract NotifyGetRepoList: + [] owner: string * + [] repo: string * + [] all: bool * + [] status_types: string list * + [] subject_type: string list * + [] since: string * + [] before: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> NotificationThread list System.Threading.Tasks.Task /// Mark notification threads as read, pinned or unread on a specific repo [] [] - abstract NotifyReadRepoList : - [] owner : string * - [] repo : string * - [] all : string * - [] status_types : string list * - [] to_status : string * - [] last_read_at : string * - ?ct : System.Threading.CancellationToken -> + abstract NotifyReadRepoList: + [] owner: string * + [] repo: string * + [] all: string * + [] status_types: string list * + [] to_status: string * + [] last_read_at: string * + ?ct: System.Threading.CancellationToken -> NotificationThread list System.Threading.Tasks.Task /// List a repo's pull requests [] [] - abstract RepoListPullRequests : - [] owner : string * - [] repo : string * - [] state : string * - [] sort : string * - [] milestone : int * - [] labels : int list * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListPullRequests: + [] owner: string * + [] repo: string * + [] state: string * + [] sort: string * + [] milestone: int * + [] labels: int list * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> PullRequest list System.Threading.Tasks.Task /// Create a pull request [] [] - abstract RepoCreatePullRequest : - [] owner : string * - [] repo : string * - [] body : CreatePullRequestOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoCreatePullRequest: + [] owner: string * + [] repo: string * + [] body: CreatePullRequestOption * + ?ct: System.Threading.CancellationToken -> PullRequest System.Threading.Tasks.Task /// Get a pull request [] [] - abstract RepoGetPullRequest : - [] owner : string * - [] repo : string * - [] index : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetPullRequest: + [] owner: string * + [] repo: string * + [] index: int * + ?ct: System.Threading.CancellationToken -> PullRequest System.Threading.Tasks.Task /// Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. [] [] - abstract RepoEditPullRequest : - [] owner : string * - [] repo : string * - [] index : int * - [] body : EditPullRequestOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoEditPullRequest: + [] owner: string * + [] repo: string * + [] index: int * + [] body: EditPullRequestOption * + ?ct: System.Threading.CancellationToken -> PullRequest System.Threading.Tasks.Task /// Get a pull request diff or patch [] [] - abstract RepoDownloadPullDiffOrPatch : - [] owner : string * - [] repo : string * - [] index : int * - [] diffType : string * - [] binary : bool * - ?ct : System.Threading.CancellationToken -> + abstract RepoDownloadPullDiffOrPatch: + [] owner: string * + [] repo: string * + [] index: int * + [] diffType: string * + [] binary: bool * + ?ct: System.Threading.CancellationToken -> string System.Threading.Tasks.Task /// Get commits for a pull request [] [] - abstract RepoGetPullRequestCommits : - [] owner : string * - [] repo : string * - [] index : int * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetPullRequestCommits: + [] owner: string * + [] repo: string * + [] index: int * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Commit list System.Threading.Tasks.Task /// Get changed files for a pull request [] [] - abstract RepoGetPullRequestFiles : - [] owner : string * - [] repo : string * - [] index : int * - [] skip_to : string * - [] whitespace : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetPullRequestFiles: + [] owner: string * + [] repo: string * + [] index: int * + [] skip_to: string * + [] whitespace: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> ChangedFile list System.Threading.Tasks.Task /// Check if a pull request has been merged [] [] - abstract RepoPullRequestIsMerged : - [] owner : string * - [] repo : string * - [] index : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoPullRequestIsMerged: + [] owner: string * + [] repo: string * + [] index: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Merge a pull request [] [] - abstract RepoMergePullRequest : - [] owner : string * - [] repo : string * - [] index : int * - [] body : MergePullRequestOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoMergePullRequest: + [] owner: string * + [] repo: string * + [] index: int * + [] body: MergePullRequestOption * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Cancel the scheduled auto merge for the given pull request [] [] - abstract RepoCancelScheduledAutoMerge : - [] owner : string * - [] repo : string * - [] index : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoCancelScheduledAutoMerge: + [] owner: string * + [] repo: string * + [] index: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// create review requests for a pull request [] [] - abstract RepoCreatePullReviewRequests : - [] owner : string * - [] repo : string * - [] index : int * - [] body : PullReviewRequestOptions * - ?ct : System.Threading.CancellationToken -> + abstract RepoCreatePullReviewRequests: + [] owner: string * + [] repo: string * + [] index: int * + [] body: PullReviewRequestOptions * + ?ct: System.Threading.CancellationToken -> PullReview list System.Threading.Tasks.Task /// cancel review requests for a pull request [] [] - abstract RepoDeletePullReviewRequests : - [] owner : string * - [] repo : string * - [] index : int * - [] body : PullReviewRequestOptions * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeletePullReviewRequests: + [] owner: string * + [] repo: string * + [] index: int * + [] body: PullReviewRequestOptions * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List all reviews for a pull request [] [] - abstract RepoListPullReviews : - [] owner : string * - [] repo : string * - [] index : int * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListPullReviews: + [] owner: string * + [] repo: string * + [] index: int * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> PullReview list System.Threading.Tasks.Task /// Create a review to an pull request [] [] - abstract RepoCreatePullReview : - [] owner : string * - [] repo : string * - [] index : int * - [] body : CreatePullReviewOptions * - ?ct : System.Threading.CancellationToken -> + abstract RepoCreatePullReview: + [] owner: string * + [] repo: string * + [] index: int * + [] body: CreatePullReviewOptions * + ?ct: System.Threading.CancellationToken -> PullReview System.Threading.Tasks.Task /// Get a specific review for a pull request [] [] - abstract RepoGetPullReview : - [] owner : string * - [] repo : string * - [] index : int * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetPullReview: + [] owner: string * + [] repo: string * + [] index: int * + [] id: int * + ?ct: System.Threading.CancellationToken -> PullReview System.Threading.Tasks.Task /// Submit a pending review to an pull request [] [] - abstract RepoSubmitPullReview : - [] owner : string * - [] repo : string * - [] index : int * - [] id : int * - [] body : SubmitPullReviewOptions * - ?ct : System.Threading.CancellationToken -> + abstract RepoSubmitPullReview: + [] owner: string * + [] repo: string * + [] index: int * + [] id: int * + [] body: SubmitPullReviewOptions * + ?ct: System.Threading.CancellationToken -> PullReview System.Threading.Tasks.Task /// Delete a specific review from a pull request [] [] - abstract RepoDeletePullReview : - [] owner : string * - [] repo : string * - [] index : int * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeletePullReview: + [] owner: string * + [] repo: string * + [] index: int * + [] id: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get a specific review for a pull request [] [] - abstract RepoGetPullReviewComments : - [] owner : string * - [] repo : string * - [] index : int * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetPullReviewComments: + [] owner: string * + [] repo: string * + [] index: int * + [] id: int * + ?ct: System.Threading.CancellationToken -> PullReviewComment list System.Threading.Tasks.Task /// Dismiss a review for a pull request [] [] - abstract RepoDismissPullReview : - [] owner : string * - [] repo : string * - [] index : int * - [] id : int * - [] body : DismissPullReviewOptions * - ?ct : System.Threading.CancellationToken -> + abstract RepoDismissPullReview: + [] owner: string * + [] repo: string * + [] index: int * + [] id: int * + [] body: DismissPullReviewOptions * + ?ct: System.Threading.CancellationToken -> PullReview System.Threading.Tasks.Task /// Cancel to dismiss a review for a pull request [] [] - abstract RepoUnDismissPullReview : - [] owner : string * - [] repo : string * - [] index : int * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoUnDismissPullReview: + [] owner: string * + [] repo: string * + [] index: int * + [] id: int * + ?ct: System.Threading.CancellationToken -> PullReview System.Threading.Tasks.Task /// Merge PR's baseBranch into headBranch [] [] - abstract RepoUpdatePullRequest : - [] owner : string * - [] repo : string * - [] index : int * - [] style : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoUpdatePullRequest: + [] owner: string * + [] repo: string * + [] index: int * + [] style: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get all push mirrors of the repository [] [] - abstract RepoListPushMirrors : - [] owner : string * - [] repo : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListPushMirrors: + [] owner: string * + [] repo: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> PushMirror list System.Threading.Tasks.Task /// add a push mirror to the repository [] [] - abstract RepoAddPushMirror : - [] owner : string * - [] repo : string * - [] body : CreatePushMirrorOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoAddPushMirror: + [] owner: string * + [] repo: string * + [] body: CreatePushMirrorOption * + ?ct: System.Threading.CancellationToken -> PushMirror System.Threading.Tasks.Task /// Sync all push mirrored repository [] [] - abstract RepoPushMirrorSync : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoPushMirrorSync: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get push mirror of the repository by remoteName [] [] - abstract RepoGetPushMirrorByRemoteName : - [] owner : string * - [] repo : string * - [] name : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetPushMirrorByRemoteName: + [] owner: string * + [] repo: string * + [] name: string * + ?ct: System.Threading.CancellationToken -> PushMirror System.Threading.Tasks.Task /// deletes a push mirror from a repository by remoteName [] [] - abstract RepoDeletePushMirror : - [] owner : string * - [] repo : string * - [] name : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeletePushMirror: + [] owner: string * + [] repo: string * + [] name: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get a file from a repository [] [] - abstract RepoGetRawFile : - [] owner : string * - [] repo : string * - [] filepath : string * - [] ref : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetRawFile: + [] owner: string * + [] repo: string * + [] filepath: string * + [] ref: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List a repo's releases [] [] - abstract RepoListReleases : - [] owner : string * - [] repo : string * - [] draft : bool * - [] pre_release : bool * - [] per_page : int * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListReleases: + [] owner: string * + [] repo: string * + [] draft: bool * + [] pre_release: bool * + [] per_page: int * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Release list System.Threading.Tasks.Task /// Create a release [] [] - abstract RepoCreateRelease : - [] owner : string * - [] repo : string * - [] body : CreateReleaseOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoCreateRelease: + [] owner: string * + [] repo: string * + [] body: CreateReleaseOption * + ?ct: System.Threading.CancellationToken -> Release System.Threading.Tasks.Task /// Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at [] [] - abstract RepoGetLatestRelease : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetLatestRelease: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> Release System.Threading.Tasks.Task /// Get a release by tag name [] [] - abstract RepoGetReleaseByTag : - [] owner : string * - [] repo : string * - [] tag : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetReleaseByTag: + [] owner: string * + [] repo: string * + [] tag: string * + ?ct: System.Threading.CancellationToken -> Release System.Threading.Tasks.Task /// Delete a release by tag name [] [] - abstract RepoDeleteReleaseByTag : - [] owner : string * - [] repo : string * - [] tag : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteReleaseByTag: + [] owner: string * + [] repo: string * + [] tag: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get a release [] [] - abstract RepoGetRelease : - [] owner : string * - [] repo : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetRelease: + [] owner: string * + [] repo: string * + [] id: int * + ?ct: System.Threading.CancellationToken -> Release System.Threading.Tasks.Task /// Delete a release [] [] - abstract RepoDeleteRelease : - [] owner : string * - [] repo : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteRelease: + [] owner: string * + [] repo: string * + [] id: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Update a release [] [] - abstract RepoEditRelease : - [] owner : string * - [] repo : string * - [] id : int * - [] body : EditReleaseOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoEditRelease: + [] owner: string * + [] repo: string * + [] id: int * + [] body: EditReleaseOption * + ?ct: System.Threading.CancellationToken -> Release System.Threading.Tasks.Task /// List release's attachments [] [] - abstract RepoListReleaseAttachments : - [] owner : string * - [] repo : string * - [] id : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListReleaseAttachments: + [] owner: string * + [] repo: string * + [] id: int * + ?ct: System.Threading.CancellationToken -> Attachment list System.Threading.Tasks.Task /// Get a release attachment [] [] - abstract RepoGetReleaseAttachment : - [] owner : string * - [] repo : string * - [] id : int * - [] attachment_id : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetReleaseAttachment: + [] owner: string * + [] repo: string * + [] id: int * + [] attachment_id: int * + ?ct: System.Threading.CancellationToken -> Attachment System.Threading.Tasks.Task /// Delete a release attachment [] [] - abstract RepoDeleteReleaseAttachment : - [] owner : string * - [] repo : string * - [] id : int * - [] attachment_id : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteReleaseAttachment: + [] owner: string * + [] repo: string * + [] id: int * + [] attachment_id: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit a release attachment [] [] - abstract RepoEditReleaseAttachment : - [] owner : string * - [] repo : string * - [] id : int * - [] attachment_id : int * - [] body : EditAttachmentOptions * - ?ct : System.Threading.CancellationToken -> + abstract RepoEditReleaseAttachment: + [] owner: string * + [] repo: string * + [] id: int * + [] attachment_id: int * + [] body: EditAttachmentOptions * + ?ct: System.Threading.CancellationToken -> Attachment System.Threading.Tasks.Task /// Return all users that can be requested to review in this repo [] [] - abstract RepoGetReviewers : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetReviewers: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// Get signing-key.gpg for given repository [] [] - abstract RepoSigningKey : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoSigningKey: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List a repo's stargazers [] [] - abstract RepoListStargazers : - [] owner : string * - [] repo : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListStargazers: + [] owner: string * + [] repo: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// Get a commit's statuses [] [] - abstract RepoListStatuses : - [] owner : string * - [] repo : string * - [] sha : string * - [] sort : string * - [] state : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListStatuses: + [] owner: string * + [] repo: string * + [] sha: string * + [] sort: string * + [] state: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> CommitStatus list System.Threading.Tasks.Task /// Create a commit status [] [] - abstract RepoCreateStatus : - [] owner : string * - [] repo : string * - [] sha : string * - [] body : CreateStatusOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoCreateStatus: + [] owner: string * + [] repo: string * + [] sha: string * + [] body: CreateStatusOption * + ?ct: System.Threading.CancellationToken -> CommitStatus System.Threading.Tasks.Task /// List a repo's watchers [] [] - abstract RepoListSubscribers : - [] owner : string * - [] repo : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListSubscribers: + [] owner: string * + [] repo: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// Check if the current user is watching a repo [] [] - abstract UserCurrentCheckSubscription : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract UserCurrentCheckSubscription: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> WatchInfo System.Threading.Tasks.Task /// Unwatch a repo [] [] - abstract UserCurrentDeleteSubscription : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract UserCurrentDeleteSubscription: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Watch a repo [] [] - abstract UserCurrentPutSubscription : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract UserCurrentPutSubscription: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> WatchInfo System.Threading.Tasks.Task /// List a repository's tags [] [] - abstract RepoListTags : - [] owner : string * - [] repo : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListTags: + [] owner: string * + [] repo: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Tag list System.Threading.Tasks.Task /// Create a new git tag in a repository [] [] - abstract RepoCreateTag : - [] owner : string * - [] repo : string * - [] body : CreateTagOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoCreateTag: + [] owner: string * + [] repo: string * + [] body: CreateTagOption * + ?ct: System.Threading.CancellationToken -> Tag System.Threading.Tasks.Task /// Get the tag of a repository by tag name [] [] - abstract RepoGetTag : - [] owner : string * - [] repo : string * - [] tag : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetTag: + [] owner: string * + [] repo: string * + [] tag: string * + ?ct: System.Threading.CancellationToken -> Tag System.Threading.Tasks.Task /// Delete a repository's tag by name [] [] - abstract RepoDeleteTag : - [] owner : string * - [] repo : string * - [] tag : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteTag: + [] owner: string * + [] repo: string * + [] tag: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List a repository's teams [] [] - abstract RepoListTeams : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoListTeams: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> Team list System.Threading.Tasks.Task /// Check if a team is assigned to a repository [] [] - abstract RepoCheckTeam : - [] owner : string * - [] repo : string * - [] team : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoCheckTeam: + [] owner: string * + [] repo: string * + [] team: string * + ?ct: System.Threading.CancellationToken -> Team System.Threading.Tasks.Task /// Delete a team from a repository [] [] - abstract RepoDeleteTeam : - [] owner : string * - [] repo : string * - [] team : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteTeam: + [] owner: string * + [] repo: string * + [] team: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Add a team to a repository [] [] - abstract RepoAddTeam : - [] owner : string * - [] repo : string * - [] team : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoAddTeam: + [] owner: string * + [] repo: string * + [] team: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List a repo's tracked times [] [] - abstract RepoTrackedTimes : - [] owner : string * - [] repo : string * - [] user : string * - [] since : string * - [] before : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoTrackedTimes: + [] owner: string * + [] repo: string * + [] user: string * + [] since: string * + [] before: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> TrackedTime list System.Threading.Tasks.Task /// List a user's tracked times in a repo [] [] - abstract UserTrackedTimes : - [] owner : string * - [] repo : string * - [] user : string * - ?ct : System.Threading.CancellationToken -> + abstract UserTrackedTimes: + [] owner: string * + [] repo: string * + [] user: string * + ?ct: System.Threading.CancellationToken -> TrackedTime list System.Threading.Tasks.Task /// Get list of topics that a repository has [] [] - abstract RepoListTopics : - [] owner : string * - [] repo : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoListTopics: + [] owner: string * + [] repo: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> TopicName System.Threading.Tasks.Task /// Replace list of topics for a repository [] [] - abstract RepoUpdateTopics : - [] owner : string * - [] repo : string * - [] body : RepoTopicOptions * - ?ct : System.Threading.CancellationToken -> + abstract RepoUpdateTopics: + [] owner: string * + [] repo: string * + [] body: RepoTopicOptions * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Delete a topic from a repository [] [] - abstract RepoDeleteTopic : - [] owner : string * - [] repo : string * - [] topic : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteTopic: + [] owner: string * + [] repo: string * + [] topic: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Add a topic to a repository [] [] - abstract RepoAddTopic : - [] owner : string * - [] repo : string * - [] topic : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoAddTopic: + [] owner: string * + [] repo: string * + [] topic: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Transfer a repo ownership [] [] - abstract RepoTransfer : - [] owner : string * - [] repo : string * - [] body : TransferRepoOption * - ?ct : System.Threading.CancellationToken -> + abstract RepoTransfer: + [] owner: string * + [] repo: string * + [] body: TransferRepoOption * + ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// Accept a repo transfer [] [] - abstract AcceptRepoTransfer : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract AcceptRepoTransfer: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// Reject a repo transfer [] [] - abstract RejectRepoTransfer : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract RejectRepoTransfer: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// Create a wiki page [] [] - abstract RepoCreateWikiPage : - [] owner : string * - [] repo : string * - [] body : CreateWikiPageOptions * - ?ct : System.Threading.CancellationToken -> + abstract RepoCreateWikiPage: + [] owner: string * + [] repo: string * + [] body: CreateWikiPageOptions * + ?ct: System.Threading.CancellationToken -> WikiPage System.Threading.Tasks.Task /// Get a wiki page [] [] - abstract RepoGetWikiPage : - [] owner : string * - [] repo : string * - [] pageName : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetWikiPage: + [] owner: string * + [] repo: string * + [] pageName: string * + ?ct: System.Threading.CancellationToken -> WikiPage System.Threading.Tasks.Task /// Delete a wiki page [] [] - abstract RepoDeleteWikiPage : - [] owner : string * - [] repo : string * - [] pageName : string * - ?ct : System.Threading.CancellationToken -> + abstract RepoDeleteWikiPage: + [] owner: string * + [] repo: string * + [] pageName: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit a wiki page [] [] - abstract RepoEditWikiPage : - [] owner : string * - [] repo : string * - [] pageName : string * - [] body : CreateWikiPageOptions * - ?ct : System.Threading.CancellationToken -> + abstract RepoEditWikiPage: + [] owner: string * + [] repo: string * + [] pageName: string * + [] body: CreateWikiPageOptions * + ?ct: System.Threading.CancellationToken -> WikiPage System.Threading.Tasks.Task /// Get all wiki pages [] [] - abstract RepoGetWikiPages : - [] owner : string * - [] repo : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetWikiPages: + [] owner: string * + [] repo: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> WikiPageMetaData list System.Threading.Tasks.Task /// Get revisions of a wiki page [] [] - abstract RepoGetWikiPageRevisions : - [] owner : string * - [] repo : string * - [] pageName : string * - [] page : int * - ?ct : System.Threading.CancellationToken -> + abstract RepoGetWikiPageRevisions: + [] owner: string * + [] repo: string * + [] pageName: string * + [] page: int * + ?ct: System.Threading.CancellationToken -> WikiCommitList System.Threading.Tasks.Task /// Create a repository using a template [] [] - abstract GenerateRepo : - [] template_owner : string * - [] template_repo : string * - [] body : GenerateRepoOption * - ?ct : System.Threading.CancellationToken -> + abstract GenerateRepo: + [] template_owner: string * + [] template_repo: string * + [] body: GenerateRepoOption * + ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// Get a repository by id [] [] - abstract RepoGetByID : - [] id : int * ?ct : System.Threading.CancellationToken -> + abstract RepoGetByID: + [] id: int * ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// Get instance's global settings for api [] [] - abstract GetGeneralAPISettings : - ?ct : System.Threading.CancellationToken -> GeneralAPISettings System.Threading.Tasks.Task + abstract GetGeneralAPISettings: + ?ct: System.Threading.CancellationToken -> GeneralAPISettings System.Threading.Tasks.Task /// Get instance's global settings for Attachment [] [] - abstract GetGeneralAttachmentSettings : - ?ct : System.Threading.CancellationToken -> GeneralAttachmentSettings System.Threading.Tasks.Task + abstract GetGeneralAttachmentSettings: + ?ct: System.Threading.CancellationToken -> GeneralAttachmentSettings System.Threading.Tasks.Task /// Get instance's global settings for repositories [] [] - abstract GetGeneralRepositorySettings : - ?ct : System.Threading.CancellationToken -> GeneralRepoSettings System.Threading.Tasks.Task + abstract GetGeneralRepositorySettings: + ?ct: System.Threading.CancellationToken -> GeneralRepoSettings System.Threading.Tasks.Task /// Get instance's global settings for ui [] [] - abstract GetGeneralUISettings : - ?ct : System.Threading.CancellationToken -> GeneralUISettings System.Threading.Tasks.Task + abstract GetGeneralUISettings: + ?ct: System.Threading.CancellationToken -> GeneralUISettings System.Threading.Tasks.Task /// Get default signing-key.gpg [] [] - abstract GetSigningKey : ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + abstract GetSigningKey: ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get a team [] [] - abstract OrgGetTeam : - [] id : int * ?ct : System.Threading.CancellationToken -> Team System.Threading.Tasks.Task + abstract OrgGetTeam: + [] id: int * ?ct: System.Threading.CancellationToken -> Team System.Threading.Tasks.Task /// Delete a team [] [] - abstract OrgDeleteTeam : - [] id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + abstract OrgDeleteTeam: + [] id: int * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Edit a team [] [] - abstract OrgEditTeam : - [] id : int * - [] body : EditTeamOption * - ?ct : System.Threading.CancellationToken -> + abstract OrgEditTeam: + [] id: int * + [] body: EditTeamOption * + ?ct: System.Threading.CancellationToken -> Team System.Threading.Tasks.Task /// List a team's members [] [] - abstract OrgListTeamMembers : - [] id : int * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgListTeamMembers: + [] id: int * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// List a particular member of team [] [] - abstract OrgListTeamMember : - [] id : int * - [] username : string * - ?ct : System.Threading.CancellationToken -> + abstract OrgListTeamMember: + [] id: int * + [] username: string * + ?ct: System.Threading.CancellationToken -> User System.Threading.Tasks.Task /// Remove a team member [] [] - abstract OrgRemoveTeamMember : - [] id : int * - [] username : string * - ?ct : System.Threading.CancellationToken -> + abstract OrgRemoveTeamMember: + [] id: int * + [] username: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Add a team member [] [] - abstract OrgAddTeamMember : - [] id : int * - [] username : string * - ?ct : System.Threading.CancellationToken -> + abstract OrgAddTeamMember: + [] id: int * + [] username: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List a team's repos [] [] - abstract OrgListTeamRepos : - [] id : int * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgListTeamRepos: + [] id: int * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Repository list System.Threading.Tasks.Task /// List a particular repo of team [] [] - abstract OrgListTeamRepo : - [] id : int * - [] org : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract OrgListTeamRepo: + [] id: int * + [] org: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// Remove a repository from a team [] [] - abstract OrgRemoveTeamRepository : - [] id : int * - [] org : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract OrgRemoveTeamRepository: + [] id: int * + [] org: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Add a repository to a team [] [] - abstract OrgAddTeamRepository : - [] id : int * - [] org : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract OrgAddTeamRepository: + [] id: int * + [] org: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// search topics via keyword [] [] - abstract TopicSearch : - [] q : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract TopicSearch: + [] q: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> TopicResponse list System.Threading.Tasks.Task /// Get the authenticated user [] [] - abstract UserGetCurrent : ?ct : System.Threading.CancellationToken -> User System.Threading.Tasks.Task + abstract UserGetCurrent: ?ct: System.Threading.CancellationToken -> User System.Threading.Tasks.Task /// List the authenticated user's oauth2 applications [] [] - abstract UserGetOauth2Application : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserGetOauth2Application: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> OAuth2Application list System.Threading.Tasks.Task /// creates a new OAuth2 application [] [] - abstract UserCreateOAuth2Application : - [] body : CreateOAuth2ApplicationOptions * ?ct : System.Threading.CancellationToken -> + abstract UserCreateOAuth2Application: + [] body: CreateOAuth2ApplicationOptions * ?ct: System.Threading.CancellationToken -> OAuth2Application System.Threading.Tasks.Task /// get an OAuth2 Application [] [] - abstract UserGetOAuth2Application : - [] id : int * ?ct : System.Threading.CancellationToken -> + abstract UserGetOAuth2Application: + [] id: int * ?ct: System.Threading.CancellationToken -> OAuth2Application System.Threading.Tasks.Task /// delete an OAuth2 Application [] [] - abstract UserDeleteOAuth2Application : - [] id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + abstract UserDeleteOAuth2Application: + [] id: int * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// update an OAuth2 Application, this includes regenerating the client secret [] [] - abstract UserUpdateOAuth2Application : - [] id : int * - [] body : CreateOAuth2ApplicationOptions * - ?ct : System.Threading.CancellationToken -> + abstract UserUpdateOAuth2Application: + [] id: int * + [] body: CreateOAuth2ApplicationOptions * + ?ct: System.Threading.CancellationToken -> OAuth2Application System.Threading.Tasks.Task /// List the authenticated user's email addresses [] [] - abstract UserListEmails : ?ct : System.Threading.CancellationToken -> Email list System.Threading.Tasks.Task + abstract UserListEmails: ?ct: System.Threading.CancellationToken -> Email list System.Threading.Tasks.Task /// Add email addresses [] [] - abstract UserAddEmail : - [] body : CreateEmailOption * ?ct : System.Threading.CancellationToken -> + abstract UserAddEmail: + [] body: CreateEmailOption * ?ct: System.Threading.CancellationToken -> Email list System.Threading.Tasks.Task /// Delete email addresses [] [] - abstract UserDeleteEmail : - [] body : DeleteEmailOption * ?ct : System.Threading.CancellationToken -> + abstract UserDeleteEmail: + [] body: DeleteEmailOption * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List the authenticated user's followers [] [] - abstract UserCurrentListFollowers : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserCurrentListFollowers: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// List the users that the authenticated user is following [] [] - abstract UserCurrentListFollowing : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserCurrentListFollowing: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// Check whether a user is followed by the authenticated user [] [] - abstract UserCurrentCheckFollowing : - [] username : string * ?ct : System.Threading.CancellationToken -> + abstract UserCurrentCheckFollowing: + [] username: string * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Unfollow a user [] [] - abstract UserCurrentDeleteFollow : - [] username : string * ?ct : System.Threading.CancellationToken -> + abstract UserCurrentDeleteFollow: + [] username: string * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Follow a user [] [] - abstract UserCurrentPutFollow : - [] username : string * ?ct : System.Threading.CancellationToken -> + abstract UserCurrentPutFollow: + [] username: string * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get a Token to verify [] [] - abstract GetVerificationToken : ?ct : System.Threading.CancellationToken -> string System.Threading.Tasks.Task + abstract GetVerificationToken: ?ct: System.Threading.CancellationToken -> string System.Threading.Tasks.Task /// Remove a GPG key [] [] - abstract UserCurrentDeleteGPGKey : - [] id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + abstract UserCurrentDeleteGPGKey: + [] id: int * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List the authenticated user's public keys [] [] - abstract UserCurrentListKeys : - [] fingerprint : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserCurrentListKeys: + [] fingerprint: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> PublicKey list System.Threading.Tasks.Task /// Create a public key [] [] - abstract UserCurrentPostKey : - [] body : CreateKeyOption * ?ct : System.Threading.CancellationToken -> + abstract UserCurrentPostKey: + [] body: CreateKeyOption * ?ct: System.Threading.CancellationToken -> PublicKey System.Threading.Tasks.Task /// Get a public key [] [] - abstract UserCurrentGetKey : - [] id : int * ?ct : System.Threading.CancellationToken -> + abstract UserCurrentGetKey: + [] id: int * ?ct: System.Threading.CancellationToken -> PublicKey System.Threading.Tasks.Task /// Delete a public key [] [] - abstract UserCurrentDeleteKey : - [] id : int * ?ct : System.Threading.CancellationToken -> unit System.Threading.Tasks.Task + abstract UserCurrentDeleteKey: + [] id: int * ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// List the current user's organizations [] [] - abstract OrgListCurrentUserOrgs : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgListCurrentUserOrgs: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Organization list System.Threading.Tasks.Task /// List the repos that the authenticated user owns [] [] - abstract UserCurrentListRepos : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserCurrentListRepos: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Repository list System.Threading.Tasks.Task /// Create a repository [] [] - abstract CreateCurrentUserRepo : - [] body : CreateRepoOption * ?ct : System.Threading.CancellationToken -> + abstract CreateCurrentUserRepo: + [] body: CreateRepoOption * ?ct: System.Threading.CancellationToken -> Repository System.Threading.Tasks.Task /// Get user settings [] [] - abstract GetUserSettings : ?ct : System.Threading.CancellationToken -> UserSettings list System.Threading.Tasks.Task + abstract GetUserSettings: ?ct: System.Threading.CancellationToken -> UserSettings list System.Threading.Tasks.Task /// Update user settings [] [] - abstract UpdateUserSettings : - [] body : UserSettingsOptions * ?ct : System.Threading.CancellationToken -> + abstract UpdateUserSettings: + [] body: UserSettingsOptions * ?ct: System.Threading.CancellationToken -> UserSettings list System.Threading.Tasks.Task /// The repos that the authenticated user has starred [] [] - abstract UserCurrentListStarred : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserCurrentListStarred: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Repository list System.Threading.Tasks.Task /// Whether the authenticated is starring the repo [] [] - abstract UserCurrentCheckStarring : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract UserCurrentCheckStarring: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Unstar the given repo [] [] - abstract UserCurrentDeleteStar : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract UserCurrentDeleteStar: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Star the given repo [] [] - abstract UserCurrentPutStar : - [] owner : string * - [] repo : string * - ?ct : System.Threading.CancellationToken -> + abstract UserCurrentPutStar: + [] owner: string * + [] repo: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get list of all existing stopwatches [] [] - abstract UserGetStopWatches : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserGetStopWatches: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> StopWatch list System.Threading.Tasks.Task /// List repositories watched by the authenticated user [] [] - abstract UserCurrentListSubscriptions : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserCurrentListSubscriptions: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Repository list System.Threading.Tasks.Task /// List all the teams a user belongs to [] [] - abstract UserListTeams : - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserListTeams: + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Team list System.Threading.Tasks.Task /// List the current user's tracked times [] [] - abstract UserCurrentTrackedTimes : - [] page : int * - [] limit : int * - [] since : string * - [] before : string * - ?ct : System.Threading.CancellationToken -> + abstract UserCurrentTrackedTimes: + [] page: int * + [] limit: int * + [] since: string * + [] before: string * + ?ct: System.Threading.CancellationToken -> TrackedTime list System.Threading.Tasks.Task /// Search for users [] [] - abstract UserSearch : - [] q : string * - [] uid : int * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserSearch: + [] q: string * + [] uid: int * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get a user [] [] - abstract UserGet : - [] username : string * ?ct : System.Threading.CancellationToken -> + abstract UserGet: + [] username: string * ?ct: System.Threading.CancellationToken -> User System.Threading.Tasks.Task /// List the given user's followers [] [] - abstract UserListFollowers : - [] username : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserListFollowers: + [] username: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// List the users that the given user is following [] [] - abstract UserListFollowing : - [] username : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserListFollowing: + [] username: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> User list System.Threading.Tasks.Task /// Check if one user is following another user [] [] - abstract UserCheckFollowing : - [] username : string * - [] target : string * - ?ct : System.Threading.CancellationToken -> + abstract UserCheckFollowing: + [] username: string * + [] target: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Get a user's heatmap [] [] - abstract UserGetHeatmapData : - [] username : string * ?ct : System.Threading.CancellationToken -> + abstract UserGetHeatmapData: + [] username: string * ?ct: System.Threading.CancellationToken -> UserHeatmapData list System.Threading.Tasks.Task /// List the given user's public keys [] [] - abstract UserListKeys : - [] username : string * - [] fingerprint : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserListKeys: + [] username: string * + [] fingerprint: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> PublicKey list System.Threading.Tasks.Task /// List a user's organizations [] [] - abstract OrgListUserOrgs : - [] username : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract OrgListUserOrgs: + [] username: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Organization list System.Threading.Tasks.Task /// Get user permissions in organization [] [] - abstract OrgGetUserPermissions : - [] username : string * - [] org : string * - ?ct : System.Threading.CancellationToken -> + abstract OrgGetUserPermissions: + [] username: string * + [] org: string * + ?ct: System.Threading.CancellationToken -> OrganizationPermissions System.Threading.Tasks.Task /// List the repos owned by the given user [] [] - abstract UserListRepos : - [] username : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserListRepos: + [] username: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Repository list System.Threading.Tasks.Task /// The repos that the given user has starred [] [] - abstract UserListStarred : - [] username : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserListStarred: + [] username: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Repository list System.Threading.Tasks.Task /// List the repositories watched by a user [] [] - abstract UserListSubscriptions : - [] username : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserListSubscriptions: + [] username: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> Repository list System.Threading.Tasks.Task /// List the authenticated user's access tokens [] [] - abstract UserGetTokens : - [] username : string * - [] page : int * - [] limit : int * - ?ct : System.Threading.CancellationToken -> + abstract UserGetTokens: + [] username: string * + [] page: int * + [] limit: int * + ?ct: System.Threading.CancellationToken -> AccessToken list System.Threading.Tasks.Task /// Create an access token [] [] - abstract UserCreateToken : - [] username : string * - [] body : CreateAccessTokenOption * - ?ct : System.Threading.CancellationToken -> + abstract UserCreateToken: + [] username: string * + [] body: CreateAccessTokenOption * + ?ct: System.Threading.CancellationToken -> AccessToken System.Threading.Tasks.Task /// delete an access token [] [] - abstract UserDeleteAccessToken : - [] username : string * - [] token : string * - ?ct : System.Threading.CancellationToken -> + abstract UserDeleteAccessToken: + [] username: string * + [] token: string * + ?ct: System.Threading.CancellationToken -> unit System.Threading.Tasks.Task /// Returns the version of the Gitea application [] [] - abstract GetVersion : ?ct : System.Threading.CancellationToken -> ServerVersion System.Threading.Tasks.Task + abstract GetVersion: ?ct: System.Threading.CancellationToken -> ServerVersion System.Threading.Tasks.Task + diff --git a/ConsumePlugin/GeneratedVault.fs b/ConsumePlugin/GeneratedVault.fs index a230176..717dbc6 100644 --- a/ConsumePlugin/GeneratedVault.fs +++ b/ConsumePlugin/GeneratedVault.fs @@ -1,177 +1,170 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ - - +// Source generated by Whippet. Changes will be overwritten on next build. namespace ConsumePlugin /// Module containing JSON parsing methods for the JwtVaultAuthResponse type -[] +[] module JwtVaultAuthResponse = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : JwtVaultAuthResponse = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : JwtVaultAuthResponse = let arg_10 = (match node.["num_uses"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("num_uses") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_9 = (match node.["orphan"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("orphan") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_8 = (match node.["entity_id"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("entity_id") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_7 = (match node.["token_type"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("token_type") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_6 = (match node.["renewable"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("renewable") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_5 = (match node.["lease_duration"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("lease_duration") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_4 = (match node.["identity_policies"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("identity_policies") ) ) | v -> v) - .AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + .AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq let arg_3 = (match node.["token_policies"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("token_policies") ) ) | v -> v) - .AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + .AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq let arg_2 = (match node.["policies"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("policies") ) ) | v -> v) - .AsArray () - |> Seq.map (fun elt -> elt.AsValue().GetValue ()) + .AsArray() + |> Seq.map (fun elt -> elt.AsValue().GetValue()) |> List.ofSeq let arg_1 = (match node.["accessor"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("accessor") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = (match node.["client_token"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("client_token") ) ) | v -> v) .AsValue() - .GetValue () - - { - ClientToken = arg_0 - Accessor = arg_1 - Policies = arg_2 - TokenPolicies = arg_3 - IdentityPolicies = arg_4 - LeaseDuration = arg_5 - Renewable = arg_6 - TokenType = arg_7 - EntityId = arg_8 - Orphan = arg_9 - NumUses = arg_10 - } + .GetValue() + + { ClientToken = arg_0 + Accessor = arg_1 + Policies = arg_2 + TokenPolicies = arg_3 + IdentityPolicies = arg_4 + LeaseDuration = arg_5 + Renewable = arg_6 + TokenType = arg_7 + EntityId = arg_8 + Orphan = arg_9 + NumUses = arg_10 } namespace ConsumePlugin /// Module containing JSON parsing methods for the JwtVaultResponse type -[] +[] module JwtVaultResponse = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : JwtVaultResponse = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : JwtVaultResponse = let arg_4 = JwtVaultAuthResponse.jsonParse ( match node.["auth"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("auth") ) ) @@ -182,79 +175,76 @@ module JwtVaultResponse = (match node.["lease_duration"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("lease_duration") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_2 = (match node.["renewable"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("renewable") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_1 = (match node.["lease_id"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("lease_id") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = (match node.["request_id"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("request_id") ) ) | v -> v) .AsValue() - .GetValue () - - { - RequestId = arg_0 - LeaseId = arg_1 - Renewable = arg_2 - LeaseDuration = arg_3 - Auth = arg_4 - } + .GetValue() + + { RequestId = arg_0 + LeaseId = arg_1 + Renewable = arg_2 + LeaseDuration = arg_3 + Auth = arg_4 } namespace ConsumePlugin /// Module containing JSON parsing methods for the JwtSecretResponse type -[] +[] module JwtSecretResponse = /// Parse from a JSON node. - let jsonParse (node : System.Text.Json.Nodes.JsonNode) : JwtSecretResponse = + let jsonParse (node: System.Text.Json.Nodes.JsonNode) : JwtSecretResponse = let arg_11 = (match node.["data8"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("data8") ) ) | v -> v) - .AsObject () + .AsObject() |> Seq.map (fun kvp -> let key = (kvp.Key) - let value = (kvp.Value).AsValue().GetValue () |> System.Uri - key, value - ) + let value = (kvp.Value).AsValue().GetValue() |> System.Uri + key, value) |> Seq.map System.Collections.Generic.KeyValuePair |> System.Collections.Generic.Dictionary @@ -262,85 +252,80 @@ module JwtSecretResponse = (match node.["data7"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("data7") ) ) | v -> v) - .AsObject () + .AsObject() |> Seq.map (fun kvp -> let key = (kvp.Key) - let value = (kvp.Value).AsValue().GetValue () - key, value - ) + let value = (kvp.Value).AsValue().GetValue() + key, value) |> Map.ofSeq let arg_9 = (match node.["data6"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("data6") ) ) | v -> v) - .AsObject () + .AsObject() |> Seq.map (fun kvp -> let key = (kvp.Key) |> System.Uri - let value = (kvp.Value).AsValue().GetValue () - key, value - ) + let value = (kvp.Value).AsValue().GetValue() + key, value) |> dict let arg_8 = (match node.["data5"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("data5") ) ) | v -> v) - .AsObject () + .AsObject() |> Seq.map (fun kvp -> let key = (kvp.Key) |> System.Uri - let value = (kvp.Value).AsValue().GetValue () - key, value - ) + let value = (kvp.Value).AsValue().GetValue() + key, value) |> readOnlyDict let arg_7 = (match node.["data4"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("data4") ) ) | v -> v) - .AsObject () + .AsObject() |> Seq.map (fun kvp -> let key = (kvp.Key) - let value = (kvp.Value).AsValue().GetValue () - key, value - ) + let value = (kvp.Value).AsValue().GetValue() + key, value) |> Map.ofSeq let arg_6 = (match node.["data3"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("data3") ) ) | v -> v) - .AsObject () + .AsObject() |> Seq.map (fun kvp -> let key = (kvp.Key) - let value = (kvp.Value).AsValue().GetValue () - key, value - ) + let value = (kvp.Value).AsValue().GetValue() + key, value) |> Seq.map System.Collections.Generic.KeyValuePair |> System.Collections.Generic.Dictionary @@ -348,99 +333,96 @@ module JwtSecretResponse = (match node.["data2"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("data2") ) ) | v -> v) - .AsObject () + .AsObject() |> Seq.map (fun kvp -> let key = (kvp.Key) - let value = (kvp.Value).AsValue().GetValue () - key, value - ) + let value = (kvp.Value).AsValue().GetValue() + key, value) |> dict let arg_4 = (match node.["data"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("data") ) ) | v -> v) - .AsObject () + .AsObject() |> Seq.map (fun kvp -> let key = (kvp.Key) - let value = (kvp.Value).AsValue().GetValue () - key, value - ) + let value = (kvp.Value).AsValue().GetValue() + key, value) |> readOnlyDict let arg_3 = (match node.["lease_duration"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("lease_duration") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_2 = (match node.["renewable"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("renewable") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_1 = (match node.["lease_id"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("lease_id") ) ) | v -> v) .AsValue() - .GetValue () + .GetValue() let arg_0 = (match node.["request_id"] with | null -> raise ( - System.Collections.Generic.KeyNotFoundException ( + System.Collections.Generic.KeyNotFoundException( sprintf "Required key '%s' not found on JSON object" ("request_id") ) ) | v -> v) .AsValue() - .GetValue () - - { - RequestId = arg_0 - LeaseId = arg_1 - Renewable = arg_2 - LeaseDuration = arg_3 - Data = arg_4 - Data2 = arg_5 - Data3 = arg_6 - Data4 = arg_7 - Data5 = arg_8 - Data6 = arg_9 - Data7 = arg_10 - Data8 = arg_11 - } - + .GetValue() + + { RequestId = arg_0 + LeaseId = arg_1 + Renewable = arg_2 + LeaseDuration = arg_3 + Data = arg_4 + Data2 = arg_5 + Data3 = arg_6 + Data4 = arg_7 + Data5 = arg_8 + Data6 = arg_9 + Data7 = arg_10 + Data8 = arg_11 } + +// Source generated by Whippet. Changes will be overwritten on next build. namespace ConsumePlugin open System @@ -451,90 +433,87 @@ open System.Threading.Tasks open RestEase /// Module for constructing a REST client. -[] +[] module VaultClient = /// Create a REST client. - let make (client : System.Net.Http.HttpClient) : IVaultClient = + let make (client: System.Net.Http.HttpClient) : IVaultClient = { new IVaultClient with - member _.GetSecret - (jwt : JwtVaultResponse, path : string, mountPoint : string, ct : CancellationToken option) - = + member _.GetSecret(jwt: JwtVaultResponse, path: string, mountPoint: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ( + System.Uri( "v1/{mountPoint}/{path}" - .Replace("{path}", path.ToString () |> System.Uri.EscapeDataString) - .Replace ("{mountPoint}", mountPoint.ToString () |> System.Uri.EscapeDataString), + .Replace("{path}", path.ToString() |> System.Uri.EscapeDataString) + .Replace("{mountPoint}", mountPoint.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return JwtSecretResponse.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetJwt (role : string, jwt : string, ct : CancellationToken option) = + member _.GetJwt(role: string, jwt: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("v1/auth/jwt/login", System.UriKind.Relative) + System.Uri("v1/auth/jwt/login", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return JwtVaultResponse.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) } namespace ConsumePlugin open System @@ -545,90 +524,87 @@ open System.Threading.Tasks open RestEase /// Module for constructing a REST client. -[] +[] module VaultClientNonExtensionMethod = /// Create a REST client. - let make (client : System.Net.Http.HttpClient) : IVaultClientNonExtensionMethod = + let make (client: System.Net.Http.HttpClient) : IVaultClientNonExtensionMethod = { new IVaultClientNonExtensionMethod with - member _.GetSecret - (jwt : JwtVaultResponse, path : string, mountPoint : string, ct : CancellationToken option) - = + member _.GetSecret(jwt: JwtVaultResponse, path: string, mountPoint: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ( + System.Uri( "v1/{mountPoint}/{path}" - .Replace("{path}", path.ToString () |> System.Uri.EscapeDataString) - .Replace ("{mountPoint}", mountPoint.ToString () |> System.Uri.EscapeDataString), + .Replace("{path}", path.ToString() |> System.Uri.EscapeDataString) + .Replace("{mountPoint}", mountPoint.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return JwtSecretResponse.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetJwt (role : string, jwt : string, ct : CancellationToken option) = + member _.GetJwt(role: string, jwt: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("v1/auth/jwt/login", System.UriKind.Relative) + System.Uri("v1/auth/jwt/login", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return JwtVaultResponse.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) } namespace ConsumePlugin open System @@ -645,84 +621,88 @@ module VaultClientExtensionMethodHttpClientExtension = type VaultClientExtensionMethod with /// Create a REST client. - static member make (client : System.Net.Http.HttpClient) : IVaultClientExtensionMethod = + static member make(client: System.Net.Http.HttpClient) : IVaultClientExtensionMethod = { new IVaultClientExtensionMethod with member _.GetSecret - (jwt : JwtVaultResponse, path : string, mountPoint : string, ct : CancellationToken option) - = + ( + jwt: JwtVaultResponse, + path: string, + mountPoint: string, + ct: CancellationToken option + ) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ( + System.Uri( "v1/{mountPoint}/{path}" - .Replace("{path}", path.ToString () |> System.Uri.EscapeDataString) - .Replace ("{mountPoint}", mountPoint.ToString () |> System.Uri.EscapeDataString), + .Replace("{path}", path.ToString() |> System.Uri.EscapeDataString) + .Replace("{mountPoint}", mountPoint.ToString() |> System.Uri.EscapeDataString), System.UriKind.Relative ) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return JwtSecretResponse.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) - member _.GetJwt (role : string, jwt : string, ct : CancellationToken option) = + member _.GetJwt(role: string, jwt: string, ct: CancellationToken option) = async { let! ct = Async.CancellationToken let uri = - System.Uri ( + System.Uri( (match client.BaseAddress with | null -> raise ( - System.ArgumentNullException ( + System.ArgumentNullException( nameof (client.BaseAddress), "No base address was supplied on the type, and no BaseAddress was on the HttpClient." ) ) | v -> v), - System.Uri ("v1/auth/jwt/login", System.UriKind.Relative) + System.Uri("v1/auth/jwt/login", System.UriKind.Relative) ) let httpMessage = - new System.Net.Http.HttpRequestMessage ( + new System.Net.Http.HttpRequestMessage( Method = System.Net.Http.HttpMethod.Get, RequestUri = uri ) - let! response = client.SendAsync (httpMessage, ct) |> Async.AwaitTask - let response = response.EnsureSuccessStatusCode () + let! response = client.SendAsync(httpMessage, ct) |> Async.AwaitTask + let response = response.EnsureSuccessStatusCode() let! responseStream = response.Content.ReadAsStreamAsync ct |> Async.AwaitTask let! jsonNode = - System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct) + System.Text.Json.Nodes.JsonNode.ParseAsync(responseStream, cancellationToken = ct) |> Async.AwaitTask return JwtVaultResponse.jsonParse jsonNode } - |> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct)) - } + |> (fun a -> Async.StartAsTask(a, ?cancellationToken = ct)) } + diff --git a/ConsumePlugin/ListCata.fs b/ConsumePlugin/ListCata.fs index 9c2d250..9882de1 100644 --- a/ConsumePlugin/ListCata.fs +++ b/ConsumePlugin/ListCata.fs @@ -1,117 +1,84 @@ -//------------------------------------------------------------------------------ -// This code was generated by myriad. -// Changes to this file will be lost when the code is regenerated. -//------------------------------------------------------------------------------ - - - - +// Source generated by Whippet. Changes will be overwritten on next build. namespace ConsumePlugin open WoofWare.Myriad.Plugins /// Description of how to combine cases during a fold -type MyListCataCase<'a, 'MyList> = +type MyList2CataCase<'a, 'MyList2, 'MyList> = /// How to operate on the Nil case - abstract Nil : 'MyList + abstract Nil: 'MyList2 /// How to operate on the Cons case - abstract Cons : head : 'a -> tail : 'MyList -> 'MyList - -/// Specifies how to perform a fold (catamorphism) over the type MyList and its friends. -type MyListCata<'a, 'MyList> = - { - /// How to perform a fold (catamorphism) over the type MyList - MyList : MyListCataCase<'a, 'MyList> - } - -/// Methods to perform a catamorphism over the type MyList -[] -module MyListCata = - [] - type private Instruction<'a> = - | Process__MyList of MyList<'a> - | MyList_Cons of head : 'a - - let private loop (cata : MyListCata<'a, 'MyList>) (instructions : ResizeArray>) = - let myListStack = ResizeArray<'MyList> () - - while instructions.Count > 0 do - let currentInstruction = instructions.[instructions.Count - 1] - instructions.RemoveAt (instructions.Count - 1) - - match currentInstruction with - | Instruction.Process__MyList x -> - match x with - | MyList.Nil -> cata.MyList.Nil |> myListStack.Add - | MyList.Cons ({ - Head = head - Tail = tail - }) -> - instructions.Add (Instruction.MyList_Cons (head)) - instructions.Add (Instruction.Process__MyList tail) - | Instruction.MyList_Cons head -> - let tail = myListStack.[myListStack.Count - 1] - myListStack.RemoveAt (myListStack.Count - 1) - cata.MyList.Cons head tail |> myListStack.Add - - myListStack - - /// Execute the catamorphism. - let runMyList (cata : MyListCata<'a, 'MyListRet>) (x : MyList<'a>) : 'MyListRet = - let instructions = ResizeArray () - instructions.Add (Instruction.Process__MyList x) - let myListRetStack = loop cata instructions - Seq.exactlyOne myListRetStack -namespace ConsumePlugin - -open WoofWare.Myriad.Plugins + abstract Cons: 'a -> 'MyList2 -> 'MyList2 /// Description of how to combine cases during a fold -type MyList2CataCase<'a, 'MyList2> = +type MyListCataCase<'a, 'MyList2, 'MyList> = /// How to operate on the Nil case - abstract Nil : 'MyList2 + abstract Nil: 'MyList /// How to operate on the Cons case - abstract Cons : 'a -> 'MyList2 -> 'MyList2 + abstract Cons: head: 'a -> tail: 'MyList -> 'MyList -/// Specifies how to perform a fold (catamorphism) over the type MyList2 and its friends. -type MyList2Cata<'a, 'MyList2> = +/// Specifies how to perform a fold (catamorphism) over the type MyList and its friends. +type MyListCata<'a, 'MyList2, 'MyList> = { /// How to perform a fold (catamorphism) over the type MyList2 - MyList2 : MyList2CataCase<'a, 'MyList2> + MyList2: MyList2CataCase<'a, 'MyList2, 'MyList> + /// How to perform a fold (catamorphism) over the type MyList + MyList: MyListCataCase<'a, 'MyList2, 'MyList> } -/// Methods to perform a catamorphism over the type MyList2 +/// Methods to perform a catamorphism over the type MyList [] -module MyList2Cata = +module MyListCata = [] type private Instruction<'a> = | Process__MyList2 of MyList2<'a> + | Process__MyList of MyList<'a> | MyList2_Cons of 'a + | MyList_Cons of head: 'a - let private loop (cata : MyList2Cata<'a, 'MyList2>) (instructions : ResizeArray>) = - let myList2Stack = ResizeArray<'MyList2> () + let private loop (cata: MyListCata<'a, 'MyList2, 'MyList>) (instructions: ResizeArray>) = + let myListStack = ResizeArray<'MyList>() + let myList2Stack = ResizeArray<'MyList2>() while instructions.Count > 0 do let currentInstruction = instructions.[instructions.Count - 1] - instructions.RemoveAt (instructions.Count - 1) + instructions.RemoveAt(instructions.Count - 1) match currentInstruction with | Instruction.Process__MyList2 x -> match x with | MyList2.Nil -> cata.MyList2.Nil |> myList2Stack.Add - | MyList2.Cons (arg0_0, arg1_0) -> - instructions.Add (Instruction.MyList2_Cons (arg0_0)) - instructions.Add (Instruction.Process__MyList2 arg1_0) + | MyList2.Cons(arg0_0, arg1_0) -> + instructions.Add(Instruction.MyList2_Cons(arg0_0)) + instructions.Add(Instruction.Process__MyList2 arg1_0) + | Instruction.Process__MyList x -> + match x with + | MyList.Nil -> cata.MyList.Nil |> myListStack.Add + | MyList.Cons({ Head = head; Tail = tail }) -> + instructions.Add(Instruction.MyList_Cons(head)) + instructions.Add(Instruction.Process__MyList tail) | Instruction.MyList2_Cons arg0_0 -> let arg1_0 = myList2Stack.[myList2Stack.Count - 1] - myList2Stack.RemoveAt (myList2Stack.Count - 1) + myList2Stack.RemoveAt(myList2Stack.Count - 1) cata.MyList2.Cons arg0_0 arg1_0 |> myList2Stack.Add + | Instruction.MyList_Cons head -> + let tail = myListStack.[myListStack.Count - 1] + myListStack.RemoveAt(myListStack.Count - 1) + cata.MyList.Cons head tail |> myListStack.Add - myList2Stack + myList2Stack, myListStack /// Execute the catamorphism. - let runMyList2 (cata : MyList2Cata<'a, 'MyList2Ret>) (x : MyList2<'a>) : 'MyList2Ret = - let instructions = ResizeArray () - instructions.Add (Instruction.Process__MyList2 x) - let myList2RetStack = loop cata instructions + let runMyList2 (cata: MyListCata<'a, 'MyList2Ret, 'MyListRet>) (x: MyList2<'a>) : 'MyList2Ret = + let instructions = ResizeArray() + instructions.Add(Instruction.Process__MyList2 x) + let myList2RetStack, myListRetStack = loop cata instructions Seq.exactlyOne myList2RetStack + + /// Execute the catamorphism. + let runMyList (cata: MyListCata<'a, 'MyList2Ret, 'MyListRet>) (x: MyList<'a>) : 'MyListRet = + let instructions = ResizeArray() + instructions.Add(Instruction.Process__MyList x) + let myList2RetStack, myListRetStack = loop cata instructions + Seq.exactlyOne myListRetStack + diff --git a/NuGet.Config b/NuGet.Config new file mode 100644 index 0000000..29ff82e --- /dev/null +++ b/NuGet.Config @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj b/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj index 110a31e..b34b067 100644 --- a/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj +++ b/WoofWare.Myriad.Plugins.Test/WoofWare.Myriad.Plugins.Test.fsproj @@ -47,6 +47,7 @@ + diff --git a/WoofWare.Myriad.Plugins/ArgParserGenerator.fs b/WoofWare.Myriad.Plugins/ArgParserGenerator.fs index d2774fb..4724564 100644 --- a/WoofWare.Myriad.Plugins/ArgParserGenerator.fs +++ b/WoofWare.Myriad.Plugins/ArgParserGenerator.fs @@ -3,6 +3,8 @@ namespace WoofWare.Myriad.Plugins open System open System.Text open Fantomas.FCS.Syntax +open WoofWare.Whippet.Core +open WoofWare.Whippet.Fantomas open Fantomas.FCS.Text.Range type internal ArgParserOutputSpec = @@ -1743,23 +1745,19 @@ module internal ArgParserGenerator = ] |> SynModuleOrNamespace.createNamespace ns -open Myriad.Core - /// Myriad generator that provides a catamorphism for an algebraic data type. -[] +[] type ArgParserGenerator () = - interface IMyriadGenerator with - member _.ValidInputExtensions = [ ".fs" ] + interface IGenerateRawFromRaw with + member _.GenerateRawFromRaw (context : RawSourceGenerationArgs) = + if not (context.FilePath.EndsWith (".fs", StringComparison.Ordinal)) then + null + else - member _.Generate (context : GeneratorContext) = - let ast, _ = - Ast.fromFilename context.InputFilename |> Async.RunSynchronously |> Array.head + let ast = Ast.parse (Encoding.UTF8.GetString context.FileContents) - let types = - Ast.extractTypeDefn ast - |> List.groupBy (fst >> List.map _.idText >> String.concat ".") - |> List.map (fun (_, v) -> fst (List.head v), List.collect snd v) + let types = Ast.getTypes ast let opens = AstHelper.extractOpens ast @@ -1817,4 +1815,4 @@ type ArgParserGenerator () = ArgParserGenerator.createModule opens ns taggedType unions records ) - Output.Ast modules + Ast.render modules |> Option.toObj diff --git a/WoofWare.Myriad.Plugins/AstHelper.fs b/WoofWare.Myriad.Plugins/AstHelper.fs index 94da94d..63b8bbb 100644 --- a/WoofWare.Myriad.Plugins/AstHelper.fs +++ b/WoofWare.Myriad.Plugins/AstHelper.fs @@ -1,174 +1,6 @@ namespace WoofWare.Myriad.Plugins open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range -open Fantomas.FCS.Xml - -type internal ParameterInfo = - { - Attributes : SynAttribute list - IsOptional : bool - Id : Ident option - Type : SynType - } - -type internal TupledArg = - { - HasParen : bool - Args : ParameterInfo list - } - -type internal MemberInfo = - { - ReturnType : SynType - Accessibility : SynAccess option - /// Each element of this list is a list of args in a tuple, or just one arg if not a tuple. - Args : TupledArg list - Identifier : Ident - Attributes : SynAttribute list - XmlDoc : PreXmlDoc option - IsInline : bool - IsMutable : bool - } - -[] -type internal PropertyAccessors = - | Get - | Set - | GetSet - -type internal PropertyInfo = - { - Type : SynType - Accessibility : SynAccess option - Attributes : SynAttribute list - XmlDoc : PreXmlDoc option - Accessors : PropertyAccessors - IsInline : bool - Identifier : Ident - } - -type internal InterfaceType = - { - Attributes : SynAttribute list - Name : LongIdent - Inherits : SynType list - Members : MemberInfo list - Properties : PropertyInfo list - Generics : SynTyparDecls option - Accessibility : SynAccess option - } - -type internal RecordType = - { - Name : Ident - Fields : SynField list - /// Any additional members which are not record fields. - Members : SynMemberDefns option - XmlDoc : PreXmlDoc option - Generics : SynTyparDecls option - TypeAccessibility : SynAccess option - ImplAccessibility : SynAccess option - Attributes : SynAttribute list - } - - /// Parse from the AST. - static member OfRecord - (sci : SynComponentInfo) - (smd : SynMemberDefns) - (access : SynAccess option) - (recordFields : SynField list) - : RecordType - = - match sci with - | SynComponentInfo.SynComponentInfo (attrs, typars, _, longId, doc, _, implAccess, _) -> - { - Name = List.last longId - Fields = recordFields - Members = if smd.IsEmpty then None else Some smd - XmlDoc = if doc.IsEmpty then None else Some doc - Generics = typars - ImplAccessibility = implAccess - TypeAccessibility = access - Attributes = attrs |> List.collect (fun l -> l.Attributes) - } - -/// Methods for manipulating UnionCase. -[] -module UnionCase = - /// Construct our structured `UnionCase` from an FCS `SynUnionCase`: extract everything - /// we care about from the AST representation. - let ofSynUnionCase (case : SynUnionCase) : UnionCase = - match case with - | SynUnionCase.SynUnionCase (attributes, ident, caseType, xmlDoc, access, _, _) -> - - let ident = - match ident with - | SynIdent.SynIdent (ident, _) -> ident - - let fields = - match caseType with - | SynUnionCaseKind.Fields cases -> cases - | SynUnionCaseKind.FullType _ -> failwith "unexpected FullType union" - - { - Name = ident - XmlDoc = if xmlDoc.IsEmpty then None else Some xmlDoc - Access = access - Attributes = attributes |> List.collect (fun t -> t.Attributes) - Fields = fields |> List.map SynField.extract - } - - /// Functorial `map`. - let mapIdentFields<'a, 'b> (f : 'a -> 'b) (unionCase : UnionCase<'a>) : UnionCase<'b> = - { - Attributes = unionCase.Attributes - Name = unionCase.Name - Access = unionCase.Access - XmlDoc = unionCase.XmlDoc - Fields = unionCase.Fields |> List.map (SynField.mapIdent f) - } - -/// Everything you need to know about a discriminated union definition. -type internal UnionType = - { - /// The name of the DU: for example, `type Foo = | Blah` has this being `Foo`. - Name : Ident - /// Any additional members which are not union cases. - Members : SynMemberDefns option - /// Any docstring associated with the DU itself (not its cases). - XmlDoc : PreXmlDoc option - /// Generic type parameters this DU takes: `type Foo<'a> = | ...`. - Generics : SynTyparDecls option - /// Attributes of the DU (not its cases): `[] type Foo = | ...` - Attributes : SynAttribute list - /// Accessibility modifier of the DU: `type private Foo = ...` - TypeAccessibility : SynAccess option - /// Accessibility modifier of the DU's implementation: `type Foo = private | ...` - ImplAccessibility : SynAccess option - /// The actual DU cases themselves. - Cases : UnionCase list - } - - static member OfUnion - (sci : SynComponentInfo) - (smd : SynMemberDefns) - (access : SynAccess option) - (cases : SynUnionCase list) - : UnionType - = - match sci with - | SynComponentInfo.SynComponentInfo (attrs, typars, _, longId, doc, _, implAccess, _) -> - { - Name = List.last longId - Members = if smd.IsEmpty then None else Some smd - XmlDoc = if doc.IsEmpty then None else Some doc - Generics = typars - Attributes = attrs |> List.collect (fun l -> l.Attributes) - TypeAccessibility = access - ImplAccessibility = implAccess - Cases = cases |> List.map UnionCase.ofSynUnionCase - } /// Anything that is part of an ADT. /// A record is a product of stuff; this type represents one of those stuffs. @@ -194,256 +26,7 @@ type internal AdtProduct = Generics : SynTyparDecl list } -[] module internal AstHelper = - - let isEnum (SynTypeDefn.SynTypeDefn (_, repr, _, _, _, _)) : bool = - match repr with - | SynTypeDefnRepr.Simple (SynTypeDefnSimpleRepr.Enum _, _) -> true - | _ -> false - - let instantiateRecord (fields : (SynLongIdent * SynExpr) list) : SynExpr = - let fields = - fields - |> List.map (fun (rfn, synExpr) -> SynExprRecordField ((rfn, true), Some range0, Some synExpr, None)) - - SynExpr.Record (None, None, fields, range0) - - let defineRecordType (record : RecordType) : SynTypeDefn = - let name = - SynComponentInfo.create record.Name - |> SynComponentInfo.setAccessibility record.TypeAccessibility - |> match record.XmlDoc with - | None -> id - | Some doc -> SynComponentInfo.withDocString doc - |> SynComponentInfo.setGenerics record.Generics - - SynTypeDefnRepr.recordWithAccess record.ImplAccessibility (Seq.toList record.Fields) - |> SynTypeDefn.create name - |> SynTypeDefn.withMemberDefns (defaultArg record.Members SynMemberDefns.Empty) - - let rec private extractOpensFromDecl (moduleDecls : SynModuleDecl list) : SynOpenDeclTarget list = - moduleDecls - |> List.choose (fun moduleDecl -> - match moduleDecl with - | SynModuleDecl.Open (target, _) -> Some target - | _ -> None - ) - - let extractOpens (ast : ParsedInput) : SynOpenDeclTarget list = - match ast with - | ParsedInput.ImplFile (ParsedImplFileInput (_, _, _, _, _, modules, _, _, _)) -> - modules - |> List.collect (fun (SynModuleOrNamespace (_, _, _, decls, _, _, _, _, _)) -> extractOpensFromDecl decls) - | _ -> [] - - let rec convertSigParam (ty : SynType) : ParameterInfo * bool = - match ty with - | SynType.Paren (inner, _) -> - let result, _ = convertSigParam inner - result, true - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - { - Attributes = [] - IsOptional = false - Id = None - Type = SynType.createLongIdent ident - }, - false - | SynType.SignatureParameter (attrs, opt, id, usedType, _) -> - let attrs = attrs |> List.collect (fun attrs -> attrs.Attributes) - - { - Attributes = attrs - IsOptional = opt - Id = id - Type = usedType - }, - false - | SynType.Var (typar, _) -> - { - Attributes = [] - IsOptional = false - Id = None - Type = SynType.var typar - }, - false - | _ -> failwithf "expected SignatureParameter, got: %+A" ty - - let rec extractTupledTypes (tupleType : SynTupleTypeSegment list) : TupledArg = - match tupleType with - | [] -> - { - HasParen = false - Args = [] - } - | [ SynTupleTypeSegment.Type param ] -> - let converted, hasParen = convertSigParam param - - { - HasParen = hasParen - Args = [ converted ] - } - | SynTupleTypeSegment.Type param :: SynTupleTypeSegment.Star _ :: rest -> - let rest = extractTupledTypes rest - let converted, _ = convertSigParam param - - { - HasParen = false - Args = converted :: rest.Args - } - | _ -> failwithf "Didn't have alternating type-and-star in interface member definition: %+A" tupleType - - let private parseMember (slotSig : SynValSig) (flags : SynMemberFlags) : Choice = - if not flags.IsInstance then - failwith "member was not an instance member" - - let propertyAccessors = - match flags.MemberKind with - | SynMemberKind.Member -> None - | SynMemberKind.PropertyGet -> Some PropertyAccessors.Get - | SynMemberKind.PropertySet -> Some PropertyAccessors.Set - | SynMemberKind.PropertyGetSet -> Some PropertyAccessors.GetSet - | kind -> failwithf "Unrecognised member kind: %+A" kind - - match slotSig with - | SynValSig (attrs, - SynIdent.SynIdent (ident, _), - _typeParams, - synType, - _arity, - isInline, - isMutable, - xmlDoc, - accessibility, - synExpr, - _, - _) -> - - match synExpr with - | Some _ -> failwith "literal members are not supported" - | None -> () - - let attrs = attrs |> List.collect _.Attributes - - let args, ret = SynType.getType synType - - let args = - args - |> List.map (fun (args, hasParen) -> - match args with - | SynType.Tuple (false, path, _) -> extractTupledTypes path - | SynType.SignatureParameter _ -> - let arg, hasParen = convertSigParam args - - { - HasParen = hasParen - Args = [ arg ] - } - | SynType.LongIdent (SynLongIdent (ident, _, _)) -> - { - HasParen = false - Args = - { - Attributes = [] - IsOptional = false - Id = None - Type = SynType.createLongIdent ident - } - |> List.singleton - } - | SynType.Var (typar, _) -> - { - HasParen = false - Args = - { - Attributes = [] - IsOptional = false - Id = None - Type = SynType.var typar - } - |> List.singleton - } - | arg -> - { - HasParen = false - Args = - { - Attributes = [] - IsOptional = false - Id = None - Type = arg - } - |> List.singleton - } - |> fun ty -> - { ty with - HasParen = ty.HasParen || hasParen - } - ) - - match propertyAccessors with - | None -> - { - ReturnType = ret - Args = args - Identifier = ident - Attributes = attrs - XmlDoc = Some xmlDoc - Accessibility = accessibility - IsInline = isInline - IsMutable = isMutable - } - |> Choice1Of2 - | Some accessors -> - { - Type = ret - Accessibility = accessibility - Attributes = attrs - XmlDoc = Some xmlDoc - Accessors = accessors - IsInline = isInline - Identifier = ident - } - |> Choice2Of2 - - /// Assumes that the input type is an ObjectModel, i.e. a `type Foo = member ...` - let parseInterface (interfaceType : SynTypeDefn) : InterfaceType = - let (SynTypeDefn (SynComponentInfo (attrs, typars, _, interfaceName, _, _, accessibility, _), - synTypeDefnRepr, - _, - _, - _, - _)) = - interfaceType - - let attrs = attrs |> List.collect (fun s -> s.Attributes) - - let members, inherits = - match synTypeDefnRepr with - | SynTypeDefnRepr.ObjectModel (_kind, members, _) -> - members - |> List.map (fun defn -> - match defn with - | SynMemberDefn.AbstractSlot (slotSig, flags, _, _) -> Choice1Of2 (parseMember slotSig flags) - | SynMemberDefn.Inherit (baseType, _asIdent, _) -> Choice2Of2 baseType - | _ -> failwith $"Unrecognised member definition: %+A{defn}" - ) - | _ -> failwith $"Unrecognised SynTypeDefnRepr for an interface type: %+A{synTypeDefnRepr}" - |> List.partitionChoice - - let members, properties = members |> List.partitionChoice - - { - Members = members - Properties = properties - Name = interfaceName - Inherits = inherits - Attributes = attrs - Generics = typars - Accessibility = accessibility - } - let getUnionCases (SynTypeDefn.SynTypeDefn (info, repr, _, _, _, _)) : AdtProduct list * SynTyparDecl list * SynAccess option diff --git a/WoofWare.Myriad.Plugins/CataGenerator.fs b/WoofWare.Myriad.Plugins/CataGenerator.fs index 48de317..7306f07 100644 --- a/WoofWare.Myriad.Plugins/CataGenerator.fs +++ b/WoofWare.Myriad.Plugins/CataGenerator.fs @@ -1,13 +1,15 @@ namespace WoofWare.Myriad.Plugins +open System open Fantomas.FCS.Syntax open Fantomas.FCS.SyntaxTrivia open Fantomas.FCS.Xml +open WoofWare.Whippet.Core +open WoofWare.Whippet.Fantomas [] module internal CataGenerator = open Fantomas.FCS.Text.Range - open Myriad.Core.Ast /// The user-provided DU contains cases, each of which contains fields. /// We have a hard-coded set of things we know how to deal with as field contents. @@ -174,20 +176,14 @@ module internal CataGenerator = |> SynExpr.applyFunction (SynExpr.createLongIdent [ "Seq" ; "exactlyOne" ]) |> SynExpr.createLet [ - SynBinding.Let ( - valData = SynValData.SynValData (None, SynValInfo.empty, None), - pattern = - SynPat.tupleNoParen ( - allArtificialTyparNames - |> List.map (fun (t : Ident) -> - SynPat.namedI (Ident.create (t.idText + "Stack") |> Ident.lowerFirstLetter) - ) - ), - expr = - SynExpr.applyFunction - (SynExpr.applyFunction (SynExpr.createIdent "loop") (SynExpr.createIdent "cata")) - (SynExpr.createIdent "instructions") - ) + SynBinding.basicTuple + (allArtificialTyparNames + |> List.map (fun t -> + SynPat.namedI (Ident.create (t.idText + "Stack") |> Ident.lowerFirstLetter) + )) + (SynExpr.applyFunction + (SynExpr.applyFunction (SynExpr.createIdent "loop") (SynExpr.createIdent "cata")) + (SynExpr.createIdent "instructions")) ] ] |> SynExpr.sequential @@ -1180,20 +1176,19 @@ module internal CataGenerator = ] |> SynModuleOrNamespace.createNamespace ns -open Myriad.Core - /// Myriad generator that provides a catamorphism for an algebraic data type. -[] +[] type CreateCatamorphismGenerator () = - interface IMyriadGenerator with - member _.ValidInputExtensions = [ ".fs" ] + interface IGenerateRawFromRaw with + member _.GenerateRawFromRaw (context : RawSourceGenerationArgs) = + if not (context.FilePath.EndsWith (".fs", StringComparison.Ordinal)) then + null + else - member _.Generate (context : GeneratorContext) = - let ast, _ = - Ast.fromFilename context.InputFilename |> Async.RunSynchronously |> Array.head + let ast = Ast.parse (System.Text.Encoding.UTF8.GetString context.FileContents) - let types = Ast.extractTypeDefn ast + let types = Ast.getTypes ast let opens = AstHelper.extractOpens ast @@ -1237,4 +1232,4 @@ type CreateCatamorphismGenerator () = CataGenerator.createModule opens ns taggedType unions records ) - Output.Ast modules + Ast.render modules |> Option.toObj diff --git a/WoofWare.Myriad.Plugins/HttpClientGenerator.fs b/WoofWare.Myriad.Plugins/HttpClientGenerator.fs index 2710c23..f2add48 100644 --- a/WoofWare.Myriad.Plugins/HttpClientGenerator.fs +++ b/WoofWare.Myriad.Plugins/HttpClientGenerator.fs @@ -1,8 +1,11 @@ namespace WoofWare.Myriad.Plugins +open System open System.IO open System.Net.Http open Fantomas.FCS.Syntax +open WoofWare.Whippet.Core +open WoofWare.Whippet.Fantomas type internal HttpClientGeneratorOutputSpec = { @@ -643,7 +646,7 @@ module internal HttpClientGenerator = yield jsonNode | String -> yield responseString | Stream -> yield responseStream - | Unit -> + | UnitType -> // What we're returning doesn't depend on the content, so don't bother! () | _ -> @@ -978,24 +981,24 @@ module internal HttpClientGenerator = ] |> SynModuleOrNamespace.createNamespace ns -open Myriad.Core - -/// Myriad generator that provides an HTTP client for an interface type using RestEase annotations. -[] +/// Whippet generator that provides an HTTP client for an interface type using RestEase annotations. +[] type HttpClientGenerator () = - interface IMyriadGenerator with - member _.ValidInputExtensions = [ ".fs" ] + interface IGenerateRawFromRaw with + member _.GenerateRawFromRaw (context : RawSourceGenerationArgs) = + if not (context.FilePath.EndsWith (".fs", StringComparison.Ordinal)) then + null + else - member _.Generate (context : GeneratorContext) = let targetedTypes = - MyriadParamParser.render context.AdditionalParameters - |> Map.map (fun _ v -> v.Split '!' |> Array.toList |> List.map DesiredGenerator.Parse) + context.Parameters + |> Seq.map (fun (KeyValue (k, v)) -> k, v.Split '!' |> Array.toList |> List.map DesiredGenerator.Parse) + |> Map.ofSeq - let ast, _ = - Ast.fromFilename context.InputFilename |> Async.RunSynchronously |> Array.head + let ast = Ast.parse (System.Text.Encoding.UTF8.GetString context.FileContents) - let types = Ast.extractTypeDefn ast + let types = Ast.getTypes ast let opens = AstHelper.extractOpens ast @@ -1051,4 +1054,4 @@ type HttpClientGenerator () = namespaceAndTypes |> List.collect (fun (ns, types) -> types |> List.map (HttpClientGenerator.createModule opens ns)) - Output.Ast modules + Ast.render modules |> Option.toObj diff --git a/WoofWare.Myriad.Plugins/InterfaceMockGenerator.fs b/WoofWare.Myriad.Plugins/InterfaceMockGenerator.fs index b8fc07e..63df631 100644 --- a/WoofWare.Myriad.Plugins/InterfaceMockGenerator.fs +++ b/WoofWare.Myriad.Plugins/InterfaceMockGenerator.fs @@ -3,6 +3,8 @@ namespace WoofWare.Myriad.Plugins open System open Fantomas.FCS.Syntax open Fantomas.FCS.Xml +open WoofWare.Whippet.Core +open WoofWare.Whippet.Fantomas type internal GenerateMockOutputSpec = { @@ -217,7 +219,7 @@ module internal InterfaceMockGenerator = Attributes = [] } - let typeDecl = AstHelper.defineRecordType record + let typeDecl = RecordType.ToAst record SynModuleDecl.Types ([ typeDecl ], range0) @@ -272,32 +274,32 @@ module internal InterfaceMockGenerator = [ yield! opens |> List.map SynModuleDecl.openAny ; yield typeDecl ] |> SynModuleOrNamespace.createNamespace namespaceId -open Myriad.Core - /// Myriad generator that creates a record which implements the given interface, /// but with every field mocked out. -[] +[] type InterfaceMockGenerator () = - interface IMyriadGenerator with - member _.ValidInputExtensions = [ ".fs" ] + interface IGenerateRawFromRaw with + member _.GenerateRawFromRaw (context : RawSourceGenerationArgs) = + if not (context.FilePath.EndsWith (".fs", StringComparison.Ordinal)) then + null + else - member _.Generate (context : GeneratorContext) = let targetedTypes = - MyriadParamParser.render context.AdditionalParameters - |> Map.map (fun _ v -> v.Split '!' |> Array.toList |> List.map DesiredGenerator.Parse) + context.Parameters + |> Seq.map (fun (KeyValue (k, v)) -> k, v.Split '!' |> Array.toList |> List.map DesiredGenerator.Parse) + |> Map.ofSeq - let ast, _ = - Ast.fromFilename context.InputFilename |> Async.RunSynchronously |> Array.head + let ast = Ast.parse (System.Text.Encoding.UTF8.GetString context.FileContents) - let types = Ast.extractTypeDefn ast + let types = Ast.getTypes ast let namespaceAndInterfaces = types |> List.choose (fun (ns, types) -> types |> List.choose (fun typeDef -> - match Ast.getAttribute typeDef with + match SynTypeDefn.getAttribute typeof.Name typeDef with | None -> let name = SynTypeDefn.getName typeDef |> List.map _.idText |> String.concat "." @@ -348,4 +350,4 @@ type InterfaceMockGenerator () = records |> List.map (InterfaceMockGenerator.createRecord ns opens) ) - Output.Ast modules + Ast.render modules |> Option.toObj diff --git a/WoofWare.Myriad.Plugins/JsonParseGenerator.fs b/WoofWare.Myriad.Plugins/JsonParseGenerator.fs index 9e0d134..f622606 100644 --- a/WoofWare.Myriad.Plugins/JsonParseGenerator.fs +++ b/WoofWare.Myriad.Plugins/JsonParseGenerator.fs @@ -4,6 +4,8 @@ open System open System.Text open Fantomas.FCS.Syntax open Fantomas.FCS.SyntaxTrivia +open WoofWare.Whippet.Core +open WoofWare.Whippet.Fantomas type internal JsonParseOutputSpec = { @@ -280,7 +282,7 @@ module internal JsonParseGenerator = parseNumberType options propertyName node primType |> SynExpr.pipeThroughFunction (Measure.getLanguagePrimitivesMeasure primType) | JsonNode -> node - | Unit -> SynExpr.CreateConst () + | UnitType -> SynExpr.CreateConst () | _ -> // Let's just hope that we've also got our own type annotation! let typeName = @@ -691,32 +693,32 @@ module internal JsonParseGenerator = |> List.singleton |> SynModuleOrNamespace.createNamespace namespaceId -open Myriad.Core - -/// Myriad generator that provides a method (possibly an extension method) for a record type, +/// Whippet generator that provides a method (possibly an extension method) for a record type, /// containing a JSON parse function. -[] +[] type JsonParseGenerator () = - interface IMyriadGenerator with - member _.ValidInputExtensions = [ ".fs" ] + interface IGenerateRawFromRaw with + member _.GenerateRawFromRaw (context : RawSourceGenerationArgs) = + if not (context.FilePath.EndsWith (".fs", StringComparison.Ordinal)) then + null + else - member _.Generate (context : GeneratorContext) = let targetedTypes = - MyriadParamParser.render context.AdditionalParameters - |> Map.map (fun _ v -> v.Split '!' |> Array.toList |> List.map DesiredGenerator.Parse) + context.Parameters + |> Seq.map (fun (KeyValue (k, v)) -> k, v.Split '!' |> Array.toList |> List.map DesiredGenerator.Parse) + |> Map.ofSeq - let ast, _ = - Ast.fromFilename context.InputFilename |> Async.RunSynchronously |> Array.head + let ast = Ast.parse (Encoding.UTF8.GetString context.FileContents) let relevantTypes = - Ast.extractTypeDefn ast + Ast.getTypes ast |> List.map (fun (name, defns) -> defns |> List.choose (fun defn -> - if Ast.isRecord defn then Some defn - elif Ast.isDu defn then Some defn - elif AstHelper.isEnum defn then Some defn + if SynTypeDefn.isRecord defn then Some defn + elif SynTypeDefn.isDu defn then Some defn + elif SynTypeDefn.isEnum defn then Some defn else None ) |> fun defns -> name, defns @@ -777,4 +779,4 @@ type JsonParseGenerator () = types |> List.map (fun (ty, spec) -> JsonParseGenerator.createModule ns spec ty) ) - Output.Ast modules + Ast.render modules |> Option.toObj diff --git a/WoofWare.Myriad.Plugins/JsonSerializeGenerator.fs b/WoofWare.Myriad.Plugins/JsonSerializeGenerator.fs index e69d400..f606456 100644 --- a/WoofWare.Myriad.Plugins/JsonSerializeGenerator.fs +++ b/WoofWare.Myriad.Plugins/JsonSerializeGenerator.fs @@ -3,6 +3,8 @@ namespace WoofWare.Myriad.Plugins open System open System.Text open Fantomas.FCS.Syntax +open WoofWare.Whippet.Core +open WoofWare.Whippet.Fantomas type internal JsonSerializeOutputSpec = { @@ -147,7 +149,7 @@ module internal JsonSerializeGenerator = |> SynExpr.createLambda "field" |> fun e -> e, false | JsonNode -> SynExpr.createIdent "id", true - | Unit -> + | UnitType -> SynExpr.createLambda "value" (SynExpr.createLongIdent [ "System" ; "Text" ; "Json" ; "Nodes" ; "JsonObject" ] @@ -508,32 +510,32 @@ module internal JsonSerializeGenerator = ] |> SynModuleOrNamespace.createNamespace namespaceId -open Myriad.Core - -/// Myriad generator that provides a method (possibly an extension method) for a record type, +/// Whippet generator that provides a method (possibly an extension method) for a record type, /// containing a JSON serialization function. -[] +[] type JsonSerializeGenerator () = - interface IMyriadGenerator with - member _.ValidInputExtensions = [ ".fs" ] + interface IGenerateRawFromRaw with + member _.GenerateRawFromRaw (context : RawSourceGenerationArgs) = + if not (context.FilePath.EndsWith (".fs", StringComparison.Ordinal)) then + null + else - member _.Generate (context : GeneratorContext) = let targetedTypes = - MyriadParamParser.render context.AdditionalParameters - |> Map.map (fun _ v -> v.Split '!' |> Array.toList |> List.map DesiredGenerator.Parse) + context.Parameters + |> Seq.map (fun (KeyValue (k, v)) -> k, v.Split '!' |> Array.toList |> List.map DesiredGenerator.Parse) + |> Map.ofSeq - let ast, _ = - Ast.fromFilename context.InputFilename |> Async.RunSynchronously |> Array.head + let ast = Ast.parse (Encoding.UTF8.GetString context.FileContents) let relevantTypes = - Ast.extractTypeDefn ast + Ast.getTypes ast |> List.map (fun (name, defns) -> defns |> List.choose (fun defn -> - if Ast.isRecord defn then Some defn - elif Ast.isDu defn then Some defn - elif AstHelper.isEnum defn then Some defn + if SynTypeDefn.isRecord defn then Some defn + elif SynTypeDefn.isDu defn then Some defn + elif SynTypeDefn.isEnum defn then Some defn else None ) |> fun defns -> name, defns @@ -597,4 +599,4 @@ type JsonSerializeGenerator () = |> List.map (fun (ty, spec) -> JsonSerializeGenerator.createModule ns opens spec ty) ) - Output.Ast modules + Ast.render modules |> Option.toObj diff --git a/WoofWare.Myriad.Plugins/Measure.fs b/WoofWare.Myriad.Plugins/Measure.fs index 7f388da..146a47e 100644 --- a/WoofWare.Myriad.Plugins/Measure.fs +++ b/WoofWare.Myriad.Plugins/Measure.fs @@ -1,5 +1,6 @@ namespace WoofWare.Myriad.Plugins +open WoofWare.Whippet.Fantomas open Fantomas.FCS.Syntax [] diff --git a/WoofWare.Myriad.Plugins/MyriadParamParser.fs b/WoofWare.Myriad.Plugins/MyriadParamParser.fs deleted file mode 100644 index 82c4e3b..0000000 --- a/WoofWare.Myriad.Plugins/MyriadParamParser.fs +++ /dev/null @@ -1,64 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open System.Collections.Generic - -type internal DesiredGenerator = - | InterfaceMock of isInternal : bool option - | JsonParse of extensionMethod : bool option - | JsonSerialize of extensionMethod : bool option - | HttpClient of extensionMethod : bool option - - static member Parse (s : string) = - match s with - | "GenerateMock" -> DesiredGenerator.InterfaceMock None - | "GenerateMock(true)" -> DesiredGenerator.InterfaceMock (Some true) - | "GenerateMock(false)" -> DesiredGenerator.InterfaceMock (Some false) - | "JsonParse" -> DesiredGenerator.JsonParse None - | "JsonParse(true)" -> DesiredGenerator.JsonParse (Some true) - | "JsonParse(false)" -> DesiredGenerator.JsonParse (Some false) - | "JsonSerialize" -> DesiredGenerator.JsonSerialize None - | "JsonSerialize(true)" -> DesiredGenerator.JsonSerialize (Some true) - | "JsonSerialize(false)" -> DesiredGenerator.JsonSerialize (Some false) - | "HttpClient" -> DesiredGenerator.HttpClient None - | "HttpClient(true)" -> DesiredGenerator.HttpClient (Some true) - | "HttpClient(false)" -> DesiredGenerator.HttpClient (Some false) - | _ -> failwith $"Failed to parse as a generator specification: %s{s}" - -[] -module internal MyriadParamParser = - (* - An apparent bug in Myriad's argument parsing means that this: - - - bar - quux - - - leads to this: - - Foo = "bar;Baz=quux" - - I'm not going to put effort into fixing Myriad, though, because I want - to build something much more powerful instead. - *) - - /// Call this with `context.AdditionalParameters`. - let render (pars : IDictionary) : Map = - match pars.Count with - | 0 -> Map.empty - | 1 -> - let (KeyValue (key, value)) = pars |> Seq.exactlyOne - - match value.Split ';' |> Seq.toList with - | [] -> failwith "LOGIC ERROR" - | value :: rest -> - rest - |> Seq.map (fun v -> - let split = v.Split '=' - split.[0], String.concat "=" split.[1..] - ) - |> Seq.append (Seq.singleton (key, value)) - |> Map.ofSeq - | _ -> - // assume the Myriad bug is fixed! - pars |> Seq.map (fun (KeyValue (k, v)) -> k, v) |> Map.ofSeq diff --git a/WoofWare.Myriad.Plugins/Parameters.fs b/WoofWare.Myriad.Plugins/Parameters.fs new file mode 100644 index 0000000..9fc9b31 --- /dev/null +++ b/WoofWare.Myriad.Plugins/Parameters.fs @@ -0,0 +1,23 @@ +namespace WoofWare.Myriad.Plugins + +type internal DesiredGenerator = + | InterfaceMock of isInternal : bool option + | JsonParse of extensionMethod : bool option + | JsonSerialize of extensionMethod : bool option + | HttpClient of extensionMethod : bool option + + static member Parse (s : string) = + match s with + | "GenerateMock" -> DesiredGenerator.InterfaceMock None + | "GenerateMock(true)" -> DesiredGenerator.InterfaceMock (Some true) + | "GenerateMock(false)" -> DesiredGenerator.InterfaceMock (Some false) + | "JsonParse" -> DesiredGenerator.JsonParse None + | "JsonParse(true)" -> DesiredGenerator.JsonParse (Some true) + | "JsonParse(false)" -> DesiredGenerator.JsonParse (Some false) + | "JsonSerialize" -> DesiredGenerator.JsonSerialize None + | "JsonSerialize(true)" -> DesiredGenerator.JsonSerialize (Some true) + | "JsonSerialize(false)" -> DesiredGenerator.JsonSerialize (Some false) + | "HttpClient" -> DesiredGenerator.HttpClient None + | "HttpClient(true)" -> DesiredGenerator.HttpClient (Some true) + | "HttpClient(false)" -> DesiredGenerator.HttpClient (Some false) + | _ -> failwith $"Failed to parse as a generator specification: %s{s}" diff --git a/WoofWare.Myriad.Plugins/Primitives.fs b/WoofWare.Myriad.Plugins/Primitives.fs deleted file mode 100644 index 5d19d80..0000000 --- a/WoofWare.Myriad.Plugins/Primitives.fs +++ /dev/null @@ -1,32 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal Primitives = - /// Given e.g. "byte", returns "System.Byte". - let qualifyType (typeName : string) : LongIdent option = - match typeName with - | "float32" - | "single" -> [ "System" ; "Single" ] |> Some - | "float" - | "double" -> [ "System" ; "Double" ] |> Some - | "byte" - | "uint8" -> [ "System" ; "Byte" ] |> Some - | "sbyte" - | "int8" -> [ "System" ; "SByte" ] |> Some - | "int16" -> [ "System" ; "Int16" ] |> Some - | "int" - | "int32" -> [ "System" ; "Int32" ] |> Some - | "int64" -> [ "System" ; "Int64" ] |> Some - | "uint16" -> [ "System" ; "UInt16" ] |> Some - | "uint" - | "uint32" -> [ "System" ; "UInt32" ] |> Some - | "uint64" -> [ "System" ; "UInt64" ] |> Some - | "char" -> [ "System" ; "Char" ] |> Some - | "decimal" -> [ "System" ; "Decimal" ] |> Some - | "string" -> [ "System" ; "String" ] |> Some - | "bool" -> [ "System" ; "Boolean" ] |> Some - | _ -> None - |> Option.map (List.map (fun i -> (Ident (i, range0)))) diff --git a/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs b/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs index cfa80ea..90e2219 100644 --- a/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs +++ b/WoofWare.Myriad.Plugins/RemoveOptionsGenerator.fs @@ -3,7 +3,7 @@ namespace WoofWare.Myriad.Plugins open System open System.Text open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia +open WoofWare.Whippet.Fantomas open Fantomas.FCS.Xml [] @@ -61,7 +61,7 @@ module internal RemoveOptionsGenerator = Attributes = [] } - let typeDecl = AstHelper.defineRecordType record + let typeDecl = RecordType.ToAst record SynModuleDecl.Types ([ typeDecl ], range0) @@ -148,74 +148,36 @@ type RemoveOptionsGenerator () = null else - let ast, _ = - Fantomas.Core.CodeFormatter.ParseAsync (false, Encoding.UTF8.GetString args.FileContents) - |> Async.RunSynchronously - |> Array.head + let ast = Ast.parse (Encoding.UTF8.GetString args.FileContents) - let records = Myriad.Core.Ast.extractRecords ast + let records = Ast.getRecords ast let namespaceAndRecords = records - |> List.choose (fun (ns, types) -> - match - types - |> List.filter (SynTypeDefn.hasAttribute typeof.Name) - with - | [] -> None - | types -> - let types = - types - |> List.map (fun ty -> - match ty with - | SynTypeDefn.SynTypeDefn (sci, - SynTypeDefnRepr.Simple (SynTypeDefnSimpleRepr.Record (access, - fields, - _), - _), - smd, - smdo, - _, - _) -> RecordType.OfRecord sci smd access fields - | _ -> failwith "unexpectedly not a record" - ) - - Some (ns, types) - ) - - let modules = - namespaceAndRecords - |> List.collect (fun (ns, records) -> - records - |> List.map (fun record -> - let recordModule = RemoveOptionsGenerator.createRecordModule ns record - recordModule + |> List.collect (fun (ns, ty) -> + ty + |> List.filter (fun record -> + record.Attributes + |> List.exists (fun attr -> + attr.TypeName.LongIdent + |> List.last + |> _.idText + |> fun s -> + if s.EndsWith ("Attribute", StringComparison.Ordinal) then + s + else + $"%s{s}Attribute" + |> (=) typeof.Name + ) ) + |> List.map (fun ty -> ns, ty) ) - if modules.IsEmpty then + if namespaceAndRecords.IsEmpty then null else - let parseTree = - ParsedInput.ImplFile ( - ParsedImplFileInput.ParsedImplFileInput ( - "file.fs", - false, - QualifiedNameOfFile.QualifiedNameOfFile (Ident.create "file"), - [], - [], - modules, - (false, false), - { - ParsedImplFileInputTrivia.CodeComments = [] - ConditionalDirectives = [] - }, - Set.empty - ) - ) - - let cfg = Fantomas.Core.FormatConfig.Default - - Fantomas.Core.CodeFormatter.FormatASTAsync (parseTree, cfg) - |> Async.RunSynchronously + namespaceAndRecords + |> List.map (fun (ns, ty) -> RemoveOptionsGenerator.createRecordModule ns ty) + |> Ast.render + |> Option.toObj diff --git a/WoofWare.Myriad.Plugins/SwaggerClientGenerator.fs b/WoofWare.Myriad.Plugins/SwaggerClientGenerator.fs index a5b1359..c5d9d20 100644 --- a/WoofWare.Myriad.Plugins/SwaggerClientGenerator.fs +++ b/WoofWare.Myriad.Plugins/SwaggerClientGenerator.fs @@ -1,10 +1,14 @@ namespace WoofWare.Myriad.Plugins +open System open System.Collections.Generic open System.IO +open System.Text open System.Threading open Fantomas.FCS.Syntax open Fantomas.FCS.Xml +open WoofWare.Whippet.Core +open WoofWare.Whippet.Fantomas open Fantomas.FCS.Text.Range type internal SwaggerClientConfig = @@ -510,17 +514,17 @@ module internal SwaggerClientGenerator = |> SynModuleDecl.createTypes |> List.singleton -open Myriad.Core - -/// Myriad generator that stamps out an interface and class to access a Swagger-specified API. -[] +/// Whippet generator that stamps out an interface and class to access a Swagger-specified API. +[] type SwaggerClientGenerator () = - interface IMyriadGenerator with - member _.ValidInputExtensions = [ ".json" ] + interface IGenerateRawFromRaw with + member _.GenerateRawFromRaw (context : RawSourceGenerationArgs) = + if not (context.FilePath.EndsWith (".json", StringComparison.Ordinal)) then + null + else - member _.Generate (context : GeneratorContext) = - let contents = File.ReadAllText context.InputFilename |> Swagger.parse + let contents = Encoding.UTF8.GetString context.FileContents |> Swagger.parse let scheme = let preferred = Scheme "https" @@ -672,16 +676,13 @@ type SwaggerClientGenerator () = |> Seq.toList let config = - let pars = MyriadParamParser.render context.AdditionalParameters - let pars = - pars - |> Map.toSeq - |> Seq.map (fun (k, v) -> k.ToUpperInvariant (), v) + context.Parameters + |> Seq.map (fun (KeyValue (k, v)) -> k.ToUpperInvariant (), v) |> Map.ofSeq if pars.IsEmpty then - failwith "No parameters given. You must supply the parameter in ." + failwith "No parameters given. You must supply the parameter." let createMock = match Map.tryFind "GENERATEMOCKVISIBILITY" pars with @@ -696,7 +697,7 @@ type SwaggerClientGenerator () = let className = match Map.tryFind "CLASSNAME" pars with - | None -> failwith "You must supply the parameter in ." + | None -> failwith "You must supply the parameter." | Some v -> v { @@ -721,4 +722,5 @@ type SwaggerClientGenerator () = ] |> SynModuleOrNamespace.createNamespace [ Ident.create config.ClassName ] |> List.singleton - |> Output.Ast + |> Ast.render + |> Option.toObj diff --git a/WoofWare.Myriad.Plugins/SynExpr/CompExpr.fs b/WoofWare.Myriad.Plugins/SynExpr/CompExpr.fs deleted file mode 100644 index 802455b..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/CompExpr.fs +++ /dev/null @@ -1,49 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax - -type internal CompExprBinding = - | LetBang of varName : string * rhs : SynExpr - | Let of varName : string * rhs : SynExpr - | Use of varName : string * rhs : SynExpr - | Do of body : SynExpr - -(* -Potential API! -type internal CompExprBindings = - private - { - /// These are stored in reverse. - Bindings : CompExprBinding list - CompExprName : string - } - -[] -module internal CompExprBindings = - let make (name : string) : CompExprBindings = - { - Bindings = [] - CompExprName = name - } - - let thenDo (body : SynExpr) (bindings : CompExprBindings) = - { bindings with - Bindings = (Do body :: bindings.Bindings) - } - - let thenLet (varName : string) (value : SynExpr) (bindings : CompExprBindings) = - { bindings with - Bindings = (Let (varName, value) :: bindings.Bindings) - } - - let thenLetBang (varName : string) (value : SynExpr) (bindings : CompExprBindings) = - { bindings with - Bindings = (LetBang (varName, value) :: bindings.Bindings) - } - - - let thenUse (varName : string) (value : SynExpr) (bindings : CompExprBindings) = - { bindings with - Bindings = (LetBang (varName, value) :: bindings.Bindings) - } -*) diff --git a/WoofWare.Myriad.Plugins/SynExpr/Ident.fs b/WoofWare.Myriad.Plugins/SynExpr/Ident.fs deleted file mode 100644 index 7befa00..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/Ident.fs +++ /dev/null @@ -1,65 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open System -open System.Text -open System.Text.RegularExpressions -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal Ident = - let inline create (s : string) = Ident (s, range0) - - /// Fantomas bug, perhaps? "type" is not rendered as ``type``, although the ASTs are identical - /// apart from the ranges? - /// Awful hack: here is a function that does this sort of thing. - let createSanitisedParamName (s : string) = - match s with - | "type" -> create "type'" - | "private" -> create "private'" - | _ -> - - let result = StringBuilder () - - for i = 0 to s.Length - 1 do - if Char.IsLetter s.[i] then - result.Append s.[i] |> ignore - elif Char.IsNumber s.[i] then - if result.Length > 0 then - result.Append s.[i] |> ignore - elif s.[i] = '_' || s.[i] = '-' then - result.Append '_' |> ignore - else - failwith $"could not convert to ident: %s{s}" - - create (result.ToString ()) - - let private alnum = Regex @"^[a-zA-Z][a-zA-Z0-9]*$" - - let createSanitisedTypeName (s : string) = - let result = StringBuilder () - let mutable capitalize = true - - for i = 0 to s.Length - 1 do - if Char.IsLetter s.[i] then - if capitalize then - result.Append (Char.ToUpperInvariant s.[i]) |> ignore - capitalize <- false - else - result.Append s.[i] |> ignore - elif Char.IsNumber s.[i] then - if result.Length > 0 then - result.Append s.[i] |> ignore - elif s.[i] = '_' then - capitalize <- true - - if result.Length = 0 then - failwith $"String %s{s} was not suitable as a type identifier" - - Ident (result.ToString (), range0) - - let lowerFirstLetter (x : Ident) : Ident = - let result = StringBuilder x.idText.Length - result.Append (Char.ToLowerInvariant x.idText.[0]) |> ignore - result.Append x.idText.[1..] |> ignore - create ((result : StringBuilder).ToString ()) diff --git a/WoofWare.Myriad.Plugins/SynExpr/PreXmlDoc.fs b/WoofWare.Myriad.Plugins/SynExpr/PreXmlDoc.fs deleted file mode 100644 index 45fbdc0..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/PreXmlDoc.fs +++ /dev/null @@ -1,17 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Xml -open Fantomas.FCS.Text.Range - -[] -module internal PreXmlDoc = - let create (s : string) : PreXmlDoc = - let s = s.Split "\n" - - for i = 0 to s.Length - 1 do - s.[i] <- " " + s.[i] - - PreXmlDoc.Create (s, range0) - - let create' (s : string seq) : PreXmlDoc = - PreXmlDoc.Create (Array.ofSeq s, range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynArgInfo.fs b/WoofWare.Myriad.Plugins/SynExpr/SynArgInfo.fs deleted file mode 100644 index afafbcb..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynArgInfo.fs +++ /dev/null @@ -1,7 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax - -[] -module internal SynArgInfo = - let empty = SynArgInfo.SynArgInfo ([], false, None) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynArgPats.fs b/WoofWare.Myriad.Plugins/SynExpr/SynArgPats.fs deleted file mode 100644 index 1f742c0..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynArgPats.fs +++ /dev/null @@ -1,30 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynArgPats = - let createNamed (caseNames : string list) : SynArgPats = - match caseNames.Length with - | 0 -> SynArgPats.Pats [] - | 1 -> - SynPat.Named (SynIdent.createS caseNames.[0], false, None, range0) - |> List.singleton - |> SynArgPats.Pats - | len -> - caseNames - |> List.map (fun name -> SynPat.Named (SynIdent.createS name, false, None, range0)) - |> fun t -> SynPat.Tuple (false, t, List.replicate (len - 1) range0, range0) - |> fun t -> SynPat.Paren (t, range0) - |> List.singleton - |> SynArgPats.Pats - - let create (pats : SynPat list) : SynArgPats = - match pats.Length with - | 0 -> SynArgPats.Pats [] - | 1 -> [ pats.[0] ] |> SynArgPats.Pats - | len -> - SynPat.Paren (SynPat.Tuple (false, pats, List.replicate (len - 1) range0, range0), range0) - |> List.singleton - |> SynArgPats.Pats diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynAttribute.fs b/WoofWare.Myriad.Plugins/SynExpr/SynAttribute.fs deleted file mode 100644 index 60d0c2f..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynAttribute.fs +++ /dev/null @@ -1,27 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynAttribute = - let inline create (typeName : SynLongIdent) (arg : SynExpr) : SynAttribute = - { - TypeName = typeName - ArgExpr = arg - Target = None - AppliesToGetterAndSetter = false - Range = range0 - } - - let internal compilationRepresentation : SynAttribute = - [ "CompilationRepresentationFlags" ; "ModuleSuffix" ] - |> SynExpr.createLongIdent - |> SynExpr.paren - |> create (SynLongIdent.createS "CompilationRepresentation") - - let internal requireQualifiedAccess : SynAttribute = - create (SynLongIdent.createS "RequireQualifiedAccess") (SynExpr.CreateConst ()) - - let internal autoOpen : SynAttribute = - create (SynLongIdent.createS "AutoOpen") (SynExpr.CreateConst ()) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynAttributes.fs b/WoofWare.Myriad.Plugins/SynExpr/SynAttributes.fs deleted file mode 100644 index adca197..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynAttributes.fs +++ /dev/null @@ -1,15 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynAttributes = - let ofAttrs (attrs : SynAttribute list) : SynAttributes = - attrs - |> List.map (fun a -> - { - Attributes = [ a ] - Range = range0 - } - ) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynBinding.fs b/WoofWare.Myriad.Plugins/SynExpr/SynBinding.fs deleted file mode 100644 index e35d4d4..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynBinding.fs +++ /dev/null @@ -1,233 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Xml -open Fantomas.FCS.Text.Range - -[] -module internal SynBinding = - - let rec private stripParen (pat : SynPat) = - match pat with - | SynPat.Paren (p, _) -> stripParen p - | _ -> pat - - let rec private getName (pat : SynPat) : Ident option = - match stripParen pat with - | SynPat.Named (SynIdent.SynIdent (name, _), _, _, _) -> Some name - | SynPat.Typed (pat, _, _) -> getName pat - | SynPat.LongIdent (SynLongIdent.SynLongIdent (longIdent, _, _), _, _, _, _, _) -> - match longIdent with - | [ x ] -> Some x - | _ -> failwithf "got long ident %O ; can only get the name of a long ident with one component" longIdent - | _ -> None - - let private getArgInfo (pat : SynPat) : SynArgInfo list = - // TODO: this only copes with one layer of tupling - match stripParen pat with - | SynPat.Tuple (_, pats, _, _) -> pats |> List.map (fun pat -> SynArgInfo.SynArgInfo ([], false, getName pat)) - | pat -> [ SynArgInfo.SynArgInfo (SynAttributes.Empty, false, getName pat) ] - - let triviaZero (isMember : bool) = - { - SynBindingTrivia.EqualsRange = Some range0 - InlineKeyword = None - LeadingKeyword = - if isMember then - SynLeadingKeyword.Member range0 - else - SynLeadingKeyword.Let range0 - } - - let basic (name : LongIdent) (args : SynPat list) (body : SynExpr) : SynBinding = - let valInfo : SynValInfo = - args - |> List.map getArgInfo - |> fun x -> SynValInfo.SynValInfo (x, SynArgInfo.SynArgInfo ([], false, None)) - - SynBinding.SynBinding ( - None, - SynBindingKind.Normal, - false, - false, - [], - PreXmlDoc.Empty, - SynValData.SynValData (None, valInfo, None), - SynPat.identWithArgs name (SynArgPats.Pats args), - None, - body, - range0, - DebugPointAtBinding.Yes range0, - triviaZero false - ) - - let withMutability (mut : bool) (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (pat, kind, inl, _, attrs, xml, valData, headPat, returnInfo, expr, range, debugPoint, trivia) -> - SynBinding (pat, kind, inl, mut, attrs, xml, valData, headPat, returnInfo, expr, range, debugPoint, trivia) - - let withRecursion (isRec : bool) (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (pat, kind, inl, mut, attrs, xml, valData, headPat, returnInfo, expr, range, debugPoint, trivia) -> - let trivia = - { trivia with - LeadingKeyword = - match trivia.LeadingKeyword with - | SynLeadingKeyword.Let _ -> - if isRec then - SynLeadingKeyword.LetRec (range0, range0) - else - trivia.LeadingKeyword - | SynLeadingKeyword.LetRec _ -> - if isRec then - trivia.LeadingKeyword - else - trivia.LeadingKeyword - | existing -> - failwith - $"WoofWare.Myriad doesn't yet let you adjust the recursion modifier on a binding with modifier %O{existing}" - } - - SynBinding (pat, kind, inl, mut, attrs, xml, valData, headPat, returnInfo, expr, range, debugPoint, trivia) - - let withAccessibility (acc : SynAccess option) (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (_, kind, inl, mut, attrs, xml, valData, headPat, returnInfo, expr, range, debugPoint, trivia) -> - let headPat = - match headPat with - | SynPat.LongIdent (ident, extra, options, argPats, _, range) -> - SynPat.LongIdent (ident, extra, options, argPats, acc, range) - | _ -> failwithf "unrecognised head pattern: %O" headPat - - SynBinding (acc, kind, inl, mut, attrs, xml, valData, headPat, returnInfo, expr, range, debugPoint, trivia) - - let withXmlDoc (doc : PreXmlDoc) (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (acc, kind, inl, mut, attrs, _, valData, headPat, returnInfo, expr, range, debugPoint, trivia) -> - SynBinding (acc, kind, inl, mut, attrs, doc, valData, headPat, returnInfo, expr, range, debugPoint, trivia) - - let withReturnAnnotation (ty : SynType) (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (acc, kind, inl, mut, attrs, doc, valData, headPat, _, expr, range, debugPoint, trivia) -> - let retInfo = - SynBindingReturnInfo.SynBindingReturnInfo ( - ty, - range0, - [], - { - ColonRange = Some range0 - } - ) - - SynBinding ( - acc, - kind, - inl, - mut, - attrs, - doc, - valData, - headPat, - Some retInfo, - expr, - range, - debugPoint, - trivia - ) - - let inline makeInline (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (acc, kind, _, mut, attrs, doc, valData, headPat, ret, expr, range, debugPoint, trivia) -> - SynBinding ( - acc, - kind, - true, - mut, - attrs, - doc, - valData, - headPat, - ret, - expr, - range, - debugPoint, - { trivia with - InlineKeyword = Some range0 - } - ) - - let inline makeNotInline (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (acc, kind, _, mut, attrs, doc, valData, headPat, ret, expr, range, debugPoint, trivia) -> - SynBinding ( - acc, - kind, - false, - mut, - attrs, - doc, - valData, - headPat, - ret, - expr, - range, - debugPoint, - { trivia with - InlineKeyword = None - } - ) - - let inline setInline (isInline : bool) (binding : SynBinding) : SynBinding = - if isInline then - makeInline binding - else - makeNotInline binding - - let makeStaticMember (binding : SynBinding) : SynBinding = - let memberFlags = - { - SynMemberFlags.IsInstance = false - SynMemberFlags.IsDispatchSlot = false - SynMemberFlags.IsOverrideOrExplicitImpl = false - SynMemberFlags.IsFinal = false - SynMemberFlags.GetterOrSetterIsCompilerGenerated = false - SynMemberFlags.MemberKind = SynMemberKind.Member - } - - match binding with - | SynBinding (acc, kind, inl, mut, attrs, doc, valData, headPat, ret, expr, range, debugPoint, trivia) -> - let valData = - match valData with - | SynValData.SynValData (_, valInfo, _) -> SynValData.SynValData (Some memberFlags, valInfo, None) - - let trivia = - { trivia with - LeadingKeyword = SynLeadingKeyword.StaticMember (range0, range0) - } - - SynBinding (acc, kind, inl, mut, attrs, doc, valData, headPat, ret, expr, range, debugPoint, trivia) - - let makeInstanceMember (binding : SynBinding) : SynBinding = - let memberFlags = - { - SynMemberFlags.IsInstance = true - SynMemberFlags.IsDispatchSlot = false - SynMemberFlags.IsOverrideOrExplicitImpl = true - SynMemberFlags.IsFinal = false - SynMemberFlags.GetterOrSetterIsCompilerGenerated = false - SynMemberFlags.MemberKind = SynMemberKind.Member - } - - match binding with - | SynBinding (acc, kind, inl, mut, attrs, doc, valData, headPat, ret, expr, range, debugPoint, trivia) -> - let valData = - match valData with - | SynValData.SynValData (_, valInfo, _) -> SynValData.SynValData (Some memberFlags, valInfo, None) - - let trivia = - { trivia with - LeadingKeyword = SynLeadingKeyword.Member range0 - } - - SynBinding (acc, kind, inl, mut, attrs, doc, valData, headPat, ret, expr, range, debugPoint, trivia) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynComponentInfo.fs b/WoofWare.Myriad.Plugins/SynExpr/SynComponentInfo.fs deleted file mode 100644 index ad36475..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynComponentInfo.fs +++ /dev/null @@ -1,50 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Xml -open Fantomas.FCS.Text.Range - -[] -module internal SynComponentInfo = - let inline createLong (name : LongIdent) = - SynComponentInfo.SynComponentInfo ([], None, [], name, PreXmlDoc.Empty, false, None, range0) - - let inline create (name : Ident) = createLong [ name ] - - let inline withDocString (doc : PreXmlDoc) (i : SynComponentInfo) : SynComponentInfo = - match i with - | SynComponentInfo.SynComponentInfo (attrs, typars, constraints, name, _, postfix, access, range) -> - SynComponentInfo (attrs, typars, constraints, name, doc, postfix, access, range) - - let inline setGenerics (typars : SynTyparDecls option) (i : SynComponentInfo) : SynComponentInfo = - match i with - | SynComponentInfo.SynComponentInfo (attrs, _, constraints, name, doc, postfix, access, range) -> - SynComponentInfo (attrs, typars, constraints, name, doc, postfix, access, range) - - let inline withGenerics (typars : SynTyparDecl list) (i : SynComponentInfo) : SynComponentInfo = - let inner = - if typars.IsEmpty then - None - else - Some (SynTyparDecls.PostfixList (typars, [], range0)) - - setGenerics inner i - - let inline setAccessibility (acc : SynAccess option) (i : SynComponentInfo) : SynComponentInfo = - match i with - | SynComponentInfo.SynComponentInfo (attrs, typars, constraints, name, doc, postfix, _, range) -> - SynComponentInfo.SynComponentInfo (attrs, typars, constraints, name, doc, postfix, acc, range) - - let inline withAccessibility (acc : SynAccess) (i : SynComponentInfo) : SynComponentInfo = - setAccessibility (Some acc) i - - let inline addAttributes (attrs : SynAttribute list) (i : SynComponentInfo) : SynComponentInfo = - match i with - | SynComponentInfo.SynComponentInfo (oldAttrs, typars, constraints, name, doc, postfix, acc, range) -> - let attrs = - { - SynAttributeList.Attributes = attrs - SynAttributeList.Range = range0 - } - - SynComponentInfo.SynComponentInfo ((attrs :: oldAttrs), typars, constraints, name, doc, postfix, acc, range) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynConst.fs b/WoofWare.Myriad.Plugins/SynExpr/SynConst.fs deleted file mode 100644 index 11d71ee..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynConst.fs +++ /dev/null @@ -1,10 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynConstExt = - type SynConst with - static member Create (s : string) : SynConst = - SynConst.String (s, SynStringKind.Regular, range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynExpr.fs b/WoofWare.Myriad.Plugins/SynExpr/SynExpr.fs deleted file mode 100644 index ede3ad2..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynExpr.fs +++ /dev/null @@ -1,365 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Text.Range - -[] -module internal SynExprExtensions = - type SynExpr with - static member CreateConst (s : string) : SynExpr = - SynExpr.Const (SynConst.Create s, range0) - - static member CreateConst () : SynExpr = SynExpr.Const (SynConst.Unit, range0) - - static member CreateConst (b : bool) : SynExpr = SynExpr.Const (SynConst.Bool b, range0) - - static member CreateConst (c : char) : SynExpr = - // apparent Myriad bug: `IndexOf '?'` gets formatted as `IndexOf ?` which is clearly wrong - SynExpr.App ( - ExprAtomicFlag.NonAtomic, - false, - SynExpr.Ident (Ident.create "char"), - SynExpr.CreateConst (int c), - range0 - ) - |> fun e -> SynExpr.Paren (e, range0, Some range0, range0) - - static member CreateConst (i : int32) : SynExpr = - SynExpr.Const (SynConst.Int32 i, range0) - -[] -module internal SynExpr = - - /// {f} {x} - let applyFunction (f : SynExpr) (x : SynExpr) : SynExpr = - SynExpr.App (ExprAtomicFlag.NonAtomic, false, f, x, range0) - - /// {f} {x} - let inline applyTo (x : SynExpr) (f : SynExpr) : SynExpr = applyFunction f x - - let inline private createAppInfix (f : SynExpr) (x : SynExpr) = - SynExpr.App (ExprAtomicFlag.NonAtomic, true, f, x, range0) - - let inline createLongIdent'' (ident : SynLongIdent) : SynExpr = - SynExpr.LongIdent (false, ident, None, range0) - - let inline createLongIdent' (ident : Ident list) : SynExpr = - createLongIdent'' (SynLongIdent.create ident) - - let inline createLongIdent (ident : string list) : SynExpr = - createLongIdent' (ident |> List.map Ident.create) - - /// {expr} |> {func} - let pipeThroughFunction (func : SynExpr) (expr : SynExpr) : SynExpr = - createAppInfix (createLongIdent'' SynLongIdent.pipe) expr |> applyTo func - - /// if {cond} then {trueBranch} else {falseBranch} - /// Note that this function puts the trueBranch last, for pipelining convenience: - /// we assume that the `else` branch is more like an error case and is less interesting. - let ifThenElse (cond : SynExpr) (falseBranch : SynExpr) (trueBranch : SynExpr) : SynExpr = - SynExpr.IfThenElse ( - cond, - trueBranch, - Some falseBranch, - DebugPointAtBinding.Yes range0, - false, - range0, - { - IfKeyword = range0 - IsElif = false - ThenKeyword = range0 - ElseKeyword = Some range0 - IfToThenRange = range0 - } - ) - - /// try {body} with | {exc} as exc -> {handler} - let pipeThroughTryWith (exc : SynPat) (handler : SynExpr) (body : SynExpr) : SynExpr = - let clause = - SynMatchClause.create (SynPat.As (exc, SynPat.named "exc", range0)) handler - - SynExpr.TryWith ( - body, - [ clause ], - range0, - DebugPointAtTry.Yes range0, - DebugPointAtWith.Yes range0, - { - TryKeyword = range0 - TryToWithRange = range0 - WithKeyword = range0 - WithToEndRange = range0 - } - ) - - /// {a} = {b} - let equals (a : SynExpr) (b : SynExpr) = - createAppInfix (createLongIdent'' SynLongIdent.eq) a |> applyTo b - - /// {a} && {b} - let booleanAnd (a : SynExpr) (b : SynExpr) = - createAppInfix (createLongIdent'' SynLongIdent.booleanAnd) a |> applyTo b - - /// {a} || {b} - let booleanOr (a : SynExpr) (b : SynExpr) = - createAppInfix (createLongIdent'' SynLongIdent.booleanOr) a |> applyTo b - - /// {a} + {b} - let plus (a : SynExpr) (b : SynExpr) = - createAppInfix (createLongIdent'' SynLongIdent.plus) a |> applyTo b - - /// {a} * {b} - let times (a : SynExpr) (b : SynExpr) = - createAppInfix (createLongIdent'' SynLongIdent.times) a |> applyTo b - - let rec stripOptionalParen (expr : SynExpr) : SynExpr = - match expr with - | SynExpr.Paren (expr, _, _, _) -> stripOptionalParen expr - | expr -> expr - - let dotGet (field : string) (obj : SynExpr) : SynExpr = - SynExpr.DotGet ( - obj, - range0, - SynLongIdent.SynLongIdent (id = [ Ident.create field ], dotRanges = [], trivia = [ None ]), - range0 - ) - - /// {obj}.{meth} {arg} - let callMethodArg (meth : string) (arg : SynExpr) (obj : SynExpr) : SynExpr = dotGet meth obj |> applyTo arg - - /// {obj}.{meth}() - let callMethod (meth : string) (obj : SynExpr) : SynExpr = - callMethodArg meth (SynExpr.CreateConst ()) obj - - let typeApp (types : SynType list) (operand : SynExpr) = - SynExpr.TypeApp (operand, range0, types, List.replicate (types.Length - 1) range0, Some range0, range0, range0) - - /// {obj}.{meth}() - let callGenericMethod (meth : SynLongIdent) (types : SynType list) (obj : SynExpr) : SynExpr = - SynExpr.DotGet (obj, range0, meth, range0) - |> typeApp types - |> applyTo (SynExpr.CreateConst ()) - - /// {obj}.{meth}() - let callGenericMethod' (meth : string) (ty : string) (obj : SynExpr) : SynExpr = - callGenericMethod (SynLongIdent.createS meth) [ SynType.createLongIdent' [ ty ] ] obj - - let inline index (property : SynExpr) (obj : SynExpr) : SynExpr = - SynExpr.DotIndexedGet (obj, property, range0, range0) - - let inline arrayIndexRange (start : SynExpr option) (endRange : SynExpr option) (arr : SynExpr) : SynExpr = - SynExpr.DotIndexedGet ( - arr, - (SynExpr.IndexRange (start, range0, endRange, range0, range0, range0)), - range0, - range0 - ) - - let inline paren (e : SynExpr) : SynExpr = - SynExpr.Paren (e, range0, Some range0, range0) - - /// (fun {varName} -> {body}) - let createLambda (varName : string) (body : SynExpr) : SynExpr = - let parsedDataPat = [ SynPat.named varName ] - - SynExpr.Lambda ( - false, - false, - SynSimplePats.create [ SynSimplePat.createId (Ident.create varName) ], - body, - Some (parsedDataPat, body), - range0, - { - ArrowRange = Some range0 - } - ) - |> paren - - let createThunk (body : SynExpr) : SynExpr = - SynExpr.Lambda ( - false, - false, - SynSimplePats.create [], - body, - Some ([ SynPat.unit ], body), - range0, - { - ArrowRange = Some range0 - } - ) - |> paren - - let inline createIdent (s : string) : SynExpr = SynExpr.Ident (Ident (s, range0)) - - let inline createIdent' (i : Ident) : SynExpr = SynExpr.Ident i - - let tupleNoParen (args : SynExpr list) : SynExpr = - SynExpr.Tuple (false, args, List.replicate (args.Length - 1) range0, range0) - - let inline tuple (args : SynExpr list) = args |> tupleNoParen |> paren - - /// {body} |> fun a -> Async.StartAsTask (a, ?cancellationToken=ct) - let startAsTask (ct : Ident) (body : SynExpr) = - let lambda = - [ - createIdent "a" - equals - (SynExpr.LongIdent (true, SynLongIdent.createS "cancellationToken", None, range0)) - (createIdent' ct) - ] - |> tuple - |> applyFunction (createLongIdent [ "Async" ; "StartAsTask" ]) - |> createLambda "a" - - pipeThroughFunction lambda body - - let inline createForEach (pat : SynPat) (enumExpr : SynExpr) (body : SynExpr) : SynExpr = - SynExpr.ForEach ( - DebugPointAtFor.No, - DebugPointAtInOrTo.No, - SeqExprOnly.SeqExprOnly false, - true, - pat, - enumExpr, - body, - range0 - ) - - let inline createLet (bindings : SynBinding list) (body : SynExpr) : SynExpr = - SynExpr.LetOrUse (false, false, bindings, body, range0, SynExprLetOrUseTrivia.empty) - - let inline createDo (body : SynExpr) : SynExpr = SynExpr.Do (body, range0) - - let inline createMatch (matchOn : SynExpr) (cases : SynMatchClause list) : SynExpr = - SynExpr.Match ( - DebugPointAtBinding.Yes range0, - matchOn, - cases, - range0, - { - MatchKeyword = range0 - WithKeyword = range0 - } - ) - - let typeAnnotate (ty : SynType) (expr : SynExpr) : SynExpr = SynExpr.Typed (expr, ty, range0) - - let inline createNew (ty : SynType) (args : SynExpr) : SynExpr = - SynExpr.New (false, ty, paren args, range0) - - let inline createWhile (cond : SynExpr) (body : SynExpr) : SynExpr = - SynExpr.While (DebugPointAtWhile.Yes range0, cond, body, range0) - - let inline createNull () : SynExpr = SynExpr.Null range0 - - let reraise : SynExpr = createIdent "reraise" |> applyTo (SynExpr.CreateConst ()) - - let sequential (exprs : SynExpr list) : SynExpr = - exprs - |> List.reduce (fun a b -> SynExpr.Sequential (DebugPointAtSequential.SuppressNeither, false, a, b, range0)) - - let listLiteral (elts : SynExpr list) : SynExpr = - SynExpr.ArrayOrListComputed (false, sequential elts, range0) - - let arrayLiteral (elts : SynExpr list) : SynExpr = - SynExpr.ArrayOrListComputed (true, sequential elts, range0) - - /// {compExpr} { {lets} ; return {ret} } - let createCompExpr (compExpr : string) (retBody : SynExpr) (lets : CompExprBinding list) : SynExpr = - let retStatement = SynExpr.YieldOrReturn ((false, true), retBody, range0) - - let contents : SynExpr = - (retStatement, List.rev lets) - ||> List.fold (fun state binding -> - match binding with - | LetBang (lhs, rhs) -> - SynExpr.LetOrUseBang ( - DebugPointAtBinding.Yes range0, - false, - true, - SynPat.named lhs, - rhs, - [], - state, - range0, - { - EqualsRange = Some range0 - } - ) - | Let (lhs, rhs) -> createLet [ SynBinding.basic [ Ident.create lhs ] [] rhs ] state - | Use (lhs, rhs) -> - SynExpr.LetOrUse ( - false, - true, - [ SynBinding.basic [ Ident.create lhs ] [] rhs ], - state, - range0, - { - SynExprLetOrUseTrivia.InKeyword = None - } - ) - | Do body -> sequential [ SynExpr.Do (body, range0) ; state ] - ) - - applyFunction (createIdent compExpr) (SynExpr.ComputationExpr (false, contents, range0)) - - /// {expr} |> Async.AwaitTask - let awaitTask (expr : SynExpr) : SynExpr = - expr |> pipeThroughFunction (createLongIdent [ "Async" ; "AwaitTask" ]) - - /// {ident}.ToString () - /// with special casing for some types like DateTime - let toString (ty : SynType) (ident : SynExpr) = - match ty with - | DateOnly -> ident |> callMethodArg "ToString" (SynExpr.CreateConst "yyyy-MM-dd") - | DateTime -> ident |> callMethodArg "ToString" (SynExpr.CreateConst "yyyy-MM-ddTHH:mm:ss") - | _ -> callMethod "ToString" ident - - let upcast' (ty : SynType) (e : SynExpr) = SynExpr.Upcast (e, ty, range0) - - /// {ident} - {rhs} - let minus (ident : SynLongIdent) (rhs : SynExpr) : SynExpr = - createAppInfix (createLongIdent'' SynLongIdent.sub) (createLongIdent'' ident) - |> applyTo rhs - - /// {ident} - {n} - let minusN (ident : SynLongIdent) (n : int) : SynExpr = minus ident (SynExpr.CreateConst n) - - /// {y} > {x} - let greaterThan (x : SynExpr) (y : SynExpr) : SynExpr = - createAppInfix (createLongIdent'' SynLongIdent.gt) y |> applyTo x - - /// {y} < {x} - let lessThan (x : SynExpr) (y : SynExpr) : SynExpr = - createAppInfix (createLongIdent'' SynLongIdent.lt) y |> applyTo x - - /// {y} >= {x} - let greaterThanOrEqual (x : SynExpr) (y : SynExpr) : SynExpr = - createAppInfix (createLongIdent'' SynLongIdent.geq) y |> applyTo x - - /// {y} <= {x} - let lessThanOrEqual (x : SynExpr) (y : SynExpr) : SynExpr = - createAppInfix (createLongIdent'' SynLongIdent.leq) y |> applyTo x - - /// {x} :: {y} - let listCons (x : SynExpr) (y : SynExpr) : SynExpr = - createAppInfix - (SynExpr.LongIdent ( - false, - SynLongIdent.SynLongIdent ( - [ Ident.create "op_ColonColon" ], - [], - [ Some (IdentTrivia.OriginalNotation "::") ] - ), - None, - range0 - )) - (tupleNoParen [ x ; y ]) - |> paren - - let assign (lhs : SynLongIdent) (rhs : SynExpr) : SynExpr = SynExpr.LongIdentSet (lhs, rhs, range0) - - let assignIndex (lhs : SynExpr) (index : SynExpr) (rhs : SynExpr) : SynExpr = - SynExpr.DotIndexedSet (lhs, index, rhs, range0, range0, range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynExprLetOrUseTrivia.fs b/WoofWare.Myriad.Plugins/SynExpr/SynExprLetOrUseTrivia.fs deleted file mode 100644 index e78a44c..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynExprLetOrUseTrivia.fs +++ /dev/null @@ -1,10 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.SyntaxTrivia - -[] -module internal SynExprLetOrUseTrivia = - let empty : SynExprLetOrUseTrivia = - { - InKeyword = None - } diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynField.fs b/WoofWare.Myriad.Plugins/SynExpr/SynField.fs deleted file mode 100644 index 6d55035..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynField.fs +++ /dev/null @@ -1,76 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Text.Range -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Xml - -/// The data needed to reconstitute a single piece of data within a union field, or a single record field. -/// This is generic on whether the field is identified. For example, in `type Foo = Blah of int`, the `int` -/// field is not identified; whereas in `type Foo = Blah of baz : int`, it is identified. -type SynFieldData<'Ident> = - { - /// Attributes on this field. I think you can only get these if this is a *record* field. - Attrs : SynAttribute list - /// The identifier of this field (see docstring for SynFieldData). - Ident : 'Ident - /// The type of the data contained in this field. For example, `type Foo = { Blah : int }` - /// has this being `int`. - Type : SynType - } - -[] -module internal SynField = - /// Get the useful information out of a SynField. - let extract (SynField (attrs, _, id, fieldType, _, _, _, _, _)) : SynFieldData = - { - Attrs = attrs |> List.collect (fun l -> l.Attributes) - Ident = id - Type = fieldType - } - - let mapIdent<'a, 'b> (f : 'a -> 'b) (x : SynFieldData<'a>) : SynFieldData<'b> = - let ident = f x.Ident - - { - Attrs = x.Attrs - Ident = ident - Type = x.Type - } - - /// Throws if the field has no identifier. - let extractWithIdent (f : SynField) : SynFieldData = - f - |> extract - |> mapIdent (fun ident -> - match ident with - | None -> failwith "expected field identifier to have a value, but it did not" - | Some i -> i - ) - - let make (data : SynFieldData) : SynField = - let attrs : SynAttributeList list = - data.Attrs - |> List.map (fun l -> - { - Attributes = [ l ] - Range = range0 - } - ) - - SynField.SynField ( - attrs, - false, - data.Ident, - data.Type, - false, - PreXmlDoc.Empty, - None, - range0, - SynFieldTrivia.Zero - ) - - let withDocString (doc : PreXmlDoc) (f : SynField) : SynField = - match f with - | SynField (attributes, isStatic, idOpt, fieldType, isMutable, _, accessibility, range, trivia) -> - SynField (attributes, isStatic, idOpt, fieldType, isMutable, doc, accessibility, range, trivia) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynIdent.fs b/WoofWare.Myriad.Plugins/SynExpr/SynIdent.fs deleted file mode 100644 index d1bd0ea..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynIdent.fs +++ /dev/null @@ -1,10 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax - -[] -module internal SynIdent = - let inline createI (i : Ident) : SynIdent = SynIdent.SynIdent (i, None) - - let inline createS (i : string) : SynIdent = - SynIdent.SynIdent (Ident.create i, None) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynLongIdent.fs b/WoofWare.Myriad.Plugins/SynExpr/SynLongIdent.fs deleted file mode 100644 index de86308..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynLongIdent.fs +++ /dev/null @@ -1,140 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Text.Range -open Fantomas.FCS.Syntax - -[] -module internal SynLongIdent = - - let geq = - SynLongIdent.SynLongIdent ( - [ Ident.create "op_GreaterThanOrEqual" ], - [], - [ Some (IdentTrivia.OriginalNotation ">=") ] - ) - - let leq = - SynLongIdent.SynLongIdent ( - [ Ident.create "op_LessThanOrEqual" ], - [], - [ Some (IdentTrivia.OriginalNotation "<=") ] - ) - - let gt = - SynLongIdent.SynLongIdent ([ Ident.create "op_GreaterThan" ], [], [ Some (IdentTrivia.OriginalNotation ">") ]) - - let lt = - SynLongIdent.SynLongIdent ([ Ident.create "op_LessThan" ], [], [ Some (IdentTrivia.OriginalNotation "<") ]) - - let sub = - SynLongIdent.SynLongIdent ([ Ident.create "op_Subtraction" ], [], [ Some (IdentTrivia.OriginalNotation "-") ]) - - let eq = - SynLongIdent.SynLongIdent ([ Ident.create "op_Equality" ], [], [ Some (IdentTrivia.OriginalNotation "=") ]) - - let booleanAnd = - SynLongIdent.SynLongIdent ([ Ident.create "op_BooleanAnd" ], [], [ Some (IdentTrivia.OriginalNotation "&&") ]) - - let booleanOr = - SynLongIdent.SynLongIdent ([ Ident.create "op_BooleanOr" ], [], [ Some (IdentTrivia.OriginalNotation "||") ]) - - let plus = - SynLongIdent.SynLongIdent ([ Ident.create "op_Addition" ], [], [ Some (IdentTrivia.OriginalNotation "+") ]) - - let times = - SynLongIdent.SynLongIdent ([ Ident.create "op_Multiply" ], [], [ Some (IdentTrivia.OriginalNotation "*") ]) - - let pipe = - SynLongIdent.SynLongIdent ([ Ident.create "op_PipeRight" ], [], [ Some (IdentTrivia.OriginalNotation "|>") ]) - - let toString (sli : SynLongIdent) : string = - sli.LongIdent |> List.map _.idText |> String.concat "." - - let create (ident : LongIdent) : SynLongIdent = - let commas = - match ident with - | [] -> [] - | _ :: commas -> commas |> List.map (fun _ -> range0) - - SynLongIdent.SynLongIdent (ident, commas, List.replicate ident.Length None) - - let inline createI (i : Ident) : SynLongIdent = create [ i ] - - let inline createS (s : string) : SynLongIdent = createI (Ident (s, range0)) - - let inline createS' (s : string list) : SynLongIdent = - create (s |> List.map (fun i -> Ident (i, range0))) - - let isUnit (ident : SynLongIdent) : bool = - match ident.LongIdent with - | [ i ] when System.String.Equals (i.idText, "unit", System.StringComparison.OrdinalIgnoreCase) -> true - | _ -> false - - let isList (ident : SynLongIdent) : bool = - match ident.LongIdent with - | [ i ] when System.String.Equals (i.idText, "list", System.StringComparison.OrdinalIgnoreCase) -> true - // TODO: consider FSharpList or whatever it is - | _ -> false - - let isArray (ident : SynLongIdent) : bool = - match ident.LongIdent with - | [ i ] when - System.String.Equals (i.idText, "array", System.StringComparison.OrdinalIgnoreCase) - || System.String.Equals (i.idText, "[]", System.StringComparison.Ordinal) - -> - true - | _ -> false - - let isOption (ident : SynLongIdent) : bool = - match ident.LongIdent with - | [ i ] when System.String.Equals (i.idText, "option", System.StringComparison.OrdinalIgnoreCase) -> true - // TODO: consider Microsoft.FSharp.Option or whatever it is - | _ -> false - - let isChoice (ident : SynLongIdent) : bool = - match ident.LongIdent with - | [ i ] when System.String.Equals (i.idText, "Choice", System.StringComparison.Ordinal) -> true - // TODO: consider Microsoft.FSharp.Choice or whatever it is - | _ -> false - - let isNullable (ident : SynLongIdent) : bool = - match ident.LongIdent |> List.map _.idText with - | [ "System" ; "Nullable" ] - | [ "Nullable" ] -> true - | _ -> false - - let isResponse (ident : SynLongIdent) : bool = - match ident.LongIdent |> List.map _.idText with - | [ "Response" ] - | [ "RestEase" ; "Response" ] -> true - | _ -> false - - let isMap (ident : SynLongIdent) : bool = - match ident.LongIdent |> List.map _.idText with - | [ "Map" ] -> true - | _ -> false - - let isReadOnlyDictionary (ident : SynLongIdent) : bool = - match ident.LongIdent |> List.map _.idText with - | [ "IReadOnlyDictionary" ] - | [ "Generic" ; "IReadOnlyDictionary" ] - | [ "Collections" ; "Generic" ; "IReadOnlyDictionary" ] - | [ "System" ; "Collections" ; "Generic" ; "IReadOnlyDictionary" ] -> true - | _ -> false - - let isDictionary (ident : SynLongIdent) : bool = - match ident.LongIdent |> List.map _.idText with - | [ "Dictionary" ] - | [ "Generic" ; "Dictionary" ] - | [ "Collections" ; "Generic" ; "Dictionary" ] - | [ "System" ; "Collections" ; "Generic" ; "Dictionary" ] -> true - | _ -> false - - let isIDictionary (ident : SynLongIdent) : bool = - match ident.LongIdent |> List.map _.idText with - | [ "IDictionary" ] - | [ "Generic" ; "IDictionary" ] - | [ "Collections" ; "Generic" ; "IDictionary" ] - | [ "System" ; "Collections" ; "Generic" ; "IDictionary" ] -> true - | _ -> false diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynMatchClause.fs b/WoofWare.Myriad.Plugins/SynExpr/SynMatchClause.fs deleted file mode 100644 index d56115b..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynMatchClause.fs +++ /dev/null @@ -1,24 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynMatchClause = - let create (lhs : SynPat) (rhs : SynExpr) : SynMatchClause = - SynMatchClause.SynMatchClause ( - lhs, - None, - rhs, - range0, - DebugPointAtTarget.Yes, - { - ArrowRange = Some range0 - BarRange = Some range0 - } - ) - - let withWhere (where : SynExpr) (m : SynMatchClause) : SynMatchClause = - match m with - | SynMatchClause (synPat, _, resultExpr, range, debugPointAtTarget, synMatchClauseTrivia) -> - SynMatchClause (synPat, Some where, resultExpr, range, debugPointAtTarget, synMatchClauseTrivia) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynMemberDefn.fs b/WoofWare.Myriad.Plugins/SynExpr/SynMemberDefn.fs deleted file mode 100644 index f7c83c3..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynMemberDefn.fs +++ /dev/null @@ -1,71 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Text.Range -open Fantomas.FCS.Xml - -[] -module internal SynMemberDefn = - let private interfaceMemberSlotFlags = - { - SynMemberFlags.IsInstance = true - SynMemberFlags.IsDispatchSlot = true - SynMemberFlags.IsOverrideOrExplicitImpl = false - SynMemberFlags.IsFinal = false - SynMemberFlags.GetterOrSetterIsCompilerGenerated = false - SynMemberFlags.MemberKind = SynMemberKind.Member - } - - let abstractMember - (attrs : SynAttribute list) - (ident : SynIdent) - (typars : SynTyparDecls option) - (arity : SynValInfo) - (xmlDoc : PreXmlDoc) - (returnType : SynType) - : SynMemberDefn - = - let slot = - SynValSig.SynValSig ( - attrs - |> List.map (fun attr -> - { - Attributes = [ attr ] - Range = range0 - } - ), - ident, - SynValTyparDecls.SynValTyparDecls (typars, true), - returnType, - arity, - false, - false, - xmlDoc, - None, - None, - range0, - { - EqualsRange = None - WithKeyword = None - InlineKeyword = None - LeadingKeyword = SynLeadingKeyword.Abstract range0 - } - ) - - SynMemberDefn.AbstractSlot ( - slot, - interfaceMemberSlotFlags, - range0, - { - GetSetKeywords = None - } - ) - - let staticMember (binding : SynBinding) : SynMemberDefn = - let binding = SynBinding.makeStaticMember binding - SynMemberDefn.Member (binding, range0) - - let memberImplementation (binding : SynBinding) : SynMemberDefn = - let binding = SynBinding.makeInstanceMember binding - SynMemberDefn.Member (binding, range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynModuleDecl.fs b/WoofWare.Myriad.Plugins/SynExpr/SynModuleDecl.fs deleted file mode 100644 index 3334d5b..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynModuleDecl.fs +++ /dev/null @@ -1,30 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Text.Range - -[] -module internal SynModuleDecl = - - let inline openAny (ident : SynOpenDeclTarget) : SynModuleDecl = SynModuleDecl.Open (ident, range0) - - let inline createLets (bindings : SynBinding list) : SynModuleDecl = - SynModuleDecl.Let (false, bindings, range0) - - let inline createLet (binding : SynBinding) : SynModuleDecl = createLets [ binding ] - - let inline createTypes (tys : SynTypeDefn list) : SynModuleDecl = SynModuleDecl.Types (tys, range0) - - let nestedModule (info : SynComponentInfo) (decls : SynModuleDecl list) : SynModuleDecl = - SynModuleDecl.NestedModule ( - info, - false, - decls, - false, - range0, - { - ModuleKeyword = Some range0 - EqualsRange = Some range0 - } - ) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynModuleOrNamespace.fs b/WoofWare.Myriad.Plugins/SynExpr/SynModuleOrNamespace.fs deleted file mode 100644 index d17fc74..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynModuleOrNamespace.fs +++ /dev/null @@ -1,24 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Xml -open Fantomas.FCS.Text.Range - -[] -module internal SynModuleOrNamespace = - - let createNamespace (name : LongIdent) (decls : SynModuleDecl list) = - SynModuleOrNamespace.SynModuleOrNamespace ( - name, - false, - SynModuleOrNamespaceKind.DeclaredNamespace, - decls, - PreXmlDoc.Empty, - [], - None, - range0, - { - LeadingKeyword = SynModuleOrNamespaceLeadingKeyword.Namespace range0 - } - ) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynPat.fs b/WoofWare.Myriad.Plugins/SynExpr/SynPat.fs deleted file mode 100644 index 282ad91..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynPat.fs +++ /dev/null @@ -1,54 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynPat = - let inline paren (pat : SynPat) : SynPat = SynPat.Paren (pat, range0) - - let anon : SynPat = SynPat.Wild range0 - - let inline annotateTypeNoParen (ty : SynType) (pat : SynPat) = SynPat.Typed (pat, ty, range0) - - let inline annotateType (ty : SynType) (pat : SynPat) = paren (annotateTypeNoParen ty pat) - - let inline named (s : string) : SynPat = - SynPat.Named (SynIdent.SynIdent (Ident (s, range0), None), false, None, range0) - - let inline namedI (i : Ident) : SynPat = - SynPat.Named (SynIdent.SynIdent (i, None), false, None, range0) - - let inline identWithArgs (i : LongIdent) (args : SynArgPats) : SynPat = - SynPat.LongIdent (SynLongIdent.create i, None, None, args, None, range0) - - let inline nameWithArgs (i : string) (args : SynPat list) : SynPat = - identWithArgs [ Ident.create i ] (SynArgPats.create args) - - let inline tupleNoParen (elements : SynPat list) : SynPat = - match elements with - | [] -> failwith "Can't tuple no elements in a pattern" - | [ p ] -> p - | elements -> SynPat.Tuple (false, elements, List.replicate (elements.Length - 1) range0, range0) - - let inline tuple (elements : SynPat list) : SynPat = tupleNoParen elements |> paren - - let inline createConst (c : SynConst) = SynPat.Const (c, range0) - - let unit = createConst SynConst.Unit - - let createNull = SynPat.Null range0 - - let emptyList = SynPat.ArrayOrList (false, [], range0) - - let listCons (lhs : SynPat) (rhs : SynPat) = - SynPat.ListCons ( - lhs, - rhs, - range0, - { - ColonColonRange = range0 - } - ) - - let emptyArray = SynPat.ArrayOrList (true, [], range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynSimplePat.fs b/WoofWare.Myriad.Plugins/SynExpr/SynSimplePat.fs deleted file mode 100644 index 5f1c475..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynSimplePat.fs +++ /dev/null @@ -1,10 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynSimplePat = - - let createId (id : Ident) : SynSimplePat = - SynSimplePat.Id (id, None, false, false, false, range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynSimplePats.fs b/WoofWare.Myriad.Plugins/SynExpr/SynSimplePats.fs deleted file mode 100644 index 4714a0b..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynSimplePats.fs +++ /dev/null @@ -1,12 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynSimplePats = - - let create (pats : SynSimplePat list) : SynSimplePats = - match pats with - | [] -> SynSimplePats.SimplePats ([], [], range0) - | pats -> SynSimplePats.SimplePats (pats, List.replicate (pats.Length - 1) range0, range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynType.fs b/WoofWare.Myriad.Plugins/SynExpr/SynType.fs deleted file mode 100644 index 47f00db..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynType.fs +++ /dev/null @@ -1,555 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open System -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynTypePatterns = - let (|OptionType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ innerType ], _, _, _, _) when SynLongIdent.isOption ident -> - Some innerType - | _ -> None - - let (|ChoiceType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, inner, _, _, _, _) when SynLongIdent.isChoice ident -> Some inner - | _ -> None - - let (|NullableType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ innerType ], _, _, _, _) when SynLongIdent.isNullable ident -> - Some innerType - | _ -> None - - let (|UnitType|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident when SynLongIdent.isUnit ident -> Some () - | _ -> None - - let (|ListType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ innerType ], _, _, _, _) when SynLongIdent.isList ident -> - Some innerType - | _ -> None - - let (|ArrayType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ innerType ], _, _, _, _) when SynLongIdent.isArray ident -> - Some innerType - | SynType.Array (1, innerType, _) -> Some innerType - | _ -> None - - let (|RestEaseResponseType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ innerType ], _, _, _, _) when SynLongIdent.isResponse ident -> - Some innerType - | _ -> None - - let (|DictionaryType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ key ; value ], _, _, _, _) when SynLongIdent.isDictionary ident -> - Some (key, value) - | _ -> None - - let (|IDictionaryType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ key ; value ], _, _, _, _) when SynLongIdent.isIDictionary ident -> - Some (key, value) - | _ -> None - - let (|IReadOnlyDictionaryType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ key ; value ], _, _, _, _) when - SynLongIdent.isReadOnlyDictionary ident - -> - Some (key, value) - | _ -> None - - let (|MapType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ key ; value ], _, _, _, _) when SynLongIdent.isMap ident -> - Some (key, value) - | _ -> None - - let (|BigInt|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent |> List.map _.idText with - | [ "bigint" ] - | [ "BigInteger" ] - | [ "Numerics" ; "BigInteger" ] - | [ "System" ; "Numerics" ; "BigInteger" ] -> Some () - | _ -> None - | _ -> None - - /// Returns the type, qualified as in e.g. `System.Boolean`. - let (|PrimitiveType|_|) (fieldType : SynType) : LongIdent option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent with - | [ i ] -> Primitives.qualifyType i.idText - | _ -> None - | _ -> None - - let (|String|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent with - | [ i ] -> - [ "string" ] - |> List.tryFind (fun s -> s = i.idText) - |> Option.map ignore - | _ -> None - | _ -> None - - let (|Byte|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent with - | [ i ] -> [ "byte" ] |> List.tryFind (fun s -> s = i.idText) |> Option.map ignore - | _ -> None - | _ -> None - - let (|Guid|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent |> List.map (fun i -> i.idText) with - | [ "System" ; "Guid" ] - | [ "Guid" ] -> Some () - | _ -> None - | _ -> None - - let (|HttpResponseMessage|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent |> List.map (fun i -> i.idText) with - | [ "System" ; "Net" ; "Http" ; "HttpResponseMessage" ] - | [ "Net" ; "Http" ; "HttpResponseMessage" ] - | [ "Http" ; "HttpResponseMessage" ] - | [ "HttpResponseMessage" ] -> Some () - | _ -> None - | _ -> None - - let (|HttpContent|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent |> List.map (fun i -> i.idText) with - | [ "System" ; "Net" ; "Http" ; "HttpContent" ] - | [ "Net" ; "Http" ; "HttpContent" ] - | [ "Http" ; "HttpContent" ] - | [ "HttpContent" ] -> Some () - | _ -> None - | _ -> None - - let (|Stream|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent |> List.map (fun i -> i.idText) with - | [ "System" ; "IO" ; "Stream" ] - | [ "IO" ; "Stream" ] - | [ "Stream" ] -> Some () - | _ -> None - | _ -> None - - let (|NumberType|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent with - | [ i ] -> - // We won't bother with the case that the user has done e.g. `Single` (relying on `System` being open). - match Primitives.qualifyType i.idText with - | Some qualified -> - match i.idText with - | "char" - | "string" -> None - | _ -> Some qualified - | None -> None - | _ -> None - | _ -> None - - /// Returns the name of the measure, and the outer type. - let (|Measure|_|) (fieldType : SynType) : (Ident * LongIdent) option = - match fieldType with - | SynType.App (NumberType outer, - _, - [ SynType.LongIdent (SynLongIdent.SynLongIdent ([ ident ], _, _)) ], - _, - _, - _, - _) -> Some (ident, outer) - | _ -> None - - let (|JsonNode|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "Text" ; "Json" ; "Nodes" ; "JsonNode" ] - | [ "Text" ; "Json" ; "Nodes" ; "JsonNode" ] - | [ "Json" ; "Nodes" ; "JsonNode" ] - | [ "Nodes" ; "JsonNode" ] - | [ "JsonNode" ] -> Some () - | _ -> None - | _ -> None - - let (|Unit|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText.ToLowerInvariant ()) with - | [ "microsoft" ; "fsharp" ; "core" ; "unit" ] - | [ "fsharp" ; "core" ; "unit" ] - | [ "core" ; "unit" ] - | [ "unit" ] -> Some () - | _ -> None - | _ -> None - - let (|DateOnly|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "DateOnly" ] - | [ "DateOnly" ] -> Some () - | _ -> None - | _ -> None - - let (|DateTime|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "DateTime" ] - | [ "DateTime" ] -> Some () - | _ -> None - | _ -> None - - let (|DateTimeOffset|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "DateTimeOffset" ] - | [ "DateTimeOffset" ] -> Some () - | _ -> None - | _ -> None - - let (|Uri|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "Uri" ] - | [ "Uri" ] -> Some () - | _ -> None - | _ -> None - - let (|Task|_|) (fieldType : SynType) : SynType option = - match fieldType with - | SynType.App (SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)), _, args, _, _, _, _) -> - match ident |> List.map (fun i -> i.idText) with - | [ "Task" ] - | [ "Tasks" ; "Task" ] - | [ "Threading" ; "Tasks" ; "Task" ] - | [ "System" ; "Threading" ; "Tasks" ; "Task" ] -> - match args with - | [ arg ] -> Some arg - | _ -> failwithf "Expected Task to be applied to exactly one arg, but got: %+A" args - | _ -> None - | _ -> None - - let (|DirectoryInfo|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "IO" ; "DirectoryInfo" ] - | [ "IO" ; "DirectoryInfo" ] - | [ "DirectoryInfo" ] -> Some () - | _ -> None - | _ -> None - - let (|FileInfo|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "IO" ; "FileInfo" ] - | [ "IO" ; "FileInfo" ] - | [ "FileInfo" ] -> Some () - | _ -> None - | _ -> None - - let (|TimeSpan|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "TimeSpan" ] - | [ "TimeSpan" ] -> Some () - | _ -> None - | _ -> None - -[] -module internal SynType = - - let rec stripOptionalParen (ty : SynType) : SynType = - match ty with - | SynType.Paren (ty, _) -> stripOptionalParen ty - | ty -> ty - - let inline paren (ty : SynType) : SynType = SynType.Paren (ty, range0) - - let inline createLongIdent (ident : LongIdent) : SynType = - SynType.LongIdent (SynLongIdent.create ident) - - let inline createLongIdent' (ident : string list) : SynType = - SynType.LongIdent (SynLongIdent.createS' ident) - - let inline named (name : string) = createLongIdent' [ name ] - - let inline app' (name : SynType) (args : SynType list) : SynType = - if args.IsEmpty then - failwith "Type cannot be applied to no arguments" - - SynType.App (name, Some range0, args, List.replicate (args.Length - 1) range0, Some range0, false, range0) - - let inline app (name : string) (args : SynType list) : SynType = app' (named name) args - - /// Returns None if the input list was empty. - let inline tupleNoParen (ty : SynType list) : SynType option = - match List.rev ty with - | [] -> None - | [ t ] -> Some t - | t :: rest -> - ([ SynTupleTypeSegment.Type t ], rest) - ||> List.fold (fun ty nextArg -> SynTupleTypeSegment.Type nextArg :: SynTupleTypeSegment.Star range0 :: ty) - |> fun segs -> SynType.Tuple (false, segs, range0) - |> Some - - let inline appPostfix (name : string) (arg : SynType) : SynType = - SynType.App (named name, None, [ arg ], [], None, true, range0) - - let inline appPostfix' (name : string list) (arg : SynType) : SynType = - SynType.App (createLongIdent' name, None, [ arg ], [], None, true, range0) - - let inline funFromDomain (domain : SynType) (range : SynType) : SynType = - SynType.Fun ( - domain, - range, - range0, - { - ArrowRange = range0 - } - ) - - let inline signatureParamOfType - (attrs : SynAttribute list) - (ty : SynType) - (optional : bool) - (name : Ident option) - : SynType - = - SynType.SignatureParameter ( - attrs - |> List.map (fun attr -> - { - Attributes = [ attr ] - Range = range0 - } - ), - optional, - name, - ty, - range0 - ) - - let inline var (ty : SynTypar) : SynType = SynType.Var (ty, range0) - - let unit : SynType = named "unit" - let obj : SynType = named "obj" - let bool : SynType = named "bool" - let int : SynType = named "int" - let array (elt : SynType) : SynType = SynType.Array (1, elt, range0) - - let list (elt : SynType) : SynType = - SynType.App (named "list", None, [ elt ], [], None, true, range0) - - let option (elt : SynType) : SynType = - SynType.App (named "option", None, [ elt ], [], None, true, range0) - - let anon : SynType = SynType.Anon range0 - - let task (elt : SynType) : SynType = - SynType.App ( - createLongIdent' [ "System" ; "Threading" ; "Tasks" ; "Task" ], - None, - [ elt ], - [], - None, - true, - range0 - ) - - let string : SynType = named "string" - - /// Given ['a1, 'a2] and 'ret, returns 'a1 -> 'a2 -> 'ret. - let toFun (inputs : SynType list) (ret : SynType) : SynType = - (ret, List.rev inputs) ||> List.fold (fun ty input -> funFromDomain input ty) - - let primitiveToHumanReadableString (name : LongIdent) : string = - match name |> List.map _.idText with - | [ "System" ; "Single" ] -> "single" - | [ "System" ; "Double" ] -> "double" - | [ "System" ; "Byte" ] -> "byte" - | [ "System" ; "SByte" ] -> "signed byte" - | [ "System" ; "Int16" ] -> "int16" - | [ "System" ; "Int32" ] -> "int32" - | [ "System" ; "Int64" ] -> "int64" - | [ "System" ; "UInt16" ] -> "uint16" - | [ "System" ; "UInt32" ] -> "uint32" - | [ "System" ; "UInt64" ] -> "uint64" - | [ "System" ; "Char" ] -> "char" - | [ "System" ; "Decimal" ] -> "decimal" - | [ "System" ; "String" ] -> "string" - | [ "System" ; "Boolean" ] -> "bool" - | ty -> - ty - |> String.concat "." - |> failwithf "could not create human-readable string for primitive type %s" - - let rec toHumanReadableString (ty : SynType) : string = - match ty with - | PrimitiveType t1 -> primitiveToHumanReadableString t1 - | OptionType t1 -> toHumanReadableString t1 + " option" - | NullableType t1 -> toHumanReadableString t1 + " Nullable" - | ChoiceType ts -> - ts - |> List.map toHumanReadableString - |> String.concat ", " - |> sprintf "Choice<%s>" - | MapType (k, v) - | DictionaryType (k, v) - | IDictionaryType (k, v) - | IReadOnlyDictionaryType (k, v) -> sprintf "map<%s, %s>" (toHumanReadableString k) (toHumanReadableString v) - | ListType t1 -> toHumanReadableString t1 + " list" - | ArrayType t1 -> toHumanReadableString t1 + " array" - | Task t1 -> toHumanReadableString t1 + " Task" - | UnitType -> "unit" - | FileInfo -> "FileInfo" - | DirectoryInfo -> "DirectoryInfo" - | Uri -> "URI" - | Stream -> "Stream" - | Guid -> "GUID" - | BigInt -> "bigint" - | DateTimeOffset -> "DateTimeOffset" - | DateOnly -> "DateOnly" - | TimeSpan -> "TimeSpan" - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> ident |> List.map _.idText |> String.concat "." - | ty -> failwithf "could not compute human-readable string for type: %O" ty - - /// Guess whether the types are equal. We err on the side of saying "no, they're different". - let rec provablyEqual (ty1 : SynType) (ty2 : SynType) : bool = - if Object.ReferenceEquals (ty1, ty2) then - true - else - - match ty1 with - | PrimitiveType t1 -> - match ty2 with - | PrimitiveType t2 -> (t1 |> List.map _.idText) = (t2 |> List.map _.idText) - | _ -> false - | OptionType t1 -> - match ty2 with - | OptionType t2 -> provablyEqual t1 t2 - | _ -> false - | NullableType t1 -> - match ty2 with - | NullableType t2 -> provablyEqual t1 t2 - | _ -> false - | ChoiceType t1 -> - match ty2 with - | ChoiceType t2 -> - t1.Length = t2.Length - && List.forall (fun (a, b) -> provablyEqual a b) (List.zip t1 t2) - | _ -> false - | DictionaryType (k1, v1) -> - match ty2 with - | DictionaryType (k2, v2) -> provablyEqual k1 k2 && provablyEqual v1 v2 - | _ -> false - | IDictionaryType (k1, v1) -> - match ty2 with - | IDictionaryType (k2, v2) -> provablyEqual k1 k2 && provablyEqual v1 v2 - | _ -> false - | IReadOnlyDictionaryType (k1, v1) -> - match ty2 with - | IReadOnlyDictionaryType (k2, v2) -> provablyEqual k1 k2 && provablyEqual v1 v2 - | _ -> false - | MapType (k1, v1) -> - match ty2 with - | MapType (k2, v2) -> provablyEqual k1 k2 && provablyEqual v1 v2 - | _ -> false - | ListType t1 -> - match ty2 with - | ListType t2 -> provablyEqual t1 t2 - | _ -> false - | ArrayType t1 -> - match ty2 with - | ArrayType t2 -> provablyEqual t1 t2 - | _ -> false - | Task t1 -> - match ty2 with - | Task t2 -> provablyEqual t1 t2 - | _ -> false - | UnitType -> - match ty2 with - | UnitType -> true - | _ -> false - | FileInfo -> - match ty2 with - | FileInfo -> true - | _ -> false - | DirectoryInfo -> - match ty2 with - | DirectoryInfo -> true - | _ -> false - | Uri -> - match ty2 with - | Uri -> true - | _ -> false - | Stream -> - match ty2 with - | Stream -> true - | _ -> false - | Guid -> - match ty2 with - | Guid -> true - | _ -> false - | BigInt -> - match ty2 with - | BigInt -> true - | _ -> false - | DateTimeOffset -> - match ty2 with - | DateTimeOffset -> true - | _ -> false - | DateOnly -> - match ty2 with - | DateOnly -> true - | _ -> false - | _ -> - - match ty1, ty2 with - | SynType.LongIdent (SynLongIdent (ident1, _, _)), SynType.LongIdent (SynLongIdent (ident2, _, _)) -> - let ident1 = ident1 |> List.map _.idText - let ident2 = ident2 |> List.map _.idText - ident1 = ident2 - | _, _ -> false - - /// Returns the args (where these are tuple types if curried) in order, and the return type. - let rec getType (ty : SynType) : (SynType * bool) list * SynType = - match ty with - | SynType.Paren (ty, _) -> getType ty - | SynType.Fun (argType, returnType, _, _) -> - let args, ret = getType returnType - // TODO this code is clearly wrong - let (inputArgs, inputRet), hasParen = - match argType with - | SynType.Paren (argType, _) -> getType argType, true - | _ -> getType argType, false - - ((toFun (List.map fst inputArgs) inputRet), hasParen) :: args, ret - | _ -> [], ty diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynTypeDefn.fs b/WoofWare.Myriad.Plugins/SynExpr/SynTypeDefn.fs deleted file mode 100644 index 71eb8c0..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynTypeDefn.fs +++ /dev/null @@ -1,46 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Text.Range - -[] -module internal SynTypeDefn = - - let inline create (componentInfo : SynComponentInfo) (repr : SynTypeDefnRepr) : SynTypeDefn = - SynTypeDefn.SynTypeDefn ( - componentInfo, - repr, - [], - None, - range0, - { - LeadingKeyword = SynTypeDefnLeadingKeyword.Type range0 - EqualsRange = Some range0 - WithKeyword = None - } - ) - - let inline withMemberDefns (members : SynMemberDefn list) (r : SynTypeDefn) : SynTypeDefn = - match r with - | SynTypeDefn (typeInfo, typeRepr, _, ctor, range, trivia) -> - SynTypeDefn.SynTypeDefn (typeInfo, typeRepr, members, ctor, range, trivia) - - let getName (defn : SynTypeDefn) : LongIdent = - match defn with - | SynTypeDefn (SynComponentInfo.SynComponentInfo (_, _, _, id, _, _, _, _), _, _, _, _, _) -> id - - let getAttribute (attrName : string) (defn : SynTypeDefn) : SynAttribute option = - match defn with - | SynTypeDefn (SynComponentInfo.SynComponentInfo (attrs, _, _, _, _, _, _, _), _, _, _, _, _) -> - attrs - |> List.collect (fun a -> a.Attributes) - |> List.tryFind (fun i -> - match i.TypeName with - | SynLongIdent.SynLongIdent (id, _, _) -> - let name = List.last(id).idText - name = attrName || name + "Attribute" = attrName - ) - - let hasAttribute (attrName : string) (defn : SynTypeDefn) : bool = - getAttribute attrName defn |> Option.isSome diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynTypeDefnRepr.fs b/WoofWare.Myriad.Plugins/SynExpr/SynTypeDefnRepr.fs deleted file mode 100644 index a5e0a2b..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynTypeDefnRepr.fs +++ /dev/null @@ -1,24 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynTypeDefnRepr = - - let inline interfaceType (mems : SynMemberDefns) : SynTypeDefnRepr = - SynTypeDefnRepr.ObjectModel (SynTypeDefnKind.Unspecified, mems, range0) - - /// Indicates the body of a `type Foo with {body}` extension type declaration. - let inline augmentation () : SynTypeDefnRepr = - SynTypeDefnRepr.ObjectModel (SynTypeDefnKind.Augmentation range0, [], range0) - - let inline unionWithAccess (implAccess : SynAccess option) (cases : SynUnionCase list) : SynTypeDefnRepr = - SynTypeDefnRepr.Simple (SynTypeDefnSimpleRepr.Union (implAccess, cases, range0), range0) - - let inline union (cases : SynUnionCase list) : SynTypeDefnRepr = unionWithAccess None cases - - let inline recordWithAccess (implAccess : SynAccess option) (fields : SynField list) : SynTypeDefnRepr = - SynTypeDefnRepr.Simple (SynTypeDefnSimpleRepr.Record (implAccess, fields, range0), range0) - - let inline record (fields : SynField list) : SynTypeDefnRepr = recordWithAccess None fields diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynUnionCase.fs b/WoofWare.Myriad.Plugins/SynExpr/SynUnionCase.fs deleted file mode 100644 index 85ee398..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynUnionCase.fs +++ /dev/null @@ -1,55 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range -open Fantomas.FCS.Xml -open Fantomas.FCS.SyntaxTrivia - -/// Represents everything you need to know about a union case. -/// This is generic on whether each field of this case must be named. -type UnionCase<'ident> = - { - /// The name of the case: e.g. `| Foo of blah` has this being `Foo`. - Name : Ident - /// Any docstring associated with this case. - XmlDoc : PreXmlDoc option - /// Any accessibility modifier: e.g. `type Foo = private | Blah`. - Access : SynAccess option - /// Attributes on the case: for example, `| [] Foo of blah`. - Attributes : SynAttribute list - /// The data contained within the case: for example, `[blah]` in `| Foo of blah`. - Fields : SynFieldData<'ident> list - } - -[] -module internal SynUnionCase = - let create (case : UnionCase) : SynUnionCase = - let fields = - case.Fields - |> List.map (fun field -> - SynField.SynField ( - SynAttributes.ofAttrs field.Attrs, - false, - field.Ident, - field.Type, - false, - PreXmlDoc.Empty, - None, - range0, - { - LeadingKeyword = None - } - ) - ) - - SynUnionCase.SynUnionCase ( - SynAttributes.ofAttrs case.Attributes, - SynIdent.createI case.Name, - SynUnionCaseKind.Fields fields, - case.XmlDoc |> Option.defaultValue PreXmlDoc.Empty, - case.Access, - range0, - { - BarRange = Some range0 - } - ) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynValInfo.fs b/WoofWare.Myriad.Plugins/SynExpr/SynValInfo.fs deleted file mode 100644 index 0848db0..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynValInfo.fs +++ /dev/null @@ -1,7 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax - -[] -module internal SynValInfo = - let empty = SynValInfo.SynValInfo ([], SynArgInfo.empty) diff --git a/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj b/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj index cdeb938..274f1ea 100644 --- a/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj +++ b/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj @@ -15,12 +15,10 @@ FS3559 WoofWare.Myriad.Plugins logo.png + true - - - @@ -28,38 +26,10 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - @@ -83,6 +53,7 @@ + diff --git a/WoofWare.Myriad.sln b/WoofWare.Myriad.sln index 296ec81..36d1c54 100644 --- a/WoofWare.Myriad.sln +++ b/WoofWare.Myriad.sln @@ -12,6 +12,8 @@ Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Myriad.Plugins.Att EndProject Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Whippet.Core", "..\WoofWare.Whippet\WoofWare.Whippet.Core\WoofWare.Whippet.Core.fsproj", "{0831FDF4-9BCB-4595-8432-E90111AB98A2}" EndProject +Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "WoofWare.Whippet.Fantomas", "..\WoofWare.Whippet\WoofWare.Whippet.Fantomas\WoofWare.Whippet.Fantomas.fsproj", "{4B3035E3-A160-4FED-B6EB-A374FAC01E0C}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -42,5 +44,9 @@ Global {0831FDF4-9BCB-4595-8432-E90111AB98A2}.Debug|Any CPU.Build.0 = Debug|Any CPU {0831FDF4-9BCB-4595-8432-E90111AB98A2}.Release|Any CPU.ActiveCfg = Release|Any CPU {0831FDF4-9BCB-4595-8432-E90111AB98A2}.Release|Any CPU.Build.0 = Release|Any CPU + {4B3035E3-A160-4FED-B6EB-A374FAC01E0C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4B3035E3-A160-4FED-B6EB-A374FAC01E0C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4B3035E3-A160-4FED-B6EB-A374FAC01E0C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4B3035E3-A160-4FED-B6EB-A374FAC01E0C}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal From d478afbc4e0d16e6c896cd3747c23984ec2e5c57 Mon Sep 17 00:00:00 2001 From: Smaug123 <3138005+Smaug123@users.noreply.github.com> Date: Sun, 6 Oct 2024 21:13:55 +0100 Subject: [PATCH 3/4] Use WoofWare.Whippet.Fantomas, not Myriad.Core --- WoofWare.Myriad.Plugins/Primitives.fs | 32 -- WoofWare.Myriad.Plugins/SynExpr/CompExpr.fs | 49 -- WoofWare.Myriad.Plugins/SynExpr/Ident.fs | 65 --- WoofWare.Myriad.Plugins/SynExpr/PreXmlDoc.fs | 17 - WoofWare.Myriad.Plugins/SynExpr/SynArgInfo.fs | 7 - WoofWare.Myriad.Plugins/SynExpr/SynArgPats.fs | 30 - .../SynExpr/SynAttribute.fs | 27 - .../SynExpr/SynAttributes.fs | 15 - WoofWare.Myriad.Plugins/SynExpr/SynBinding.fs | 233 -------- .../SynExpr/SynComponentInfo.fs | 50 -- WoofWare.Myriad.Plugins/SynExpr/SynConst.fs | 10 - WoofWare.Myriad.Plugins/SynExpr/SynExpr.fs | 365 ------------ .../SynExpr/SynExprLetOrUseTrivia.fs | 10 - WoofWare.Myriad.Plugins/SynExpr/SynField.fs | 76 --- WoofWare.Myriad.Plugins/SynExpr/SynIdent.fs | 10 - .../SynExpr/SynLongIdent.fs | 140 ----- .../SynExpr/SynMatchClause.fs | 24 - .../SynExpr/SynMemberDefn.fs | 71 --- .../SynExpr/SynModuleDecl.fs | 30 - .../SynExpr/SynModuleOrNamespace.fs | 24 - WoofWare.Myriad.Plugins/SynExpr/SynPat.fs | 54 -- .../SynExpr/SynSimplePat.fs | 10 - .../SynExpr/SynSimplePats.fs | 12 - WoofWare.Myriad.Plugins/SynExpr/SynType.fs | 539 ------------------ .../SynExpr/SynTypeDefn.fs | 46 -- .../SynExpr/SynTypeDefnRepr.fs | 24 - .../SynExpr/SynUnionCase.fs | 55 -- WoofWare.Myriad.Plugins/SynExpr/SynValInfo.fs | 7 - 28 files changed, 2032 deletions(-) delete mode 100644 WoofWare.Myriad.Plugins/Primitives.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/CompExpr.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/Ident.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/PreXmlDoc.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynArgInfo.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynArgPats.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynAttribute.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynAttributes.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynBinding.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynComponentInfo.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynConst.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynExpr.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynExprLetOrUseTrivia.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynField.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynIdent.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynLongIdent.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynMatchClause.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynMemberDefn.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynModuleDecl.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynModuleOrNamespace.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynPat.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynSimplePat.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynSimplePats.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynType.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynTypeDefn.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynTypeDefnRepr.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynUnionCase.fs delete mode 100644 WoofWare.Myriad.Plugins/SynExpr/SynValInfo.fs diff --git a/WoofWare.Myriad.Plugins/Primitives.fs b/WoofWare.Myriad.Plugins/Primitives.fs deleted file mode 100644 index 5d19d80..0000000 --- a/WoofWare.Myriad.Plugins/Primitives.fs +++ /dev/null @@ -1,32 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal Primitives = - /// Given e.g. "byte", returns "System.Byte". - let qualifyType (typeName : string) : LongIdent option = - match typeName with - | "float32" - | "single" -> [ "System" ; "Single" ] |> Some - | "float" - | "double" -> [ "System" ; "Double" ] |> Some - | "byte" - | "uint8" -> [ "System" ; "Byte" ] |> Some - | "sbyte" - | "int8" -> [ "System" ; "SByte" ] |> Some - | "int16" -> [ "System" ; "Int16" ] |> Some - | "int" - | "int32" -> [ "System" ; "Int32" ] |> Some - | "int64" -> [ "System" ; "Int64" ] |> Some - | "uint16" -> [ "System" ; "UInt16" ] |> Some - | "uint" - | "uint32" -> [ "System" ; "UInt32" ] |> Some - | "uint64" -> [ "System" ; "UInt64" ] |> Some - | "char" -> [ "System" ; "Char" ] |> Some - | "decimal" -> [ "System" ; "Decimal" ] |> Some - | "string" -> [ "System" ; "String" ] |> Some - | "bool" -> [ "System" ; "Boolean" ] |> Some - | _ -> None - |> Option.map (List.map (fun i -> (Ident (i, range0)))) diff --git a/WoofWare.Myriad.Plugins/SynExpr/CompExpr.fs b/WoofWare.Myriad.Plugins/SynExpr/CompExpr.fs deleted file mode 100644 index 802455b..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/CompExpr.fs +++ /dev/null @@ -1,49 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax - -type internal CompExprBinding = - | LetBang of varName : string * rhs : SynExpr - | Let of varName : string * rhs : SynExpr - | Use of varName : string * rhs : SynExpr - | Do of body : SynExpr - -(* -Potential API! -type internal CompExprBindings = - private - { - /// These are stored in reverse. - Bindings : CompExprBinding list - CompExprName : string - } - -[] -module internal CompExprBindings = - let make (name : string) : CompExprBindings = - { - Bindings = [] - CompExprName = name - } - - let thenDo (body : SynExpr) (bindings : CompExprBindings) = - { bindings with - Bindings = (Do body :: bindings.Bindings) - } - - let thenLet (varName : string) (value : SynExpr) (bindings : CompExprBindings) = - { bindings with - Bindings = (Let (varName, value) :: bindings.Bindings) - } - - let thenLetBang (varName : string) (value : SynExpr) (bindings : CompExprBindings) = - { bindings with - Bindings = (LetBang (varName, value) :: bindings.Bindings) - } - - - let thenUse (varName : string) (value : SynExpr) (bindings : CompExprBindings) = - { bindings with - Bindings = (LetBang (varName, value) :: bindings.Bindings) - } -*) diff --git a/WoofWare.Myriad.Plugins/SynExpr/Ident.fs b/WoofWare.Myriad.Plugins/SynExpr/Ident.fs deleted file mode 100644 index 7befa00..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/Ident.fs +++ /dev/null @@ -1,65 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open System -open System.Text -open System.Text.RegularExpressions -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal Ident = - let inline create (s : string) = Ident (s, range0) - - /// Fantomas bug, perhaps? "type" is not rendered as ``type``, although the ASTs are identical - /// apart from the ranges? - /// Awful hack: here is a function that does this sort of thing. - let createSanitisedParamName (s : string) = - match s with - | "type" -> create "type'" - | "private" -> create "private'" - | _ -> - - let result = StringBuilder () - - for i = 0 to s.Length - 1 do - if Char.IsLetter s.[i] then - result.Append s.[i] |> ignore - elif Char.IsNumber s.[i] then - if result.Length > 0 then - result.Append s.[i] |> ignore - elif s.[i] = '_' || s.[i] = '-' then - result.Append '_' |> ignore - else - failwith $"could not convert to ident: %s{s}" - - create (result.ToString ()) - - let private alnum = Regex @"^[a-zA-Z][a-zA-Z0-9]*$" - - let createSanitisedTypeName (s : string) = - let result = StringBuilder () - let mutable capitalize = true - - for i = 0 to s.Length - 1 do - if Char.IsLetter s.[i] then - if capitalize then - result.Append (Char.ToUpperInvariant s.[i]) |> ignore - capitalize <- false - else - result.Append s.[i] |> ignore - elif Char.IsNumber s.[i] then - if result.Length > 0 then - result.Append s.[i] |> ignore - elif s.[i] = '_' then - capitalize <- true - - if result.Length = 0 then - failwith $"String %s{s} was not suitable as a type identifier" - - Ident (result.ToString (), range0) - - let lowerFirstLetter (x : Ident) : Ident = - let result = StringBuilder x.idText.Length - result.Append (Char.ToLowerInvariant x.idText.[0]) |> ignore - result.Append x.idText.[1..] |> ignore - create ((result : StringBuilder).ToString ()) diff --git a/WoofWare.Myriad.Plugins/SynExpr/PreXmlDoc.fs b/WoofWare.Myriad.Plugins/SynExpr/PreXmlDoc.fs deleted file mode 100644 index 45fbdc0..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/PreXmlDoc.fs +++ /dev/null @@ -1,17 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Xml -open Fantomas.FCS.Text.Range - -[] -module internal PreXmlDoc = - let create (s : string) : PreXmlDoc = - let s = s.Split "\n" - - for i = 0 to s.Length - 1 do - s.[i] <- " " + s.[i] - - PreXmlDoc.Create (s, range0) - - let create' (s : string seq) : PreXmlDoc = - PreXmlDoc.Create (Array.ofSeq s, range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynArgInfo.fs b/WoofWare.Myriad.Plugins/SynExpr/SynArgInfo.fs deleted file mode 100644 index afafbcb..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynArgInfo.fs +++ /dev/null @@ -1,7 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax - -[] -module internal SynArgInfo = - let empty = SynArgInfo.SynArgInfo ([], false, None) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynArgPats.fs b/WoofWare.Myriad.Plugins/SynExpr/SynArgPats.fs deleted file mode 100644 index 1f742c0..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynArgPats.fs +++ /dev/null @@ -1,30 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynArgPats = - let createNamed (caseNames : string list) : SynArgPats = - match caseNames.Length with - | 0 -> SynArgPats.Pats [] - | 1 -> - SynPat.Named (SynIdent.createS caseNames.[0], false, None, range0) - |> List.singleton - |> SynArgPats.Pats - | len -> - caseNames - |> List.map (fun name -> SynPat.Named (SynIdent.createS name, false, None, range0)) - |> fun t -> SynPat.Tuple (false, t, List.replicate (len - 1) range0, range0) - |> fun t -> SynPat.Paren (t, range0) - |> List.singleton - |> SynArgPats.Pats - - let create (pats : SynPat list) : SynArgPats = - match pats.Length with - | 0 -> SynArgPats.Pats [] - | 1 -> [ pats.[0] ] |> SynArgPats.Pats - | len -> - SynPat.Paren (SynPat.Tuple (false, pats, List.replicate (len - 1) range0, range0), range0) - |> List.singleton - |> SynArgPats.Pats diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynAttribute.fs b/WoofWare.Myriad.Plugins/SynExpr/SynAttribute.fs deleted file mode 100644 index 60d0c2f..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynAttribute.fs +++ /dev/null @@ -1,27 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynAttribute = - let inline create (typeName : SynLongIdent) (arg : SynExpr) : SynAttribute = - { - TypeName = typeName - ArgExpr = arg - Target = None - AppliesToGetterAndSetter = false - Range = range0 - } - - let internal compilationRepresentation : SynAttribute = - [ "CompilationRepresentationFlags" ; "ModuleSuffix" ] - |> SynExpr.createLongIdent - |> SynExpr.paren - |> create (SynLongIdent.createS "CompilationRepresentation") - - let internal requireQualifiedAccess : SynAttribute = - create (SynLongIdent.createS "RequireQualifiedAccess") (SynExpr.CreateConst ()) - - let internal autoOpen : SynAttribute = - create (SynLongIdent.createS "AutoOpen") (SynExpr.CreateConst ()) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynAttributes.fs b/WoofWare.Myriad.Plugins/SynExpr/SynAttributes.fs deleted file mode 100644 index adca197..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynAttributes.fs +++ /dev/null @@ -1,15 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynAttributes = - let ofAttrs (attrs : SynAttribute list) : SynAttributes = - attrs - |> List.map (fun a -> - { - Attributes = [ a ] - Range = range0 - } - ) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynBinding.fs b/WoofWare.Myriad.Plugins/SynExpr/SynBinding.fs deleted file mode 100644 index e35d4d4..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynBinding.fs +++ /dev/null @@ -1,233 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Xml -open Fantomas.FCS.Text.Range - -[] -module internal SynBinding = - - let rec private stripParen (pat : SynPat) = - match pat with - | SynPat.Paren (p, _) -> stripParen p - | _ -> pat - - let rec private getName (pat : SynPat) : Ident option = - match stripParen pat with - | SynPat.Named (SynIdent.SynIdent (name, _), _, _, _) -> Some name - | SynPat.Typed (pat, _, _) -> getName pat - | SynPat.LongIdent (SynLongIdent.SynLongIdent (longIdent, _, _), _, _, _, _, _) -> - match longIdent with - | [ x ] -> Some x - | _ -> failwithf "got long ident %O ; can only get the name of a long ident with one component" longIdent - | _ -> None - - let private getArgInfo (pat : SynPat) : SynArgInfo list = - // TODO: this only copes with one layer of tupling - match stripParen pat with - | SynPat.Tuple (_, pats, _, _) -> pats |> List.map (fun pat -> SynArgInfo.SynArgInfo ([], false, getName pat)) - | pat -> [ SynArgInfo.SynArgInfo (SynAttributes.Empty, false, getName pat) ] - - let triviaZero (isMember : bool) = - { - SynBindingTrivia.EqualsRange = Some range0 - InlineKeyword = None - LeadingKeyword = - if isMember then - SynLeadingKeyword.Member range0 - else - SynLeadingKeyword.Let range0 - } - - let basic (name : LongIdent) (args : SynPat list) (body : SynExpr) : SynBinding = - let valInfo : SynValInfo = - args - |> List.map getArgInfo - |> fun x -> SynValInfo.SynValInfo (x, SynArgInfo.SynArgInfo ([], false, None)) - - SynBinding.SynBinding ( - None, - SynBindingKind.Normal, - false, - false, - [], - PreXmlDoc.Empty, - SynValData.SynValData (None, valInfo, None), - SynPat.identWithArgs name (SynArgPats.Pats args), - None, - body, - range0, - DebugPointAtBinding.Yes range0, - triviaZero false - ) - - let withMutability (mut : bool) (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (pat, kind, inl, _, attrs, xml, valData, headPat, returnInfo, expr, range, debugPoint, trivia) -> - SynBinding (pat, kind, inl, mut, attrs, xml, valData, headPat, returnInfo, expr, range, debugPoint, trivia) - - let withRecursion (isRec : bool) (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (pat, kind, inl, mut, attrs, xml, valData, headPat, returnInfo, expr, range, debugPoint, trivia) -> - let trivia = - { trivia with - LeadingKeyword = - match trivia.LeadingKeyword with - | SynLeadingKeyword.Let _ -> - if isRec then - SynLeadingKeyword.LetRec (range0, range0) - else - trivia.LeadingKeyword - | SynLeadingKeyword.LetRec _ -> - if isRec then - trivia.LeadingKeyword - else - trivia.LeadingKeyword - | existing -> - failwith - $"WoofWare.Myriad doesn't yet let you adjust the recursion modifier on a binding with modifier %O{existing}" - } - - SynBinding (pat, kind, inl, mut, attrs, xml, valData, headPat, returnInfo, expr, range, debugPoint, trivia) - - let withAccessibility (acc : SynAccess option) (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (_, kind, inl, mut, attrs, xml, valData, headPat, returnInfo, expr, range, debugPoint, trivia) -> - let headPat = - match headPat with - | SynPat.LongIdent (ident, extra, options, argPats, _, range) -> - SynPat.LongIdent (ident, extra, options, argPats, acc, range) - | _ -> failwithf "unrecognised head pattern: %O" headPat - - SynBinding (acc, kind, inl, mut, attrs, xml, valData, headPat, returnInfo, expr, range, debugPoint, trivia) - - let withXmlDoc (doc : PreXmlDoc) (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (acc, kind, inl, mut, attrs, _, valData, headPat, returnInfo, expr, range, debugPoint, trivia) -> - SynBinding (acc, kind, inl, mut, attrs, doc, valData, headPat, returnInfo, expr, range, debugPoint, trivia) - - let withReturnAnnotation (ty : SynType) (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (acc, kind, inl, mut, attrs, doc, valData, headPat, _, expr, range, debugPoint, trivia) -> - let retInfo = - SynBindingReturnInfo.SynBindingReturnInfo ( - ty, - range0, - [], - { - ColonRange = Some range0 - } - ) - - SynBinding ( - acc, - kind, - inl, - mut, - attrs, - doc, - valData, - headPat, - Some retInfo, - expr, - range, - debugPoint, - trivia - ) - - let inline makeInline (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (acc, kind, _, mut, attrs, doc, valData, headPat, ret, expr, range, debugPoint, trivia) -> - SynBinding ( - acc, - kind, - true, - mut, - attrs, - doc, - valData, - headPat, - ret, - expr, - range, - debugPoint, - { trivia with - InlineKeyword = Some range0 - } - ) - - let inline makeNotInline (binding : SynBinding) : SynBinding = - match binding with - | SynBinding (acc, kind, _, mut, attrs, doc, valData, headPat, ret, expr, range, debugPoint, trivia) -> - SynBinding ( - acc, - kind, - false, - mut, - attrs, - doc, - valData, - headPat, - ret, - expr, - range, - debugPoint, - { trivia with - InlineKeyword = None - } - ) - - let inline setInline (isInline : bool) (binding : SynBinding) : SynBinding = - if isInline then - makeInline binding - else - makeNotInline binding - - let makeStaticMember (binding : SynBinding) : SynBinding = - let memberFlags = - { - SynMemberFlags.IsInstance = false - SynMemberFlags.IsDispatchSlot = false - SynMemberFlags.IsOverrideOrExplicitImpl = false - SynMemberFlags.IsFinal = false - SynMemberFlags.GetterOrSetterIsCompilerGenerated = false - SynMemberFlags.MemberKind = SynMemberKind.Member - } - - match binding with - | SynBinding (acc, kind, inl, mut, attrs, doc, valData, headPat, ret, expr, range, debugPoint, trivia) -> - let valData = - match valData with - | SynValData.SynValData (_, valInfo, _) -> SynValData.SynValData (Some memberFlags, valInfo, None) - - let trivia = - { trivia with - LeadingKeyword = SynLeadingKeyword.StaticMember (range0, range0) - } - - SynBinding (acc, kind, inl, mut, attrs, doc, valData, headPat, ret, expr, range, debugPoint, trivia) - - let makeInstanceMember (binding : SynBinding) : SynBinding = - let memberFlags = - { - SynMemberFlags.IsInstance = true - SynMemberFlags.IsDispatchSlot = false - SynMemberFlags.IsOverrideOrExplicitImpl = true - SynMemberFlags.IsFinal = false - SynMemberFlags.GetterOrSetterIsCompilerGenerated = false - SynMemberFlags.MemberKind = SynMemberKind.Member - } - - match binding with - | SynBinding (acc, kind, inl, mut, attrs, doc, valData, headPat, ret, expr, range, debugPoint, trivia) -> - let valData = - match valData with - | SynValData.SynValData (_, valInfo, _) -> SynValData.SynValData (Some memberFlags, valInfo, None) - - let trivia = - { trivia with - LeadingKeyword = SynLeadingKeyword.Member range0 - } - - SynBinding (acc, kind, inl, mut, attrs, doc, valData, headPat, ret, expr, range, debugPoint, trivia) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynComponentInfo.fs b/WoofWare.Myriad.Plugins/SynExpr/SynComponentInfo.fs deleted file mode 100644 index ad36475..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynComponentInfo.fs +++ /dev/null @@ -1,50 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Xml -open Fantomas.FCS.Text.Range - -[] -module internal SynComponentInfo = - let inline createLong (name : LongIdent) = - SynComponentInfo.SynComponentInfo ([], None, [], name, PreXmlDoc.Empty, false, None, range0) - - let inline create (name : Ident) = createLong [ name ] - - let inline withDocString (doc : PreXmlDoc) (i : SynComponentInfo) : SynComponentInfo = - match i with - | SynComponentInfo.SynComponentInfo (attrs, typars, constraints, name, _, postfix, access, range) -> - SynComponentInfo (attrs, typars, constraints, name, doc, postfix, access, range) - - let inline setGenerics (typars : SynTyparDecls option) (i : SynComponentInfo) : SynComponentInfo = - match i with - | SynComponentInfo.SynComponentInfo (attrs, _, constraints, name, doc, postfix, access, range) -> - SynComponentInfo (attrs, typars, constraints, name, doc, postfix, access, range) - - let inline withGenerics (typars : SynTyparDecl list) (i : SynComponentInfo) : SynComponentInfo = - let inner = - if typars.IsEmpty then - None - else - Some (SynTyparDecls.PostfixList (typars, [], range0)) - - setGenerics inner i - - let inline setAccessibility (acc : SynAccess option) (i : SynComponentInfo) : SynComponentInfo = - match i with - | SynComponentInfo.SynComponentInfo (attrs, typars, constraints, name, doc, postfix, _, range) -> - SynComponentInfo.SynComponentInfo (attrs, typars, constraints, name, doc, postfix, acc, range) - - let inline withAccessibility (acc : SynAccess) (i : SynComponentInfo) : SynComponentInfo = - setAccessibility (Some acc) i - - let inline addAttributes (attrs : SynAttribute list) (i : SynComponentInfo) : SynComponentInfo = - match i with - | SynComponentInfo.SynComponentInfo (oldAttrs, typars, constraints, name, doc, postfix, acc, range) -> - let attrs = - { - SynAttributeList.Attributes = attrs - SynAttributeList.Range = range0 - } - - SynComponentInfo.SynComponentInfo ((attrs :: oldAttrs), typars, constraints, name, doc, postfix, acc, range) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynConst.fs b/WoofWare.Myriad.Plugins/SynExpr/SynConst.fs deleted file mode 100644 index 11d71ee..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynConst.fs +++ /dev/null @@ -1,10 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynConstExt = - type SynConst with - static member Create (s : string) : SynConst = - SynConst.String (s, SynStringKind.Regular, range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynExpr.fs b/WoofWare.Myriad.Plugins/SynExpr/SynExpr.fs deleted file mode 100644 index ede3ad2..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynExpr.fs +++ /dev/null @@ -1,365 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Text.Range - -[] -module internal SynExprExtensions = - type SynExpr with - static member CreateConst (s : string) : SynExpr = - SynExpr.Const (SynConst.Create s, range0) - - static member CreateConst () : SynExpr = SynExpr.Const (SynConst.Unit, range0) - - static member CreateConst (b : bool) : SynExpr = SynExpr.Const (SynConst.Bool b, range0) - - static member CreateConst (c : char) : SynExpr = - // apparent Myriad bug: `IndexOf '?'` gets formatted as `IndexOf ?` which is clearly wrong - SynExpr.App ( - ExprAtomicFlag.NonAtomic, - false, - SynExpr.Ident (Ident.create "char"), - SynExpr.CreateConst (int c), - range0 - ) - |> fun e -> SynExpr.Paren (e, range0, Some range0, range0) - - static member CreateConst (i : int32) : SynExpr = - SynExpr.Const (SynConst.Int32 i, range0) - -[] -module internal SynExpr = - - /// {f} {x} - let applyFunction (f : SynExpr) (x : SynExpr) : SynExpr = - SynExpr.App (ExprAtomicFlag.NonAtomic, false, f, x, range0) - - /// {f} {x} - let inline applyTo (x : SynExpr) (f : SynExpr) : SynExpr = applyFunction f x - - let inline private createAppInfix (f : SynExpr) (x : SynExpr) = - SynExpr.App (ExprAtomicFlag.NonAtomic, true, f, x, range0) - - let inline createLongIdent'' (ident : SynLongIdent) : SynExpr = - SynExpr.LongIdent (false, ident, None, range0) - - let inline createLongIdent' (ident : Ident list) : SynExpr = - createLongIdent'' (SynLongIdent.create ident) - - let inline createLongIdent (ident : string list) : SynExpr = - createLongIdent' (ident |> List.map Ident.create) - - /// {expr} |> {func} - let pipeThroughFunction (func : SynExpr) (expr : SynExpr) : SynExpr = - createAppInfix (createLongIdent'' SynLongIdent.pipe) expr |> applyTo func - - /// if {cond} then {trueBranch} else {falseBranch} - /// Note that this function puts the trueBranch last, for pipelining convenience: - /// we assume that the `else` branch is more like an error case and is less interesting. - let ifThenElse (cond : SynExpr) (falseBranch : SynExpr) (trueBranch : SynExpr) : SynExpr = - SynExpr.IfThenElse ( - cond, - trueBranch, - Some falseBranch, - DebugPointAtBinding.Yes range0, - false, - range0, - { - IfKeyword = range0 - IsElif = false - ThenKeyword = range0 - ElseKeyword = Some range0 - IfToThenRange = range0 - } - ) - - /// try {body} with | {exc} as exc -> {handler} - let pipeThroughTryWith (exc : SynPat) (handler : SynExpr) (body : SynExpr) : SynExpr = - let clause = - SynMatchClause.create (SynPat.As (exc, SynPat.named "exc", range0)) handler - - SynExpr.TryWith ( - body, - [ clause ], - range0, - DebugPointAtTry.Yes range0, - DebugPointAtWith.Yes range0, - { - TryKeyword = range0 - TryToWithRange = range0 - WithKeyword = range0 - WithToEndRange = range0 - } - ) - - /// {a} = {b} - let equals (a : SynExpr) (b : SynExpr) = - createAppInfix (createLongIdent'' SynLongIdent.eq) a |> applyTo b - - /// {a} && {b} - let booleanAnd (a : SynExpr) (b : SynExpr) = - createAppInfix (createLongIdent'' SynLongIdent.booleanAnd) a |> applyTo b - - /// {a} || {b} - let booleanOr (a : SynExpr) (b : SynExpr) = - createAppInfix (createLongIdent'' SynLongIdent.booleanOr) a |> applyTo b - - /// {a} + {b} - let plus (a : SynExpr) (b : SynExpr) = - createAppInfix (createLongIdent'' SynLongIdent.plus) a |> applyTo b - - /// {a} * {b} - let times (a : SynExpr) (b : SynExpr) = - createAppInfix (createLongIdent'' SynLongIdent.times) a |> applyTo b - - let rec stripOptionalParen (expr : SynExpr) : SynExpr = - match expr with - | SynExpr.Paren (expr, _, _, _) -> stripOptionalParen expr - | expr -> expr - - let dotGet (field : string) (obj : SynExpr) : SynExpr = - SynExpr.DotGet ( - obj, - range0, - SynLongIdent.SynLongIdent (id = [ Ident.create field ], dotRanges = [], trivia = [ None ]), - range0 - ) - - /// {obj}.{meth} {arg} - let callMethodArg (meth : string) (arg : SynExpr) (obj : SynExpr) : SynExpr = dotGet meth obj |> applyTo arg - - /// {obj}.{meth}() - let callMethod (meth : string) (obj : SynExpr) : SynExpr = - callMethodArg meth (SynExpr.CreateConst ()) obj - - let typeApp (types : SynType list) (operand : SynExpr) = - SynExpr.TypeApp (operand, range0, types, List.replicate (types.Length - 1) range0, Some range0, range0, range0) - - /// {obj}.{meth}() - let callGenericMethod (meth : SynLongIdent) (types : SynType list) (obj : SynExpr) : SynExpr = - SynExpr.DotGet (obj, range0, meth, range0) - |> typeApp types - |> applyTo (SynExpr.CreateConst ()) - - /// {obj}.{meth}() - let callGenericMethod' (meth : string) (ty : string) (obj : SynExpr) : SynExpr = - callGenericMethod (SynLongIdent.createS meth) [ SynType.createLongIdent' [ ty ] ] obj - - let inline index (property : SynExpr) (obj : SynExpr) : SynExpr = - SynExpr.DotIndexedGet (obj, property, range0, range0) - - let inline arrayIndexRange (start : SynExpr option) (endRange : SynExpr option) (arr : SynExpr) : SynExpr = - SynExpr.DotIndexedGet ( - arr, - (SynExpr.IndexRange (start, range0, endRange, range0, range0, range0)), - range0, - range0 - ) - - let inline paren (e : SynExpr) : SynExpr = - SynExpr.Paren (e, range0, Some range0, range0) - - /// (fun {varName} -> {body}) - let createLambda (varName : string) (body : SynExpr) : SynExpr = - let parsedDataPat = [ SynPat.named varName ] - - SynExpr.Lambda ( - false, - false, - SynSimplePats.create [ SynSimplePat.createId (Ident.create varName) ], - body, - Some (parsedDataPat, body), - range0, - { - ArrowRange = Some range0 - } - ) - |> paren - - let createThunk (body : SynExpr) : SynExpr = - SynExpr.Lambda ( - false, - false, - SynSimplePats.create [], - body, - Some ([ SynPat.unit ], body), - range0, - { - ArrowRange = Some range0 - } - ) - |> paren - - let inline createIdent (s : string) : SynExpr = SynExpr.Ident (Ident (s, range0)) - - let inline createIdent' (i : Ident) : SynExpr = SynExpr.Ident i - - let tupleNoParen (args : SynExpr list) : SynExpr = - SynExpr.Tuple (false, args, List.replicate (args.Length - 1) range0, range0) - - let inline tuple (args : SynExpr list) = args |> tupleNoParen |> paren - - /// {body} |> fun a -> Async.StartAsTask (a, ?cancellationToken=ct) - let startAsTask (ct : Ident) (body : SynExpr) = - let lambda = - [ - createIdent "a" - equals - (SynExpr.LongIdent (true, SynLongIdent.createS "cancellationToken", None, range0)) - (createIdent' ct) - ] - |> tuple - |> applyFunction (createLongIdent [ "Async" ; "StartAsTask" ]) - |> createLambda "a" - - pipeThroughFunction lambda body - - let inline createForEach (pat : SynPat) (enumExpr : SynExpr) (body : SynExpr) : SynExpr = - SynExpr.ForEach ( - DebugPointAtFor.No, - DebugPointAtInOrTo.No, - SeqExprOnly.SeqExprOnly false, - true, - pat, - enumExpr, - body, - range0 - ) - - let inline createLet (bindings : SynBinding list) (body : SynExpr) : SynExpr = - SynExpr.LetOrUse (false, false, bindings, body, range0, SynExprLetOrUseTrivia.empty) - - let inline createDo (body : SynExpr) : SynExpr = SynExpr.Do (body, range0) - - let inline createMatch (matchOn : SynExpr) (cases : SynMatchClause list) : SynExpr = - SynExpr.Match ( - DebugPointAtBinding.Yes range0, - matchOn, - cases, - range0, - { - MatchKeyword = range0 - WithKeyword = range0 - } - ) - - let typeAnnotate (ty : SynType) (expr : SynExpr) : SynExpr = SynExpr.Typed (expr, ty, range0) - - let inline createNew (ty : SynType) (args : SynExpr) : SynExpr = - SynExpr.New (false, ty, paren args, range0) - - let inline createWhile (cond : SynExpr) (body : SynExpr) : SynExpr = - SynExpr.While (DebugPointAtWhile.Yes range0, cond, body, range0) - - let inline createNull () : SynExpr = SynExpr.Null range0 - - let reraise : SynExpr = createIdent "reraise" |> applyTo (SynExpr.CreateConst ()) - - let sequential (exprs : SynExpr list) : SynExpr = - exprs - |> List.reduce (fun a b -> SynExpr.Sequential (DebugPointAtSequential.SuppressNeither, false, a, b, range0)) - - let listLiteral (elts : SynExpr list) : SynExpr = - SynExpr.ArrayOrListComputed (false, sequential elts, range0) - - let arrayLiteral (elts : SynExpr list) : SynExpr = - SynExpr.ArrayOrListComputed (true, sequential elts, range0) - - /// {compExpr} { {lets} ; return {ret} } - let createCompExpr (compExpr : string) (retBody : SynExpr) (lets : CompExprBinding list) : SynExpr = - let retStatement = SynExpr.YieldOrReturn ((false, true), retBody, range0) - - let contents : SynExpr = - (retStatement, List.rev lets) - ||> List.fold (fun state binding -> - match binding with - | LetBang (lhs, rhs) -> - SynExpr.LetOrUseBang ( - DebugPointAtBinding.Yes range0, - false, - true, - SynPat.named lhs, - rhs, - [], - state, - range0, - { - EqualsRange = Some range0 - } - ) - | Let (lhs, rhs) -> createLet [ SynBinding.basic [ Ident.create lhs ] [] rhs ] state - | Use (lhs, rhs) -> - SynExpr.LetOrUse ( - false, - true, - [ SynBinding.basic [ Ident.create lhs ] [] rhs ], - state, - range0, - { - SynExprLetOrUseTrivia.InKeyword = None - } - ) - | Do body -> sequential [ SynExpr.Do (body, range0) ; state ] - ) - - applyFunction (createIdent compExpr) (SynExpr.ComputationExpr (false, contents, range0)) - - /// {expr} |> Async.AwaitTask - let awaitTask (expr : SynExpr) : SynExpr = - expr |> pipeThroughFunction (createLongIdent [ "Async" ; "AwaitTask" ]) - - /// {ident}.ToString () - /// with special casing for some types like DateTime - let toString (ty : SynType) (ident : SynExpr) = - match ty with - | DateOnly -> ident |> callMethodArg "ToString" (SynExpr.CreateConst "yyyy-MM-dd") - | DateTime -> ident |> callMethodArg "ToString" (SynExpr.CreateConst "yyyy-MM-ddTHH:mm:ss") - | _ -> callMethod "ToString" ident - - let upcast' (ty : SynType) (e : SynExpr) = SynExpr.Upcast (e, ty, range0) - - /// {ident} - {rhs} - let minus (ident : SynLongIdent) (rhs : SynExpr) : SynExpr = - createAppInfix (createLongIdent'' SynLongIdent.sub) (createLongIdent'' ident) - |> applyTo rhs - - /// {ident} - {n} - let minusN (ident : SynLongIdent) (n : int) : SynExpr = minus ident (SynExpr.CreateConst n) - - /// {y} > {x} - let greaterThan (x : SynExpr) (y : SynExpr) : SynExpr = - createAppInfix (createLongIdent'' SynLongIdent.gt) y |> applyTo x - - /// {y} < {x} - let lessThan (x : SynExpr) (y : SynExpr) : SynExpr = - createAppInfix (createLongIdent'' SynLongIdent.lt) y |> applyTo x - - /// {y} >= {x} - let greaterThanOrEqual (x : SynExpr) (y : SynExpr) : SynExpr = - createAppInfix (createLongIdent'' SynLongIdent.geq) y |> applyTo x - - /// {y} <= {x} - let lessThanOrEqual (x : SynExpr) (y : SynExpr) : SynExpr = - createAppInfix (createLongIdent'' SynLongIdent.leq) y |> applyTo x - - /// {x} :: {y} - let listCons (x : SynExpr) (y : SynExpr) : SynExpr = - createAppInfix - (SynExpr.LongIdent ( - false, - SynLongIdent.SynLongIdent ( - [ Ident.create "op_ColonColon" ], - [], - [ Some (IdentTrivia.OriginalNotation "::") ] - ), - None, - range0 - )) - (tupleNoParen [ x ; y ]) - |> paren - - let assign (lhs : SynLongIdent) (rhs : SynExpr) : SynExpr = SynExpr.LongIdentSet (lhs, rhs, range0) - - let assignIndex (lhs : SynExpr) (index : SynExpr) (rhs : SynExpr) : SynExpr = - SynExpr.DotIndexedSet (lhs, index, rhs, range0, range0, range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynExprLetOrUseTrivia.fs b/WoofWare.Myriad.Plugins/SynExpr/SynExprLetOrUseTrivia.fs deleted file mode 100644 index e78a44c..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynExprLetOrUseTrivia.fs +++ /dev/null @@ -1,10 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.SyntaxTrivia - -[] -module internal SynExprLetOrUseTrivia = - let empty : SynExprLetOrUseTrivia = - { - InKeyword = None - } diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynField.fs b/WoofWare.Myriad.Plugins/SynExpr/SynField.fs deleted file mode 100644 index 6d55035..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynField.fs +++ /dev/null @@ -1,76 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Text.Range -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Xml - -/// The data needed to reconstitute a single piece of data within a union field, or a single record field. -/// This is generic on whether the field is identified. For example, in `type Foo = Blah of int`, the `int` -/// field is not identified; whereas in `type Foo = Blah of baz : int`, it is identified. -type SynFieldData<'Ident> = - { - /// Attributes on this field. I think you can only get these if this is a *record* field. - Attrs : SynAttribute list - /// The identifier of this field (see docstring for SynFieldData). - Ident : 'Ident - /// The type of the data contained in this field. For example, `type Foo = { Blah : int }` - /// has this being `int`. - Type : SynType - } - -[] -module internal SynField = - /// Get the useful information out of a SynField. - let extract (SynField (attrs, _, id, fieldType, _, _, _, _, _)) : SynFieldData = - { - Attrs = attrs |> List.collect (fun l -> l.Attributes) - Ident = id - Type = fieldType - } - - let mapIdent<'a, 'b> (f : 'a -> 'b) (x : SynFieldData<'a>) : SynFieldData<'b> = - let ident = f x.Ident - - { - Attrs = x.Attrs - Ident = ident - Type = x.Type - } - - /// Throws if the field has no identifier. - let extractWithIdent (f : SynField) : SynFieldData = - f - |> extract - |> mapIdent (fun ident -> - match ident with - | None -> failwith "expected field identifier to have a value, but it did not" - | Some i -> i - ) - - let make (data : SynFieldData) : SynField = - let attrs : SynAttributeList list = - data.Attrs - |> List.map (fun l -> - { - Attributes = [ l ] - Range = range0 - } - ) - - SynField.SynField ( - attrs, - false, - data.Ident, - data.Type, - false, - PreXmlDoc.Empty, - None, - range0, - SynFieldTrivia.Zero - ) - - let withDocString (doc : PreXmlDoc) (f : SynField) : SynField = - match f with - | SynField (attributes, isStatic, idOpt, fieldType, isMutable, _, accessibility, range, trivia) -> - SynField (attributes, isStatic, idOpt, fieldType, isMutable, doc, accessibility, range, trivia) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynIdent.fs b/WoofWare.Myriad.Plugins/SynExpr/SynIdent.fs deleted file mode 100644 index d1bd0ea..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynIdent.fs +++ /dev/null @@ -1,10 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax - -[] -module internal SynIdent = - let inline createI (i : Ident) : SynIdent = SynIdent.SynIdent (i, None) - - let inline createS (i : string) : SynIdent = - SynIdent.SynIdent (Ident.create i, None) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynLongIdent.fs b/WoofWare.Myriad.Plugins/SynExpr/SynLongIdent.fs deleted file mode 100644 index de86308..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynLongIdent.fs +++ /dev/null @@ -1,140 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Text.Range -open Fantomas.FCS.Syntax - -[] -module internal SynLongIdent = - - let geq = - SynLongIdent.SynLongIdent ( - [ Ident.create "op_GreaterThanOrEqual" ], - [], - [ Some (IdentTrivia.OriginalNotation ">=") ] - ) - - let leq = - SynLongIdent.SynLongIdent ( - [ Ident.create "op_LessThanOrEqual" ], - [], - [ Some (IdentTrivia.OriginalNotation "<=") ] - ) - - let gt = - SynLongIdent.SynLongIdent ([ Ident.create "op_GreaterThan" ], [], [ Some (IdentTrivia.OriginalNotation ">") ]) - - let lt = - SynLongIdent.SynLongIdent ([ Ident.create "op_LessThan" ], [], [ Some (IdentTrivia.OriginalNotation "<") ]) - - let sub = - SynLongIdent.SynLongIdent ([ Ident.create "op_Subtraction" ], [], [ Some (IdentTrivia.OriginalNotation "-") ]) - - let eq = - SynLongIdent.SynLongIdent ([ Ident.create "op_Equality" ], [], [ Some (IdentTrivia.OriginalNotation "=") ]) - - let booleanAnd = - SynLongIdent.SynLongIdent ([ Ident.create "op_BooleanAnd" ], [], [ Some (IdentTrivia.OriginalNotation "&&") ]) - - let booleanOr = - SynLongIdent.SynLongIdent ([ Ident.create "op_BooleanOr" ], [], [ Some (IdentTrivia.OriginalNotation "||") ]) - - let plus = - SynLongIdent.SynLongIdent ([ Ident.create "op_Addition" ], [], [ Some (IdentTrivia.OriginalNotation "+") ]) - - let times = - SynLongIdent.SynLongIdent ([ Ident.create "op_Multiply" ], [], [ Some (IdentTrivia.OriginalNotation "*") ]) - - let pipe = - SynLongIdent.SynLongIdent ([ Ident.create "op_PipeRight" ], [], [ Some (IdentTrivia.OriginalNotation "|>") ]) - - let toString (sli : SynLongIdent) : string = - sli.LongIdent |> List.map _.idText |> String.concat "." - - let create (ident : LongIdent) : SynLongIdent = - let commas = - match ident with - | [] -> [] - | _ :: commas -> commas |> List.map (fun _ -> range0) - - SynLongIdent.SynLongIdent (ident, commas, List.replicate ident.Length None) - - let inline createI (i : Ident) : SynLongIdent = create [ i ] - - let inline createS (s : string) : SynLongIdent = createI (Ident (s, range0)) - - let inline createS' (s : string list) : SynLongIdent = - create (s |> List.map (fun i -> Ident (i, range0))) - - let isUnit (ident : SynLongIdent) : bool = - match ident.LongIdent with - | [ i ] when System.String.Equals (i.idText, "unit", System.StringComparison.OrdinalIgnoreCase) -> true - | _ -> false - - let isList (ident : SynLongIdent) : bool = - match ident.LongIdent with - | [ i ] when System.String.Equals (i.idText, "list", System.StringComparison.OrdinalIgnoreCase) -> true - // TODO: consider FSharpList or whatever it is - | _ -> false - - let isArray (ident : SynLongIdent) : bool = - match ident.LongIdent with - | [ i ] when - System.String.Equals (i.idText, "array", System.StringComparison.OrdinalIgnoreCase) - || System.String.Equals (i.idText, "[]", System.StringComparison.Ordinal) - -> - true - | _ -> false - - let isOption (ident : SynLongIdent) : bool = - match ident.LongIdent with - | [ i ] when System.String.Equals (i.idText, "option", System.StringComparison.OrdinalIgnoreCase) -> true - // TODO: consider Microsoft.FSharp.Option or whatever it is - | _ -> false - - let isChoice (ident : SynLongIdent) : bool = - match ident.LongIdent with - | [ i ] when System.String.Equals (i.idText, "Choice", System.StringComparison.Ordinal) -> true - // TODO: consider Microsoft.FSharp.Choice or whatever it is - | _ -> false - - let isNullable (ident : SynLongIdent) : bool = - match ident.LongIdent |> List.map _.idText with - | [ "System" ; "Nullable" ] - | [ "Nullable" ] -> true - | _ -> false - - let isResponse (ident : SynLongIdent) : bool = - match ident.LongIdent |> List.map _.idText with - | [ "Response" ] - | [ "RestEase" ; "Response" ] -> true - | _ -> false - - let isMap (ident : SynLongIdent) : bool = - match ident.LongIdent |> List.map _.idText with - | [ "Map" ] -> true - | _ -> false - - let isReadOnlyDictionary (ident : SynLongIdent) : bool = - match ident.LongIdent |> List.map _.idText with - | [ "IReadOnlyDictionary" ] - | [ "Generic" ; "IReadOnlyDictionary" ] - | [ "Collections" ; "Generic" ; "IReadOnlyDictionary" ] - | [ "System" ; "Collections" ; "Generic" ; "IReadOnlyDictionary" ] -> true - | _ -> false - - let isDictionary (ident : SynLongIdent) : bool = - match ident.LongIdent |> List.map _.idText with - | [ "Dictionary" ] - | [ "Generic" ; "Dictionary" ] - | [ "Collections" ; "Generic" ; "Dictionary" ] - | [ "System" ; "Collections" ; "Generic" ; "Dictionary" ] -> true - | _ -> false - - let isIDictionary (ident : SynLongIdent) : bool = - match ident.LongIdent |> List.map _.idText with - | [ "IDictionary" ] - | [ "Generic" ; "IDictionary" ] - | [ "Collections" ; "Generic" ; "IDictionary" ] - | [ "System" ; "Collections" ; "Generic" ; "IDictionary" ] -> true - | _ -> false diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynMatchClause.fs b/WoofWare.Myriad.Plugins/SynExpr/SynMatchClause.fs deleted file mode 100644 index d56115b..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynMatchClause.fs +++ /dev/null @@ -1,24 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynMatchClause = - let create (lhs : SynPat) (rhs : SynExpr) : SynMatchClause = - SynMatchClause.SynMatchClause ( - lhs, - None, - rhs, - range0, - DebugPointAtTarget.Yes, - { - ArrowRange = Some range0 - BarRange = Some range0 - } - ) - - let withWhere (where : SynExpr) (m : SynMatchClause) : SynMatchClause = - match m with - | SynMatchClause (synPat, _, resultExpr, range, debugPointAtTarget, synMatchClauseTrivia) -> - SynMatchClause (synPat, Some where, resultExpr, range, debugPointAtTarget, synMatchClauseTrivia) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynMemberDefn.fs b/WoofWare.Myriad.Plugins/SynExpr/SynMemberDefn.fs deleted file mode 100644 index f7c83c3..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynMemberDefn.fs +++ /dev/null @@ -1,71 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Text.Range -open Fantomas.FCS.Xml - -[] -module internal SynMemberDefn = - let private interfaceMemberSlotFlags = - { - SynMemberFlags.IsInstance = true - SynMemberFlags.IsDispatchSlot = true - SynMemberFlags.IsOverrideOrExplicitImpl = false - SynMemberFlags.IsFinal = false - SynMemberFlags.GetterOrSetterIsCompilerGenerated = false - SynMemberFlags.MemberKind = SynMemberKind.Member - } - - let abstractMember - (attrs : SynAttribute list) - (ident : SynIdent) - (typars : SynTyparDecls option) - (arity : SynValInfo) - (xmlDoc : PreXmlDoc) - (returnType : SynType) - : SynMemberDefn - = - let slot = - SynValSig.SynValSig ( - attrs - |> List.map (fun attr -> - { - Attributes = [ attr ] - Range = range0 - } - ), - ident, - SynValTyparDecls.SynValTyparDecls (typars, true), - returnType, - arity, - false, - false, - xmlDoc, - None, - None, - range0, - { - EqualsRange = None - WithKeyword = None - InlineKeyword = None - LeadingKeyword = SynLeadingKeyword.Abstract range0 - } - ) - - SynMemberDefn.AbstractSlot ( - slot, - interfaceMemberSlotFlags, - range0, - { - GetSetKeywords = None - } - ) - - let staticMember (binding : SynBinding) : SynMemberDefn = - let binding = SynBinding.makeStaticMember binding - SynMemberDefn.Member (binding, range0) - - let memberImplementation (binding : SynBinding) : SynMemberDefn = - let binding = SynBinding.makeInstanceMember binding - SynMemberDefn.Member (binding, range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynModuleDecl.fs b/WoofWare.Myriad.Plugins/SynExpr/SynModuleDecl.fs deleted file mode 100644 index 3334d5b..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynModuleDecl.fs +++ /dev/null @@ -1,30 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Text.Range - -[] -module internal SynModuleDecl = - - let inline openAny (ident : SynOpenDeclTarget) : SynModuleDecl = SynModuleDecl.Open (ident, range0) - - let inline createLets (bindings : SynBinding list) : SynModuleDecl = - SynModuleDecl.Let (false, bindings, range0) - - let inline createLet (binding : SynBinding) : SynModuleDecl = createLets [ binding ] - - let inline createTypes (tys : SynTypeDefn list) : SynModuleDecl = SynModuleDecl.Types (tys, range0) - - let nestedModule (info : SynComponentInfo) (decls : SynModuleDecl list) : SynModuleDecl = - SynModuleDecl.NestedModule ( - info, - false, - decls, - false, - range0, - { - ModuleKeyword = Some range0 - EqualsRange = Some range0 - } - ) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynModuleOrNamespace.fs b/WoofWare.Myriad.Plugins/SynExpr/SynModuleOrNamespace.fs deleted file mode 100644 index d17fc74..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynModuleOrNamespace.fs +++ /dev/null @@ -1,24 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Xml -open Fantomas.FCS.Text.Range - -[] -module internal SynModuleOrNamespace = - - let createNamespace (name : LongIdent) (decls : SynModuleDecl list) = - SynModuleOrNamespace.SynModuleOrNamespace ( - name, - false, - SynModuleOrNamespaceKind.DeclaredNamespace, - decls, - PreXmlDoc.Empty, - [], - None, - range0, - { - LeadingKeyword = SynModuleOrNamespaceLeadingKeyword.Namespace range0 - } - ) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynPat.fs b/WoofWare.Myriad.Plugins/SynExpr/SynPat.fs deleted file mode 100644 index 282ad91..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynPat.fs +++ /dev/null @@ -1,54 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynPat = - let inline paren (pat : SynPat) : SynPat = SynPat.Paren (pat, range0) - - let anon : SynPat = SynPat.Wild range0 - - let inline annotateTypeNoParen (ty : SynType) (pat : SynPat) = SynPat.Typed (pat, ty, range0) - - let inline annotateType (ty : SynType) (pat : SynPat) = paren (annotateTypeNoParen ty pat) - - let inline named (s : string) : SynPat = - SynPat.Named (SynIdent.SynIdent (Ident (s, range0), None), false, None, range0) - - let inline namedI (i : Ident) : SynPat = - SynPat.Named (SynIdent.SynIdent (i, None), false, None, range0) - - let inline identWithArgs (i : LongIdent) (args : SynArgPats) : SynPat = - SynPat.LongIdent (SynLongIdent.create i, None, None, args, None, range0) - - let inline nameWithArgs (i : string) (args : SynPat list) : SynPat = - identWithArgs [ Ident.create i ] (SynArgPats.create args) - - let inline tupleNoParen (elements : SynPat list) : SynPat = - match elements with - | [] -> failwith "Can't tuple no elements in a pattern" - | [ p ] -> p - | elements -> SynPat.Tuple (false, elements, List.replicate (elements.Length - 1) range0, range0) - - let inline tuple (elements : SynPat list) : SynPat = tupleNoParen elements |> paren - - let inline createConst (c : SynConst) = SynPat.Const (c, range0) - - let unit = createConst SynConst.Unit - - let createNull = SynPat.Null range0 - - let emptyList = SynPat.ArrayOrList (false, [], range0) - - let listCons (lhs : SynPat) (rhs : SynPat) = - SynPat.ListCons ( - lhs, - rhs, - range0, - { - ColonColonRange = range0 - } - ) - - let emptyArray = SynPat.ArrayOrList (true, [], range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynSimplePat.fs b/WoofWare.Myriad.Plugins/SynExpr/SynSimplePat.fs deleted file mode 100644 index 5f1c475..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynSimplePat.fs +++ /dev/null @@ -1,10 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynSimplePat = - - let createId (id : Ident) : SynSimplePat = - SynSimplePat.Id (id, None, false, false, false, range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynSimplePats.fs b/WoofWare.Myriad.Plugins/SynExpr/SynSimplePats.fs deleted file mode 100644 index 4714a0b..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynSimplePats.fs +++ /dev/null @@ -1,12 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynSimplePats = - - let create (pats : SynSimplePat list) : SynSimplePats = - match pats with - | [] -> SynSimplePats.SimplePats ([], [], range0) - | pats -> SynSimplePats.SimplePats (pats, List.replicate (pats.Length - 1) range0, range0) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynType.fs b/WoofWare.Myriad.Plugins/SynExpr/SynType.fs deleted file mode 100644 index 3fb417d..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynType.fs +++ /dev/null @@ -1,539 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open System -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynTypePatterns = - let (|OptionType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ innerType ], _, _, _, _) when SynLongIdent.isOption ident -> - Some innerType - | _ -> None - - let (|ChoiceType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, inner, _, _, _, _) when SynLongIdent.isChoice ident -> Some inner - | _ -> None - - let (|NullableType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ innerType ], _, _, _, _) when SynLongIdent.isNullable ident -> - Some innerType - | _ -> None - - let (|UnitType|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident when SynLongIdent.isUnit ident -> Some () - | _ -> None - - let (|ListType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ innerType ], _, _, _, _) when SynLongIdent.isList ident -> - Some innerType - | _ -> None - - let (|ArrayType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ innerType ], _, _, _, _) when SynLongIdent.isArray ident -> - Some innerType - | SynType.Array (1, innerType, _) -> Some innerType - | _ -> None - - let (|RestEaseResponseType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ innerType ], _, _, _, _) when SynLongIdent.isResponse ident -> - Some innerType - | _ -> None - - let (|DictionaryType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ key ; value ], _, _, _, _) when SynLongIdent.isDictionary ident -> - Some (key, value) - | _ -> None - - let (|IDictionaryType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ key ; value ], _, _, _, _) when SynLongIdent.isIDictionary ident -> - Some (key, value) - | _ -> None - - let (|IReadOnlyDictionaryType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ key ; value ], _, _, _, _) when - SynLongIdent.isReadOnlyDictionary ident - -> - Some (key, value) - | _ -> None - - let (|MapType|_|) (fieldType : SynType) = - match fieldType with - | SynType.App (SynType.LongIdent ident, _, [ key ; value ], _, _, _, _) when SynLongIdent.isMap ident -> - Some (key, value) - | _ -> None - - let (|BigInt|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent |> List.map _.idText with - | [ "bigint" ] - | [ "BigInteger" ] - | [ "Numerics" ; "BigInteger" ] - | [ "System" ; "Numerics" ; "BigInteger" ] -> Some () - | _ -> None - | _ -> None - - /// Returns the type, qualified as in e.g. `System.Boolean`. - let (|PrimitiveType|_|) (fieldType : SynType) : LongIdent option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent with - | [ i ] -> Primitives.qualifyType i.idText - | _ -> None - | _ -> None - - let (|String|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent with - | [ i ] -> - [ "string" ] - |> List.tryFind (fun s -> s = i.idText) - |> Option.map ignore - | _ -> None - | _ -> None - - let (|Byte|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent with - | [ i ] -> [ "byte" ] |> List.tryFind (fun s -> s = i.idText) |> Option.map ignore - | _ -> None - | _ -> None - - let (|Guid|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent |> List.map (fun i -> i.idText) with - | [ "System" ; "Guid" ] - | [ "Guid" ] -> Some () - | _ -> None - | _ -> None - - let (|HttpResponseMessage|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent |> List.map (fun i -> i.idText) with - | [ "System" ; "Net" ; "Http" ; "HttpResponseMessage" ] - | [ "Net" ; "Http" ; "HttpResponseMessage" ] - | [ "Http" ; "HttpResponseMessage" ] - | [ "HttpResponseMessage" ] -> Some () - | _ -> None - | _ -> None - - let (|HttpContent|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent |> List.map (fun i -> i.idText) with - | [ "System" ; "Net" ; "Http" ; "HttpContent" ] - | [ "Net" ; "Http" ; "HttpContent" ] - | [ "Http" ; "HttpContent" ] - | [ "HttpContent" ] -> Some () - | _ -> None - | _ -> None - - let (|Stream|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent |> List.map (fun i -> i.idText) with - | [ "System" ; "IO" ; "Stream" ] - | [ "IO" ; "Stream" ] - | [ "Stream" ] -> Some () - | _ -> None - | _ -> None - - let (|NumberType|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent ident -> - match ident.LongIdent with - | [ i ] -> - // We won't bother with the case that the user has done e.g. `Single` (relying on `System` being open). - match Primitives.qualifyType i.idText with - | Some qualified -> - match i.idText with - | "char" - | "string" -> None - | _ -> Some qualified - | None -> None - | _ -> None - | _ -> None - - /// Returns the name of the measure, and the outer type. - let (|Measure|_|) (fieldType : SynType) : (Ident * LongIdent) option = - match fieldType with - | SynType.App (NumberType outer, - _, - [ SynType.LongIdent (SynLongIdent.SynLongIdent ([ ident ], _, _)) ], - _, - _, - _, - _) -> Some (ident, outer) - | _ -> None - - let (|JsonNode|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "Text" ; "Json" ; "Nodes" ; "JsonNode" ] - | [ "Text" ; "Json" ; "Nodes" ; "JsonNode" ] - | [ "Json" ; "Nodes" ; "JsonNode" ] - | [ "Nodes" ; "JsonNode" ] - | [ "JsonNode" ] -> Some () - | _ -> None - | _ -> None - - let (|Unit|_|) (fieldType : SynType) : unit option = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText.ToLowerInvariant ()) with - | [ "microsoft" ; "fsharp" ; "core" ; "unit" ] - | [ "fsharp" ; "core" ; "unit" ] - | [ "core" ; "unit" ] - | [ "unit" ] -> Some () - | _ -> None - | _ -> None - - let (|DateOnly|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "DateOnly" ] - | [ "DateOnly" ] -> Some () - | _ -> None - | _ -> None - - let (|DateTime|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "DateTime" ] - | [ "DateTime" ] -> Some () - | _ -> None - | _ -> None - - let (|DateTimeOffset|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "DateTimeOffset" ] - | [ "DateTimeOffset" ] -> Some () - | _ -> None - | _ -> None - - let (|Uri|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "Uri" ] - | [ "Uri" ] -> Some () - | _ -> None - | _ -> None - - let (|Task|_|) (fieldType : SynType) : SynType option = - match fieldType with - | SynType.App (SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)), _, args, _, _, _, _) -> - match ident |> List.map (fun i -> i.idText) with - | [ "Task" ] - | [ "Tasks" ; "Task" ] - | [ "Threading" ; "Tasks" ; "Task" ] - | [ "System" ; "Threading" ; "Tasks" ; "Task" ] -> - match args with - | [ arg ] -> Some arg - | _ -> failwithf "Expected Task to be applied to exactly one arg, but got: %+A" args - | _ -> None - | _ -> None - - let (|DirectoryInfo|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "IO" ; "DirectoryInfo" ] - | [ "IO" ; "DirectoryInfo" ] - | [ "DirectoryInfo" ] -> Some () - | _ -> None - | _ -> None - - let (|FileInfo|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "IO" ; "FileInfo" ] - | [ "IO" ; "FileInfo" ] - | [ "FileInfo" ] -> Some () - | _ -> None - | _ -> None - - let (|TimeSpan|_|) (fieldType : SynType) = - match fieldType with - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> - match ident |> List.map (fun i -> i.idText) with - | [ "System" ; "TimeSpan" ] - | [ "TimeSpan" ] -> Some () - | _ -> None - | _ -> None - -[] -module internal SynType = - let rec stripOptionalParen (ty : SynType) : SynType = - match ty with - | SynType.Paren (ty, _) -> stripOptionalParen ty - | ty -> ty - - let inline paren (ty : SynType) : SynType = SynType.Paren (ty, range0) - - let inline createLongIdent (ident : LongIdent) : SynType = - SynType.LongIdent (SynLongIdent.create ident) - - let inline createLongIdent' (ident : string list) : SynType = - SynType.LongIdent (SynLongIdent.createS' ident) - - let inline named (name : string) = createLongIdent' [ name ] - - let inline app' (name : SynType) (args : SynType list) : SynType = - if args.IsEmpty then - failwith "Type cannot be applied to no arguments" - - SynType.App (name, Some range0, args, List.replicate (args.Length - 1) range0, Some range0, false, range0) - - let inline app (name : string) (args : SynType list) : SynType = app' (named name) args - - /// Returns None if the input list was empty. - let inline tupleNoParen (ty : SynType list) : SynType option = - match List.rev ty with - | [] -> None - | [ t ] -> Some t - | t :: rest -> - ([ SynTupleTypeSegment.Type t ], rest) - ||> List.fold (fun ty nextArg -> SynTupleTypeSegment.Type nextArg :: SynTupleTypeSegment.Star range0 :: ty) - |> fun segs -> SynType.Tuple (false, segs, range0) - |> Some - - let inline appPostfix (name : string) (arg : SynType) : SynType = - SynType.App (named name, None, [ arg ], [], None, true, range0) - - let inline appPostfix' (name : string list) (arg : SynType) : SynType = - SynType.App (createLongIdent' name, None, [ arg ], [], None, true, range0) - - let inline funFromDomain (domain : SynType) (range : SynType) : SynType = - SynType.Fun ( - domain, - range, - range0, - { - ArrowRange = range0 - } - ) - - let inline signatureParamOfType - (attrs : SynAttribute list) - (ty : SynType) - (optional : bool) - (name : Ident option) - : SynType - = - SynType.SignatureParameter ( - attrs - |> List.map (fun attr -> - { - Attributes = [ attr ] - Range = range0 - } - ), - optional, - name, - ty, - range0 - ) - - let inline var (ty : SynTypar) : SynType = SynType.Var (ty, range0) - - let unit : SynType = named "unit" - let obj : SynType = named "obj" - let bool : SynType = named "bool" - let int : SynType = named "int" - let array (elt : SynType) : SynType = SynType.Array (1, elt, range0) - - let list (elt : SynType) : SynType = - SynType.App (named "list", None, [ elt ], [], None, true, range0) - - let option (elt : SynType) : SynType = - SynType.App (named "option", None, [ elt ], [], None, true, range0) - - let anon : SynType = SynType.Anon range0 - - let task (elt : SynType) : SynType = - SynType.App ( - createLongIdent' [ "System" ; "Threading" ; "Tasks" ; "Task" ], - None, - [ elt ], - [], - None, - true, - range0 - ) - - let string : SynType = named "string" - - /// Given ['a1, 'a2] and 'ret, returns 'a1 -> 'a2 -> 'ret. - let toFun (inputs : SynType list) (ret : SynType) : SynType = - (ret, List.rev inputs) ||> List.fold (fun ty input -> funFromDomain input ty) - - let primitiveToHumanReadableString (name : LongIdent) : string = - match name |> List.map _.idText with - | [ "System" ; "Single" ] -> "single" - | [ "System" ; "Double" ] -> "double" - | [ "System" ; "Byte" ] -> "byte" - | [ "System" ; "SByte" ] -> "signed byte" - | [ "System" ; "Int16" ] -> "int16" - | [ "System" ; "Int32" ] -> "int32" - | [ "System" ; "Int64" ] -> "int64" - | [ "System" ; "UInt16" ] -> "uint16" - | [ "System" ; "UInt32" ] -> "uint32" - | [ "System" ; "UInt64" ] -> "uint64" - | [ "System" ; "Char" ] -> "char" - | [ "System" ; "Decimal" ] -> "decimal" - | [ "System" ; "String" ] -> "string" - | [ "System" ; "Boolean" ] -> "bool" - | ty -> - ty - |> String.concat "." - |> failwithf "could not create human-readable string for primitive type %s" - - let rec toHumanReadableString (ty : SynType) : string = - match ty with - | PrimitiveType t1 -> primitiveToHumanReadableString t1 - | OptionType t1 -> toHumanReadableString t1 + " option" - | NullableType t1 -> toHumanReadableString t1 + " Nullable" - | ChoiceType ts -> - ts - |> List.map toHumanReadableString - |> String.concat ", " - |> sprintf "Choice<%s>" - | MapType (k, v) - | DictionaryType (k, v) - | IDictionaryType (k, v) - | IReadOnlyDictionaryType (k, v) -> sprintf "map<%s, %s>" (toHumanReadableString k) (toHumanReadableString v) - | ListType t1 -> toHumanReadableString t1 + " list" - | ArrayType t1 -> toHumanReadableString t1 + " array" - | Task t1 -> toHumanReadableString t1 + " Task" - | UnitType -> "unit" - | FileInfo -> "FileInfo" - | DirectoryInfo -> "DirectoryInfo" - | Uri -> "URI" - | Stream -> "Stream" - | Guid -> "GUID" - | BigInt -> "bigint" - | DateTimeOffset -> "DateTimeOffset" - | DateOnly -> "DateOnly" - | TimeSpan -> "TimeSpan" - | SynType.LongIdent (SynLongIdent.SynLongIdent (ident, _, _)) -> ident |> List.map _.idText |> String.concat "." - | ty -> failwithf "could not compute human-readable string for type: %O" ty - - /// Guess whether the types are equal. We err on the side of saying "no, they're different". - let rec provablyEqual (ty1 : SynType) (ty2 : SynType) : bool = - if Object.ReferenceEquals (ty1, ty2) then - true - else - - match ty1 with - | PrimitiveType t1 -> - match ty2 with - | PrimitiveType t2 -> (t1 |> List.map _.idText) = (t2 |> List.map _.idText) - | _ -> false - | OptionType t1 -> - match ty2 with - | OptionType t2 -> provablyEqual t1 t2 - | _ -> false - | NullableType t1 -> - match ty2 with - | NullableType t2 -> provablyEqual t1 t2 - | _ -> false - | ChoiceType t1 -> - match ty2 with - | ChoiceType t2 -> - t1.Length = t2.Length - && List.forall (fun (a, b) -> provablyEqual a b) (List.zip t1 t2) - | _ -> false - | DictionaryType (k1, v1) -> - match ty2 with - | DictionaryType (k2, v2) -> provablyEqual k1 k2 && provablyEqual v1 v2 - | _ -> false - | IDictionaryType (k1, v1) -> - match ty2 with - | IDictionaryType (k2, v2) -> provablyEqual k1 k2 && provablyEqual v1 v2 - | _ -> false - | IReadOnlyDictionaryType (k1, v1) -> - match ty2 with - | IReadOnlyDictionaryType (k2, v2) -> provablyEqual k1 k2 && provablyEqual v1 v2 - | _ -> false - | MapType (k1, v1) -> - match ty2 with - | MapType (k2, v2) -> provablyEqual k1 k2 && provablyEqual v1 v2 - | _ -> false - | ListType t1 -> - match ty2 with - | ListType t2 -> provablyEqual t1 t2 - | _ -> false - | ArrayType t1 -> - match ty2 with - | ArrayType t2 -> provablyEqual t1 t2 - | _ -> false - | Task t1 -> - match ty2 with - | Task t2 -> provablyEqual t1 t2 - | _ -> false - | UnitType -> - match ty2 with - | UnitType -> true - | _ -> false - | FileInfo -> - match ty2 with - | FileInfo -> true - | _ -> false - | DirectoryInfo -> - match ty2 with - | DirectoryInfo -> true - | _ -> false - | Uri -> - match ty2 with - | Uri -> true - | _ -> false - | Stream -> - match ty2 with - | Stream -> true - | _ -> false - | Guid -> - match ty2 with - | Guid -> true - | _ -> false - | BigInt -> - match ty2 with - | BigInt -> true - | _ -> false - | DateTimeOffset -> - match ty2 with - | DateTimeOffset -> true - | _ -> false - | DateOnly -> - match ty2 with - | DateOnly -> true - | _ -> false - | _ -> - - match ty1, ty2 with - | SynType.LongIdent (SynLongIdent (ident1, _, _)), SynType.LongIdent (SynLongIdent (ident2, _, _)) -> - let ident1 = ident1 |> List.map _.idText - let ident2 = ident2 |> List.map _.idText - ident1 = ident2 - | _, _ -> false diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynTypeDefn.fs b/WoofWare.Myriad.Plugins/SynExpr/SynTypeDefn.fs deleted file mode 100644 index 71eb8c0..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynTypeDefn.fs +++ /dev/null @@ -1,46 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.SyntaxTrivia -open Fantomas.FCS.Text.Range - -[] -module internal SynTypeDefn = - - let inline create (componentInfo : SynComponentInfo) (repr : SynTypeDefnRepr) : SynTypeDefn = - SynTypeDefn.SynTypeDefn ( - componentInfo, - repr, - [], - None, - range0, - { - LeadingKeyword = SynTypeDefnLeadingKeyword.Type range0 - EqualsRange = Some range0 - WithKeyword = None - } - ) - - let inline withMemberDefns (members : SynMemberDefn list) (r : SynTypeDefn) : SynTypeDefn = - match r with - | SynTypeDefn (typeInfo, typeRepr, _, ctor, range, trivia) -> - SynTypeDefn.SynTypeDefn (typeInfo, typeRepr, members, ctor, range, trivia) - - let getName (defn : SynTypeDefn) : LongIdent = - match defn with - | SynTypeDefn (SynComponentInfo.SynComponentInfo (_, _, _, id, _, _, _, _), _, _, _, _, _) -> id - - let getAttribute (attrName : string) (defn : SynTypeDefn) : SynAttribute option = - match defn with - | SynTypeDefn (SynComponentInfo.SynComponentInfo (attrs, _, _, _, _, _, _, _), _, _, _, _, _) -> - attrs - |> List.collect (fun a -> a.Attributes) - |> List.tryFind (fun i -> - match i.TypeName with - | SynLongIdent.SynLongIdent (id, _, _) -> - let name = List.last(id).idText - name = attrName || name + "Attribute" = attrName - ) - - let hasAttribute (attrName : string) (defn : SynTypeDefn) : bool = - getAttribute attrName defn |> Option.isSome diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynTypeDefnRepr.fs b/WoofWare.Myriad.Plugins/SynExpr/SynTypeDefnRepr.fs deleted file mode 100644 index a5e0a2b..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynTypeDefnRepr.fs +++ /dev/null @@ -1,24 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range - -[] -module internal SynTypeDefnRepr = - - let inline interfaceType (mems : SynMemberDefns) : SynTypeDefnRepr = - SynTypeDefnRepr.ObjectModel (SynTypeDefnKind.Unspecified, mems, range0) - - /// Indicates the body of a `type Foo with {body}` extension type declaration. - let inline augmentation () : SynTypeDefnRepr = - SynTypeDefnRepr.ObjectModel (SynTypeDefnKind.Augmentation range0, [], range0) - - let inline unionWithAccess (implAccess : SynAccess option) (cases : SynUnionCase list) : SynTypeDefnRepr = - SynTypeDefnRepr.Simple (SynTypeDefnSimpleRepr.Union (implAccess, cases, range0), range0) - - let inline union (cases : SynUnionCase list) : SynTypeDefnRepr = unionWithAccess None cases - - let inline recordWithAccess (implAccess : SynAccess option) (fields : SynField list) : SynTypeDefnRepr = - SynTypeDefnRepr.Simple (SynTypeDefnSimpleRepr.Record (implAccess, fields, range0), range0) - - let inline record (fields : SynField list) : SynTypeDefnRepr = recordWithAccess None fields diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynUnionCase.fs b/WoofWare.Myriad.Plugins/SynExpr/SynUnionCase.fs deleted file mode 100644 index 85ee398..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynUnionCase.fs +++ /dev/null @@ -1,55 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax -open Fantomas.FCS.Text.Range -open Fantomas.FCS.Xml -open Fantomas.FCS.SyntaxTrivia - -/// Represents everything you need to know about a union case. -/// This is generic on whether each field of this case must be named. -type UnionCase<'ident> = - { - /// The name of the case: e.g. `| Foo of blah` has this being `Foo`. - Name : Ident - /// Any docstring associated with this case. - XmlDoc : PreXmlDoc option - /// Any accessibility modifier: e.g. `type Foo = private | Blah`. - Access : SynAccess option - /// Attributes on the case: for example, `| [] Foo of blah`. - Attributes : SynAttribute list - /// The data contained within the case: for example, `[blah]` in `| Foo of blah`. - Fields : SynFieldData<'ident> list - } - -[] -module internal SynUnionCase = - let create (case : UnionCase) : SynUnionCase = - let fields = - case.Fields - |> List.map (fun field -> - SynField.SynField ( - SynAttributes.ofAttrs field.Attrs, - false, - field.Ident, - field.Type, - false, - PreXmlDoc.Empty, - None, - range0, - { - LeadingKeyword = None - } - ) - ) - - SynUnionCase.SynUnionCase ( - SynAttributes.ofAttrs case.Attributes, - SynIdent.createI case.Name, - SynUnionCaseKind.Fields fields, - case.XmlDoc |> Option.defaultValue PreXmlDoc.Empty, - case.Access, - range0, - { - BarRange = Some range0 - } - ) diff --git a/WoofWare.Myriad.Plugins/SynExpr/SynValInfo.fs b/WoofWare.Myriad.Plugins/SynExpr/SynValInfo.fs deleted file mode 100644 index 0848db0..0000000 --- a/WoofWare.Myriad.Plugins/SynExpr/SynValInfo.fs +++ /dev/null @@ -1,7 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -open Fantomas.FCS.Syntax - -[] -module internal SynValInfo = - let empty = SynValInfo.SynValInfo ([], SynArgInfo.empty) From 217ef138f679e5c2010fcf20d3946f40636b9cd8 Mon Sep 17 00:00:00 2001 From: Smaug123 <3138005+Smaug123@users.noreply.github.com> Date: Sun, 6 Oct 2024 21:56:39 +0100 Subject: [PATCH 4/4] Add a function from Myriad --- .../{TeqLicence.txt => ApacheLicence.txt} | 0 WoofWare.Myriad.Plugins/ArgParserGenerator.fs | 1 + WoofWare.Myriad.Plugins/CataGenerator.fs | 25 ++++++++++++++++++- WoofWare.Myriad.Plugins/Teq.fs | 18 ------------- .../WoofWare.Myriad.Plugins.fsproj | 4 +-- 5 files changed, 27 insertions(+), 21 deletions(-) rename WoofWare.Myriad.Plugins/{TeqLicence.txt => ApacheLicence.txt} (100%) delete mode 100644 WoofWare.Myriad.Plugins/Teq.fs diff --git a/WoofWare.Myriad.Plugins/TeqLicence.txt b/WoofWare.Myriad.Plugins/ApacheLicence.txt similarity index 100% rename from WoofWare.Myriad.Plugins/TeqLicence.txt rename to WoofWare.Myriad.Plugins/ApacheLicence.txt diff --git a/WoofWare.Myriad.Plugins/ArgParserGenerator.fs b/WoofWare.Myriad.Plugins/ArgParserGenerator.fs index e7be6c5..6e13b6a 100644 --- a/WoofWare.Myriad.Plugins/ArgParserGenerator.fs +++ b/WoofWare.Myriad.Plugins/ArgParserGenerator.fs @@ -4,6 +4,7 @@ open System open System.Text open Fantomas.FCS.Syntax open Fantomas.FCS.Text.Range +open TypeEquality open WoofWare.Whippet.Fantomas type internal ArgParserOutputSpec = diff --git a/WoofWare.Myriad.Plugins/CataGenerator.fs b/WoofWare.Myriad.Plugins/CataGenerator.fs index ef767b6..6b7d29c 100644 --- a/WoofWare.Myriad.Plugins/CataGenerator.fs +++ b/WoofWare.Myriad.Plugins/CataGenerator.fs @@ -1174,6 +1174,29 @@ module internal CataGenerator = ] |> SynModuleOrNamespace.createNamespace ns + /// This function comes from Myriad, and is therefore derived from an Apache 2.0-licenced work. + /// https://github.com/MoiraeSoftware/myriad/blob/3c9818faabf9d508c10c28d5ecd26e66fafb48a1/src/Myriad.Core/Ast.fs#L160 + /// A copy of the Apache 2.0 licence is at ApacheLicence.txt. + let groupedTypeDefns (ast : ParsedInput) : (LongIdent * SynTypeDefn list) list = + let rec extractTypes (moduleDecls : SynModuleDecl list) (ns : LongIdent) = + [ + for moduleDecl in moduleDecls do + match moduleDecl with + | SynModuleDecl.Types (types, _) -> yield (ns, types) + | SynModuleDecl.NestedModule (SynComponentInfo (_, _, _, longId, _, _, _, _), _, decls, _, _, _) -> + let combined = longId |> List.append ns + yield! (extractTypes decls combined) + | _ -> () + ] + + [ + match ast with + | ParsedInput.ImplFile (ParsedImplFileInput (_, _, _, _, _, modules, _, _, _)) -> + for SynModuleOrNamespace (namespaceId, _, _, moduleDecls, _, _, _, _, _) in modules do + yield! extractTypes moduleDecls namespaceId + | _ -> () + ] + open Myriad.Core /// Myriad generator that provides a catamorphism for an algebraic data type. @@ -1187,7 +1210,7 @@ type CreateCatamorphismGenerator () = let ast, _ = Ast.fromFilename context.InputFilename |> Async.RunSynchronously |> Array.head - let types = Ast.extractTypeDefn ast + let types = CataGenerator.groupedTypeDefns ast let opens = AstHelper.extractOpens ast diff --git a/WoofWare.Myriad.Plugins/Teq.fs b/WoofWare.Myriad.Plugins/Teq.fs deleted file mode 100644 index 860e345..0000000 --- a/WoofWare.Myriad.Plugins/Teq.fs +++ /dev/null @@ -1,18 +0,0 @@ -namespace WoofWare.Myriad.Plugins - -// Extracted from https://github.com/G-Research/TypeEquality -// which is Apache-2.0 licenced. See `TeqLicence.txt`. -// We inline this code because Myriad doesn't seem to reliably load package references in the generator. -// I have reformatted a little, and stripped out all the code I don't use. - -type internal Teq<'a, 'b> = private | Teq of ('a -> 'b) * ('b -> 'a) - -[] -module internal Teq = - - let refl<'a> : Teq<'a, 'a> = Teq (id, id) - let cast (Teq (f, _)) a = f a - - [] - module Cong = - let believeMe<'a, 'b, 'a2, 'b2> (_ : Teq<'a, 'b>) : Teq<'a2, 'b2> = unbox <| (refl : Teq<'a2, 'a2>) diff --git a/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj b/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj index 59df1bd..af29d92 100644 --- a/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj +++ b/WoofWare.Myriad.Plugins/WoofWare.Myriad.Plugins.fsproj @@ -20,6 +20,7 @@ + @@ -28,7 +29,6 @@ - @@ -41,7 +41,7 @@ - +