]> git.basschouten.com Git - openhab-addons.git/blob
f088f8c9fab5b5f23c882e72536b19dbf130d6fb
[openhab-addons.git] /
1 /**
2  * Copyright (c) 2010-2024 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.automower.internal.rest.api.automowerconnect.dto;
14
15 import java.util.ArrayList;
16
17 /**
18  * @author Markus Pfleger - Initial contribution
19  */
20 public class MowerData {
21     private System system;
22     private Battery battery;
23     private MowerApp mower;
24     private Calendar calendar;
25     private Planner planner;
26     private Metadata metadata;
27     private ArrayList<Position> positions = new ArrayList<Position>();
28
29     public System getSystem() {
30         return system;
31     }
32
33     public void setSystem(System system) {
34         this.system = system;
35     }
36
37     public Battery getBattery() {
38         return battery;
39     }
40
41     public void setBattery(Battery battery) {
42         this.battery = battery;
43     }
44
45     public MowerApp getMower() {
46         return mower;
47     }
48
49     public void setMower(MowerApp mower) {
50         this.mower = mower;
51     }
52
53     public Calendar getCalendar() {
54         return calendar;
55     }
56
57     public void setCalendar(Calendar calendar) {
58         this.calendar = calendar;
59     }
60
61     public Planner getPlanner() {
62         return planner;
63     }
64
65     public void setPlanner(Planner planner) {
66         this.planner = planner;
67     }
68
69     public Metadata getMetadata() {
70         return metadata;
71     }
72
73     public void setMetadata(Metadata metadata) {
74         this.metadata = metadata;
75     }
76
77     public void addPosition(Position position) {
78         this.positions.add(position);
79     }
80
81     public ArrayList<Position> getPositions() {
82         return this.positions;
83     }
84
85     public Position getLastPosition() {
86         return !this.positions.isEmpty() ? this.positions.get(0) : null;
87     }
88 }