]> git.basschouten.com Git - openhab-addons.git/blob
d46c816411f4fcbedf0fbd40eea324722d9f6fe5
[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.tankerkoenig.internal.dto;
14
15 import org.openhab.binding.tankerkoenig.internal.TankerkoenigBindingConstants;
16
17 /***
18  * The {@link TankerkoenigDetailResult} class is the representing java model for the json result of the tankerkoenig.de
19  * details request
20  * Actually used for OpeningTimes only.
21  *
22  * @author Dennis Dollinger - Initial contribution
23  * @author Jürgen Baginski - Initial contribution
24  */
25 public class TankerkoenigDetailResult {
26
27     private boolean ok;
28     private boolean wholeDay;
29     private OpeningTimes openingTimes;
30     private LittleStation littleStation;
31     private String message;
32
33     public boolean isOk() {
34         return ok;
35     }
36
37     public void setOk(boolean ok) {
38         this.ok = ok;
39     }
40
41     public boolean iswholeDay() {
42         return wholeDay;
43     }
44
45     public void setwholeDay(boolean WholeDay) {
46         this.wholeDay = WholeDay;
47     }
48
49     public static TankerkoenigDetailResult emptyResult() {
50         TankerkoenigDetailResult emptyResult = new TankerkoenigDetailResult();
51         emptyResult.setOk(false);
52         emptyResult.setMessage(TankerkoenigBindingConstants.NO_VALID_RESPONSE);
53         return emptyResult;
54     }
55
56     public LittleStation getLittleStation() {
57         return littleStation;
58     }
59
60     public void setLittleStation(LittleStation littleStation) {
61         this.littleStation = littleStation;
62     }
63
64     public OpeningTimes getOpeningTimes() {
65         return openingTimes;
66     }
67
68     public void setOpeningTimes(OpeningTimes openingTimes) {
69         this.openingTimes = openingTimes;
70     }
71
72     public String getMessage() {
73         return message;
74     }
75
76     public void setMessage(String message) {
77         this.message = message;
78     }
79 }