From 11172bb975a6d8cc5f32ec695cc5ec58c1acd106 Mon Sep 17 00:00:00 2001 From: Thomas Ardal Date: Thu, 29 Feb 2024 14:11:22 +0100 Subject: [PATCH] Built against the newest API with addition of checks to heartbeat --- src/Elmah.Io.Client/ElmahioClient.cs | 51 ++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/src/Elmah.Io.Client/ElmahioClient.cs b/src/Elmah.Io.Client/ElmahioClient.cs index d89e4de..6806095 100644 --- a/src/Elmah.Io.Client/ElmahioClient.cs +++ b/src/Elmah.Io.Client/ElmahioClient.cs @@ -4164,6 +4164,51 @@ public static Breadcrumb FromJson(string data) } + /// + /// A check represent one of many checks included in a heartbeat. + /// + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Check + { + /// + /// The name of the check. + /// + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + /// + /// Optional long for specifying how many milliseconds it took to execute the check. + /// + [Newtonsoft.Json.JsonProperty("took", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Took { get; set; } + + /// + /// The result of this check. Can be "Healthy, "Degraded", or "Unhealthy". Defaults to "Healthy" + /// + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Result { get; set; } + + /// + /// If result is "Degraded" or "Unhealthy" you can use this property to specify why. + /// + [Newtonsoft.Json.JsonProperty("reason", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Reason { get; set; } + + public string ToJson() + { + + return Newtonsoft.Json.JsonConvert.SerializeObject(this, new Newtonsoft.Json.JsonSerializerSettings()); + + } + public static Check FromJson(string data) + { + + return Newtonsoft.Json.JsonConvert.DeserializeObject(data, new Newtonsoft.Json.JsonSerializerSettings()); + + } + + } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")] public partial class CreateBulkMessageResult { @@ -4314,6 +4359,12 @@ public partial class CreateHeartbeat [Newtonsoft.Json.JsonProperty("took", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long? Took { get; set; } + /// + /// A list of checks in this heartbeat. + /// + [Newtonsoft.Json.JsonProperty("checks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Checks { get; set; } + public string ToJson() {