Skip to content

Commit

Permalink
Built against the newest API with addition of checks to heartbeat
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasArdal committed Feb 29, 2024
1 parent ec5294c commit 11172bb
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions src/Elmah.Io.Client/ElmahioClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4164,6 +4164,51 @@ public static Breadcrumb FromJson(string data)

}

/// <summary>
/// A check represent one of many checks included in a heartbeat.
/// </summary>
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class Check
{
/// <summary>
/// The name of the check.
/// </summary>
[Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Name { get; set; }

/// <summary>
/// Optional long for specifying how many milliseconds it took to execute the check.
/// </summary>
[Newtonsoft.Json.JsonProperty("took", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public long? Took { get; set; }

/// <summary>
/// The result of this check. Can be "Healthy, "Degraded", or "Unhealthy". Defaults to "Healthy"
/// </summary>
[Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Result { get; set; }

/// <summary>
/// If result is "Degraded" or "Unhealthy" you can use this property to specify why.
/// </summary>
[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<Check>(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
{
Expand Down Expand Up @@ -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; }

/// <summary>
/// A list of checks in this heartbeat.
/// </summary>
[Newtonsoft.Json.JsonProperty("checks", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public System.Collections.Generic.ICollection<Check> Checks { get; set; }

public string ToJson()
{

Expand Down

0 comments on commit 11172bb

Please sign in to comment.