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.mqtt.homeassistant.internal.config.dto;
15 import java.util.List;
17 import org.eclipse.jdt.annotation.Nullable;
18 import org.openhab.binding.mqtt.homeassistant.internal.config.ListOrStringDeserializer;
20 import com.google.gson.annotations.JsonAdapter;
21 import com.google.gson.annotations.SerializedName;
24 * Device configuration
26 * @author Jochen Klein - Initial contribution
29 @JsonAdapter(ListOrStringDeserializer.class)
30 protected @Nullable List<String> identifiers;
31 protected @Nullable List<Connection> connections;
32 protected @Nullable String manufacturer;
33 protected @Nullable String model;
34 protected @Nullable String name;
36 @SerializedName("sw_version")
37 protected @Nullable String swVersion;
39 public @Nullable String getId() {
40 List<String> identifiers = this.identifiers;
41 return identifiers == null ? null : String.join("_", identifiers);
45 public List<Connection> getConnections() {
50 public String getManufacturer() {
55 public String getModel() {
60 public String getName() {
65 public String getSwVersion() {
70 public List<String> getIdentifiers() {