2 * Copyright (c) 2010-2023 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.neeo.internal.models;
15 import java.util.Arrays;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
18 import org.eclipse.jdt.annotation.Nullable;
21 * The model representing an execute result (serialize/deserialize json use only)
23 * @author Tim Roberts - Initial contribution
26 public class ExecuteResult {
28 /** The estimated duration */
29 private int estimatedDuration;
36 private long startTime;
39 private ExecuteStep @Nullable [] steps;
46 * Gets the estimated duration.
48 * @return the estimated duration
50 public int getEstimatedDuration() {
51 return estimatedDuration;
60 public String getName() {
65 * Gets the start time.
67 * @return the start time
69 public long getStartTime() {
78 public ExecuteStep[] getSteps() {
79 final ExecuteStep @Nullable [] localSteps = steps;
80 return localSteps == null ? new ExecuteStep[0] : localSteps;
89 public String getType() {
94 public String toString() {
95 return "ExecuteResult [estimatedDuration=" + estimatedDuration + ", name=" + name + ", startTime=" + startTime
96 + ", steps=" + Arrays.toString(steps) + ", type=" + type + "]";