]> git.basschouten.com Git - openhab-addons.git/blob
051184433cfecea7dd18725017457f362abd56ee
[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.groupepsa.internal.rest.api.dto;
14
15 import java.math.BigDecimal;
16 import java.time.ZonedDateTime;
17
18 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import org.eclipse.jdt.annotation.Nullable;
20
21 /**
22  * @author Arjan Mels - Initial contribution
23  */
24 @NonNullByDefault
25 public class Energy {
26
27     private @Nullable ZonedDateTime updatedAt;
28     private @Nullable ZonedDateTime createdAt;
29     private @Nullable BigDecimal autonomy;
30     private @Nullable BatteryStatus battery;
31     private @Nullable Charging charging;
32     private @Nullable BigDecimal consumption;
33     private @Nullable BigDecimal level;
34     private @Nullable BigDecimal residual;
35     private @Nullable String type;
36
37     public @Nullable ZonedDateTime getUpdatedAt() {
38         return updatedAt;
39     }
40
41     public @Nullable ZonedDateTime getCreatedAt() {
42         return createdAt;
43     }
44
45     public @Nullable BigDecimal getAutonomy() {
46         return autonomy;
47     }
48
49     public @Nullable BatteryStatus getBattery() {
50         return battery;
51     }
52
53     public @Nullable Charging getCharging() {
54         return charging;
55     }
56
57     public @Nullable BigDecimal getConsumption() {
58         return consumption;
59     }
60
61     public @Nullable BigDecimal getLevel() {
62         return level;
63     }
64
65     public @Nullable BigDecimal getResidual() {
66         return residual;
67     }
68
69     public @Nullable String getType() {
70         return type;
71     }
72
73     @Override
74     public String toString() {
75         return new ToStringBuilder(this).append("updatedAt", updatedAt).append("createdAt", createdAt)
76                 .append("autonomy", autonomy).append("battery", battery).append("charging", charging)
77                 .append("consumption", consumption).append("level", level).append("residual", residual)
78                 .append("type", type).toString();
79     }
80 }