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.surepetcare.internal.dto;
15 import com.google.gson.annotations.SerializedName;
18 * The {@link SurePetcareDeviceStatus} class is used to serialize a JSON object to report the status of a device (e.g.
19 * locking mode, LED mode etc.).
21 * @author Rene Scherer - Initial contribution
23 public class SurePetcareDeviceStatus {
25 @SerializedName("led_mode")
26 public Integer ledModeId;
27 @SerializedName("pairing_mode")
28 public Integer pairingModeId;
29 public Locking locking;
30 public Version version;
32 // learn_mode - unknown type
33 public Boolean online;
34 public Signal signal = new Signal();
36 public SurePetcareDeviceStatus assign(SurePetcareDeviceStatus source) {
37 this.ledModeId = source.ledModeId;
38 this.pairingModeId = source.pairingModeId;
39 this.locking = source.locking;
40 this.version = source.version;
41 this.battery = source.battery;
42 this.online = source.online;
43 this.signal = source.signal;
47 public class Locking {
48 @SerializedName("mode")
49 public Integer modeId;
52 public class Version {
54 public String hardware;
55 public String firmware;
59 public Device device = new Device();
61 public Device lcd = new Device();
62 public Device rf = new Device();
66 public Float deviceRssi;