2 * Copyright (c) 2010-2022 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.unifi.internal.api.dto;
15 import java.util.ArrayList;
16 import java.util.List;
18 import com.google.gson.annotations.Expose;
21 * The {@link UniFiPortOverrides} represents the data model of UniFi port overrides.
23 * @author Hilbrand Bouwkamp - Initial contribution
25 public class UniFiPortOverrides {
28 private final List<UnfiPortOverride> portOverrides = new ArrayList<>();
30 public void addPortOverride(final UnfiPortOverride unfiPortOverride) {
31 portOverrides.add(unfiPortOverride);
34 public void addPortOverride(final int portIdx, final String portconfId, final String poeMode) {
35 portOverrides.add(new UnfiPortOverride(portIdx, portconfId, poeMode));
39 public String toString() {
40 return String.format("UniFiPortOverrides: {}", String.join(", ", portOverrides.toArray(new String[0])));