Skip to main content

hap_model/
generated.rs

1// @generated by `cargo xtask codegen-hap-types` from xtask/model/hap-types.json.
2// Do not edit by hand. Re-run the codegen command to regenerate.
3
4#![allow(
5    clippy::match_same_arms,
6    clippy::match_single_binding,
7    clippy::too_many_lines
8)]
9
10#[allow(unused_imports)]
11use crate::format::CharFormat;
12use crate::uuid::Uuid;
13
14#[allow(unused_imports)]
15use crate::unit::Unit;
16
17/// HAP-defined ServiceType (generated). `Unknown` carries any non-HAP UUID.
18#[derive(Debug, Clone, PartialEq, Eq, Hash)]
19#[non_exhaustive]
20pub enum ServiceType {
21    /// HAP short type "3E".
22    AccessoryInformation,
23    /// HAP short type "40".
24    Fan,
25    /// HAP short type "41".
26    GarageDoorOpener,
27    /// HAP short type "43".
28    LightBulb,
29    /// HAP short type "44".
30    LockManagement,
31    /// HAP short type "45".
32    LockMechanism,
33    /// HAP short type "47".
34    Outlet,
35    /// HAP short type "49".
36    Switch,
37    /// HAP short type "4A".
38    Thermostat,
39    /// HAP short type "7E".
40    SecuritySystem,
41    /// HAP short type "7F".
42    CarbonMonoxideSensor,
43    /// HAP short type "80".
44    ContactSensor,
45    /// HAP short type "81".
46    Door,
47    /// HAP short type "82".
48    HumiditySensor,
49    /// HAP short type "83".
50    LeakSensor,
51    /// HAP short type "84".
52    LightSensor,
53    /// HAP short type "85".
54    MotionSensor,
55    /// HAP short type "86".
56    OccupancySensor,
57    /// HAP short type "87".
58    SmokeSensor,
59    /// HAP short type "89".
60    StatelessProgrammableSwitch,
61    /// HAP short type "8A".
62    TemperatureSensor,
63    /// HAP short type "8B".
64    Window,
65    /// HAP short type "8C".
66    WindowCovering,
67    /// HAP short type "8D".
68    AirQualitySensor,
69    /// HAP short type "96".
70    Battery,
71    /// HAP short type "97".
72    CarbonDioxideSensor,
73    /// HAP short type "A2".
74    ProtocolInformation,
75    /// HAP short type "B7".
76    FanV2,
77    /// HAP short type "B9".
78    Slat,
79    /// HAP short type "BA".
80    FilterMaintenance,
81    /// HAP short type "BB".
82    AirPurifier,
83    /// HAP short type "BC".
84    HeaterCooler,
85    /// HAP short type "BD".
86    HumidifierDehumidifier,
87    /// HAP short type "CC".
88    ServiceLabel,
89    /// HAP short type "CF".
90    IrrigationSystem,
91    /// HAP short type "D0".
92    Valve,
93    /// HAP short type "D7".
94    Faucet,
95    /// HAP short type "110".
96    CameraRtpStreamManagement,
97    /// HAP short type "112".
98    Microphone,
99    /// HAP short type "113".
100    Speaker,
101    /// HAP short type "121".
102    Doorbell,
103    /// A type not in the generated table.
104    Unknown(Uuid),
105}
106
107impl ServiceType {
108    /// Map a parsed [`Uuid`] to its named variant, or `Unknown`.
109    pub fn from_uuid(u: &Uuid) -> Self {
110        match u.as_full() {
111            "0000003e-0000-1000-8000-0026bb765291" => Self::AccessoryInformation,
112            "00000040-0000-1000-8000-0026bb765291" => Self::Fan,
113            "00000041-0000-1000-8000-0026bb765291" => Self::GarageDoorOpener,
114            "00000043-0000-1000-8000-0026bb765291" => Self::LightBulb,
115            "00000044-0000-1000-8000-0026bb765291" => Self::LockManagement,
116            "00000045-0000-1000-8000-0026bb765291" => Self::LockMechanism,
117            "00000047-0000-1000-8000-0026bb765291" => Self::Outlet,
118            "00000049-0000-1000-8000-0026bb765291" => Self::Switch,
119            "0000004a-0000-1000-8000-0026bb765291" => Self::Thermostat,
120            "0000007e-0000-1000-8000-0026bb765291" => Self::SecuritySystem,
121            "0000007f-0000-1000-8000-0026bb765291" => Self::CarbonMonoxideSensor,
122            "00000080-0000-1000-8000-0026bb765291" => Self::ContactSensor,
123            "00000081-0000-1000-8000-0026bb765291" => Self::Door,
124            "00000082-0000-1000-8000-0026bb765291" => Self::HumiditySensor,
125            "00000083-0000-1000-8000-0026bb765291" => Self::LeakSensor,
126            "00000084-0000-1000-8000-0026bb765291" => Self::LightSensor,
127            "00000085-0000-1000-8000-0026bb765291" => Self::MotionSensor,
128            "00000086-0000-1000-8000-0026bb765291" => Self::OccupancySensor,
129            "00000087-0000-1000-8000-0026bb765291" => Self::SmokeSensor,
130            "00000089-0000-1000-8000-0026bb765291" => Self::StatelessProgrammableSwitch,
131            "0000008a-0000-1000-8000-0026bb765291" => Self::TemperatureSensor,
132            "0000008b-0000-1000-8000-0026bb765291" => Self::Window,
133            "0000008c-0000-1000-8000-0026bb765291" => Self::WindowCovering,
134            "0000008d-0000-1000-8000-0026bb765291" => Self::AirQualitySensor,
135            "00000096-0000-1000-8000-0026bb765291" => Self::Battery,
136            "00000097-0000-1000-8000-0026bb765291" => Self::CarbonDioxideSensor,
137            "000000a2-0000-1000-8000-0026bb765291" => Self::ProtocolInformation,
138            "000000b7-0000-1000-8000-0026bb765291" => Self::FanV2,
139            "000000b9-0000-1000-8000-0026bb765291" => Self::Slat,
140            "000000ba-0000-1000-8000-0026bb765291" => Self::FilterMaintenance,
141            "000000bb-0000-1000-8000-0026bb765291" => Self::AirPurifier,
142            "000000bc-0000-1000-8000-0026bb765291" => Self::HeaterCooler,
143            "000000bd-0000-1000-8000-0026bb765291" => Self::HumidifierDehumidifier,
144            "000000cc-0000-1000-8000-0026bb765291" => Self::ServiceLabel,
145            "000000cf-0000-1000-8000-0026bb765291" => Self::IrrigationSystem,
146            "000000d0-0000-1000-8000-0026bb765291" => Self::Valve,
147            "000000d7-0000-1000-8000-0026bb765291" => Self::Faucet,
148            "00000110-0000-1000-8000-0026bb765291" => Self::CameraRtpStreamManagement,
149            "00000112-0000-1000-8000-0026bb765291" => Self::Microphone,
150            "00000113-0000-1000-8000-0026bb765291" => Self::Speaker,
151            "00000121-0000-1000-8000-0026bb765291" => Self::Doorbell,
152            _ => Self::Unknown(u.clone()),
153        }
154    }
155
156    /// The canonical [`Uuid`] for this type.
157    pub fn uuid(&self) -> Uuid {
158        match self {
159            Self::AccessoryInformation => {
160                Uuid::from_full_unchecked("0000003e-0000-1000-8000-0026bb765291".to_string())
161            }
162            Self::Fan => {
163                Uuid::from_full_unchecked("00000040-0000-1000-8000-0026bb765291".to_string())
164            }
165            Self::GarageDoorOpener => {
166                Uuid::from_full_unchecked("00000041-0000-1000-8000-0026bb765291".to_string())
167            }
168            Self::LightBulb => {
169                Uuid::from_full_unchecked("00000043-0000-1000-8000-0026bb765291".to_string())
170            }
171            Self::LockManagement => {
172                Uuid::from_full_unchecked("00000044-0000-1000-8000-0026bb765291".to_string())
173            }
174            Self::LockMechanism => {
175                Uuid::from_full_unchecked("00000045-0000-1000-8000-0026bb765291".to_string())
176            }
177            Self::Outlet => {
178                Uuid::from_full_unchecked("00000047-0000-1000-8000-0026bb765291".to_string())
179            }
180            Self::Switch => {
181                Uuid::from_full_unchecked("00000049-0000-1000-8000-0026bb765291".to_string())
182            }
183            Self::Thermostat => {
184                Uuid::from_full_unchecked("0000004a-0000-1000-8000-0026bb765291".to_string())
185            }
186            Self::SecuritySystem => {
187                Uuid::from_full_unchecked("0000007e-0000-1000-8000-0026bb765291".to_string())
188            }
189            Self::CarbonMonoxideSensor => {
190                Uuid::from_full_unchecked("0000007f-0000-1000-8000-0026bb765291".to_string())
191            }
192            Self::ContactSensor => {
193                Uuid::from_full_unchecked("00000080-0000-1000-8000-0026bb765291".to_string())
194            }
195            Self::Door => {
196                Uuid::from_full_unchecked("00000081-0000-1000-8000-0026bb765291".to_string())
197            }
198            Self::HumiditySensor => {
199                Uuid::from_full_unchecked("00000082-0000-1000-8000-0026bb765291".to_string())
200            }
201            Self::LeakSensor => {
202                Uuid::from_full_unchecked("00000083-0000-1000-8000-0026bb765291".to_string())
203            }
204            Self::LightSensor => {
205                Uuid::from_full_unchecked("00000084-0000-1000-8000-0026bb765291".to_string())
206            }
207            Self::MotionSensor => {
208                Uuid::from_full_unchecked("00000085-0000-1000-8000-0026bb765291".to_string())
209            }
210            Self::OccupancySensor => {
211                Uuid::from_full_unchecked("00000086-0000-1000-8000-0026bb765291".to_string())
212            }
213            Self::SmokeSensor => {
214                Uuid::from_full_unchecked("00000087-0000-1000-8000-0026bb765291".to_string())
215            }
216            Self::StatelessProgrammableSwitch => {
217                Uuid::from_full_unchecked("00000089-0000-1000-8000-0026bb765291".to_string())
218            }
219            Self::TemperatureSensor => {
220                Uuid::from_full_unchecked("0000008a-0000-1000-8000-0026bb765291".to_string())
221            }
222            Self::Window => {
223                Uuid::from_full_unchecked("0000008b-0000-1000-8000-0026bb765291".to_string())
224            }
225            Self::WindowCovering => {
226                Uuid::from_full_unchecked("0000008c-0000-1000-8000-0026bb765291".to_string())
227            }
228            Self::AirQualitySensor => {
229                Uuid::from_full_unchecked("0000008d-0000-1000-8000-0026bb765291".to_string())
230            }
231            Self::Battery => {
232                Uuid::from_full_unchecked("00000096-0000-1000-8000-0026bb765291".to_string())
233            }
234            Self::CarbonDioxideSensor => {
235                Uuid::from_full_unchecked("00000097-0000-1000-8000-0026bb765291".to_string())
236            }
237            Self::ProtocolInformation => {
238                Uuid::from_full_unchecked("000000a2-0000-1000-8000-0026bb765291".to_string())
239            }
240            Self::FanV2 => {
241                Uuid::from_full_unchecked("000000b7-0000-1000-8000-0026bb765291".to_string())
242            }
243            Self::Slat => {
244                Uuid::from_full_unchecked("000000b9-0000-1000-8000-0026bb765291".to_string())
245            }
246            Self::FilterMaintenance => {
247                Uuid::from_full_unchecked("000000ba-0000-1000-8000-0026bb765291".to_string())
248            }
249            Self::AirPurifier => {
250                Uuid::from_full_unchecked("000000bb-0000-1000-8000-0026bb765291".to_string())
251            }
252            Self::HeaterCooler => {
253                Uuid::from_full_unchecked("000000bc-0000-1000-8000-0026bb765291".to_string())
254            }
255            Self::HumidifierDehumidifier => {
256                Uuid::from_full_unchecked("000000bd-0000-1000-8000-0026bb765291".to_string())
257            }
258            Self::ServiceLabel => {
259                Uuid::from_full_unchecked("000000cc-0000-1000-8000-0026bb765291".to_string())
260            }
261            Self::IrrigationSystem => {
262                Uuid::from_full_unchecked("000000cf-0000-1000-8000-0026bb765291".to_string())
263            }
264            Self::Valve => {
265                Uuid::from_full_unchecked("000000d0-0000-1000-8000-0026bb765291".to_string())
266            }
267            Self::Faucet => {
268                Uuid::from_full_unchecked("000000d7-0000-1000-8000-0026bb765291".to_string())
269            }
270            Self::CameraRtpStreamManagement => {
271                Uuid::from_full_unchecked("00000110-0000-1000-8000-0026bb765291".to_string())
272            }
273            Self::Microphone => {
274                Uuid::from_full_unchecked("00000112-0000-1000-8000-0026bb765291".to_string())
275            }
276            Self::Speaker => {
277                Uuid::from_full_unchecked("00000113-0000-1000-8000-0026bb765291".to_string())
278            }
279            Self::Doorbell => {
280                Uuid::from_full_unchecked("00000121-0000-1000-8000-0026bb765291".to_string())
281            }
282            Self::Unknown(u) => u.clone(),
283        }
284    }
285}
286
287/// HAP-defined CharacteristicType (generated). `Unknown` carries any non-HAP UUID.
288#[derive(Debug, Clone, PartialEq, Eq, Hash)]
289#[non_exhaustive]
290pub enum CharacteristicType {
291    /// HAP short type "1".
292    AdministratorOnlyAccess,
293    /// HAP short type "5".
294    AudioFeedback,
295    /// HAP short type "8".
296    Brightness,
297    /// HAP short type "D".
298    CoolingThresholdTemperature,
299    /// HAP short type "E".
300    CurrentDoorState,
301    /// HAP short type "F".
302    CurrentHeatingCoolingState,
303    /// HAP short type "10".
304    CurrentRelativeHumidity,
305    /// HAP short type "11".
306    CurrentTemperature,
307    /// HAP short type "12".
308    HeatingThresholdTemperature,
309    /// HAP short type "13".
310    Hue,
311    /// HAP short type "14".
312    Identify,
313    /// HAP short type "19".
314    LockControlPoint,
315    /// HAP short type "1A".
316    LockManagementAutoSecurityTimeout,
317    /// HAP short type "1C".
318    LockLastKnownAction,
319    /// HAP short type "1D".
320    LockCurrentState,
321    /// HAP short type "1E".
322    LockTargetState,
323    /// HAP short type "1F".
324    Logs,
325    /// HAP short type "20".
326    Manufacturer,
327    /// HAP short type "21".
328    Model,
329    /// HAP short type "22".
330    MotionDetected,
331    /// HAP short type "23".
332    Name,
333    /// HAP short type "24".
334    ObstructionDetected,
335    /// HAP short type "25".
336    On,
337    /// HAP short type "26".
338    OutletInUse,
339    /// HAP short type "28".
340    RotationDirection,
341    /// HAP short type "29".
342    RotationSpeed,
343    /// HAP short type "2F".
344    Saturation,
345    /// HAP short type "30".
346    SerialNumber,
347    /// HAP short type "32".
348    TargetDoorState,
349    /// HAP short type "33".
350    TargetHeatingCoolingState,
351    /// HAP short type "34".
352    TargetRelativeHumidity,
353    /// HAP short type "35".
354    TargetTemperature,
355    /// HAP short type "36".
356    TemperatureDisplayUnits,
357    /// HAP short type "37".
358    Version,
359    /// HAP short type "4C".
360    PairSetup,
361    /// HAP short type "4E".
362    PairVerify,
363    /// HAP short type "4F".
364    PairingFeatures,
365    /// HAP short type "50".
366    PairingPairings,
367    /// HAP short type "52".
368    FirmwareRevision,
369    /// HAP short type "53".
370    HardwareRevision,
371    /// HAP short type "64".
372    AirParticulateDensity,
373    /// HAP short type "65".
374    AirParticulateSize,
375    /// HAP short type "66".
376    SecuritySystemCurrentState,
377    /// HAP short type "67".
378    SecuritySystemTargetState,
379    /// HAP short type "68".
380    BatteryLevel,
381    /// HAP short type "69".
382    CarbonMonoxideDetected,
383    /// HAP short type "6A".
384    ContactSensorState,
385    /// HAP short type "6B".
386    CurrentAmbientLightLevel,
387    /// HAP short type "6C".
388    CurrentHorizontalTiltAngle,
389    /// HAP short type "6D".
390    CurrentPosition,
391    /// HAP short type "6E".
392    CurrentVerticalTiltAngle,
393    /// HAP short type "6F".
394    HoldPosition,
395    /// HAP short type "70".
396    LeakDetected,
397    /// HAP short type "71".
398    OccupancyDetected,
399    /// HAP short type "72".
400    PositionState,
401    /// HAP short type "73".
402    ProgrammableSwitchEvent,
403    /// HAP short type "75".
404    StatusActive,
405    /// HAP short type "76".
406    SmokeDetected,
407    /// HAP short type "77".
408    StatusFault,
409    /// HAP short type "78".
410    StatusJammed,
411    /// HAP short type "79".
412    StatusLowBattery,
413    /// HAP short type "7A".
414    StatusTampered,
415    /// HAP short type "7B".
416    TargetHorizontalTiltAngle,
417    /// HAP short type "7C".
418    TargetPosition,
419    /// HAP short type "7D".
420    TargetVerticalTiltAngle,
421    /// HAP short type "8E".
422    SecuritySystemAlarmType,
423    /// HAP short type "8F".
424    ChargingState,
425    /// HAP short type "90".
426    CarbonMonoxideLevel,
427    /// HAP short type "91".
428    CarbonMonoxidePeakLevel,
429    /// HAP short type "92".
430    CarbonDioxideDetected,
431    /// HAP short type "93".
432    CarbonDioxideLevel,
433    /// HAP short type "94".
434    CarbonDioxidePeakLevel,
435    /// HAP short type "95".
436    AirQuality,
437    /// HAP short type "A6".
438    AccessoryFlags,
439    /// HAP short type "A7".
440    LockPhysicalControls,
441    /// HAP short type "A8".
442    TargetAirPurifierState,
443    /// HAP short type "A9".
444    CurrentAirPurifierState,
445    /// HAP short type "AA".
446    CurrentSlatState,
447    /// HAP short type "AB".
448    FilterLifeLevel,
449    /// HAP short type "AC".
450    FilterChangeIndication,
451    /// HAP short type "AD".
452    ResetFilterIndication,
453    /// HAP short type "AE".
454    TargetAirQuality,
455    /// HAP short type "AF".
456    CurrentFanState,
457    /// HAP short type "B0".
458    Active,
459    /// HAP short type "B1".
460    CurrentHeaterCoolerState,
461    /// HAP short type "B2".
462    TargetHeaterCoolerState,
463    /// HAP short type "B3".
464    CurrentHumidifierDehumidifierState,
465    /// HAP short type "B4".
466    TargetHumidifierDehumidifierState,
467    /// HAP short type "B5".
468    WaterLevel,
469    /// HAP short type "B6".
470    SwingMode,
471    /// HAP short type "BE".
472    TargetSlatState,
473    /// HAP short type "BF".
474    TargetFanState,
475    /// HAP short type "C0".
476    SlatType,
477    /// HAP short type "C1".
478    CurrentTiltAngle,
479    /// HAP short type "C2".
480    TargetTiltAngle,
481    /// HAP short type "C3".
482    OzoneDensity,
483    /// HAP short type "C4".
484    NitrogenDioxideDensity,
485    /// HAP short type "C5".
486    SulphurDioxideDensity,
487    /// HAP short type "C6".
488    Pm25Density,
489    /// HAP short type "C7".
490    Pm10Density,
491    /// HAP short type "C8".
492    VocDensity,
493    /// HAP short type "C9".
494    RelativeHumidityDehumidifierThreshold,
495    /// HAP short type "CA".
496    RelativeHumidityHumidifierThreshold,
497    /// HAP short type "CB".
498    ServiceLabelIndex,
499    /// HAP short type "CD".
500    ServiceLabelNamespace,
501    /// HAP short type "CE".
502    ColorTemperature,
503    /// HAP short type "D1".
504    ProgramMode,
505    /// HAP short type "D2".
506    InUse,
507    /// HAP short type "D3".
508    SetDuration,
509    /// HAP short type "D4".
510    RemainingDuration,
511    /// HAP short type "D5".
512    ValveType,
513    /// HAP short type "D6".
514    IsConfigured,
515    /// HAP short type "114".
516    SupportedVideoStreamConfiguration,
517    /// HAP short type "115".
518    SupportedAudioStreamConfiguration,
519    /// HAP short type "116".
520    SupportedRtpConfiguration,
521    /// HAP short type "117".
522    SelectedRtpStreamConfiguration,
523    /// HAP short type "118".
524    SetupEndpoints,
525    /// HAP short type "119".
526    Volume,
527    /// HAP short type "11A".
528    Mute,
529    /// HAP short type "11B".
530    NightVision,
531    /// HAP short type "11C".
532    OpticalZoom,
533    /// HAP short type "11D".
534    DigitalZoom,
535    /// HAP short type "11E".
536    ImageRotation,
537    /// HAP short type "11F".
538    ImageMirroring,
539    /// HAP short type "120".
540    StreamingStatus,
541    /// HAP short type "702".
542    ThreadNodeCapabilities,
543    /// HAP short type "703".
544    ThreadStatus,
545    /// A type not in the generated table.
546    Unknown(Uuid),
547}
548
549impl CharacteristicType {
550    /// Map a parsed [`Uuid`] to its named variant, or `Unknown`.
551    pub fn from_uuid(u: &Uuid) -> Self {
552        match u.as_full() {
553            "00000001-0000-1000-8000-0026bb765291" => Self::AdministratorOnlyAccess,
554            "00000005-0000-1000-8000-0026bb765291" => Self::AudioFeedback,
555            "00000008-0000-1000-8000-0026bb765291" => Self::Brightness,
556            "0000000d-0000-1000-8000-0026bb765291" => Self::CoolingThresholdTemperature,
557            "0000000e-0000-1000-8000-0026bb765291" => Self::CurrentDoorState,
558            "0000000f-0000-1000-8000-0026bb765291" => Self::CurrentHeatingCoolingState,
559            "00000010-0000-1000-8000-0026bb765291" => Self::CurrentRelativeHumidity,
560            "00000011-0000-1000-8000-0026bb765291" => Self::CurrentTemperature,
561            "00000012-0000-1000-8000-0026bb765291" => Self::HeatingThresholdTemperature,
562            "00000013-0000-1000-8000-0026bb765291" => Self::Hue,
563            "00000014-0000-1000-8000-0026bb765291" => Self::Identify,
564            "00000019-0000-1000-8000-0026bb765291" => Self::LockControlPoint,
565            "0000001a-0000-1000-8000-0026bb765291" => Self::LockManagementAutoSecurityTimeout,
566            "0000001c-0000-1000-8000-0026bb765291" => Self::LockLastKnownAction,
567            "0000001d-0000-1000-8000-0026bb765291" => Self::LockCurrentState,
568            "0000001e-0000-1000-8000-0026bb765291" => Self::LockTargetState,
569            "0000001f-0000-1000-8000-0026bb765291" => Self::Logs,
570            "00000020-0000-1000-8000-0026bb765291" => Self::Manufacturer,
571            "00000021-0000-1000-8000-0026bb765291" => Self::Model,
572            "00000022-0000-1000-8000-0026bb765291" => Self::MotionDetected,
573            "00000023-0000-1000-8000-0026bb765291" => Self::Name,
574            "00000024-0000-1000-8000-0026bb765291" => Self::ObstructionDetected,
575            "00000025-0000-1000-8000-0026bb765291" => Self::On,
576            "00000026-0000-1000-8000-0026bb765291" => Self::OutletInUse,
577            "00000028-0000-1000-8000-0026bb765291" => Self::RotationDirection,
578            "00000029-0000-1000-8000-0026bb765291" => Self::RotationSpeed,
579            "0000002f-0000-1000-8000-0026bb765291" => Self::Saturation,
580            "00000030-0000-1000-8000-0026bb765291" => Self::SerialNumber,
581            "00000032-0000-1000-8000-0026bb765291" => Self::TargetDoorState,
582            "00000033-0000-1000-8000-0026bb765291" => Self::TargetHeatingCoolingState,
583            "00000034-0000-1000-8000-0026bb765291" => Self::TargetRelativeHumidity,
584            "00000035-0000-1000-8000-0026bb765291" => Self::TargetTemperature,
585            "00000036-0000-1000-8000-0026bb765291" => Self::TemperatureDisplayUnits,
586            "00000037-0000-1000-8000-0026bb765291" => Self::Version,
587            "0000004c-0000-1000-8000-0026bb765291" => Self::PairSetup,
588            "0000004e-0000-1000-8000-0026bb765291" => Self::PairVerify,
589            "0000004f-0000-1000-8000-0026bb765291" => Self::PairingFeatures,
590            "00000050-0000-1000-8000-0026bb765291" => Self::PairingPairings,
591            "00000052-0000-1000-8000-0026bb765291" => Self::FirmwareRevision,
592            "00000053-0000-1000-8000-0026bb765291" => Self::HardwareRevision,
593            "00000064-0000-1000-8000-0026bb765291" => Self::AirParticulateDensity,
594            "00000065-0000-1000-8000-0026bb765291" => Self::AirParticulateSize,
595            "00000066-0000-1000-8000-0026bb765291" => Self::SecuritySystemCurrentState,
596            "00000067-0000-1000-8000-0026bb765291" => Self::SecuritySystemTargetState,
597            "00000068-0000-1000-8000-0026bb765291" => Self::BatteryLevel,
598            "00000069-0000-1000-8000-0026bb765291" => Self::CarbonMonoxideDetected,
599            "0000006a-0000-1000-8000-0026bb765291" => Self::ContactSensorState,
600            "0000006b-0000-1000-8000-0026bb765291" => Self::CurrentAmbientLightLevel,
601            "0000006c-0000-1000-8000-0026bb765291" => Self::CurrentHorizontalTiltAngle,
602            "0000006d-0000-1000-8000-0026bb765291" => Self::CurrentPosition,
603            "0000006e-0000-1000-8000-0026bb765291" => Self::CurrentVerticalTiltAngle,
604            "0000006f-0000-1000-8000-0026bb765291" => Self::HoldPosition,
605            "00000070-0000-1000-8000-0026bb765291" => Self::LeakDetected,
606            "00000071-0000-1000-8000-0026bb765291" => Self::OccupancyDetected,
607            "00000072-0000-1000-8000-0026bb765291" => Self::PositionState,
608            "00000073-0000-1000-8000-0026bb765291" => Self::ProgrammableSwitchEvent,
609            "00000075-0000-1000-8000-0026bb765291" => Self::StatusActive,
610            "00000076-0000-1000-8000-0026bb765291" => Self::SmokeDetected,
611            "00000077-0000-1000-8000-0026bb765291" => Self::StatusFault,
612            "00000078-0000-1000-8000-0026bb765291" => Self::StatusJammed,
613            "00000079-0000-1000-8000-0026bb765291" => Self::StatusLowBattery,
614            "0000007a-0000-1000-8000-0026bb765291" => Self::StatusTampered,
615            "0000007b-0000-1000-8000-0026bb765291" => Self::TargetHorizontalTiltAngle,
616            "0000007c-0000-1000-8000-0026bb765291" => Self::TargetPosition,
617            "0000007d-0000-1000-8000-0026bb765291" => Self::TargetVerticalTiltAngle,
618            "0000008e-0000-1000-8000-0026bb765291" => Self::SecuritySystemAlarmType,
619            "0000008f-0000-1000-8000-0026bb765291" => Self::ChargingState,
620            "00000090-0000-1000-8000-0026bb765291" => Self::CarbonMonoxideLevel,
621            "00000091-0000-1000-8000-0026bb765291" => Self::CarbonMonoxidePeakLevel,
622            "00000092-0000-1000-8000-0026bb765291" => Self::CarbonDioxideDetected,
623            "00000093-0000-1000-8000-0026bb765291" => Self::CarbonDioxideLevel,
624            "00000094-0000-1000-8000-0026bb765291" => Self::CarbonDioxidePeakLevel,
625            "00000095-0000-1000-8000-0026bb765291" => Self::AirQuality,
626            "000000a6-0000-1000-8000-0026bb765291" => Self::AccessoryFlags,
627            "000000a7-0000-1000-8000-0026bb765291" => Self::LockPhysicalControls,
628            "000000a8-0000-1000-8000-0026bb765291" => Self::TargetAirPurifierState,
629            "000000a9-0000-1000-8000-0026bb765291" => Self::CurrentAirPurifierState,
630            "000000aa-0000-1000-8000-0026bb765291" => Self::CurrentSlatState,
631            "000000ab-0000-1000-8000-0026bb765291" => Self::FilterLifeLevel,
632            "000000ac-0000-1000-8000-0026bb765291" => Self::FilterChangeIndication,
633            "000000ad-0000-1000-8000-0026bb765291" => Self::ResetFilterIndication,
634            "000000ae-0000-1000-8000-0026bb765291" => Self::TargetAirQuality,
635            "000000af-0000-1000-8000-0026bb765291" => Self::CurrentFanState,
636            "000000b0-0000-1000-8000-0026bb765291" => Self::Active,
637            "000000b1-0000-1000-8000-0026bb765291" => Self::CurrentHeaterCoolerState,
638            "000000b2-0000-1000-8000-0026bb765291" => Self::TargetHeaterCoolerState,
639            "000000b3-0000-1000-8000-0026bb765291" => Self::CurrentHumidifierDehumidifierState,
640            "000000b4-0000-1000-8000-0026bb765291" => Self::TargetHumidifierDehumidifierState,
641            "000000b5-0000-1000-8000-0026bb765291" => Self::WaterLevel,
642            "000000b6-0000-1000-8000-0026bb765291" => Self::SwingMode,
643            "000000be-0000-1000-8000-0026bb765291" => Self::TargetSlatState,
644            "000000bf-0000-1000-8000-0026bb765291" => Self::TargetFanState,
645            "000000c0-0000-1000-8000-0026bb765291" => Self::SlatType,
646            "000000c1-0000-1000-8000-0026bb765291" => Self::CurrentTiltAngle,
647            "000000c2-0000-1000-8000-0026bb765291" => Self::TargetTiltAngle,
648            "000000c3-0000-1000-8000-0026bb765291" => Self::OzoneDensity,
649            "000000c4-0000-1000-8000-0026bb765291" => Self::NitrogenDioxideDensity,
650            "000000c5-0000-1000-8000-0026bb765291" => Self::SulphurDioxideDensity,
651            "000000c6-0000-1000-8000-0026bb765291" => Self::Pm25Density,
652            "000000c7-0000-1000-8000-0026bb765291" => Self::Pm10Density,
653            "000000c8-0000-1000-8000-0026bb765291" => Self::VocDensity,
654            "000000c9-0000-1000-8000-0026bb765291" => Self::RelativeHumidityDehumidifierThreshold,
655            "000000ca-0000-1000-8000-0026bb765291" => Self::RelativeHumidityHumidifierThreshold,
656            "000000cb-0000-1000-8000-0026bb765291" => Self::ServiceLabelIndex,
657            "000000cd-0000-1000-8000-0026bb765291" => Self::ServiceLabelNamespace,
658            "000000ce-0000-1000-8000-0026bb765291" => Self::ColorTemperature,
659            "000000d1-0000-1000-8000-0026bb765291" => Self::ProgramMode,
660            "000000d2-0000-1000-8000-0026bb765291" => Self::InUse,
661            "000000d3-0000-1000-8000-0026bb765291" => Self::SetDuration,
662            "000000d4-0000-1000-8000-0026bb765291" => Self::RemainingDuration,
663            "000000d5-0000-1000-8000-0026bb765291" => Self::ValveType,
664            "000000d6-0000-1000-8000-0026bb765291" => Self::IsConfigured,
665            "00000114-0000-1000-8000-0026bb765291" => Self::SupportedVideoStreamConfiguration,
666            "00000115-0000-1000-8000-0026bb765291" => Self::SupportedAudioStreamConfiguration,
667            "00000116-0000-1000-8000-0026bb765291" => Self::SupportedRtpConfiguration,
668            "00000117-0000-1000-8000-0026bb765291" => Self::SelectedRtpStreamConfiguration,
669            "00000118-0000-1000-8000-0026bb765291" => Self::SetupEndpoints,
670            "00000119-0000-1000-8000-0026bb765291" => Self::Volume,
671            "0000011a-0000-1000-8000-0026bb765291" => Self::Mute,
672            "0000011b-0000-1000-8000-0026bb765291" => Self::NightVision,
673            "0000011c-0000-1000-8000-0026bb765291" => Self::OpticalZoom,
674            "0000011d-0000-1000-8000-0026bb765291" => Self::DigitalZoom,
675            "0000011e-0000-1000-8000-0026bb765291" => Self::ImageRotation,
676            "0000011f-0000-1000-8000-0026bb765291" => Self::ImageMirroring,
677            "00000120-0000-1000-8000-0026bb765291" => Self::StreamingStatus,
678            "00000702-0000-1000-8000-0026bb765291" => Self::ThreadNodeCapabilities,
679            "00000703-0000-1000-8000-0026bb765291" => Self::ThreadStatus,
680            _ => Self::Unknown(u.clone()),
681        }
682    }
683
684    /// The canonical [`Uuid`] for this type.
685    pub fn uuid(&self) -> Uuid {
686        match self {
687            Self::AdministratorOnlyAccess => {
688                Uuid::from_full_unchecked("00000001-0000-1000-8000-0026bb765291".to_string())
689            }
690            Self::AudioFeedback => {
691                Uuid::from_full_unchecked("00000005-0000-1000-8000-0026bb765291".to_string())
692            }
693            Self::Brightness => {
694                Uuid::from_full_unchecked("00000008-0000-1000-8000-0026bb765291".to_string())
695            }
696            Self::CoolingThresholdTemperature => {
697                Uuid::from_full_unchecked("0000000d-0000-1000-8000-0026bb765291".to_string())
698            }
699            Self::CurrentDoorState => {
700                Uuid::from_full_unchecked("0000000e-0000-1000-8000-0026bb765291".to_string())
701            }
702            Self::CurrentHeatingCoolingState => {
703                Uuid::from_full_unchecked("0000000f-0000-1000-8000-0026bb765291".to_string())
704            }
705            Self::CurrentRelativeHumidity => {
706                Uuid::from_full_unchecked("00000010-0000-1000-8000-0026bb765291".to_string())
707            }
708            Self::CurrentTemperature => {
709                Uuid::from_full_unchecked("00000011-0000-1000-8000-0026bb765291".to_string())
710            }
711            Self::HeatingThresholdTemperature => {
712                Uuid::from_full_unchecked("00000012-0000-1000-8000-0026bb765291".to_string())
713            }
714            Self::Hue => {
715                Uuid::from_full_unchecked("00000013-0000-1000-8000-0026bb765291".to_string())
716            }
717            Self::Identify => {
718                Uuid::from_full_unchecked("00000014-0000-1000-8000-0026bb765291".to_string())
719            }
720            Self::LockControlPoint => {
721                Uuid::from_full_unchecked("00000019-0000-1000-8000-0026bb765291".to_string())
722            }
723            Self::LockManagementAutoSecurityTimeout => {
724                Uuid::from_full_unchecked("0000001a-0000-1000-8000-0026bb765291".to_string())
725            }
726            Self::LockLastKnownAction => {
727                Uuid::from_full_unchecked("0000001c-0000-1000-8000-0026bb765291".to_string())
728            }
729            Self::LockCurrentState => {
730                Uuid::from_full_unchecked("0000001d-0000-1000-8000-0026bb765291".to_string())
731            }
732            Self::LockTargetState => {
733                Uuid::from_full_unchecked("0000001e-0000-1000-8000-0026bb765291".to_string())
734            }
735            Self::Logs => {
736                Uuid::from_full_unchecked("0000001f-0000-1000-8000-0026bb765291".to_string())
737            }
738            Self::Manufacturer => {
739                Uuid::from_full_unchecked("00000020-0000-1000-8000-0026bb765291".to_string())
740            }
741            Self::Model => {
742                Uuid::from_full_unchecked("00000021-0000-1000-8000-0026bb765291".to_string())
743            }
744            Self::MotionDetected => {
745                Uuid::from_full_unchecked("00000022-0000-1000-8000-0026bb765291".to_string())
746            }
747            Self::Name => {
748                Uuid::from_full_unchecked("00000023-0000-1000-8000-0026bb765291".to_string())
749            }
750            Self::ObstructionDetected => {
751                Uuid::from_full_unchecked("00000024-0000-1000-8000-0026bb765291".to_string())
752            }
753            Self::On => {
754                Uuid::from_full_unchecked("00000025-0000-1000-8000-0026bb765291".to_string())
755            }
756            Self::OutletInUse => {
757                Uuid::from_full_unchecked("00000026-0000-1000-8000-0026bb765291".to_string())
758            }
759            Self::RotationDirection => {
760                Uuid::from_full_unchecked("00000028-0000-1000-8000-0026bb765291".to_string())
761            }
762            Self::RotationSpeed => {
763                Uuid::from_full_unchecked("00000029-0000-1000-8000-0026bb765291".to_string())
764            }
765            Self::Saturation => {
766                Uuid::from_full_unchecked("0000002f-0000-1000-8000-0026bb765291".to_string())
767            }
768            Self::SerialNumber => {
769                Uuid::from_full_unchecked("00000030-0000-1000-8000-0026bb765291".to_string())
770            }
771            Self::TargetDoorState => {
772                Uuid::from_full_unchecked("00000032-0000-1000-8000-0026bb765291".to_string())
773            }
774            Self::TargetHeatingCoolingState => {
775                Uuid::from_full_unchecked("00000033-0000-1000-8000-0026bb765291".to_string())
776            }
777            Self::TargetRelativeHumidity => {
778                Uuid::from_full_unchecked("00000034-0000-1000-8000-0026bb765291".to_string())
779            }
780            Self::TargetTemperature => {
781                Uuid::from_full_unchecked("00000035-0000-1000-8000-0026bb765291".to_string())
782            }
783            Self::TemperatureDisplayUnits => {
784                Uuid::from_full_unchecked("00000036-0000-1000-8000-0026bb765291".to_string())
785            }
786            Self::Version => {
787                Uuid::from_full_unchecked("00000037-0000-1000-8000-0026bb765291".to_string())
788            }
789            Self::PairSetup => {
790                Uuid::from_full_unchecked("0000004c-0000-1000-8000-0026bb765291".to_string())
791            }
792            Self::PairVerify => {
793                Uuid::from_full_unchecked("0000004e-0000-1000-8000-0026bb765291".to_string())
794            }
795            Self::PairingFeatures => {
796                Uuid::from_full_unchecked("0000004f-0000-1000-8000-0026bb765291".to_string())
797            }
798            Self::PairingPairings => {
799                Uuid::from_full_unchecked("00000050-0000-1000-8000-0026bb765291".to_string())
800            }
801            Self::FirmwareRevision => {
802                Uuid::from_full_unchecked("00000052-0000-1000-8000-0026bb765291".to_string())
803            }
804            Self::HardwareRevision => {
805                Uuid::from_full_unchecked("00000053-0000-1000-8000-0026bb765291".to_string())
806            }
807            Self::AirParticulateDensity => {
808                Uuid::from_full_unchecked("00000064-0000-1000-8000-0026bb765291".to_string())
809            }
810            Self::AirParticulateSize => {
811                Uuid::from_full_unchecked("00000065-0000-1000-8000-0026bb765291".to_string())
812            }
813            Self::SecuritySystemCurrentState => {
814                Uuid::from_full_unchecked("00000066-0000-1000-8000-0026bb765291".to_string())
815            }
816            Self::SecuritySystemTargetState => {
817                Uuid::from_full_unchecked("00000067-0000-1000-8000-0026bb765291".to_string())
818            }
819            Self::BatteryLevel => {
820                Uuid::from_full_unchecked("00000068-0000-1000-8000-0026bb765291".to_string())
821            }
822            Self::CarbonMonoxideDetected => {
823                Uuid::from_full_unchecked("00000069-0000-1000-8000-0026bb765291".to_string())
824            }
825            Self::ContactSensorState => {
826                Uuid::from_full_unchecked("0000006a-0000-1000-8000-0026bb765291".to_string())
827            }
828            Self::CurrentAmbientLightLevel => {
829                Uuid::from_full_unchecked("0000006b-0000-1000-8000-0026bb765291".to_string())
830            }
831            Self::CurrentHorizontalTiltAngle => {
832                Uuid::from_full_unchecked("0000006c-0000-1000-8000-0026bb765291".to_string())
833            }
834            Self::CurrentPosition => {
835                Uuid::from_full_unchecked("0000006d-0000-1000-8000-0026bb765291".to_string())
836            }
837            Self::CurrentVerticalTiltAngle => {
838                Uuid::from_full_unchecked("0000006e-0000-1000-8000-0026bb765291".to_string())
839            }
840            Self::HoldPosition => {
841                Uuid::from_full_unchecked("0000006f-0000-1000-8000-0026bb765291".to_string())
842            }
843            Self::LeakDetected => {
844                Uuid::from_full_unchecked("00000070-0000-1000-8000-0026bb765291".to_string())
845            }
846            Self::OccupancyDetected => {
847                Uuid::from_full_unchecked("00000071-0000-1000-8000-0026bb765291".to_string())
848            }
849            Self::PositionState => {
850                Uuid::from_full_unchecked("00000072-0000-1000-8000-0026bb765291".to_string())
851            }
852            Self::ProgrammableSwitchEvent => {
853                Uuid::from_full_unchecked("00000073-0000-1000-8000-0026bb765291".to_string())
854            }
855            Self::StatusActive => {
856                Uuid::from_full_unchecked("00000075-0000-1000-8000-0026bb765291".to_string())
857            }
858            Self::SmokeDetected => {
859                Uuid::from_full_unchecked("00000076-0000-1000-8000-0026bb765291".to_string())
860            }
861            Self::StatusFault => {
862                Uuid::from_full_unchecked("00000077-0000-1000-8000-0026bb765291".to_string())
863            }
864            Self::StatusJammed => {
865                Uuid::from_full_unchecked("00000078-0000-1000-8000-0026bb765291".to_string())
866            }
867            Self::StatusLowBattery => {
868                Uuid::from_full_unchecked("00000079-0000-1000-8000-0026bb765291".to_string())
869            }
870            Self::StatusTampered => {
871                Uuid::from_full_unchecked("0000007a-0000-1000-8000-0026bb765291".to_string())
872            }
873            Self::TargetHorizontalTiltAngle => {
874                Uuid::from_full_unchecked("0000007b-0000-1000-8000-0026bb765291".to_string())
875            }
876            Self::TargetPosition => {
877                Uuid::from_full_unchecked("0000007c-0000-1000-8000-0026bb765291".to_string())
878            }
879            Self::TargetVerticalTiltAngle => {
880                Uuid::from_full_unchecked("0000007d-0000-1000-8000-0026bb765291".to_string())
881            }
882            Self::SecuritySystemAlarmType => {
883                Uuid::from_full_unchecked("0000008e-0000-1000-8000-0026bb765291".to_string())
884            }
885            Self::ChargingState => {
886                Uuid::from_full_unchecked("0000008f-0000-1000-8000-0026bb765291".to_string())
887            }
888            Self::CarbonMonoxideLevel => {
889                Uuid::from_full_unchecked("00000090-0000-1000-8000-0026bb765291".to_string())
890            }
891            Self::CarbonMonoxidePeakLevel => {
892                Uuid::from_full_unchecked("00000091-0000-1000-8000-0026bb765291".to_string())
893            }
894            Self::CarbonDioxideDetected => {
895                Uuid::from_full_unchecked("00000092-0000-1000-8000-0026bb765291".to_string())
896            }
897            Self::CarbonDioxideLevel => {
898                Uuid::from_full_unchecked("00000093-0000-1000-8000-0026bb765291".to_string())
899            }
900            Self::CarbonDioxidePeakLevel => {
901                Uuid::from_full_unchecked("00000094-0000-1000-8000-0026bb765291".to_string())
902            }
903            Self::AirQuality => {
904                Uuid::from_full_unchecked("00000095-0000-1000-8000-0026bb765291".to_string())
905            }
906            Self::AccessoryFlags => {
907                Uuid::from_full_unchecked("000000a6-0000-1000-8000-0026bb765291".to_string())
908            }
909            Self::LockPhysicalControls => {
910                Uuid::from_full_unchecked("000000a7-0000-1000-8000-0026bb765291".to_string())
911            }
912            Self::TargetAirPurifierState => {
913                Uuid::from_full_unchecked("000000a8-0000-1000-8000-0026bb765291".to_string())
914            }
915            Self::CurrentAirPurifierState => {
916                Uuid::from_full_unchecked("000000a9-0000-1000-8000-0026bb765291".to_string())
917            }
918            Self::CurrentSlatState => {
919                Uuid::from_full_unchecked("000000aa-0000-1000-8000-0026bb765291".to_string())
920            }
921            Self::FilterLifeLevel => {
922                Uuid::from_full_unchecked("000000ab-0000-1000-8000-0026bb765291".to_string())
923            }
924            Self::FilterChangeIndication => {
925                Uuid::from_full_unchecked("000000ac-0000-1000-8000-0026bb765291".to_string())
926            }
927            Self::ResetFilterIndication => {
928                Uuid::from_full_unchecked("000000ad-0000-1000-8000-0026bb765291".to_string())
929            }
930            Self::TargetAirQuality => {
931                Uuid::from_full_unchecked("000000ae-0000-1000-8000-0026bb765291".to_string())
932            }
933            Self::CurrentFanState => {
934                Uuid::from_full_unchecked("000000af-0000-1000-8000-0026bb765291".to_string())
935            }
936            Self::Active => {
937                Uuid::from_full_unchecked("000000b0-0000-1000-8000-0026bb765291".to_string())
938            }
939            Self::CurrentHeaterCoolerState => {
940                Uuid::from_full_unchecked("000000b1-0000-1000-8000-0026bb765291".to_string())
941            }
942            Self::TargetHeaterCoolerState => {
943                Uuid::from_full_unchecked("000000b2-0000-1000-8000-0026bb765291".to_string())
944            }
945            Self::CurrentHumidifierDehumidifierState => {
946                Uuid::from_full_unchecked("000000b3-0000-1000-8000-0026bb765291".to_string())
947            }
948            Self::TargetHumidifierDehumidifierState => {
949                Uuid::from_full_unchecked("000000b4-0000-1000-8000-0026bb765291".to_string())
950            }
951            Self::WaterLevel => {
952                Uuid::from_full_unchecked("000000b5-0000-1000-8000-0026bb765291".to_string())
953            }
954            Self::SwingMode => {
955                Uuid::from_full_unchecked("000000b6-0000-1000-8000-0026bb765291".to_string())
956            }
957            Self::TargetSlatState => {
958                Uuid::from_full_unchecked("000000be-0000-1000-8000-0026bb765291".to_string())
959            }
960            Self::TargetFanState => {
961                Uuid::from_full_unchecked("000000bf-0000-1000-8000-0026bb765291".to_string())
962            }
963            Self::SlatType => {
964                Uuid::from_full_unchecked("000000c0-0000-1000-8000-0026bb765291".to_string())
965            }
966            Self::CurrentTiltAngle => {
967                Uuid::from_full_unchecked("000000c1-0000-1000-8000-0026bb765291".to_string())
968            }
969            Self::TargetTiltAngle => {
970                Uuid::from_full_unchecked("000000c2-0000-1000-8000-0026bb765291".to_string())
971            }
972            Self::OzoneDensity => {
973                Uuid::from_full_unchecked("000000c3-0000-1000-8000-0026bb765291".to_string())
974            }
975            Self::NitrogenDioxideDensity => {
976                Uuid::from_full_unchecked("000000c4-0000-1000-8000-0026bb765291".to_string())
977            }
978            Self::SulphurDioxideDensity => {
979                Uuid::from_full_unchecked("000000c5-0000-1000-8000-0026bb765291".to_string())
980            }
981            Self::Pm25Density => {
982                Uuid::from_full_unchecked("000000c6-0000-1000-8000-0026bb765291".to_string())
983            }
984            Self::Pm10Density => {
985                Uuid::from_full_unchecked("000000c7-0000-1000-8000-0026bb765291".to_string())
986            }
987            Self::VocDensity => {
988                Uuid::from_full_unchecked("000000c8-0000-1000-8000-0026bb765291".to_string())
989            }
990            Self::RelativeHumidityDehumidifierThreshold => {
991                Uuid::from_full_unchecked("000000c9-0000-1000-8000-0026bb765291".to_string())
992            }
993            Self::RelativeHumidityHumidifierThreshold => {
994                Uuid::from_full_unchecked("000000ca-0000-1000-8000-0026bb765291".to_string())
995            }
996            Self::ServiceLabelIndex => {
997                Uuid::from_full_unchecked("000000cb-0000-1000-8000-0026bb765291".to_string())
998            }
999            Self::ServiceLabelNamespace => {
1000                Uuid::from_full_unchecked("000000cd-0000-1000-8000-0026bb765291".to_string())
1001            }
1002            Self::ColorTemperature => {
1003                Uuid::from_full_unchecked("000000ce-0000-1000-8000-0026bb765291".to_string())
1004            }
1005            Self::ProgramMode => {
1006                Uuid::from_full_unchecked("000000d1-0000-1000-8000-0026bb765291".to_string())
1007            }
1008            Self::InUse => {
1009                Uuid::from_full_unchecked("000000d2-0000-1000-8000-0026bb765291".to_string())
1010            }
1011            Self::SetDuration => {
1012                Uuid::from_full_unchecked("000000d3-0000-1000-8000-0026bb765291".to_string())
1013            }
1014            Self::RemainingDuration => {
1015                Uuid::from_full_unchecked("000000d4-0000-1000-8000-0026bb765291".to_string())
1016            }
1017            Self::ValveType => {
1018                Uuid::from_full_unchecked("000000d5-0000-1000-8000-0026bb765291".to_string())
1019            }
1020            Self::IsConfigured => {
1021                Uuid::from_full_unchecked("000000d6-0000-1000-8000-0026bb765291".to_string())
1022            }
1023            Self::SupportedVideoStreamConfiguration => {
1024                Uuid::from_full_unchecked("00000114-0000-1000-8000-0026bb765291".to_string())
1025            }
1026            Self::SupportedAudioStreamConfiguration => {
1027                Uuid::from_full_unchecked("00000115-0000-1000-8000-0026bb765291".to_string())
1028            }
1029            Self::SupportedRtpConfiguration => {
1030                Uuid::from_full_unchecked("00000116-0000-1000-8000-0026bb765291".to_string())
1031            }
1032            Self::SelectedRtpStreamConfiguration => {
1033                Uuid::from_full_unchecked("00000117-0000-1000-8000-0026bb765291".to_string())
1034            }
1035            Self::SetupEndpoints => {
1036                Uuid::from_full_unchecked("00000118-0000-1000-8000-0026bb765291".to_string())
1037            }
1038            Self::Volume => {
1039                Uuid::from_full_unchecked("00000119-0000-1000-8000-0026bb765291".to_string())
1040            }
1041            Self::Mute => {
1042                Uuid::from_full_unchecked("0000011a-0000-1000-8000-0026bb765291".to_string())
1043            }
1044            Self::NightVision => {
1045                Uuid::from_full_unchecked("0000011b-0000-1000-8000-0026bb765291".to_string())
1046            }
1047            Self::OpticalZoom => {
1048                Uuid::from_full_unchecked("0000011c-0000-1000-8000-0026bb765291".to_string())
1049            }
1050            Self::DigitalZoom => {
1051                Uuid::from_full_unchecked("0000011d-0000-1000-8000-0026bb765291".to_string())
1052            }
1053            Self::ImageRotation => {
1054                Uuid::from_full_unchecked("0000011e-0000-1000-8000-0026bb765291".to_string())
1055            }
1056            Self::ImageMirroring => {
1057                Uuid::from_full_unchecked("0000011f-0000-1000-8000-0026bb765291".to_string())
1058            }
1059            Self::StreamingStatus => {
1060                Uuid::from_full_unchecked("00000120-0000-1000-8000-0026bb765291".to_string())
1061            }
1062            Self::ThreadNodeCapabilities => {
1063                Uuid::from_full_unchecked("00000702-0000-1000-8000-0026bb765291".to_string())
1064            }
1065            Self::ThreadStatus => {
1066                Uuid::from_full_unchecked("00000703-0000-1000-8000-0026bb765291".to_string())
1067            }
1068            Self::Unknown(u) => u.clone(),
1069        }
1070    }
1071
1072    /// The HAP default value format for this characteristic, if known.
1073    pub fn default_format(&self) -> Option<CharFormat> {
1074        match self {
1075            Self::AdministratorOnlyAccess => Some(CharFormat::Bool),
1076            Self::AudioFeedback => Some(CharFormat::Bool),
1077            Self::Brightness => Some(CharFormat::Int),
1078            Self::CoolingThresholdTemperature => Some(CharFormat::Float),
1079            Self::CurrentDoorState => Some(CharFormat::Uint8),
1080            Self::CurrentHeatingCoolingState => Some(CharFormat::Uint8),
1081            Self::CurrentRelativeHumidity => Some(CharFormat::Float),
1082            Self::CurrentTemperature => Some(CharFormat::Float),
1083            Self::HeatingThresholdTemperature => Some(CharFormat::Float),
1084            Self::Hue => Some(CharFormat::Float),
1085            Self::Identify => Some(CharFormat::Bool),
1086            Self::LockControlPoint => Some(CharFormat::Tlv8),
1087            Self::LockManagementAutoSecurityTimeout => Some(CharFormat::Uint32),
1088            Self::LockLastKnownAction => Some(CharFormat::Uint8),
1089            Self::LockCurrentState => Some(CharFormat::Uint8),
1090            Self::LockTargetState => Some(CharFormat::Uint8),
1091            Self::Logs => Some(CharFormat::Tlv8),
1092            Self::Manufacturer => Some(CharFormat::String),
1093            Self::Model => Some(CharFormat::String),
1094            Self::MotionDetected => Some(CharFormat::Bool),
1095            Self::Name => Some(CharFormat::String),
1096            Self::ObstructionDetected => Some(CharFormat::Bool),
1097            Self::On => Some(CharFormat::Bool),
1098            Self::OutletInUse => Some(CharFormat::Bool),
1099            Self::RotationDirection => Some(CharFormat::Int),
1100            Self::RotationSpeed => Some(CharFormat::Float),
1101            Self::Saturation => Some(CharFormat::Float),
1102            Self::SerialNumber => Some(CharFormat::String),
1103            Self::TargetDoorState => Some(CharFormat::Uint8),
1104            Self::TargetHeatingCoolingState => Some(CharFormat::Uint8),
1105            Self::TargetRelativeHumidity => Some(CharFormat::Float),
1106            Self::TargetTemperature => Some(CharFormat::Float),
1107            Self::TemperatureDisplayUnits => Some(CharFormat::Uint8),
1108            Self::Version => Some(CharFormat::String),
1109            Self::PairSetup => Some(CharFormat::Tlv8),
1110            Self::PairVerify => Some(CharFormat::Tlv8),
1111            Self::PairingFeatures => Some(CharFormat::Uint8),
1112            Self::PairingPairings => Some(CharFormat::Tlv8),
1113            Self::FirmwareRevision => Some(CharFormat::String),
1114            Self::HardwareRevision => Some(CharFormat::String),
1115            Self::AirParticulateDensity => Some(CharFormat::Float),
1116            Self::AirParticulateSize => Some(CharFormat::Uint8),
1117            Self::SecuritySystemCurrentState => Some(CharFormat::Uint8),
1118            Self::SecuritySystemTargetState => Some(CharFormat::Uint8),
1119            Self::BatteryLevel => Some(CharFormat::Uint8),
1120            Self::CarbonMonoxideDetected => Some(CharFormat::Uint8),
1121            Self::ContactSensorState => Some(CharFormat::Uint8),
1122            Self::CurrentAmbientLightLevel => Some(CharFormat::Float),
1123            Self::CurrentHorizontalTiltAngle => Some(CharFormat::Int),
1124            Self::CurrentPosition => Some(CharFormat::Uint8),
1125            Self::CurrentVerticalTiltAngle => Some(CharFormat::Int),
1126            Self::HoldPosition => Some(CharFormat::Bool),
1127            Self::LeakDetected => Some(CharFormat::Uint8),
1128            Self::OccupancyDetected => Some(CharFormat::Uint8),
1129            Self::PositionState => Some(CharFormat::Uint8),
1130            Self::ProgrammableSwitchEvent => Some(CharFormat::Uint8),
1131            Self::StatusActive => Some(CharFormat::Bool),
1132            Self::SmokeDetected => Some(CharFormat::Uint8),
1133            Self::StatusFault => Some(CharFormat::Uint8),
1134            Self::StatusJammed => Some(CharFormat::Uint8),
1135            Self::StatusLowBattery => Some(CharFormat::Uint8),
1136            Self::StatusTampered => Some(CharFormat::Uint8),
1137            Self::TargetHorizontalTiltAngle => Some(CharFormat::Int),
1138            Self::TargetPosition => Some(CharFormat::Uint8),
1139            Self::TargetVerticalTiltAngle => Some(CharFormat::Int),
1140            Self::SecuritySystemAlarmType => Some(CharFormat::Uint8),
1141            Self::ChargingState => Some(CharFormat::Uint8),
1142            Self::CarbonMonoxideLevel => Some(CharFormat::Float),
1143            Self::CarbonMonoxidePeakLevel => Some(CharFormat::Float),
1144            Self::CarbonDioxideDetected => Some(CharFormat::Uint8),
1145            Self::CarbonDioxideLevel => Some(CharFormat::Float),
1146            Self::CarbonDioxidePeakLevel => Some(CharFormat::Float),
1147            Self::AirQuality => Some(CharFormat::Uint8),
1148            Self::AccessoryFlags => Some(CharFormat::Uint32),
1149            Self::LockPhysicalControls => Some(CharFormat::Uint8),
1150            Self::TargetAirPurifierState => Some(CharFormat::Uint8),
1151            Self::CurrentAirPurifierState => Some(CharFormat::Uint8),
1152            Self::CurrentSlatState => Some(CharFormat::Uint8),
1153            Self::FilterLifeLevel => Some(CharFormat::Float),
1154            Self::FilterChangeIndication => Some(CharFormat::Uint8),
1155            Self::ResetFilterIndication => Some(CharFormat::Uint8),
1156            Self::TargetAirQuality => Some(CharFormat::Uint8),
1157            Self::CurrentFanState => Some(CharFormat::Uint8),
1158            Self::Active => Some(CharFormat::Uint8),
1159            Self::CurrentHeaterCoolerState => Some(CharFormat::Uint8),
1160            Self::TargetHeaterCoolerState => Some(CharFormat::Uint8),
1161            Self::CurrentHumidifierDehumidifierState => Some(CharFormat::Uint8),
1162            Self::TargetHumidifierDehumidifierState => Some(CharFormat::Uint8),
1163            Self::WaterLevel => Some(CharFormat::Float),
1164            Self::SwingMode => Some(CharFormat::Uint8),
1165            Self::TargetSlatState => Some(CharFormat::Uint8),
1166            Self::TargetFanState => Some(CharFormat::Uint8),
1167            Self::SlatType => Some(CharFormat::Uint8),
1168            Self::CurrentTiltAngle => Some(CharFormat::Int),
1169            Self::TargetTiltAngle => Some(CharFormat::Int),
1170            Self::OzoneDensity => Some(CharFormat::Float),
1171            Self::NitrogenDioxideDensity => Some(CharFormat::Float),
1172            Self::SulphurDioxideDensity => Some(CharFormat::Float),
1173            Self::Pm25Density => Some(CharFormat::Float),
1174            Self::Pm10Density => Some(CharFormat::Float),
1175            Self::VocDensity => Some(CharFormat::Float),
1176            Self::RelativeHumidityDehumidifierThreshold => Some(CharFormat::Float),
1177            Self::RelativeHumidityHumidifierThreshold => Some(CharFormat::Float),
1178            Self::ServiceLabelIndex => Some(CharFormat::Uint8),
1179            Self::ServiceLabelNamespace => Some(CharFormat::Uint8),
1180            Self::ColorTemperature => Some(CharFormat::Uint32),
1181            Self::ProgramMode => Some(CharFormat::Uint8),
1182            Self::InUse => Some(CharFormat::Uint8),
1183            Self::SetDuration => Some(CharFormat::Uint32),
1184            Self::RemainingDuration => Some(CharFormat::Uint32),
1185            Self::ValveType => Some(CharFormat::Uint8),
1186            Self::IsConfigured => Some(CharFormat::Uint8),
1187            Self::SupportedVideoStreamConfiguration => Some(CharFormat::Tlv8),
1188            Self::SupportedAudioStreamConfiguration => Some(CharFormat::Tlv8),
1189            Self::SupportedRtpConfiguration => Some(CharFormat::Tlv8),
1190            Self::SelectedRtpStreamConfiguration => Some(CharFormat::Tlv8),
1191            Self::SetupEndpoints => Some(CharFormat::Tlv8),
1192            Self::Volume => Some(CharFormat::Uint8),
1193            Self::Mute => Some(CharFormat::Bool),
1194            Self::NightVision => Some(CharFormat::Bool),
1195            Self::OpticalZoom => Some(CharFormat::Float),
1196            Self::DigitalZoom => Some(CharFormat::Float),
1197            Self::ImageRotation => Some(CharFormat::Float),
1198            Self::ImageMirroring => Some(CharFormat::Bool),
1199            Self::StreamingStatus => Some(CharFormat::Tlv8),
1200            Self::ThreadNodeCapabilities => Some(CharFormat::Uint16),
1201            Self::ThreadStatus => Some(CharFormat::Uint16),
1202            _ => None,
1203        }
1204    }
1205
1206    /// The HAP unit for this characteristic, if it has one.
1207    pub fn unit(&self) -> Option<Unit> {
1208        match self {
1209            Self::Brightness => Some(Unit::Percentage),
1210            Self::CoolingThresholdTemperature => Some(Unit::Celsius),
1211            Self::CurrentRelativeHumidity => Some(Unit::Percentage),
1212            Self::CurrentTemperature => Some(Unit::Celsius),
1213            Self::HeatingThresholdTemperature => Some(Unit::Celsius),
1214            Self::Hue => Some(Unit::ArcDegrees),
1215            Self::LockManagementAutoSecurityTimeout => Some(Unit::Seconds),
1216            Self::RotationSpeed => Some(Unit::Percentage),
1217            Self::Saturation => Some(Unit::Percentage),
1218            Self::TargetRelativeHumidity => Some(Unit::Percentage),
1219            Self::TargetTemperature => Some(Unit::Celsius),
1220            Self::BatteryLevel => Some(Unit::Percentage),
1221            Self::CurrentAmbientLightLevel => Some(Unit::Lux),
1222            Self::CurrentHorizontalTiltAngle => Some(Unit::ArcDegrees),
1223            Self::CurrentPosition => Some(Unit::Percentage),
1224            Self::CurrentVerticalTiltAngle => Some(Unit::ArcDegrees),
1225            Self::TargetHorizontalTiltAngle => Some(Unit::ArcDegrees),
1226            Self::TargetPosition => Some(Unit::Percentage),
1227            Self::TargetVerticalTiltAngle => Some(Unit::ArcDegrees),
1228            Self::WaterLevel => Some(Unit::Percentage),
1229            Self::CurrentTiltAngle => Some(Unit::ArcDegrees),
1230            Self::TargetTiltAngle => Some(Unit::ArcDegrees),
1231            Self::RelativeHumidityDehumidifierThreshold => Some(Unit::Percentage),
1232            Self::RelativeHumidityHumidifierThreshold => Some(Unit::Percentage),
1233            Self::Volume => Some(Unit::Percentage),
1234            Self::ImageRotation => Some(Unit::ArcDegrees),
1235            _ => None,
1236        }
1237    }
1238
1239    /// Named enum values for an enumerated characteristic, smallest-first.
1240    pub fn valid_values(&self) -> Option<&'static [(i64, &'static str)]> {
1241        match self {
1242            Self::CurrentDoorState => Some(&[
1243                (0, "Open"),
1244                (1, "Closed"),
1245                (2, "Opening"),
1246                (3, "Closing"),
1247                (4, "Stopped"),
1248            ]),
1249            Self::CurrentHeatingCoolingState => Some(&[(0, "Off"), (1, "Heat"), (2, "Cool")]),
1250            Self::LockLastKnownAction => Some(&[
1251                (0, "LastDeadbolted"),
1252                (1, "LastUnlocked"),
1253                (2, "LastLockedRemotely"),
1254                (3, "LastUnlockedRemotely"),
1255                (4, "LastLockedManual"),
1256                (5, "LastUnlockedManual"),
1257                (6, "AutoLock"),
1258                (7, "AutoUnlock"),
1259                (8, "Locked"),
1260                (9, "Unlocked"),
1261            ]),
1262            Self::LockCurrentState => Some(&[
1263                (0, "Unsecured"),
1264                (1, "Secured"),
1265                (2, "Jammed"),
1266                (3, "Unknown"),
1267            ]),
1268            Self::LockTargetState => Some(&[(0, "Unsecured"), (1, "Secured")]),
1269            Self::RotationDirection => Some(&[(0, "Clockwise"), (1, "CounterClockwise")]),
1270            Self::TargetDoorState => Some(&[(0, "Open"), (1, "Closed")]),
1271            Self::TargetHeatingCoolingState => {
1272                Some(&[(0, "Off"), (1, "Heat"), (2, "Cool"), (3, "Auto")])
1273            }
1274            Self::TemperatureDisplayUnits => Some(&[(0, "Celsius"), (1, "Fahrenheit")]),
1275            Self::SecuritySystemCurrentState => Some(&[
1276                (0, "StayArm"),
1277                (1, "AwayArm"),
1278                (2, "NightArm"),
1279                (3, "Disarmed"),
1280                (4, "AlarmTriggered"),
1281            ]),
1282            Self::SecuritySystemTargetState => Some(&[
1283                (0, "StayArm"),
1284                (1, "AwayArm"),
1285                (2, "NightArm"),
1286                (3, "Disarmed"),
1287            ]),
1288            Self::CarbonMonoxideDetected => Some(&[(0, "NotDetected"), (1, "Detected")]),
1289            Self::ContactSensorState => Some(&[(0, "ContactDetected"), (1, "ContactNotDetected")]),
1290            Self::LeakDetected => Some(&[(0, "LeakNotDetected"), (1, "LeakDetected")]),
1291            Self::OccupancyDetected => {
1292                Some(&[(0, "OccupancyNotDetected"), (1, "OccupancyDetected")])
1293            }
1294            Self::PositionState => Some(&[(0, "Decreasing"), (1, "Increasing"), (2, "Stopped")]),
1295            Self::ProgrammableSwitchEvent => {
1296                Some(&[(0, "SinglePress"), (1, "DoublePress"), (2, "LongPress")])
1297            }
1298            Self::SmokeDetected => Some(&[(0, "SmokeNotDetected"), (1, "SmokeDetected")]),
1299            Self::StatusFault => Some(&[(0, "NoFault"), (1, "GeneralFault")]),
1300            Self::StatusJammed => Some(&[(0, "NotJammed"), (1, "Jammed")]),
1301            Self::StatusLowBattery => Some(&[(0, "Normal"), (1, "Low")]),
1302            Self::StatusTampered => Some(&[(0, "NotTampered"), (1, "Tampered")]),
1303            Self::ChargingState => {
1304                Some(&[(0, "NotCharging"), (1, "Charging"), (2, "NotChargeable")])
1305            }
1306            Self::CarbonDioxideDetected => Some(&[
1307                (0, "CarbonDioxideNotDetected"),
1308                (1, "CarbonDioxideDetected"),
1309            ]),
1310            Self::AirQuality => Some(&[
1311                (0, "Unknown"),
1312                (1, "Excellent"),
1313                (2, "Good"),
1314                (3, "Fair"),
1315                (4, "Inferior"),
1316                (5, "Poor"),
1317            ]),
1318            Self::LockPhysicalControls => {
1319                Some(&[(0, "ControlLockDisabled"), (1, "ControlLockEnabled")])
1320            }
1321            Self::TargetAirPurifierState => Some(&[(0, "Manual"), (1, "Automatic")]),
1322            Self::CurrentAirPurifierState => {
1323                Some(&[(0, "Inactive"), (1, "Idle"), (2, "PurgingAir")])
1324            }
1325            Self::CurrentSlatState => Some(&[(0, "Fixed"), (1, "Jammed"), (2, "Swinging")]),
1326            Self::FilterChangeIndication => Some(&[(0, "FilterOk"), (1, "ChangeFilter")]),
1327            Self::TargetAirQuality => Some(&[(0, "Excellent"), (1, "Good"), (2, "Fair")]),
1328            Self::CurrentFanState => Some(&[(0, "Inactive"), (1, "Idle"), (2, "BlowingAir")]),
1329            Self::Active => Some(&[(0, "Inactive"), (1, "Active")]),
1330            Self::CurrentHeaterCoolerState => {
1331                Some(&[(0, "Inactive"), (1, "Idle"), (2, "Heating"), (3, "Cooling")])
1332            }
1333            Self::TargetHeaterCoolerState => Some(&[(0, "Automatic"), (1, "Heat"), (2, "Cool")]),
1334            Self::CurrentHumidifierDehumidifierState => Some(&[
1335                (0, "Inactive"),
1336                (1, "Idle"),
1337                (2, "Humidifying"),
1338                (3, "Dehumidifying"),
1339            ]),
1340            Self::TargetHumidifierDehumidifierState => Some(&[
1341                (0, "Humidifier"),
1342                (1, "Dehumidifier"),
1343                (2, "HumidifierOrDehumidifier"),
1344            ]),
1345            Self::SwingMode => Some(&[(0, "Disabled"), (1, "Enabled")]),
1346            Self::TargetSlatState => Some(&[(0, "Manual"), (1, "Auto")]),
1347            Self::TargetFanState => Some(&[(0, "Manual"), (1, "Auto")]),
1348            Self::SlatType => Some(&[(0, "Horizontal"), (1, "Vertical")]),
1349            Self::ServiceLabelNamespace => Some(&[(0, "Dots"), (1, "ArabicNumerals")]),
1350            Self::ProgramMode => Some(&[
1351                (0, "NoProgramScheduled"),
1352                (1, "ProgramScheduled"),
1353                (2, "ProgramScheduledManualMode"),
1354            ]),
1355            Self::InUse => Some(&[(0, "NotInUse"), (1, "InUse")]),
1356            Self::ValveType => Some(&[
1357                (0, "GenericValve"),
1358                (1, "Irrigation"),
1359                (2, "ShowerHead"),
1360                (3, "WaterFaucet"),
1361            ]),
1362            Self::IsConfigured => Some(&[(0, "NotConfigured"), (1, "Configured")]),
1363            _ => None,
1364        }
1365    }
1366}