]> git.basschouten.com Git - openhab-addons.git/blob
d5e69b6f0ee3565b03b296ef657e1e89562b7018
[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 TankerkoenigListResult} class is the representing java model for the json result of the tankerkoenig.de
19  * api
20  *
21  * @author Dennis Dollinger - Initial contribution
22  */
23 public class TankerkoenigListResult {
24
25     private boolean ok;
26     private Prices prices;
27     private String message;
28
29     public boolean isOk() {
30         return ok;
31     }
32
33     public void setOk(boolean ok) {
34         this.ok = ok;
35     }
36
37     public Prices getPrices() {
38         return prices;
39     }
40
41     public void setPrices(Prices prices) {
42         this.prices = prices;
43     }
44
45     public static TankerkoenigListResult emptyResult() {
46         TankerkoenigListResult emptyResult = new TankerkoenigListResult();
47         emptyResult.setOk(false);
48         emptyResult.setMessage(TankerkoenigBindingConstants.NO_VALID_RESPONSE);
49         return emptyResult;
50     }
51
52     public String getMessage() {
53         return message;
54     }
55
56     public void setMessage(String message) {
57         this.message = message;
58     }
59 }