]> git.basschouten.com Git - openhab-addons.git/blob
6da48f5f7e4004cff716cf51fe10c8671303ca5e
[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.miio.internal;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 import com.google.gson.annotations.Expose;
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * Storing last id to to be able to reconnect better after binding restart
22  *
23  * @author Marcel Verpaalen - Initial contribution
24  */
25 @NonNullByDefault
26 public class SavedDeviceInfoDTO {
27
28     @SerializedName("lastId")
29     @Expose
30     private int lastId = 0;
31     @SerializedName("deviceId")
32     @Expose
33     private String deviceId;
34
35     public SavedDeviceInfoDTO(int lastId, String deviceId) {
36         super();
37         this.lastId = lastId;
38         this.deviceId = deviceId;
39     }
40
41     public int getLastId() {
42         return lastId;
43     }
44
45     public void setLastId(int lastId) {
46         this.lastId = lastId;
47     }
48
49     public String getDeviceId() {
50         return deviceId;
51     }
52
53     public void setDeviceId(String deviceId) {
54         this.deviceId = deviceId;
55     }
56 }