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.binding.sensibo.internal.dto.settimer;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.eclipse.jetty.http.HttpMethod;
17 import org.openhab.binding.sensibo.internal.dto.AbstractRequest;
18 import org.openhab.binding.sensibo.internal.dto.poddetails.AcStateDTO;
21 * All classes in the ..binding.sensibo.dto are data transfer classes used by the GSON mapper. This class reflects a
22 * part of a request/response data structure.
24 * @author Arne Seime - Initial contribution.
27 public class SetTimerRequest extends AbstractRequest {
28 public final transient String podId; // Transient fields are ignored by gson
29 public final AcStateDTO acState;
30 public final int minutesFromNow;
32 public SetTimerRequest(String podId, int minutesFromNow, AcStateDTO acState) {
34 this.acState = acState;
35 this.minutesFromNow = minutesFromNow;
39 public String getRequestUrl() {
40 return String.format("/v1/pods/%s/timer/", podId);
44 public String getMethod() {
45 return HttpMethod.PUT.asString();