]> git.basschouten.com Git - openhab-addons.git/blob
b943bf30ead6e9ece647475fee62330d2d92f165
[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.hue.internal.api.dto.clip1;
14
15 import com.google.gson.Gson;
16
17 /**
18  *
19  * @author Q42 - Initial contribution
20  * @author Denis Dudnik - moved Jue library source code inside the smarthome Hue binding
21  * @author Samuel Leisering - changed Command visibility to public
22  */
23 public class Command {
24     public String key;
25     public Object value;
26
27     public Command(String key, Object value) {
28         this.key = key;
29         this.value = value;
30     }
31
32     String toJson() {
33         return "\"" + key + "\":" + new Gson().toJson(value);
34     }
35 }