]> git.basschouten.com Git - openhab-addons.git/blob
0da4e24344eae86194d7c1f8817c5b52220aede7
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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 org.eclipse.jdt.annotation.Nullable;
16
17 import com.google.gson.JsonElement;
18 import com.google.gson.annotations.SerializedName;
19
20 /**
21  * Represents a device status update as represented by the Smart Home
22  * Controller.
23  *
24  * @author Stefan Kästle - Initial contribution
25  * @author Christian Oeing - refactorings of e.g. server registration
26  */
27 public class DeviceStatusUpdate {
28     /**
29      * Url path of the service the update came from.
30      */
31     public String path;
32
33     /**
34      * The type of message.
35      */
36     @SerializedName("@type")
37     public String type;
38
39     /**
40      * Name of service the update came from.
41      */
42     public String id;
43
44     /**
45      * Current state of device. Serialized as JSON.
46      */
47     public JsonElement state;
48
49     /**
50      * Id of device the update is for.
51      */
52     public @Nullable String deviceId;
53
54     @Override
55     public String toString() {
56         return this.deviceId + "state: " + this.type;
57     }
58 }