]> git.basschouten.com Git - openhab-addons.git/blob
649f3de5bfda4caa79f116521f7ad8314b5174b4
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2021 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.boschshc.internal.devices.bridge.dto;
14
15 import com.google.gson.JsonElement;
16 import com.google.gson.annotations.SerializedName;
17
18 /**
19  * Represents a device status update as represented by the Smart Home
20  * Controller.
21  *
22  * @author Stefan Kästle - Initial contribution
23  * @author Christian Oeing - refactorings of e.g. server registration
24  */
25 public class DeviceStatusUpdate {
26     /**
27      * Url path of the service the update came from.
28      */
29     public String path;
30
31     /**
32      * The type of message.
33      */
34     @SerializedName("@type")
35     public String type;
36
37     /**
38      * Name of service the update came from.
39      */
40     public String id;
41
42     /**
43      * Current state of device. Serialized as JSON.
44      */
45     public JsonElement state;
46
47     /**
48      * Id of device the update is for.
49      */
50     public String deviceId;
51
52     @Override
53     public String toString() {
54         return this.deviceId + "state: " + this.type;
55     }
56 }