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.amazonechocontrol.internal.jsons;
15 import java.util.List;
16 import java.util.Objects;
19 import org.eclipse.jdt.annotation.NonNullByDefault;
20 import org.eclipse.jdt.annotation.Nullable;
23 * The {@link JsonDevices} encapsulate the GSON data of device list
25 * @author Michael Geramb - Initial contribution
28 public class JsonDevices {
30 public static class Device {
31 public @Nullable String accountName;
32 public @Nullable String serialNumber;
33 public @Nullable String deviceOwnerCustomerId;
34 public @Nullable String deviceAccountId;
35 public @Nullable String deviceFamily;
36 public @Nullable String deviceType;
37 public @Nullable String softwareVersion;
38 public boolean online;
39 public @Nullable Set<String> capabilities;
41 public Set<String> getCapabilities() {
42 return Objects.requireNonNullElse(capabilities, Set.of());
46 public String toString() {
47 return "Device{" + "accountName='" + accountName + '\'' + ", serialNumber='" + serialNumber + '\''
48 + ", deviceOwnerCustomerId='" + deviceOwnerCustomerId + '\'' + ", deviceAccountId='"
49 + deviceAccountId + '\'' + ", deviceFamily='" + deviceFamily + '\'' + ", deviceType='" + deviceType
50 + '\'' + ", softwareVersion='" + softwareVersion + '\'' + ", online=" + online + ", capabilities="
55 public List<Device> devices = List.of();