]> git.basschouten.com Git - openhab-addons.git/blob
bd4a41ff06ab357d1146df0f129cfd6212b6b8a4
[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 UnfiPortOverride} represents the data model of UniFi port override.
19  *
20  * @author Hilbrand Bouwkamp - Initial contribution
21  */
22 public class UnfiPortOverride {
23
24     @Expose
25     private int portIdx;
26
27     @Expose
28     private String portconfId;
29
30     @Expose
31     private String poeMode;
32
33     public UnfiPortOverride() {
34         // Constructor for GSON.
35     }
36
37     public UnfiPortOverride(final int portIdx, final String portconfId, final String poeMode) {
38         this.portIdx = portIdx;
39         this.portconfId = portconfId;
40         this.poeMode = poeMode;
41     }
42
43     public int getPortIdx() {
44         return portIdx;
45     }
46
47     public String getPortconfId() {
48         return portconfId;
49     }
50
51     public String getPoeMode() {
52         return poeMode;
53     }
54
55     public void setPortIdx(final int portIdx) {
56         this.portIdx = portIdx;
57     }
58
59     public void setPortconfId(final String portconfId) {
60         this.portconfId = portconfId;
61     }
62
63     public void setPoeMode(final String poeMode) {
64         this.poeMode = poeMode;
65     }
66
67     @Override
68     public String toString() {
69         return String.format("UnfiPortOverride{portIx: '%d', portconfId: '%s', poeMode: '%s'}", portIdx, portconfId,
70                 poeMode);
71     }
72 }