2 * Copyright (c) 2010-2020 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.apache.commons.lang.StringUtils;
16 import org.eclipse.jdt.annotation.NonNullByDefault;
17 import org.eclipse.jdt.annotation.Nullable;
20 * The model representing an Neeo Device Details (serialize/deserialize json use only)
22 * @author Tim Roberts - Initial contribution
25 public class NeeoDeviceDetails {
27 /** The source name (neeo-deviceadapter or sdk name) */
29 private String sourceName;
31 /** The adapter name (name given by source) */
33 private String adapterName;
39 /** The manufacture */
41 private String manufacturer;
43 /** The name of the device given by source */
47 /** The timings of the device */
49 private NeeoDeviceDetailsTiming timing;
51 /** The device capabilities */
52 private String @Nullable [] deviceCapabilities;
55 * The device source name
57 * @return the device source name
60 public String getSourceName() {
65 * The device adapter name (given by the source)
67 * @return the adapter name
70 public String getAdapterName() {
75 * The NEEO device type
77 * @return the NEEO device type
80 public String getType() {
85 * The manufacturer of the device
87 * @return the manufacturer
90 public String getManufacturer() {
95 * The name of the device (given by the source)
97 * @return the device name
100 public String getName() {
107 * @return the timings
110 public NeeoDeviceDetailsTiming getTiming() {
115 * The device capabilities
117 * @return the capabilities
119 public String[] getDeviceCapabilities() {
120 final String[] localCapabilities = deviceCapabilities;
121 return localCapabilities == null ? new String[0] : localCapabilities;
125 public String toString() {
126 return "NeeoDeviceDetails [sourceName=" + sourceName + ", adapterName=" + adapterName + ", type=" + type
127 + ", manufacturer=" + manufacturer + ", name=" + name + ", timing=" + timing + ", deviceCapabilities="
128 + StringUtils.join(deviceCapabilities, ',') + "]";