From 5edc5bd89472ed7cecab96d9772785e55af3307a Mon Sep 17 00:00:00 2001 From: Aviv Cohn Date: Wed, 10 Dec 2025 09:51:36 -0500 Subject: [PATCH] feat: add device and custom property enums --- .../UDMApi/IUDMAPI.cs | 10 ++----- .../UDMApi/StatusProperties.cs | 2 +- .../UDMApi/enums/CustomPropertyEnums.cs | 30 +++++++++++++++++++ .../UDMApi/enums/DeviceEnums.cs | 18 ++++------- 4 files changed, 40 insertions(+), 20 deletions(-) create mode 100644 src/PepperDash.Essentials.Core/UDMApi/enums/CustomPropertyEnums.cs diff --git a/src/PepperDash.Essentials.Core/UDMApi/IUDMAPI.cs b/src/PepperDash.Essentials.Core/UDMApi/IUDMAPI.cs index 44b7a5a7..892acf1a 100644 --- a/src/PepperDash.Essentials.Core/UDMApi/IUDMAPI.cs +++ b/src/PepperDash.Essentials.Core/UDMApi/IUDMAPI.cs @@ -1,12 +1,8 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - + namespace PepperDash.Essentials.Core { - internal interface IUDMAPI + internal interface IUdmApi { + bool SetDeviceProperty(DeviceKeys DeviceKey, DeviceStatus DeviceStatus ); } } diff --git a/src/PepperDash.Essentials.Core/UDMApi/StatusProperties.cs b/src/PepperDash.Essentials.Core/UDMApi/StatusProperties.cs index 0317e017..d95f5476 100644 --- a/src/PepperDash.Essentials.Core/UDMApi/StatusProperties.cs +++ b/src/PepperDash.Essentials.Core/UDMApi/StatusProperties.cs @@ -11,4 +11,4 @@ namespace PepperDash.Essentials.Core [JsonProperty("devices")] public Dictionary Devices { get; set; } } -} +} \ No newline at end of file diff --git a/src/PepperDash.Essentials.Core/UDMApi/enums/CustomPropertyEnums.cs b/src/PepperDash.Essentials.Core/UDMApi/enums/CustomPropertyEnums.cs new file mode 100644 index 00000000..cafd6fcf --- /dev/null +++ b/src/PepperDash.Essentials.Core/UDMApi/enums/CustomPropertyEnums.cs @@ -0,0 +1,30 @@ +namespace PepperDash.Essentials.Core +{ + /// + /// Enumeration of valid custom property identifiers for UDM API. + /// Property keys must be in the format "property1" through "property20". + /// + internal enum PropertyKeys + { + property1, + property2, + property3, + property4, + property5, + property6, + property7, + property8, + property9, + property10, + property11, + property12, + property13, + property14, + property15, + property16, + property17, + property18, + property19, + property20 + } +} diff --git a/src/PepperDash.Essentials.Core/UDMApi/enums/DeviceEnums.cs b/src/PepperDash.Essentials.Core/UDMApi/enums/DeviceEnums.cs index 06cb083d..97d632f3 100644 --- a/src/PepperDash.Essentials.Core/UDMApi/enums/DeviceEnums.cs +++ b/src/PepperDash.Essentials.Core/UDMApi/enums/DeviceEnums.cs @@ -1,14 +1,10 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace PepperDash.Essentials.Core +namespace PepperDash.Essentials.Core { - internal class DeviceEnums - { - public enum DeviceKeys + /// + /// Enumeration of valid device identifiers for UDM API status properties. + /// Device keys must be in the format "device1" through "device20". + /// + internal enum DeviceKeys { device1, device2, @@ -30,7 +26,5 @@ namespace PepperDash.Essentials.Core device18, device19, device20 - } - } }