]> git.basschouten.com Git - openhab-addons.git/blob
671206262e5ddc5e1be1f01fc64bebe1b203b77b
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2023 Contributors to the openHAB project
3  *
4  * See the NOTICE file(s) distributed with this work for additional
5  * information.
6  *
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
10  *
11  * SPDX-License-Identifier: EPL-2.0
12  */
13 package org.openhab.binding.ecovacs.internal.api.impl.dto.response.main;
14
15 import com.google.gson.annotations.SerializedName;
16
17 /**
18  * @author Johannes Ptaszyk - Initial contribution
19  */
20 public class ResponseWrapper<T> {
21     @SerializedName("code")
22     private final String code;
23
24     @SerializedName("time")
25     private final String time;
26
27     @SerializedName("msg")
28     private final String message;
29
30     @SerializedName("data")
31     private final T data;
32
33     @SerializedName("success")
34     private final boolean success;
35
36     public ResponseWrapper(String code, String time, String message, T data, boolean success) {
37         this.code = code;
38         this.time = time;
39         this.message = message;
40         this.data = data;
41         this.success = success;
42     }
43
44     public String getCode() {
45         return code;
46     }
47
48     public String getTime() {
49         return time;
50     }
51
52     public String getMessage() {
53         return message;
54     }
55
56     public T getData() {
57         return data;
58     }
59
60     public boolean isSuccess() {
61         return success;
62     }
63 }