]> git.basschouten.com Git - openhab-addons.git/blob
6a4b239dfa0be7ec3aee117667bb49cb14eb7fd9
[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.unifi.internal.api.dto;
14
15 import com.google.gson.annotations.Expose;
16
17 /**
18  * The {@link UniFiPortTable} represents the data model of UniFi port table, which is an extend of port override.
19  *
20  * @author Hilbrand Bouwkamp - Initial contribution
21  */
22 public class UniFiPortTable {
23
24     @Expose
25     private int portIdx;
26
27     @Expose
28     private String portconfId;
29
30     @Expose
31     private String poeMode;
32
33     private String name;
34
35     private boolean enable;
36
37     private boolean up;
38
39     /**
40      * If true supports PoE.
41      */
42     private boolean portPoe;
43
44     private boolean poeEnable;
45
46     private String poePower;
47
48     private String poeVoltage;
49
50     private String poeCurrent;
51
52     public int getPortIdx() {
53         return portIdx;
54     }
55
56     public String getPortconfId() {
57         return portconfId;
58     }
59
60     public String getPoeMode() {
61         return poeMode;
62     }
63
64     public String getName() {
65         return name;
66     }
67
68     public boolean isUp() {
69         return up;
70     }
71
72     public boolean isEnabled() {
73         return enable;
74     }
75
76     public boolean isPortPoe() {
77         return portPoe;
78     }
79
80     public boolean isPoeEnabled() {
81         return poeEnable;
82     }
83
84     public String getPoePower() {
85         return poePower;
86     }
87
88     public String getPoeVoltage() {
89         return poeVoltage;
90     }
91
92     public String getPoeCurrent() {
93         return poeCurrent;
94     }
95
96     @Override
97     public String toString() {
98         return String.format(
99                 "UniFiPortTable{portIx: '%d', portconfId: '%s', poeMode: '%s', name: '%s', enable: '%b', up: '%b', portPoe: '%b', poeEnable: '%b, poePower: '%s', poeVoltage: '%s', poeCurrent: '%s'}",
100                 portIdx, portconfId, poeMode, name, enable, up, portPoe, poeEnable, poePower, poeVoltage, poeCurrent);
101     }
102 }