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.tplinksmarthome.internal.model;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
17 import com.google.gson.annotations.SerializedName;
20 * Data class for getting the tp-Link Smart Plug energy state.
21 * Only getter methods as the values are set by gson based on the retrieved json.
23 * @author Hilbrand Bouwkamp - Initial contribution
26 public class GetRealtime extends ContextState {
28 public static class EMeter {
29 private Realtime getRealtime = new Realtime();
31 public Realtime getRealtime() {
36 public String toString() {
37 return "get_realtime:{" + getRealtime + "}";
41 @SerializedName(value = "emeter", alternate = "smartlife.iot.common.emeter")
42 private EMeter emeter = new EMeter();
44 public Realtime getRealtime() {
45 return emeter.getRealtime();
49 public String toString() {
50 return "GetRealtime {emeter:{" + emeter + "}}";