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.neeo.internal.models;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
19 * The model representing a Neeo Brain(serialize/deserialize json use only)
21 * @author Tim Roberts - Initial contribution
24 public class NeeoBrain {
30 /** The version of the brain */
32 private String version;
34 /** The brain's label */
38 /** Whether the brain has been configured */
39 private boolean configured;
45 /** ?? The brain airkey ?? */
47 private String airkey;
49 /** Last time the brain was changed */
50 private long lastchange;
52 /** The rooms in the brain */
54 private NeeoRooms rooms;
62 public String getName() {
67 * Gets the version of the brain
72 public String getVersion() {
77 * Gets the brain's label
82 public String getLabel() {
87 * Checks if the brain is configured
89 * @return true, if is configured
91 public boolean isConfigured() {
101 public String getKey() {
106 * Gets the brain's airkey
111 public String getAirkey() {
116 * Gets the last time the brain was changed
118 * @return the lastchange
120 public long getLastChange() {
125 * Gets the rooms in the brain
129 public NeeoRooms getRooms() {
130 final NeeoRooms localRooms = rooms;
131 return localRooms == null ? new NeeoRooms(new NeeoRoom[0]) : localRooms;
135 public String toString() {
136 return "NeeoBrain [name=" + name + ", version=" + version + ", label=" + label + ", configured=" + configured
137 + ", key=" + key + ", airkey=" + airkey + ", lastchange=" + lastchange + ", rooms=" + rooms + "]";