fix: use standard C# property naming structure, jsonproperties to conform to api

This commit is contained in:
Aviv Cohn
2025-12-09 23:12:29 -05:00
parent e44a7160ad
commit 9ef23cfcfe
5 changed files with 20 additions and 20 deletions

View File

@@ -6,10 +6,10 @@ namespace PepperDash.Essentials.Core.UDMApi
internal class CustomProperties internal class CustomProperties
{ {
[JsonProperty("label")] [JsonProperty("label")]
public string label { get; set; } public string Label { get; set; }
[JsonProperty("value")] [JsonProperty("value")]
public string value { get; set; } public string Value { get; set; }
} }
} }

View File

@@ -5,25 +5,25 @@ namespace PepperDash.Essentials.Core.UDMApi
internal class DeviceStatus internal class DeviceStatus
{ {
[JsonProperty("label")] [JsonProperty("label")]
public string label { get; set; } public string Label { get; set; }
[JsonProperty("status")] [JsonProperty("status")]
public string status { get; set; } public string Status { get; set; }
[JsonProperty("description")] [JsonProperty("description")]
public string description { get; set; } public string Description { get; set; }
[JsonProperty("videoSource")] [JsonProperty("videoSource")]
public string videoSource { get; set; } public string VideoSource { get; set; }
[JsonProperty("audioSource")] [JsonProperty("audioSource")]
public string audioSource { get; set; } public string AudioSource { get; set; }
[JsonProperty("usage")] [JsonProperty("usage")]
public int usage { get; set; } public int Usage { get; set; }
[JsonProperty("error")] [JsonProperty("error")]
public string error { get; set; } public string Error { get; set; }
} }
} }

View File

@@ -12,24 +12,24 @@ namespace PepperDash.Essentials.Core.UDMApi
/// API version string /// API version string
/// </summary> /// </summary>
[JsonProperty("apiVersion")] [JsonProperty("apiVersion")]
public string apiVersion { get; set; } public string ApiVersion { get; set; }
/// <summary> /// <summary>
/// Standard room properties /// Standard room properties
/// </summary> /// </summary>
[JsonProperty("standard")] [JsonProperty("standard")]
public StandardProperties standard { get; set; } public StandardProperties Standard { get; set; }
/// <summary> /// <summary>
/// Status information including devices /// Status information including devices
/// </summary> /// </summary>
[JsonProperty("status")] [JsonProperty("status")]
public StatusProperties status { get; set; } public StatusProperties Status { get; set; }
/// <summary> /// <summary>
/// Custom properties dictionary /// Custom properties dictionary
/// </summary> /// </summary>
[JsonProperty("custom")] [JsonProperty("custom")]
public Dictionary<string, CustomProperties> custom { get; set; } public Dictionary<string, CustomProperties> Custom { get; set; }
} }
} }

View File

@@ -5,22 +5,22 @@ namespace PepperDash.Essentials.Core.UDMApi
internal class StandardProperties internal class StandardProperties
{ {
[JsonProperty("version")] [JsonProperty("version")]
public string version { get; set; } public string Version { get; set; }
[JsonProperty("state")] [JsonProperty("state")]
public string state { get; set; } public string State { get; set; }
[JsonProperty("error")] [JsonProperty("error")]
public string error { get; set; } public string Error { get; set; }
[JsonProperty("occupancy")] [JsonProperty("occupancy")]
public bool occupancy { get; set; } public bool Occupancy { get; set; }
[JsonProperty("helpRequest")] [JsonProperty("helpRequest")]
public string helpRequest { get; set; } public string HelpRequest { get; set; }
[JsonProperty("activity")] [JsonProperty("activity")]
public string activity { get; set; } public string Activity { get; set; }
} }
} }

View File

@@ -9,6 +9,6 @@ namespace PepperDash.Essentials.Core.UDMApi
/// Dictionary of device statuses keyed by device identifier /// Dictionary of device statuses keyed by device identifier
/// </summary> /// </summary>
[JsonProperty("devices")] [JsonProperty("devices")]
public Dictionary<string, DeviceStatus> devices { get; set; } public Dictionary<string, DeviceStatus> Devices { get; set; }
} }
} }