diff --git a/src/PepperDash.Essentials.Core/UDMApi/CustomProperties.cs b/src/PepperDash.Essentials.Core/UDMApi/CustomProperties.cs new file mode 100644 index 00000000..c0d6abee --- /dev/null +++ b/src/PepperDash.Essentials.Core/UDMApi/CustomProperties.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Newtonsoft.Json; + +namespace PepperDash.Essentials.Core.UDMApi +{ + + internal class CustomProperties + { + [JsonProperty("label")] + public string label { get; set; } + + [JsonProperty("value")] + public string value { get; set; } + } + +} diff --git a/src/PepperDash.Essentials.Core/UDMApi/DeviceStatus.cs b/src/PepperDash.Essentials.Core/UDMApi/DeviceStatus.cs new file mode 100644 index 00000000..b977f248 --- /dev/null +++ b/src/PepperDash.Essentials.Core/UDMApi/DeviceStatus.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Newtonsoft.Json; + +namespace PepperDash.Essentials.Core.UDMApi +{ + internal class DeviceStatus + { + [JsonProperty("label")] + public string label { get; set; } + + [JsonProperty("status")] + public string status { get; set; } + + [JsonProperty("description")] + public string description { get; set; } + + [JsonProperty("videoSource")] + public string videoSource { get; set; } + + [JsonProperty("audioSource")] + public string audioSource { get; set; } + + [JsonProperty("usage")] + public int usage { get; set; } + + [JsonProperty("error")] + public string error { get; set; } + } + +} diff --git a/src/PepperDash.Essentials.Core/UDMApi/RoomResponse.cs b/src/PepperDash.Essentials.Core/UDMApi/RoomResponse.cs new file mode 100644 index 00000000..f7ccd3bc --- /dev/null +++ b/src/PepperDash.Essentials.Core/UDMApi/RoomResponse.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Newtonsoft.Json; + +namespace PepperDash.Essentials.Core.UDMApi +{ + /// + /// Represents the complete room response for UDM API + /// + internal class RoomResponse + { + public RoomResponse() + { + standard = new StandardProperties(); + status = new StatusProperties(); + custom = new Dictionary(); + } + + /// + /// API version string + /// + [JsonProperty("apiVersion")] + public string apiVersion { get; set; } + + /// + /// Standard room properties + /// + [JsonProperty("standard")] + public StandardProperties standard { get; set; } + + /// + /// Status information including devices + /// + [JsonProperty("status")] + public StatusProperties status { get; set; } + + /// + /// Custom properties dictionary + /// + [JsonProperty("custom")] + public Dictionary custom { get; set; } + } + + /// + /// Represents status properties including devices + /// + internal class StatusProperties + { + /// + /// Dictionary of device statuses keyed by device identifier + /// + [JsonProperty("devices")] + public Dictionary devices { get; set; } + + public StatusProperties() + { + devices = new Dictionary(); + } + } +} diff --git a/src/PepperDash.Essentials.Core/UDMApi/StandardProperties.cs b/src/PepperDash.Essentials.Core/UDMApi/StandardProperties.cs new file mode 100644 index 00000000..801d484e --- /dev/null +++ b/src/PepperDash.Essentials.Core/UDMApi/StandardProperties.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Newtonsoft.Json; + +namespace PepperDash.Essentials.Core.UDMApi +{ + internal class StandardProperties + { + [JsonProperty("version")] + public string version { get; set; } + + [JsonProperty("state")] + public string state { get; set; } + + [JsonProperty("error")] + public string error { get; set; } + + [JsonProperty("occupancy")] + public bool occupancy { get; set; } + + [JsonProperty("helpRequest")] + public string helpRequest { get; set; } + + [JsonProperty("activity")] + public string activity { get; set; } + } + +}