public static void validatePreviewSnapshot(Action action) { if (action == null) { throw new ValidationException("Action is mandatory but was not provided."); } if (action.getSnapshot()==null || action.getSnapshot().getId()==null) { throw new ValidationException("Parameter 'snapshot.id' is mandatory but was not provided."); } }
validateParameters(action, "snapshot.id"); TryBackToAllSnapshotsOfVmParameters tryBackParams = new TryBackToAllSnapshotsOfVmParameters(guid, asGuid(action.getSnapshot().getId())); if (action.isSetRestoreMemory()) { tryBackParams.setRestoreMemory(action.isRestoreMemory());
to.setSnapshot(adaptOut(from.getSnapshot()));