2 * Copyright (c) 2010-2022 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 java.util.Arrays;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
21 * The model representing a Neeo Device Details (serialize/deserialize json use only)
23 * @author Tim Roberts - Initial contribution
26 public class NeeoDeviceDetails {
28 /** The source name (neeo-deviceadapter or sdk name) */
30 private String sourceName;
32 /** The adapter name (name given by source) */
34 private String adapterName;
40 /** The manufacture */
42 private String manufacturer;
44 /** The name of the device given by source */
48 /** The timings of the device */
50 private NeeoDeviceDetailsTiming timing;
52 /** The device capabilities */
53 private String @Nullable [] deviceCapabilities;
56 * The device source name
58 * @return the device source name
61 public String getSourceName() {
66 * The device adapter name (given by the source)
68 * @return the adapter name
71 public String getAdapterName() {
76 * The NEEO device type
78 * @return the NEEO device type
81 public String getType() {
86 * The manufacturer of the device
88 * @return the manufacturer
91 public String getManufacturer() {
96 * The name of the device (given by the source)
98 * @return the device name
101 public String getName() {
108 * @return the timings
111 public NeeoDeviceDetailsTiming getTiming() {
116 * The device capabilities
118 * @return the capabilities
120 public String[] getDeviceCapabilities() {
121 final String[] localCapabilities = deviceCapabilities;
122 return localCapabilities == null ? new String[0] : localCapabilities;
126 public String toString() {
127 return "NeeoDeviceDetails{" + "sourceName='" + sourceName + '\'' + ", adapterName='" + adapterName + '\''
128 + ", type='" + type + '\'' + ", manufacturer='" + manufacturer + '\'' + ", name='" + name + '\''
129 + ", timing=" + timing + ", deviceCapabilities=" + Arrays.toString(deviceCapabilities) + '}';