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 Device (serialize/deserialize json use only)
21 * @author Tim Roberts - Initial contribution
24 public class NeeoDevice {
26 /** The device name */
30 /** The associated room name */
32 private String roomName;
34 /** The associated room key */
36 private String roomKey;
38 /** The adapter device id */
40 private String adapterDeviceId;
46 /** The macros for the device */
48 private NeeoMacros macros;
50 /** The device details */
52 private NeeoDeviceDetails details;
55 * Gets the device name
60 public String getName() {
65 * Gets the associated room name
67 * @return the room name
70 public String getRoomName() {
75 * Gets the associated room key
77 * @return the room key
80 public String getRoomKey() {
85 * Gets the adapter device id
87 * @return the adapter device id
90 public String getAdapterDeviceId() {
91 return adapterDeviceId;
100 public String getKey() {
105 * Gets the macros for the device
109 public NeeoMacros getMacros() {
110 final NeeoMacros localMacros = macros;
111 return localMacros == null ? new NeeoMacros(new NeeoMacro[0]) : localMacros;
115 * Gets the details for the device
117 * @return the details
120 public NeeoDeviceDetails getDetails() {
125 public String toString() {
126 return "NeeoDevice [name=" + name + ", roomName=" + roomName + ", roomKey=" + roomKey + ", adapterDeviceId="
127 + adapterDeviceId + ", key=" + key + ", macros=" + macros + ", details=" + details + "]";