]> git.basschouten.com Git - openhab-addons.git/blob
d1bc2b459bd7ba89eddc6beb27fb658bfc97d22a
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.nuki.internal.dto;
14
15 import org.openhab.binding.nuki.internal.constants.NukiBindingConstants;
16 import org.openhab.core.thing.ThingUID;
17
18 /**
19  * The {@link WebApiBridgeDiscoveryDto} class defines the Data Transfer Object (POJO) for bridge object
20  * the https://api.nuki.io/discover/bridges Web API.
21  *
22  * @author Jan Vybíral - Initial contribution
23  */
24 public class WebApiBridgeDto {
25     private String bridgeId;
26     private String ip;
27     private int port;
28     private String dateUpdated;
29
30     public String getBridgeId() {
31         return bridgeId;
32     }
33
34     public void setBridgeId(String bridgeId) {
35         this.bridgeId = bridgeId;
36     }
37
38     public String getIp() {
39         return ip;
40     }
41
42     public void setIp(String ip) {
43         this.ip = ip;
44     }
45
46     public int getPort() {
47         return port;
48     }
49
50     public void setPort(int port) {
51         this.port = port;
52     }
53
54     public String getDateUpdated() {
55         return dateUpdated;
56     }
57
58     public void setDateUpdated(String dateUpdated) {
59         this.dateUpdated = dateUpdated;
60     }
61
62     @Override
63     public String toString() {
64         return "WebApiBridgeDto{" + "bridgeId='" + bridgeId + '\'' + ", ip='" + ip + '\'' + ", port=" + port
65                 + ", dateUpdated='" + dateUpdated + '\'' + '}';
66     }
67
68     public ThingUID getThingUid() {
69         return new ThingUID(NukiBindingConstants.THING_TYPE_BRIDGE, getBridgeId());
70     }
71 }