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 Room (serialize/deserialize json use only).
21 * @author Tim Roberts - Initial contribution
24 public class NeeoRoom {
34 /** The devices in the room */
36 private NeeoDevices devices;
38 /** The scenarios in the room */
40 private NeeoScenarios scenarios;
42 /** The recipes in the room */
44 private NeeoRecipes recipes;
52 public String getName() {
62 public String getKey() {
67 * Gets the recipes in the room
71 public NeeoRecipes getRecipes() {
72 final NeeoRecipes localRecipes = recipes;
73 return localRecipes == null ? new NeeoRecipes(new NeeoRecipe[0]) : localRecipes;
77 * Gets the devices in the room
81 public NeeoDevices getDevices() {
82 final NeeoDevices localDevices = devices;
83 return localDevices == null ? new NeeoDevices(new NeeoDevice[0]) : localDevices;
87 * Gets the scenarios in the room
89 * @return the scenarios
91 public NeeoScenarios getScenarios() {
92 final NeeoScenarios localScenarios = scenarios;
93 return localScenarios == null ? new NeeoScenarios(new NeeoScenario[0]) : localScenarios;
97 public String toString() {
98 return "NeeoRoom [name=" + name + ", key=" + key + ", scenarios=" + scenarios + ", devices=" + devices
99 + ", recipes=" + recipes + "]";