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.boschshc.internal.devices.bridge.dto;
15 import org.eclipse.jdt.annotation.Nullable;
16 import org.openhab.binding.boschshc.internal.services.dto.BoschSHCServiceState;
18 import com.google.gson.JsonElement;
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 DeviceServiceData extends BoschSHCServiceState {
30 * Url path of the service the update came from.
35 * Name of service the update came from.
40 * Current state of device. Serialized as JSON.
42 public @Nullable JsonElement state;
45 * Id of device the update is for.
47 public @Nullable String deviceId;
50 * An optional object containing information about device faults.
52 * Example: low battery warnings are stored as faults with category <code>WARNING</code>
54 public @Nullable Faults faults;
56 public DeviceServiceData() {
57 super("DeviceServiceData");
61 public String toString() {
62 return this.deviceId + " state: " + this.type;