2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.deconz.internal.dto;
15 import java.util.Collections;
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
20 import org.openhab.binding.deconz.internal.types.ResourceType;
23 * http://dresden-elektronik.github.io/deconz-rest-doc/configuration/
27 * @author David Graeff - Initial contribution
30 public class BridgeFullState {
31 public Config config = new Config();
33 public static class Config {
34 public String apiversion = ""; // "1.0.0"
35 public String ipaddress = ""; // "192.168.80.142",
36 public String name = ""; // "deCONZ-GW",
37 public String swversion = ""; // "20405"
38 public String fwversion = ""; // "0x262e0500"
39 public String uuid = ""; // "a65d80a1-975a-4598-8d5a-2547bc18d63b",
40 public int websocketport = 0; // 8088
41 public int zigbeechannel = 0;
44 public Map<String, SensorMessage> sensors = Collections.emptyMap();
45 public Map<String, LightMessage> lights = Collections.emptyMap();
46 public Map<String, GroupMessage> groups = Collections.emptyMap();
48 public @Nullable DeconzBaseMessage getMessage(ResourceType resourceType, String id) {
49 switch (resourceType) {
51 return lights.get(id);
53 return sensors.get(id);
55 return groups.get(id);