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.io.hueemulation.internal.dto.changerequest;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
18 * Commands are http request data (method+url+body) used by schedules and rules.
20 * Note: Rules use shorter address variants without the "/api/username" parts, which
21 * makes them no valid relative urls!
23 * @author David Graeff - Initial contribution
26 public class HueCommand {
27 public String address = "";
28 public String method = "";
29 public String body = "";
31 public boolean isValid() {
32 return !address.isEmpty() && !method.isEmpty() && !body.isEmpty();
38 public HueCommand(String address, String method, String body) {
39 this.address = address;