2 * Copyright (c) 2010-2022 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 static org.openhab.binding.bondhome.internal.BondHomeBindingConstants.*;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
20 import com.google.gson.annotations.Expose;
21 import com.google.gson.annotations.SerializedName;
24 * This POJO represents update datagram sent by the Bond Push UDP Protocol
26 * The incoming JSON looks like this:
28 * {"B": "ZZBL12345", "t": "devices/aabbccdd/state", "i": "00112233bbeeeeff", "s" :200, "m": 0, "f": 255, "b": {"_":
29 * "ab9284ef", "power": 1, "speed": 2}}
31 * @author Sara Geleskie Damiano - Initial contribution
34 public class BPUPUpdate {
37 @Expose(serialize = true, deserialize = true)
38 public @Nullable String bondId;
39 // The topic (the path from HTTP URL)
41 @Expose(serialize = true, deserialize = true)
42 public @Nullable String topic;
45 @Expose(serialize = true, deserialize = true)
46 public @Nullable String requestId;
47 // The HTTP status code
49 @Expose(serialize = true, deserialize = true)
50 public int statusCode;
51 // HTTP method (0=GET, 1=POST, 2=PUT, 3=DELETE, 4=PATCH)
53 @Expose(serialize = true, deserialize = true)
55 // flags (Olibra-internal use)
57 @Expose(serialize = true, deserialize = true)
61 @Expose(serialize = true, deserialize = true)
62 public @Nullable BondDeviceState deviceState;