2 * Copyright (c) 2010-2024 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
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
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.automower.internal.rest.api.automowerconnect.dto;
15 import java.util.ArrayList;
18 * @author Markus Pfleger - Initial contribution
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>();
29 public System getSystem() {
33 public void setSystem(System system) {
37 public Battery getBattery() {
41 public void setBattery(Battery battery) {
42 this.battery = battery;
45 public MowerApp getMower() {
49 public void setMower(MowerApp mower) {
53 public Calendar getCalendar() {
57 public void setCalendar(Calendar calendar) {
58 this.calendar = calendar;
61 public Planner getPlanner() {
65 public void setPlanner(Planner planner) {
66 this.planner = planner;
69 public Metadata getMetadata() {
73 public void setMetadata(Metadata metadata) {
74 this.metadata = metadata;
77 public void addPosition(Position position) {
78 this.positions.add(position);
81 public ArrayList<Position> getPositions() {
82 return this.positions;
85 public Position getLastPosition() {
86 return !this.positions.isEmpty() ? this.positions.get(0) : null;