zaber.motion.exceptions.MovementInterruptedExceptionData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of motion-library Show documentation
Show all versions of motion-library Show documentation
A library that aims to provide easy-to-use API for communication with Zaber devices using Zaber ASCII Protocol.
// ===== THIS FILE IS GENERATED FROM A TEMPLATE ===== //
// ============== DO NOT EDIT DIRECTLY ============== //
package zaber.motion.exceptions;
import java.util.Arrays;
import zaber.motion.protobufs.Main;
/**
* Contains additional data for MovementInterruptedException.
*/
public final class MovementInterruptedExceptionData {
private String[] warnings;
/**
* The full list of warnings.
*/
public void setWarnings(String[] warnings) {
this.warnings = warnings;
}
/**
* @return The full list of warnings.
*/
public String[] getWarnings() {
return this.warnings;
}
private String reason;
/**
* The reason for the Exception.
*/
public void setReason(String reason) {
this.reason = reason;
}
/**
* @return The reason for the Exception.
*/
public String getReason() {
return this.reason;
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("MovementInterruptedExceptionData { ");
sb.append("warnings: ");
sb.append(Arrays.toString(this.warnings));
sb.append(", ");
sb.append("reason: ");
sb.append(this.reason);
sb.append(" }");
return sb.toString();
}
public static MovementInterruptedExceptionData fromProtobuf(Main.MovementInterruptedExceptionData pbData) {
MovementInterruptedExceptionData obj = new MovementInterruptedExceptionData();
obj.setWarnings(pbData.getWarningsList().
stream().toArray(String[]::new));
obj.setReason(pbData.getReason());
return obj;
}
}