]> git.basschouten.com Git - openhab-addons.git/blob
1480245147ce44aedb81c716f7e6729119fee2f7
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.tellstick.internal.local.dto;
14
15 import org.tellstick.device.iface.Device;
16 import org.tellstick.enums.DeviceType;
17
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * Class used to deserialize JSON from Telldus local API.
22  *
23  * @author Jan Gustafsson - Initial contribution
24  */
25 public class TellstickLocalDeviceDTO implements Device {
26
27     @SerializedName("id")
28     private int deviceId;
29     private int methods;
30     private String name;
31     private int state;
32     private String statevalue;
33     private String type;
34     private String protocol;
35     private String model;
36     private boolean updated;
37
38     public void setUpdated(boolean b) {
39         this.updated = b;
40     }
41
42     public boolean isUpdated() {
43         return updated;
44     }
45
46     @Override
47     public int getId() {
48         return deviceId;
49     }
50
51     public void setId(int deviceId) {
52         this.deviceId = deviceId;
53     }
54
55     public int getMethods() {
56         return methods;
57     }
58
59     public void setMethods(int methods) {
60         this.methods = methods;
61     }
62
63     @Override
64     public String getName() {
65         return name;
66     }
67
68     public void setName(String name) {
69         this.name = name;
70     }
71
72     @Override
73     public String getUUId() {
74         return Integer.toString(deviceId);
75     }
76
77     @Override
78     public String getProtocol() {
79         return protocol;
80     }
81
82     @Override
83     public String getModel() {
84         return model;
85     }
86
87     @Override
88     public DeviceType getDeviceType() {
89         return DeviceType.DEVICE;
90     }
91
92     public int getState() {
93         return state;
94     }
95
96     public void setState(int state) {
97         this.state = state;
98     }
99
100     public String getStatevalue() {
101         return statevalue;
102     }
103
104     public void setStatevalue(String statevalue) {
105         this.statevalue = statevalue;
106     }
107
108     public String getType() {
109         return type;
110     }
111
112     public void setType(String type) {
113         this.type = type;
114     }
115 }