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.bondhome.internal.api;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jdt.annotation.Nullable;
18 import com.google.gson.annotations.Expose;
19 import com.google.gson.annotations.SerializedName;
22 * This POJO represents update datagram sent by the Bond Push UDP Protocol
24 * The incoming JSON looks like this:
26 * {"B": "ZZBL12345", "t": "devices/aabbccdd/state", "i": "00112233bbeeeeff", "s" :200, "m": 0, "f": 255, "b": {"_":
27 * "ab9284ef", "power": 1, "speed": 2}}
29 * @author Sara Geleskie Damiano - Initial contribution
32 public class BPUPUpdate {
35 @Expose(serialize = true, deserialize = true)
36 public @Nullable String bondId;
37 // The topic (the path from HTTP URL)
39 @Expose(serialize = true, deserialize = true)
40 public @Nullable String topic;
43 @Expose(serialize = true, deserialize = true)
44 public @Nullable String requestId;
45 // The HTTP status code
47 @Expose(serialize = true, deserialize = true)
48 public int statusCode;
49 // HTTP method (0=GET, 1=POST, 2=PUT, 3=DELETE, 4=PATCH)
51 @Expose(serialize = true, deserialize = true)
53 // flags (Olibra-internal use)
55 @Expose(serialize = true, deserialize = true)
59 @Expose(serialize = true, deserialize = true)
60 public @Nullable BondDeviceState deviceState;