2 * Copyright (c) 2010-2021 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.boschshc.internal.devices.bridge.dto;
15 import org.eclipse.jdt.annotation.Nullable;
17 import com.google.gson.JsonElement;
18 import com.google.gson.annotations.SerializedName;
21 * Represents a device status update as represented by the Smart Home
24 * @author Stefan Kästle - Initial contribution
25 * @author Christian Oeing - refactorings of e.g. server registration
27 public class DeviceStatusUpdate {
29 * Url path of the service the update came from.
34 * The type of message.
36 @SerializedName("@type")
40 * Name of service the update came from.
45 * Current state of device. Serialized as JSON.
47 public JsonElement state;
50 * Id of device the update is for.
52 public @Nullable String deviceId;
55 public String toString() {
56 return this.deviceId + "state: " + this.type;