hue_bridge/api/resources/items.rs
1// Copyright 2022 Palade Ionut Victor
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15use serde::{Deserialize, Serialize};
16
17#[allow(missing_docs)]
18#[derive(Debug, Clone, Serialize, Deserialize)]
19/// <https://developers.meethue.com/develop/hue-api-v2/api-reference/#resource>
20#[serde(rename_all = "lowercase")]
21pub enum ResourceTypes {
22 Device,
23 BridgeHome,
24 Room,
25 Zone,
26 Light,
27 Button,
28 Temperature,
29 LightLevel,
30 Motion,
31 Entertainment,
32 GroupedLight,
33 DevicePower,
34 ZigbeeBridgeConnectivity,
35 ZigbeeConectivity,
36 ZgpConnectivity,
37 Bridge,
38 HomeKit,
39 Scene,
40 EntertainmentConfiguration,
41 PublicImage,
42 AuthV1,
43 BehaviorScript,
44 BehaviorInstance,
45 Geofence,
46 GeofenceClient,
47 Geolocation,
48}
49
50impl Default for ResourceTypes {
51 // TODO: change this if needed to something that makes sense.
52 fn default() -> Self {
53 ResourceTypes::Device
54 }
55}