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.vesync.internal.dto.responses;
15 import com.google.gson.annotations.SerializedName;
18 * The {@link VeSyncResponse} is a Java class used as a DTO to hold the Vesync's API's common response data.
20 * @author David Goodyear - Initial contribution
22 public class VeSyncResponse {
24 @SerializedName("traceId")
25 public String traceId;
27 @SerializedName("code")
30 @SerializedName("msg")
33 public String getMsg() {
37 public String getTraceId() {
41 public String getCode() {
45 public boolean isMsgSuccess() {
46 return (msg != null) ? "request success".equals(msg) : false;
49 public boolean isMsgDeviceOffline() {
50 return (msg != null) ? "device offline".equals(msg) : false;
54 public String toString() {
55 return "VesyncResponse [traceId=\"" + traceId + "\", msg=\"" + msg + "\", code=\"" + code + "\"]";