2 * Copyright (c) 2010-2022 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.binding.hue.internal;
15 import java.util.Date;
19 * @author Q42 - Initial contribution
20 * @author Denis Dudnik - moved Jue library source code inside the smarthome Hue binding
22 @SuppressWarnings("unused")
23 class CreateScheduleRequest {
25 private String description;
26 private ScheduleCommand command;
29 public CreateScheduleRequest(String name, String description, ScheduleCommand command, Date time) {
30 if (name != null && Util.stringSize(name) > 32) {
31 throw new IllegalArgumentException("Schedule name can be at most 32 characters long");
34 if (description != null && Util.stringSize(description) > 64) {
35 throw new IllegalArgumentException("Schedule description can be at most 64 characters long");
38 if (command == null) {
39 throw new IllegalArgumentException("No schedule command specified");
43 this.description = description;
44 this.command = command;