]> git.basschouten.com Git - openhab-addons.git/blob
20cefa6a1a37081f89a256cd91f519fa12c9c049
[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.bticinosmarther.internal.api.dto;
14
15 import java.util.List;
16
17 import org.eclipse.jdt.annotation.Nullable;
18
19 /**
20  * The {@code Plant} class defines the dto for Smarther API plant object.
21  *
22  * @author Fabio Possieri - Initial contribution
23  */
24 public class Plant {
25
26     private String id;
27     private String name;
28     private List<Module> modules;
29
30     /**
31      * Returns the identifier of the plant.
32      *
33      * @return a string containing the plant identifier
34      */
35     public String getId() {
36         return id;
37     }
38
39     /**
40      * Returns the plant reference label (i.e. the plant "name").
41      *
42      * @return a string containing the plant reference label
43      */
44     public String getName() {
45         return name;
46     }
47
48     /**
49      * Returns the list of chronothermostat modules of the plant.
50      *
51      * @return the list of chronothermostat modules of the plant, or {@code null} in case the plant has no modules
52      */
53     public @Nullable List<Module> getModules() {
54         return modules;
55     }
56
57     @Override
58     public String toString() {
59         return String.format("id=%s, name=%s", id, name);
60     }
61 }