]> git.basschouten.com Git - openhab-addons.git/blob
e0311d585b7235b69c24e58cf86be5165873f646
[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.unifi.internal.api.dto;
14
15 /**
16  * Tuple to store both the {@link UniFiPortTable}, which contains the all information related to the port,
17  * and the {@link UnfiPortOverrideJsonObject}, which contains the raw JSON data of the port override.
18  *
19  * @author Hilbrand Bouwkamp - Initial contribution
20  */
21 public class UniFiPortTuple {
22
23     private UniFiDevice device;
24
25     private UniFiPortTable table;
26
27     private UnfiPortOverrideJsonObject jsonElement;
28
29     public UniFiDevice getDevice() {
30         return device;
31     }
32
33     public void setDevice(final UniFiDevice device) {
34         this.device = device;
35     }
36
37     public int getPortIdx() {
38         return table == null ? 0 : table.getPortIdx();
39     }
40
41     public UniFiPortTable getTable() {
42         return table;
43     }
44
45     public void setTable(final UniFiPortTable table) {
46         this.table = table;
47     }
48
49     public UnfiPortOverrideJsonObject getJsonElement() {
50         return jsonElement;
51     }
52
53     public void setJsonElement(final UnfiPortOverrideJsonObject jsonElement) {
54         this.jsonElement = jsonElement;
55     }
56 }