6e46e413ba
Script for retrive alerts from SolarEdge site
81 lines
2.2 KiB
C#
81 lines
2.2 KiB
C#
using Newtonsoft.Json;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace console_solaredge
|
|
{
|
|
public class Model
|
|
{
|
|
public class SolarEdgeModel
|
|
{
|
|
[JsonProperty("count")]
|
|
public long Count { get; set; }
|
|
[JsonProperty("alerts")]
|
|
public List<Alert>? Alerts { get; set; }
|
|
}
|
|
|
|
public class Alert
|
|
{
|
|
[JsonProperty("alertId")]
|
|
public long AlertId { get; set; }
|
|
|
|
[JsonProperty("siteId")]
|
|
public long SiteId { get; set; }
|
|
|
|
[JsonProperty("creationDate")]
|
|
public long CreationDate { get; set; }
|
|
|
|
[JsonProperty("category")]
|
|
public string? Category { get; set; }
|
|
|
|
[JsonProperty("impact")]
|
|
public long Impact { get; set; }
|
|
|
|
[JsonProperty("componentType")]
|
|
public string? ComponentType { get; set; }
|
|
|
|
[JsonProperty("alertType")]
|
|
public string? AlertType { get; set; }
|
|
|
|
[JsonProperty("reporterId")]
|
|
public long ReporterId { get; set; }
|
|
|
|
[JsonProperty("reporterSerialNumber")]
|
|
public string? ReporterSerialNumber { get; set; }
|
|
|
|
[JsonProperty("status")]
|
|
public string? Status { get; set; }
|
|
|
|
[JsonProperty("serverStatus")]
|
|
public string? ServerStatus { get; set; }
|
|
|
|
[JsonProperty("muted")]
|
|
public bool Muted { get; set; }
|
|
|
|
[JsonProperty("lastTrigger")]
|
|
public long LastTrigger { get; set; }
|
|
|
|
[JsonProperty("open")]
|
|
public bool Open { get; set; }
|
|
|
|
[JsonProperty("timeOffset")]
|
|
public long TimeOffset { get; set; }
|
|
|
|
[JsonProperty("units")]
|
|
public List<object>? Units { get; set; }
|
|
|
|
[JsonProperty("description")]
|
|
public string? Description { get; set; }
|
|
|
|
[JsonProperty("resolution")]
|
|
public string? Resolution { get; set; }
|
|
|
|
[JsonProperty("isSupportAlert")]
|
|
public bool IsSupportAlert { get; set; }
|
|
}
|
|
}
|
|
}
|