]> git.basschouten.com Git - openhab-addons.git/blob
dda7e1616dfb8121e227d5e8ca1d033fafd2774a
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.lgwebos.internal.handler.core;
14
15 import com.google.gson.JsonElement;
16
17 /**
18  * {@link Response} is a value object for a response message from WebOSTV.
19  *
20  * @author Sebastian Prehn - Initial contribution
21  */
22 public class Response {
23     /** Required response type */
24     private String type;
25     /** Optional payload */
26     private JsonElement payload;
27     /**
28      * Message ID to which this is a response to.
29      * This is optional.
30      */
31     private Integer id;
32
33     public Response() {
34         // no-argument constructor for gson
35     }
36
37     /** Optional error message. */
38     private String error;
39
40     public Integer getId() {
41         return id;
42     }
43
44     public String getType() {
45         return type;
46     }
47
48     public String getError() {
49         return error;
50     }
51
52     public JsonElement getPayload() {
53         return payload;
54     }
55 }