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.pilight.internal.dto;
15 import java.util.HashMap;
16 import java.util.List;
19 import com.fasterxml.jackson.annotation.JsonAnySetter;
20 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
21 import com.fasterxml.jackson.annotation.JsonProperty;
24 * Class describing a device in pilight
26 * @author Jeroen Idserda - Initial contribution
27 * @author Stefan Röllin - Port to openHAB 2 pilight binding
28 * @author Niklas Dörfler - Port pilight binding to openHAB 3 + add device discovery
30 @JsonIgnoreProperties(ignoreUnknown = true)
35 private String origin;
37 private String timestamp;
39 private List<String> protocol;
43 private Integer dimlevel = null;
45 // @SerializedName("dimlevel-maximum")
46 private Integer dimlevelMaximum = null;
48 private Integer dimlevelMinimum = null;
50 private List<Map<String, String>> id;
52 private Map<String, String> properties = new HashMap<>();
54 public String getUuid() {
58 public void setUuid(String uuid) {
62 public String getOrigin() {
66 public void setOrigin(String origin) {
70 public String getTimestamp() {
74 public void setTimestamp(String timestamp) {
75 this.timestamp = timestamp;
78 public List<String> getProtocol() {
82 public void setProtocol(List<String> protocol) {
83 this.protocol = protocol;
86 public String getState() {
90 public void setState(String state) {
94 public Integer getDimlevel() {
98 public void setDimlevel(Integer dimlevel) {
99 this.dimlevel = dimlevel;
102 public Integer getDimlevelMaximum() {
103 return dimlevelMaximum;
106 @JsonProperty("dimlevel-maximum")
107 public void setDimlevelMaximum(Integer dimlevelMaximum) {
108 this.dimlevelMaximum = dimlevelMaximum;
111 public Integer getDimlevelMinimum() {
112 return dimlevelMinimum;
115 @JsonProperty("dimlevel-minimum")
116 public void setDimlevelMinimum(Integer dimlevelMinimum) {
117 this.dimlevelMinimum = dimlevelMinimum;
120 public List<Map<String, String>> getId() {
124 public void setId(List<Map<String, String>> id) {
128 public void setProperties(Map<String, String> properties) {
129 this.properties = properties;
132 public Map<String, String> getProperties() {
137 public void set(String name, Object value) {
138 properties.put(name, value.toString());