]> git.basschouten.com Git - openhab-addons.git/blob
6155f712df61904afbb4bc5b6dfced3702adc082
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2022 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.request;
14
15 /**
16  * Builder for timed API requests
17  *
18  * @author Jasper van Zuijlen - Initial contribution
19  *
20  */
21 public abstract class TimedRequestBuilder<T> implements RequestBuilder<T> {
22     private boolean useEndTime;
23     private int year;
24     private int month;
25     private int day;
26
27     public RequestBuilder<T> withEndTime(int year, int month, int day) {
28         this.useEndTime = true;
29         this.year = year;
30         this.month = month;
31         this.day = day;
32         return this;
33     }
34
35     protected boolean useEndTime() {
36         return useEndTime;
37     }
38
39     protected int getYear() {
40         return year;
41     }
42
43     protected int getMonth() {
44         return month;
45     }
46
47     protected int getDay() {
48         return day;
49     }
50 }