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 com.google.gson.annotations.Expose;
18 * Base class for responses containing the common error response fields.
19 * Only getter methods as the values are set by gson based on the retrieved json.
21 * @author Hilbrand Bouwkamp - Initial contribution
23 public class ErrorResponse implements HasErrorResponse {
25 @Expose(serialize = false)
27 @Expose(serialize = false)
28 private String errMsg;
31 * @return the error code
33 public int getErrorCode() {
38 * @return the error message
40 public String getErrorMessage() {
45 public ErrorResponse getErrorResponse() {
50 public String toString() {
51 return "{err_code:" + errCode + ", err_msg:'" + errMsg + "'}";