]> git.basschouten.com Git - openhab-addons.git/blob
125147f98929bf673eae5fceb33df2e2f5383557
[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.evohome.internal.api.models.v2.dto.request;
14
15 import com.google.gson.annotations.SerializedName;
16
17 /**
18  * Request model for the mode
19  *
20  * @author Jasper van Zuijlen - Initial contribution
21  *
22  */
23 public class Mode {
24
25     Mode(String mode) {
26         systemMode = mode;
27         timeUntil = null;
28         permanent = true;
29     }
30
31     Mode(String mode, int day, int month, int year) {
32         systemMode = mode;
33         timeUntil = String.format("%s-%s-%sT00:00:00Z", year, month, day);
34         permanent = false;
35     }
36
37     @SuppressWarnings("unused")
38     @SerializedName("systemMode")
39     private String systemMode;
40
41     @SuppressWarnings("unused")
42     @SerializedName("timeUntil")
43     private String timeUntil;
44
45     @SuppressWarnings("unused")
46     @SerializedName("permanent")
47     private boolean permanent;
48 }