2 * Copyright (c) 2010-2023 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.bticinosmarther.internal.api.dto;
15 import java.util.ArrayList;
16 import java.util.List;
18 import org.eclipse.jdt.annotation.Nullable;
21 * The {@code Topology} class defines the dto for Smarther API topology object.
23 * @author Fabio Possieri - Initial contribution
25 public class Topology {
30 * Returns a {@link Plant} object representing the plant contained in this topology.
32 * @return the plant contained in this topology, or {@code null} if the topology has no plant
34 public @Nullable Plant getPlant() {
39 * Returns the list of chronothermostat modules contained in this topology.
41 * @return the list of chronothermostat modules contained in this topology, or an empty list in case the topology
44 public List<Module> getModules() {
45 return (plant != null) ? plant.getModules() : new ArrayList<>();