]> git.basschouten.com Git - openhab-addons.git/blob
9709e9bade51451c6f0ea8b97e91d11f43478e7d
[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.boschshc.internal.devices.bridge;
14
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16
17 /**
18  * Payload as POST data for triggering a RPC call on the Bosch Smart Home Controller.
19  *
20  * @author Stefan Kästle - Initial contribution
21  */
22 @NonNullByDefault
23 class JsonRpcRequest {
24
25     public String jsonrpc;
26     public String method;
27     public String[] params;
28
29     public JsonRpcRequest(String jsonrpc, String method, String[] params) {
30         this.jsonrpc = jsonrpc;
31         this.method = method;
32         this.params = params;
33     }
34
35     public JsonRpcRequest() {
36         this("", "", new String[0]);
37     }
38
39     public String getJsonrpc() {
40         return jsonrpc;
41     }
42
43     public void setJsonrpc(String jsonrpc) {
44         this.jsonrpc = jsonrpc;
45     }
46
47     public String getMethod() {
48         return method;
49     }
50
51     public void setMethod(String method) {
52         this.method = method;
53     }
54
55     public String[] getParams() {
56         return params;
57     }
58
59     public void setParams(String[] params) {
60         this.params = params;
61     }
62 }