├── .gitignore ├── .travis.yml ├── README.md ├── client-examples ├── pom.xml └── src │ ├── main │ └── java │ │ └── com │ │ └── graphhopper │ │ └── directions │ │ └── api │ │ └── examples │ │ ├── GeocodingExample.java │ │ ├── IsochroneExample.java │ │ ├── RoutingExample.java │ │ ├── TSP_BiggestCitiesInGermanyByBikeExample.java │ │ ├── TSP_BiggestCitiesInGermanyExample.java │ │ ├── VRP_DemoExample.java │ │ ├── VRP_WithShipmentExample.java │ │ └── VRP_WithSkillsExample.java │ └── test │ └── java │ └── com │ └── graphhopper │ └── directions │ └── api │ └── client │ └── api │ ├── GeocodingApiTest.java │ ├── IsochroneApiTest.java │ ├── MatrixApiTest.java │ ├── RoutingApiTest.java │ ├── SolutionApiTest.java │ └── VrpApiTest.java ├── client ├── .gitignore ├── .swagger-codegen-ignore ├── .travis.yml ├── README.md ├── build.gradle ├── build.sbt ├── docs │ ├── Activity.md │ ├── Address.md │ ├── Algorithm.md │ ├── CostMatrix.md │ ├── CostMatrixData.md │ ├── CostMatrixDataInfo.md │ ├── GHError.md │ ├── GHErrorHints.md │ ├── GeocodingApi.md │ ├── GeocodingLocation.md │ ├── GeocodingPoint.md │ ├── GeocodingResponse.md │ ├── IsochroneApi.md │ ├── IsochroneResponse.md │ ├── IsochroneResponsePolygon.md │ ├── IsochroneResponsePolygonGeometry.md │ ├── IsochroneResponsePolygonProperties.md │ ├── JobId.md │ ├── Location.md │ ├── MatrixApi.md │ ├── MatrixRequest.md │ ├── MatrixResponse.md │ ├── ModelBreak.md │ ├── ModelConfiguration.md │ ├── Objective.md │ ├── Relation.md │ ├── Request.md │ ├── Response.md │ ├── ResponseCoordinates.md │ ├── ResponseCoordinatesArray.md │ ├── ResponseInfo.md │ ├── ResponseInstruction.md │ ├── ResponseInstructions.md │ ├── Route.md │ ├── RoutePoint.md │ ├── RouteResponse.md │ ├── RouteResponsePath.md │ ├── Routing.md │ ├── RoutingApi.md │ ├── Service.md │ ├── Shipment.md │ ├── Solution.md │ ├── SolutionApi.md │ ├── SolutionUnassigned.md │ ├── Stop.md │ ├── TimeWindow.md │ ├── Vehicle.md │ ├── VehicleType.md │ └── VrpApi.md ├── git_push.sh ├── gradle.properties ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── pom.xml ├── settings.gradle └── src │ ├── main │ ├── AndroidManifest.xml │ └── java │ │ └── com │ │ └── graphhopper │ │ └── directions │ │ └── api │ │ └── client │ │ ├── ApiCallback.java │ │ ├── ApiClient.java │ │ ├── ApiException.java │ │ ├── ApiResponse.java │ │ ├── Configuration.java │ │ ├── JSON.java │ │ ├── Pair.java │ │ ├── ProgressRequestBody.java │ │ ├── ProgressResponseBody.java │ │ ├── StringUtil.java │ │ ├── api │ │ ├── GeocodingApi.java │ │ ├── IsochroneApi.java │ │ ├── MatrixApi.java │ │ ├── RoutingApi.java │ │ ├── SolutionApi.java │ │ └── VrpApi.java │ │ ├── auth │ │ ├── ApiKeyAuth.java │ │ ├── Authentication.java │ │ ├── HttpBasicAuth.java │ │ ├── OAuth.java │ │ └── OAuthFlow.java │ │ └── model │ │ ├── Activity.java │ │ ├── Address.java │ │ ├── Algorithm.java │ │ ├── CostMatrix.java │ │ ├── CostMatrixData.java │ │ ├── CostMatrixDataInfo.java │ │ ├── GHError.java │ │ ├── GHErrorHints.java │ │ ├── GeocodingLocation.java │ │ ├── GeocodingPoint.java │ │ ├── GeocodingResponse.java │ │ ├── IsochroneResponse.java │ │ ├── IsochroneResponsePolygon.java │ │ ├── IsochroneResponsePolygonGeometry.java │ │ ├── IsochroneResponsePolygonProperties.java │ │ ├── JobId.java │ │ ├── Location.java │ │ ├── MatrixRequest.java │ │ ├── MatrixResponse.java │ │ ├── ModelBreak.java │ │ ├── ModelConfiguration.java │ │ ├── Objective.java │ │ ├── Relation.java │ │ ├── Request.java │ │ ├── Response.java │ │ ├── ResponseCoordinates.java │ │ ├── ResponseCoordinatesArray.java │ │ ├── ResponseInfo.java │ │ ├── ResponseInstruction.java │ │ ├── ResponseInstructions.java │ │ ├── Route.java │ │ ├── RoutePoint.java │ │ ├── RouteResponse.java │ │ ├── RouteResponsePath.java │ │ ├── Routing.java │ │ ├── Service.java │ │ ├── Shipment.java │ │ ├── Solution.java │ │ ├── SolutionUnassigned.java │ │ ├── Stop.java │ │ ├── TimeWindow.java │ │ ├── Vehicle.java │ │ └── VehicleType.java │ └── test │ └── java │ └── com │ └── graphhopper │ └── directions │ └── api │ └── client │ └── api │ ├── GeocodingApiTest.java │ ├── IsochroneApiTest.java │ ├── MatrixApiTest.java │ ├── RoutingApiTest.java │ ├── SolutionApiTest.java │ └── VrpApiTest.java └── pom.xml /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | /target/ 3 | nbactions.xml 4 | */target/ 5 | .idea/ 6 | *iml 7 | .settings/ 8 | .classpath 9 | .project 10 | 11 | swagger-codegen/ 12 | swagger-codegen-cli.jar 13 | swagger-codegen-cli*.jar -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: 3 | - oraclejdk8 4 | script: 5 | - mvn clean test verify 6 | notifications: 7 | email: 8 | - github@graphhopper.com -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Deprecated Repo for the Java and Android client for the GraphHopper Directions API 2 | 3 | The [autogenerated Java and Android client](https://github.com/graphhopper/directions-api-clients) is in a different repository and the handcrafted version is part of [GraphHopper core](https://github.com/graphhopper/graphhopper/tree/master/client-hc). 4 | -------------------------------------------------------------------------------- /client-examples/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.graphhopper 7 | directions-api-client-examples 8 | 0.10-SNAPSHOT 9 | jar 10 | GraphHopper Directions API examples 11 | 12 | 13 | com.graphhopper 14 | directions-api-client-parent 15 | 0.10-SNAPSHOT 16 | 17 | 18 | 19 | 1.7.21 20 | UTF-8 21 | UTF-8 22 | 23 | 24 | 25 | 26 | com.graphhopper 27 | directions-api-client 28 | ${project.parent.version} 29 | 30 | 31 | 32 | 33 | 34 | org.apache.maven.plugins 35 | maven-compiler-plugin 36 | 3.3 37 | 38 | -XDignore.symbol.file 39 | true 40 | 1.7 41 | 1.7 42 | 43 | 44 | 45 | 46 | 47 | org.apache.maven.plugins 48 | maven-surefire-plugin 49 | 2.19.1 50 | 51 | -Xmx100m -Xms100m 52 | 53 | 54 | 55 | 56 | org.apache.maven.plugins 57 | maven-failsafe-plugin 58 | 2.19.1 59 | 60 | 61 | 62 | integration-test 63 | verify 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /client-examples/src/main/java/com/graphhopper/directions/api/examples/GeocodingExample.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.directions.api.examples; 2 | 3 | import com.graphhopper.directions.api.client.api.GeocodingApi; 4 | import com.graphhopper.directions.api.client.model.GeocodingLocation; 5 | import com.graphhopper.directions.api.client.model.GeocodingResponse; 6 | 7 | /** 8 | * A simple geocoding request. 9 | */ 10 | public class GeocodingExample { 11 | public static void main(String[] args) { 12 | new GeocodingExample().start(); 13 | } 14 | 15 | private void start() { 16 | GeocodingApi geocoding = new GeocodingApi(); 17 | String key = System.getProperty("graphhopper.key", ""); 18 | try { 19 | GeocodingResponse geocodingResponse = geocoding.geocodeGet(key, "bautzen", "de", 5, false, "", "default"); 20 | GeocodingLocation loc0 = geocodingResponse.getHits().get(0); 21 | System.out.println(loc0.getPoint() + ", " + loc0.getName() + ", " + loc0.getCountry() + ", " + loc0.getState()); 22 | } catch (Exception ex) { 23 | throw new RuntimeException(ex); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /client-examples/src/main/java/com/graphhopper/directions/api/examples/IsochroneExample.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.directions.api.examples; 2 | 3 | import com.graphhopper.directions.api.client.api.IsochroneApi; 4 | import com.graphhopper.directions.api.client.model.IsochroneResponse; 5 | import com.graphhopper.directions.api.client.model.IsochroneResponsePolygon; 6 | import com.graphhopper.directions.api.client.model.ResponseCoordinatesArray; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * A simple Isochrone example 12 | */ 13 | public class IsochroneExample { 14 | public static void main(String[] args) { 15 | new IsochroneExample().start(); 16 | } 17 | 18 | private void start() { 19 | IsochroneApi isochrone = new IsochroneApi(); 20 | String key = System.getProperty("graphhopper.key", ""); 21 | try { 22 | // Please note: the request string for the point has the order "lat,lon" but the response contains 23 | // an array with the order [lon,lat] 24 | IsochroneResponse rsp = isochrone.isochroneGet("51.183728,14.42801", key, 10 * 60, -1, "car", 25 | 3, false); 26 | final IsochroneResponsePolygon isochrone0 = rsp.getPolygons().get(0); 27 | ResponseCoordinatesArray exteriorRing = isochrone0.getGeometry().getCoordinates().get(0); 28 | System.out.println(exteriorRing); 29 | double lon0 = ((Number) exteriorRing.get(0).get(0)).doubleValue(); 30 | double lat0 = ((Number) exteriorRing.get(0).get(1)).doubleValue(); 31 | System.out.println("first coord " + lat0 + ", " + lon0); 32 | } catch (Exception ex) { 33 | throw new RuntimeException(ex); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /client-examples/src/main/java/com/graphhopper/directions/api/examples/RoutingExample.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.directions.api.examples; 2 | 3 | import com.graphhopper.directions.api.client.ApiException; 4 | import com.graphhopper.directions.api.client.api.RoutingApi; 5 | import com.graphhopper.directions.api.client.model.ResponseInstruction; 6 | import com.graphhopper.directions.api.client.model.RouteResponse; 7 | import com.graphhopper.directions.api.client.model.RouteResponsePath; 8 | 9 | import java.util.Arrays; 10 | 11 | /** 12 | * A simple example for querying the Routing API. 13 | */ 14 | public class RoutingExample { 15 | public static void main(String[] args) { 16 | new RoutingExample().start(); 17 | } 18 | 19 | private void start() { 20 | RoutingApi routing = new RoutingApi(); 21 | String key = System.getProperty("graphhopper.key", ""); 22 | try { 23 | RouteResponse rsp = routing.routeGet(Arrays.asList("48.58467,11.57753", "48.572859,11.592464"), false, key, 24 | "en", true, "car", true, true, Arrays.asList(), false, 25 | "fastest", null, null, null, null, null, 26 | null, null, null, null, null); 27 | RouteResponsePath path = rsp.getPaths().get(0); 28 | ResponseInstruction instr = path.getInstructions().get(0); 29 | System.out.println(instr.getText()); 30 | } catch (ApiException ex) { 31 | System.out.println(ex.getResponseBody()); 32 | throw new RuntimeException(ex); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /client-examples/src/main/java/com/graphhopper/directions/api/examples/TSP_BiggestCitiesInGermanyByBikeExample.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.directions.api.examples; 2 | 3 | import com.graphhopper.directions.api.client.api.VrpApi; 4 | import com.graphhopper.directions.api.client.api.SolutionApi; 5 | import com.graphhopper.directions.api.client.model.*; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | /** 11 | * Let us now assume that you want to make this round trip a bit more exciting 12 | * and challenging, thus you decide to switch from boring car to bike (you will 13 | * definitely be a hero if you manage the round trip by bike). Here, you cannot 14 | * use the default vehicle type anymore, but you need to define your bike 15 | * yourself. This requires two changes, first define a vehicle type in 16 | * vehicle_types and second make a reference to the specified type in your 17 | * vehicle with type_id. 18 | */ 19 | public class TSP_BiggestCitiesInGermanyByBikeExample { 20 | 21 | public static void main(String[] args) throws Exception { 22 | new TSP_BiggestCitiesInGermanyByBikeExample().start(); 23 | } 24 | 25 | private void start() throws Exception { 26 | Request request = createRequest(); 27 | VrpApi vrpApi = new VrpApi(); 28 | 29 | // enable debugging for sending and receiving requests 30 | // ApiClient client = new ApiClient().setDebugging(true); 31 | // vrpApi.setApiClient(client); 32 | 33 | String key = System.getProperty("graphhopper.key", ""); 34 | JobId jobId = vrpApi.postVrp(key, request); 35 | 36 | System.out.println(getClass() + ", jobId: " + jobId.getJobId()); 37 | 38 | SolutionApi solApi = new SolutionApi(); 39 | Response rsp; 40 | 41 | while (true) { 42 | rsp = solApi.getSolution(key, jobId.getJobId()); 43 | if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { 44 | break; 45 | } 46 | Thread.sleep(200); 47 | } 48 | System.out.println(rsp); 49 | 50 | } 51 | 52 | private Request createRequest() { 53 | Request request = new Request(); 54 | request.setAlgorithm(new Algorithm()); 55 | /* 56 | specify vehicles 57 | */ 58 | List vehicles = new ArrayList(); 59 | 60 | Vehicle v = new Vehicle(); 61 | v.setVehicleId("v1"); 62 | v.setStartAddress(createAddress("berlin", 52.537, 13.406)); 63 | v.setTypeId("my-awesome-bike"); 64 | vehicles.add(v); 65 | request.setVehicles(vehicles); 66 | 67 | /* 68 | specify vehicle type 69 | */ 70 | List types = new ArrayList(); 71 | VehicleType type = new VehicleType(); 72 | type.setProfile(VehicleType.ProfileEnum.BIKE); 73 | type.setTypeId("my-awesome-bike"); 74 | types.add(type); 75 | request.setVehicleTypes(types); 76 | 77 | /* 78 | specify your services 79 | */ 80 | List services = new ArrayList(); 81 | 82 | services.add(createService("hamburg", 53.552, 9.999)); 83 | services.add(createService("munich", 48.145, 11.570)); 84 | services.add(createService("cologne", 50.936, 6.957)); 85 | services.add(createService("frankfurt", 50.109, 8.670)); 86 | 87 | request.setServices(services); 88 | 89 | return request; 90 | } 91 | 92 | public Address createAddress(String locationId, double lat, double lon) { 93 | Address a = new Address(); 94 | a.setLat(lat); 95 | a.setLon(lon); 96 | a.setLocationId(locationId); 97 | return a; 98 | } 99 | 100 | public Service createService(String id, double lat, double lon) { 101 | Service service = new Service(); 102 | service.setId(id); 103 | service.setType(Service.TypeEnum.SERVICE); 104 | service.setAddress(createAddress(id, lat, lon)); 105 | return service; 106 | } 107 | 108 | } 109 | -------------------------------------------------------------------------------- /client-examples/src/main/java/com/graphhopper/directions/api/examples/TSP_BiggestCitiesInGermanyExample.java: -------------------------------------------------------------------------------- 1 | package com.graphhopper.directions.api.examples; 2 | 3 | import com.graphhopper.directions.api.client.api.VrpApi; 4 | import com.graphhopper.directions.api.client.api.SolutionApi; 5 | import com.graphhopper.directions.api.client.model.*; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | /** 11 | * Created by schroeder on 21/05/15. 12 | */ 13 | public class TSP_BiggestCitiesInGermanyExample { 14 | 15 | public static void main(String[] args) throws Exception { 16 | new TSP_BiggestCitiesInGermanyExample().start(); 17 | } 18 | 19 | private void start() throws Exception { 20 | 21 | Request request = createRequest(); 22 | VrpApi vrpApi = new VrpApi(); 23 | 24 | // enable debugging for sending and receiving requests 25 | // ApiClient client = new ApiClient().setDebugging(true); 26 | // vrpApi.setApiClient(client); 27 | 28 | String key = System.getProperty("graphhopper.key", ""); 29 | JobId jobId = vrpApi.postVrp(key, request); 30 | 31 | System.out.println(getClass() + ", jobId: " + jobId.getJobId()); 32 | 33 | SolutionApi solApi = new SolutionApi(); 34 | Response rsp; 35 | 36 | while (true) { 37 | rsp = solApi.getSolution(key, jobId.getJobId()); 38 | if (rsp.getStatus().equals(Response.StatusEnum.FINISHED)) { 39 | break; 40 | } 41 | Thread.sleep(200); 42 | } 43 | System.out.println(rsp); 44 | 45 | } 46 | 47 | private Request createRequest() { 48 | Request request = new Request(); 49 | request.setAlgorithm(new Algorithm()); 50 | 51 | /* 52 | specify vehicles 53 | */ 54 | List vehicles = new ArrayList(); 55 | 56 | Vehicle v = new Vehicle(); 57 | v.setVehicleId("v1"); 58 | v.setStartAddress(createAddress("berlin", 52.537, 13.406)); 59 | vehicles.add(v); 60 | request.setVehicles(vehicles); 61 | 62 | /* 63 | specify your services 64 | */ 65 | List services = new ArrayList(); 66 | 67 | services.add(createService("hamburg", 53.552, 9.999)); 68 | services.add(createService("munich", 48.145, 11.570)); 69 | services.add(createService("cologne", 50.936, 6.957)); 70 | services.add(createService("frankfurt", 50.109, 8.670)); 71 | 72 | request.setServices(services); 73 | 74 | return request; 75 | } 76 | 77 | public Address createAddress(String locationId, double lat, double lon) { 78 | Address a = new Address(); 79 | a.setLat(lat); 80 | a.setLon(lon); 81 | a.setLocationId(locationId); 82 | return a; 83 | } 84 | 85 | public Service createService(String id, double lat, double lon) { 86 | Service service = new Service(); 87 | service.setId(id); 88 | service.setType(Service.TypeEnum.SERVICE); 89 | service.setAddress(createAddress(id, lat, lon)); 90 | return service; 91 | } 92 | 93 | } 94 | -------------------------------------------------------------------------------- /client-examples/src/test/java/com/graphhopper/directions/api/client/api/IsochroneApiTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.api; 15 | 16 | import com.graphhopper.directions.api.client.ApiException; 17 | import com.graphhopper.directions.api.client.model.IsochroneResponse; 18 | import org.junit.Test; 19 | import org.junit.Ignore; 20 | 21 | 22 | import static org.junit.Assert.assertEquals; 23 | 24 | /** 25 | * API tests for IsochroneApi 26 | */ 27 | @Ignore 28 | public class IsochroneApiTest { 29 | 30 | private final IsochroneApi api = new IsochroneApi(); 31 | 32 | public static final String KEY = "614b8305-b4db-48c9-bf4a-40de90919939"; 33 | 34 | /** 35 | * Isochrone Request 36 | *

37 | * The GraphHopper Isochrone API allows calculating an isochrone of a locations means to calculate 'a line connecting points at which a vehicle arrives at the same time,' see [Wikipedia](http://en.wikipedia.org/wiki/Isochrone_map). It is also called **reachability** or **walkability**. 38 | * 39 | * @throws ApiException if the Api call fails 40 | */ 41 | @Test 42 | public void isochroneGetTest() throws ApiException { 43 | String point = "-33.678555,151.303432"; 44 | String key = KEY; 45 | Integer timeLimit = null; 46 | Integer distanceLimit = null; 47 | String vehicle = null; 48 | Integer buckets = null; 49 | Boolean reverseFlow = null; 50 | IsochroneResponse response = api.isochroneGet(point, key, timeLimit, distanceLimit, vehicle, buckets, reverseFlow); 51 | assertEquals(1, response.getPolygons().size()); 52 | 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /client-examples/src/test/java/com/graphhopper/directions/api/client/api/MatrixApiTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.api; 15 | 16 | import com.graphhopper.directions.api.client.ApiException; 17 | import com.graphhopper.directions.api.client.model.MatrixRequest; 18 | import com.graphhopper.directions.api.client.model.MatrixResponse; 19 | import org.junit.Test; 20 | import org.junit.Ignore; 21 | 22 | import java.util.*; 23 | 24 | import static org.junit.Assert.assertEquals; 25 | 26 | /** 27 | * API tests for MatrixApi 28 | */ 29 | @Ignore 30 | public class MatrixApiTest { 31 | 32 | private final MatrixApi api = new MatrixApi(); 33 | 34 | public static final String KEY = "614b8305-b4db-48c9-bf4a-40de90919939"; 35 | 36 | /** 37 | * Matrix API 38 | *

39 | * The Matrix API is part of the GraphHopper Directions API and with this API you can calculate many-to-many distances, times or routes a lot more efficient than calling the Routing API multiple times. In the Routing API we support multiple points, so called 'via points', which results in one route being calculated. The Matrix API results in NxM routes or more precise NxM weights, distances or times being calculated but is a lot faster compared to NxM single requests. The most simple example is a tourist trying to decide which pizza is close to him instead of using beeline distance she can calculate a 1x4 matrix. Or a delivery service in the need of often big NxN matrices to solve vehicle routing problems. E.g. the GraphHopper Route Optimization API uses the Matrix API under the hood to achieve this. 40 | * 41 | * @throws ApiException if the Api call fails 42 | */ 43 | @Test 44 | public void matrixGetTest() throws ApiException { 45 | String key = KEY; 46 | List point = Arrays.asList(new String[]{"49.932707,11.588051", "50.241935,10.747375", "50.118817,11.983337"}); 47 | String fromPoint = null; 48 | String toPoint = null; 49 | List outArray = Arrays.asList("weights", "distances", "times"); 50 | String vehicle = null; 51 | MatrixResponse response = api.matrixGet(key, point, fromPoint, toPoint, outArray, vehicle); 52 | assertEquals(3, response.getDistances().size()); 53 | 54 | } 55 | 56 | /** 57 | * Matrix API Post 58 | *

59 | * The GET request has an URL length limitation, which hurts for many locations per request. In those cases use a HTTP POST request with JSON data as input. The only parameter in the URL will be the key which stays in the URL. Both request scenarios are identically except that all singular parameter names are named as their plural for a POST request. 60 | * 61 | * @throws ApiException if the Api call fails 62 | */ 63 | @Test 64 | public void matrixPostTest() throws ApiException { 65 | String key = KEY; 66 | MatrixRequest body = new MatrixRequest(); 67 | List> pointList = new ArrayList<>(); 68 | pointList.add(Arrays.asList(new Double[]{11.588051, 49.932707})); 69 | pointList.add(Arrays.asList(new Double[]{10.747375, 50.241935})); 70 | pointList.add(Arrays.asList(new Double[]{11.983337, 50.118817})); 71 | body.setPoints(pointList); 72 | body.setOutArrays(Arrays.asList("weights", "distances", "times")); 73 | MatrixResponse response = api.matrixPost(key, body); 74 | assertEquals(3, response.getDistances().size()); 75 | 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /client-examples/src/test/java/com/graphhopper/directions/api/client/api/RoutingApiTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.api; 15 | 16 | import com.graphhopper.directions.api.client.ApiException; 17 | import com.graphhopper.directions.api.client.model.RouteResponse; 18 | import org.junit.Test; 19 | import org.junit.Ignore; 20 | 21 | import java.util.*; 22 | 23 | import static org.junit.Assert.assertEquals; 24 | 25 | /** 26 | * API tests for RoutingApi 27 | */ 28 | @Ignore 29 | public class RoutingApiTest { 30 | 31 | private final RoutingApi api = new RoutingApi(); 32 | 33 | public static final String KEY = "614b8305-b4db-48c9-bf4a-40de90919939"; 34 | 35 | /** 36 | * Routing Request 37 | *

38 | * The GraphHopper Routing API allows to calculate route and implement navigation via the turn instructions 39 | * 40 | * @throws ApiException if the Api call fails 41 | */ 42 | @Test 43 | public void routeGetTest() throws ApiException { 44 | List point = Arrays.asList(new String[]{"48.802195, 9.125709", "48.872699, 9.298057"}); 45 | Boolean pointsEncoded = false; 46 | String key = KEY; 47 | String locale = null; 48 | Boolean instructions = null; 49 | String vehicle = null; 50 | Boolean elevation = null; 51 | Boolean calcPoints = null; 52 | List pointHint = null; 53 | Boolean chDisable = null; 54 | String weighting = null; 55 | Boolean edgeTraversal = null; 56 | String algorithm = null; 57 | Integer heading = null; 58 | Integer headingPenalty = null; 59 | Boolean passThrough = null; 60 | Integer roundTripDistance = null; 61 | Long roundTripSeed = null; 62 | Integer alternativeRouteMaxPaths = null; 63 | Integer alternativeRouteMaxWeightFactor = null; 64 | Integer alternativeRouteMaxShareFactor = null; 65 | RouteResponse response = api.routeGet(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor); 66 | assertEquals(1, response.getPaths().size()); 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /client-examples/src/test/java/com/graphhopper/directions/api/client/api/SolutionApiTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.api; 15 | 16 | import com.graphhopper.directions.api.client.ApiException; 17 | import com.graphhopper.directions.api.client.model.Response; 18 | import org.junit.Test; 19 | import org.junit.Ignore; 20 | 21 | /** 22 | * API tests for SolutionApi 23 | */ 24 | @Ignore 25 | public class SolutionApiTest { 26 | 27 | private final SolutionApi api = new SolutionApi(); 28 | 29 | 30 | /** 31 | * Return the solution associated to the jobId 32 | *

33 | * This endpoint returns the solution of a large problems. You can fetch it with the job_id, you have been sent. 34 | * 35 | * @throws ApiException if the Api call fails 36 | */ 37 | @Test 38 | public void getSolutionTest() throws ApiException { 39 | String key = null; 40 | String jobId = null; 41 | Response response = api.getSolution(key, jobId); 42 | 43 | // TODO: test validations 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /client-examples/src/test/java/com/graphhopper/directions/api/client/api/VrpApiTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.api; 15 | 16 | import com.graphhopper.directions.api.client.ApiException; 17 | import com.graphhopper.directions.api.client.model.JobId; 18 | import com.graphhopper.directions.api.client.model.Request; 19 | import org.junit.Test; 20 | import org.junit.Ignore; 21 | 22 | /** 23 | * API tests for VrpApi 24 | */ 25 | @Ignore 26 | public class VrpApiTest { 27 | 28 | private final VrpApi api = new VrpApi(); 29 | 30 | 31 | /** 32 | * Solves vehicle routing problems 33 | *

34 | * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. 35 | * 36 | * @throws ApiException if the Api call fails 37 | */ 38 | @Test 39 | public void postVrpTest() throws ApiException { 40 | String key = null; 41 | Request body = null; 42 | JobId response = api.postVrp(key, body); 43 | 44 | // TODO: test validations 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | *.class 2 | 3 | # Mobile Tools for Java (J2ME) 4 | .mtj.tmp/ 5 | 6 | # Package Files # 7 | *.jar 8 | *.war 9 | *.ear 10 | 11 | # exclude jar for gradle wrapper 12 | !gradle/wrapper/*.jar 13 | 14 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 15 | hs_err_pid* 16 | 17 | # build files 18 | **/target 19 | target 20 | .gradle 21 | build 22 | -------------------------------------------------------------------------------- /client/.swagger-codegen-ignore: -------------------------------------------------------------------------------- 1 | # Swagger Codegen Ignore 2 | # Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /client/.travis.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Generated by: https://github.com/swagger-api/swagger-codegen.git 3 | # 4 | language: java 5 | jdk: 6 | - oraclejdk8 7 | - oraclejdk7 8 | before_install: 9 | # ensure gradlew has proper permission 10 | - chmod a+x ./gradlew 11 | script: 12 | # test using maven 13 | - mvn test 14 | # uncomment below to test using gradle 15 | # - gradle test 16 | # uncomment below to test using sbt 17 | # - sbt test 18 | -------------------------------------------------------------------------------- /client/README.md: -------------------------------------------------------------------------------- 1 | # deprecated 2 | 3 | For the Matrix, Routing or Geocoding API you can use the [handcrafted client](https://search.maven.org/artifact/com.graphhopper/directions-api-client-hc). 4 | 5 | For the Route Optimization API you would need to get our latest OpenAPI spec and create the client jar on your own. See the required steps [here](https://github.com/graphhopper/directions-api-clients#deprecated-notice). 6 | -------------------------------------------------------------------------------- /client/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'idea' 2 | apply plugin: 'eclipse' 3 | 4 | group = 'com.graphhopper' 5 | version = '0.10-SNAPSHOT' 6 | 7 | buildscript { 8 | repositories { 9 | jcenter() 10 | } 11 | dependencies { 12 | classpath 'com.android.tools.build:gradle:1.5.+' 13 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3' 14 | } 15 | } 16 | 17 | repositories { 18 | jcenter() 19 | } 20 | 21 | 22 | if(hasProperty('target') && target == 'android') { 23 | 24 | apply plugin: 'com.android.library' 25 | apply plugin: 'com.github.dcendents.android-maven' 26 | 27 | android { 28 | compileSdkVersion 23 29 | buildToolsVersion '23.0.2' 30 | defaultConfig { 31 | minSdkVersion 14 32 | targetSdkVersion 23 33 | } 34 | compileOptions { 35 | sourceCompatibility JavaVersion.VERSION_1_7 36 | targetCompatibility JavaVersion.VERSION_1_7 37 | } 38 | 39 | // Rename the aar correctly 40 | libraryVariants.all { variant -> 41 | variant.outputs.each { output -> 42 | def outputFile = output.outputFile 43 | if (outputFile != null && outputFile.name.endsWith('.aar')) { 44 | def fileName = "${project.name}-${variant.baseName}-${version}.aar" 45 | output.outputFile = new File(outputFile.parent, fileName) 46 | } 47 | } 48 | } 49 | 50 | dependencies { 51 | provided 'javax.annotation:jsr250-api:1.0' 52 | } 53 | } 54 | 55 | afterEvaluate { 56 | android.libraryVariants.all { variant -> 57 | def task = project.tasks.create "jar${variant.name.capitalize()}", Jar 58 | task.description = "Create jar artifact for ${variant.name}" 59 | task.dependsOn variant.javaCompile 60 | task.from variant.javaCompile.destinationDir 61 | task.destinationDir = project.file("${project.buildDir}/outputs/jar") 62 | task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" 63 | artifacts.add('archives', task); 64 | } 65 | } 66 | 67 | task sourcesJar(type: Jar) { 68 | from android.sourceSets.main.java.srcDirs 69 | classifier = 'sources' 70 | } 71 | 72 | artifacts { 73 | archives sourcesJar 74 | } 75 | 76 | } else { 77 | 78 | apply plugin: 'java' 79 | apply plugin: 'maven' 80 | 81 | sourceCompatibility = JavaVersion.VERSION_1_7 82 | targetCompatibility = JavaVersion.VERSION_1_7 83 | 84 | install { 85 | repositories.mavenInstaller { 86 | pom.artifactId = 'directions-api-client' 87 | } 88 | } 89 | 90 | task execute(type:JavaExec) { 91 | main = System.getProperty('mainClass') 92 | classpath = sourceSets.main.runtimeClasspath 93 | } 94 | } 95 | 96 | dependencies { 97 | compile 'io.swagger:swagger-annotations:1.5.8' 98 | compile 'com.squareup.okhttp:okhttp:2.7.5' 99 | compile 'com.squareup.okhttp:logging-interceptor:2.7.5' 100 | compile 'com.google.code.gson:gson:2.6.2' 101 | compile 'joda-time:joda-time:2.9.3' 102 | testCompile 'junit:junit:4.12' 103 | } 104 | -------------------------------------------------------------------------------- /client/build.sbt: -------------------------------------------------------------------------------- 1 | lazy val root = (project in file(".")). 2 | settings( 3 | organization := "com.graphhopper", 4 | name := "directions-api-client", 5 | version := "0.10-SNAPSHOT", 6 | scalaVersion := "2.11.4", 7 | scalacOptions ++= Seq("-feature"), 8 | javacOptions in compile ++= Seq("-Xlint:deprecation"), 9 | publishArtifact in (Compile, packageDoc) := false, 10 | resolvers += Resolver.mavenLocal, 11 | libraryDependencies ++= Seq( 12 | "io.swagger" % "swagger-annotations" % "1.5.8", 13 | "com.squareup.okhttp" % "okhttp" % "2.7.5", 14 | "com.squareup.okhttp" % "logging-interceptor" % "2.7.5", 15 | "com.google.code.gson" % "gson" % "2.6.2", 16 | "joda-time" % "joda-time" % "2.9.3" % "compile", 17 | "junit" % "junit" % "4.12" % "test", 18 | "com.novocode" % "junit-interface" % "0.10" % "test" 19 | ) 20 | ) 21 | -------------------------------------------------------------------------------- /client/docs/Activity.md: -------------------------------------------------------------------------------- 1 | 2 | # Activity 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **type** | [**TypeEnum**](#TypeEnum) | type of activity | [optional] 8 | **id** | **String** | id referring to the underlying service or shipment, i.e. the shipment or service this activity belongs to | [optional] 9 | **locationId** | **String** | id that refers to address | [optional] 10 | **arrTime** | **Long** | arrival time at this activity in ms | [optional] 11 | **endTime** | **Long** | end time of and thus departure time at this activity | [optional] 12 | **waitingTime** | **Long** | waiting time at this activity in ms | [optional] 13 | **distance** | **Long** | cumulated distance from start to this activity in m | [optional] 14 | **drivingTime** | **Long** | driving time of driver in ms | [optional] 15 | **loadBefore** | **List<Integer>** | Array with size/capacity dimensions before this activity | [optional] 16 | **loadAfter** | **List<Integer>** | Array with size/capacity dimensions after this activity | [optional] 17 | 18 | 19 | 20 | ## Enum: TypeEnum 21 | Name | Value 22 | ---- | ----- 23 | START | "start" 24 | END | "end" 25 | SERVICE | "service" 26 | PICKUPSHIPMENT | "pickupShipment" 27 | DELIVERSHIPMENT | "deliverShipment" 28 | PICKUP | "pickup" 29 | DELIVERY | "delivery" 30 | BREAK | "break" 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /client/docs/Address.md: -------------------------------------------------------------------------------- 1 | 2 | # Address 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **locationId** | **String** | Unique identifier of location | [optional] 8 | **name** | **String** | name of location, e.g. street name plus house number | [optional] 9 | **lon** | **Double** | longitude | [optional] 10 | **lat** | **Double** | latitude | [optional] 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /client/docs/Algorithm.md: -------------------------------------------------------------------------------- 1 | 2 | # Algorithm 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **problemType** | [**ProblemTypeEnum**](#ProblemTypeEnum) | | [optional] 8 | **objective** | [**ObjectiveEnum**](#ObjectiveEnum) | | [optional] 9 | 10 | 11 | 12 | ## Enum: ProblemTypeEnum 13 | Name | Value 14 | ---- | ----- 15 | MIN | "min" 16 | MIN_MAX | "min-max" 17 | 18 | 19 | 20 | ## Enum: ObjectiveEnum 21 | Name | Value 22 | ---- | ----- 23 | TRANSPORT_TIME | "transport_time" 24 | COMPLETION_TIME | "completion_time" 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /client/docs/CostMatrix.md: -------------------------------------------------------------------------------- 1 | 2 | # CostMatrix 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **type** | [**TypeEnum**](#TypeEnum) | type of cost matrix, currently default or google are supported | [optional] 8 | **url** | **String** | URL of matrix service | [optional] 9 | **locationIds** | **List<String>** | | [optional] 10 | **data** | [**CostMatrixData**](CostMatrixData.md) | | [optional] 11 | **profile** | **String** | vehicle profile or empty if catch all fallback | [optional] 12 | 13 | 14 | 15 | ## Enum: TypeEnum 16 | Name | Value 17 | ---- | ----- 18 | DEFAULT | "default" 19 | GOOGLE | "google" 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /client/docs/CostMatrixData.md: -------------------------------------------------------------------------------- 1 | 2 | # CostMatrixData 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **times** | [**List<List<Long>>**](List.md) | | [optional] 8 | **distances** | [**List<List<Double>>**](List.md) | | [optional] 9 | **info** | [**CostMatrixDataInfo**](CostMatrixDataInfo.md) | | [optional] 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /client/docs/CostMatrixDataInfo.md: -------------------------------------------------------------------------------- 1 | 2 | # CostMatrixDataInfo 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **copyrights** | **List<String>** | | [optional] 8 | **took** | **Double** | | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /client/docs/GHError.md: -------------------------------------------------------------------------------- 1 | 2 | # GHError 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **code** | **Integer** | | [optional] 8 | **message** | **String** | | [optional] 9 | **hints** | [**List<GHErrorHints>**](GHErrorHints.md) | | [optional] 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /client/docs/GHErrorHints.md: -------------------------------------------------------------------------------- 1 | 2 | # GHErrorHints 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **message** | **String** | | [optional] 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /client/docs/GeocodingApi.md: -------------------------------------------------------------------------------- 1 | # GeocodingApi 2 | 3 | All URIs are relative to *https://graphhopper.com/api/1* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**geocodeGet**](GeocodingApi.md#geocodeGet) | **GET** /geocode | Execute a Geocoding request 8 | 9 | 10 | 11 | # **geocodeGet** 12 | > GeocodingResponse geocodeGet(key, q, locale, limit, reverse, point, provider) 13 | 14 | Execute a Geocoding request 15 | 16 | This endpoint provides forward and reverse geocoding. For more details, review the official documentation at: https://graphhopper.com/api/1/docs/geocoding/ 17 | 18 | ### Example 19 | ```java 20 | // Import classes: 21 | //import com.graphhopper.directions.api.client.ApiException; 22 | //import com.graphhopper.directions.api.client.api.GeocodingApi; 23 | 24 | 25 | GeocodingApi apiInstance = new GeocodingApi(); 26 | String key = "key_example"; // String | Get your key at graphhopper.com 27 | String q = "q_example"; // String | If you do forward geocoding, then this would be a textual description of the adress you are looking for. If you do reverse geocoding this would be in lat,lon. 28 | String locale = "locale_example"; // String | Display the search results for the specified locale. Currently French (fr), English (en), German (de) and Italian (it) are supported. If the locale wasn't found the default (en) is used. 29 | Integer limit = 56; // Integer | Specify the maximum number of returned results 30 | Boolean reverse = true; // Boolean | Set to true to do a reverse Geocoding request 31 | String point = "point_example"; // String | The location bias in the format 'latitude,longitude' e.g. point=45.93272,11.58803 32 | String provider = "provider_example"; // String | Can be either, default, nominatim, opencagedata 33 | try { 34 | GeocodingResponse result = apiInstance.geocodeGet(key, q, locale, limit, reverse, point, provider); 35 | System.out.println(result); 36 | } catch (ApiException e) { 37 | System.err.println("Exception when calling GeocodingApi#geocodeGet"); 38 | e.printStackTrace(); 39 | } 40 | ``` 41 | 42 | ### Parameters 43 | 44 | Name | Type | Description | Notes 45 | ------------- | ------------- | ------------- | ------------- 46 | **key** | **String**| Get your key at graphhopper.com | 47 | **q** | **String**| If you do forward geocoding, then this would be a textual description of the adress you are looking for. If you do reverse geocoding this would be in lat,lon. | [optional] 48 | **locale** | **String**| Display the search results for the specified locale. Currently French (fr), English (en), German (de) and Italian (it) are supported. If the locale wasn't found the default (en) is used. | [optional] 49 | **limit** | **Integer**| Specify the maximum number of returned results | [optional] 50 | **reverse** | **Boolean**| Set to true to do a reverse Geocoding request | [optional] 51 | **point** | **String**| The location bias in the format 'latitude,longitude' e.g. point=45.93272,11.58803 | [optional] 52 | **provider** | **String**| Can be either, default, nominatim, opencagedata | [optional] 53 | 54 | ### Return type 55 | 56 | [**GeocodingResponse**](GeocodingResponse.md) 57 | 58 | ### Authorization 59 | 60 | No authorization required 61 | 62 | ### HTTP request headers 63 | 64 | - **Content-Type**: Not defined 65 | - **Accept**: application/json 66 | 67 | -------------------------------------------------------------------------------- /client/docs/GeocodingLocation.md: -------------------------------------------------------------------------------- 1 | 2 | # GeocodingLocation 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **point** | [**GeocodingPoint**](GeocodingPoint.md) | | [optional] 8 | **osmId** | **String** | OSM Id | [optional] 9 | **osmType** | **String** | N = node, R = relation, W = way | [optional] 10 | **osmKey** | **String** | The osm key of the result like `place` or `amenity` | [optional] 11 | **name** | **String** | | [optional] 12 | **country** | **String** | | [optional] 13 | **city** | **String** | | [optional] 14 | **state** | **String** | | [optional] 15 | **street** | **String** | | [optional] 16 | **housenumber** | **String** | | [optional] 17 | **postcode** | **String** | | [optional] 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /client/docs/GeocodingPoint.md: -------------------------------------------------------------------------------- 1 | 2 | # GeocodingPoint 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **lat** | **Double** | Latitude | [optional] 8 | **lng** | **Double** | Longitude | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /client/docs/GeocodingResponse.md: -------------------------------------------------------------------------------- 1 | 2 | # GeocodingResponse 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **hits** | [**List<GeocodingLocation>**](GeocodingLocation.md) | | [optional] 8 | **locale** | **String** | | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /client/docs/IsochroneApi.md: -------------------------------------------------------------------------------- 1 | # IsochroneApi 2 | 3 | All URIs are relative to *https://graphhopper.com/api/1* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**isochroneGet**](IsochroneApi.md#isochroneGet) | **GET** /isochrone | Isochrone Request 8 | 9 | 10 | 11 | # **isochroneGet** 12 | > IsochroneResponse isochroneGet(point, key, timeLimit, distanceLimit, vehicle, buckets, reverseFlow) 13 | 14 | Isochrone Request 15 | 16 | The GraphHopper Isochrone API allows calculating an isochrone of a locations means to calculate 'a line connecting points at which a vehicle arrives at the same time,' see [Wikipedia](http://en.wikipedia.org/wiki/Isochrone_map). It is also called **reachability** or **walkability**. 17 | 18 | ### Example 19 | ```java 20 | // Import classes: 21 | //import com.graphhopper.directions.api.client.ApiException; 22 | //import com.graphhopper.directions.api.client.api.IsochroneApi; 23 | 24 | 25 | IsochroneApi apiInstance = new IsochroneApi(); 26 | String point = "point_example"; // String | Specify the start coordinate 27 | String key = "key_example"; // String | Get your key at graphhopper.com 28 | Integer timeLimit = 600; // Integer | Specify which time the vehicle should travel. In seconds. 29 | Integer distanceLimit = -1; // Integer | Specify which distance the vehicle should travel. In meter. 30 | String vehicle = "car"; // String | Possible vehicles are bike, car, foot and [more](https://graphhopper.com/api/1/docs/supported-vehicle-profiles/) 31 | Integer buckets = 1; // Integer | For how many sub intervals an additional polygon should be calculated. 32 | Boolean reverseFlow = false; // Boolean | If `false` the flow goes from point to the polygon, if `true` the flow goes from the polygon \"inside\" to the point. Example usage for `false`: *How many potential customer can be reached within 30min travel time from your store* vs. `true`: *How many customers can reach your store within 30min travel time.* 33 | try { 34 | IsochroneResponse result = apiInstance.isochroneGet(point, key, timeLimit, distanceLimit, vehicle, buckets, reverseFlow); 35 | System.out.println(result); 36 | } catch (ApiException e) { 37 | System.err.println("Exception when calling IsochroneApi#isochroneGet"); 38 | e.printStackTrace(); 39 | } 40 | ``` 41 | 42 | ### Parameters 43 | 44 | Name | Type | Description | Notes 45 | ------------- | ------------- | ------------- | ------------- 46 | **point** | **String**| Specify the start coordinate | 47 | **key** | **String**| Get your key at graphhopper.com | 48 | **timeLimit** | **Integer**| Specify which time the vehicle should travel. In seconds. | [optional] [default to 600] 49 | **distanceLimit** | **Integer**| Specify which distance the vehicle should travel. In meter. | [optional] [default to -1] 50 | **vehicle** | **String**| Possible vehicles are bike, car, foot and [more](https://graphhopper.com/api/1/docs/supported-vehicle-profiles/) | [optional] [default to car] 51 | **buckets** | **Integer**| For how many sub intervals an additional polygon should be calculated. | [optional] [default to 1] 52 | **reverseFlow** | **Boolean**| If `false` the flow goes from point to the polygon, if `true` the flow goes from the polygon \"inside\" to the point. Example usage for `false`&#58; *How many potential customer can be reached within 30min travel time from your store* vs. `true`&#58; *How many customers can reach your store within 30min travel time.* | [optional] [default to false] 53 | 54 | ### Return type 55 | 56 | [**IsochroneResponse**](IsochroneResponse.md) 57 | 58 | ### Authorization 59 | 60 | No authorization required 61 | 62 | ### HTTP request headers 63 | 64 | - **Content-Type**: Not defined 65 | - **Accept**: application/json 66 | 67 | -------------------------------------------------------------------------------- /client/docs/IsochroneResponse.md: -------------------------------------------------------------------------------- 1 | 2 | # IsochroneResponse 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **polygons** | [**List<IsochroneResponsePolygon>**](IsochroneResponsePolygon.md) | | [optional] 8 | **copyrights** | **List<String>** | | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /client/docs/IsochroneResponsePolygon.md: -------------------------------------------------------------------------------- 1 | 2 | # IsochroneResponsePolygon 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **properties** | [**IsochroneResponsePolygonProperties**](IsochroneResponsePolygonProperties.md) | | [optional] 8 | **type** | **String** | | [optional] 9 | **geometry** | [**IsochroneResponsePolygonGeometry**](IsochroneResponsePolygonGeometry.md) | | [optional] 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /client/docs/IsochroneResponsePolygonGeometry.md: -------------------------------------------------------------------------------- 1 | 2 | # IsochroneResponsePolygonGeometry 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **type** | **String** | | [optional] 8 | **coordinates** | [**ResponseCoordinatesArray**](ResponseCoordinatesArray.md) | | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /client/docs/IsochroneResponsePolygonProperties.md: -------------------------------------------------------------------------------- 1 | 2 | # IsochroneResponsePolygonProperties 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **bucket** | **Integer** | | [optional] 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /client/docs/JobId.md: -------------------------------------------------------------------------------- 1 | 2 | # JobId 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **jobId** | **String** | unique id for your job/request with which you can fetch your solution | [optional] 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /client/docs/Location.md: -------------------------------------------------------------------------------- 1 | 2 | # Location 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **lon** | **Double** | longitude | [optional] 8 | **lat** | **Double** | latitude | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /client/docs/MatrixRequest.md: -------------------------------------------------------------------------------- 1 | 2 | # MatrixRequest 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **points** | [**List<List<Double>>**](List.md) | Specifiy multiple points for which the weight-, route-, time- or distance-matrix should be calculated. In this case the starts are identical to the destinations. If there are N points, then NxN entries will be calculated. The order of the point parameter is important. Specify at least three points. Cannot be used together with from_point or to_point. Is a string with the format longitude,latitude. | [optional] 8 | **fromPoints** | **String** | The starting points for the routes. E.g. if you want to calculate the three routes A-&gt;1, A-&gt;2, A-&gt;3 then you have one from_point parameter and three to_point parameters. Is a string with the format longitude,latitude. | [optional] 9 | **toPoints** | **String** | The destination points for the routes. Is a string with the format longitude,latitude. | [optional] 10 | **outArrays** | **List<String>** | Specifies which arrays should be included in the response. Specify one or more of the following options 'weights', 'times', 'distances'. To specify more than one array use e.g. out_array=times&amp;out_array=distances. The units of the entries of distances are meters, of times are seconds and of weights is arbitrary and it can differ for different vehicles or versions of this API. | [optional] 11 | **vehicle** | **String** | The vehicle for which the route should be calculated. Other vehicles are foot, bike, mtb, racingbike, motorcycle, small_truck, bus and truck. See here for the details. | [optional] 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /client/docs/MatrixResponse.md: -------------------------------------------------------------------------------- 1 | 2 | # MatrixResponse 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **distances** | [**List<List<BigDecimal>>**](List.md) | | [optional] 8 | **times** | [**List<List<BigDecimal>>**](List.md) | | [optional] 9 | **weights** | [**List<List<Double>>**](List.md) | | [optional] 10 | **info** | [**ResponseInfo**](ResponseInfo.md) | | [optional] 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /client/docs/ModelBreak.md: -------------------------------------------------------------------------------- 1 | 2 | # ModelBreak 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **earliest** | **Long** | earliest start of break | [optional] 8 | **latest** | **Long** | latest start of break | [optional] 9 | **duration** | **Long** | duration of break | [optional] 10 | **maxDrivingTime** | **Long** | max driving time without break | [optional] 11 | **initialDrivingTime** | **Long** | initial driving time, i.e. the time your driver has already spent for driving | [optional] 12 | **possibleSplit** | **List<Long>** | array of splits | [optional] 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /client/docs/ModelConfiguration.md: -------------------------------------------------------------------------------- 1 | 2 | # ModelConfiguration 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **routing** | [**Routing**](Routing.md) | | [optional] 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /client/docs/Objective.md: -------------------------------------------------------------------------------- 1 | 2 | # Objective 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **type** | [**TypeEnum**](#TypeEnum) | type of objective function, i.e. min or min-max | [optional] 8 | **value** | [**ValueEnum**](#ValueEnum) | objective function value | [optional] 9 | 10 | 11 | 12 | ## Enum: TypeEnum 13 | Name | Value 14 | ---- | ----- 15 | MIN | "min" 16 | MIN_MAX | "min-max" 17 | 18 | 19 | 20 | ## Enum: ValueEnum 21 | Name | Value 22 | ---- | ----- 23 | COMPLETION_TIME | "completion_time" 24 | TRANSPORT_TIME | "transport_time" 25 | VEHICLES | "vehicles" 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /client/docs/Relation.md: -------------------------------------------------------------------------------- 1 | 2 | # Relation 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **type** | **String** | identifier of relation | [optional] 8 | **ids** | **List<String>** | An array of ids that should be related | [optional] 9 | **vehicleId** | **String** | vehicle id | [optional] 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /client/docs/Request.md: -------------------------------------------------------------------------------- 1 | 2 | # Request 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **vehicles** | [**List<Vehicle>**](Vehicle.md) | An array of vehicles that can be employed | [optional] 8 | **vehicleTypes** | [**List<VehicleType>**](VehicleType.md) | An array of vehicle types | [optional] 9 | **services** | [**List<Service>**](Service.md) | An array of services | [optional] 10 | **shipments** | [**List<Shipment>**](Shipment.md) | An array of shipments | [optional] 11 | **relations** | [**List<Relation>**](Relation.md) | An array of relations | [optional] 12 | **algorithm** | [**Algorithm**](Algorithm.md) | | [optional] 13 | **objectives** | [**List<Objective>**](Objective.md) | An array of objectives | [optional] 14 | **costMatrices** | [**List<CostMatrix>**](CostMatrix.md) | An array of cost matrices | [optional] 15 | **_configuration** | [**ModelConfiguration**](ModelConfiguration.md) | | [optional] 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /client/docs/Response.md: -------------------------------------------------------------------------------- 1 | 2 | # Response 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **copyrights** | **List<String>** | | [optional] 8 | **jobId** | **String** | unique identify of job - which you get when posting your request to the large problem solver | [optional] 9 | **status** | [**StatusEnum**](#StatusEnum) | indicates the current status of the job | [optional] 10 | **waitingInQueue** | **Long** | waiting time in ms | [optional] 11 | **processingTime** | **Long** | processing time in ms. if job is still waiting in queue, processing_time is 0 | [optional] 12 | **solution** | [**Solution**](Solution.md) | the solution. only available if status field indicates finished | [optional] 13 | 14 | 15 | 16 | ## Enum: StatusEnum 17 | Name | Value 18 | ---- | ----- 19 | WAITING_IN_QUEUE | "waiting_in_queue" 20 | PROCESSING | "processing" 21 | FINISHED | "finished" 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /client/docs/ResponseCoordinates.md: -------------------------------------------------------------------------------- 1 | 2 | # ResponseCoordinates 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **coordinates** | [**ResponseCoordinatesArray**](ResponseCoordinatesArray.md) | | [optional] 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /client/docs/ResponseCoordinatesArray.md: -------------------------------------------------------------------------------- 1 | 2 | # ResponseCoordinatesArray 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /client/docs/ResponseInfo.md: -------------------------------------------------------------------------------- 1 | 2 | # ResponseInfo 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **copyrights** | **List<String>** | | [optional] 8 | **took** | **Double** | | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /client/docs/ResponseInstruction.md: -------------------------------------------------------------------------------- 1 | 2 | # ResponseInstruction 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **text** | **String** | A description what the user has to do in order to follow the route. The language depends on the locale parameter. | [optional] 8 | **streetName** | **String** | The name of the street to turn onto in order to follow the route. | [optional] 9 | **distance** | **Double** | The distance for this instruction, in meter | [optional] 10 | **time** | **Integer** | The duration for this instruction, in ms | [optional] 11 | **interval** | **List<Integer>** | An array containing the first and the last index (relative to paths[0].points) of the points for this instruction. This is useful to know for which part of the route the instructions are valid. | [optional] 12 | **sign** | **Integer** | A number which specifies the sign to show e.g. for right turn etc <br>TURN_SHARP_LEFT = -3<br>TURN_LEFT = -2<br>TURN_SLIGHT_LEFT = -1<br>CONTINUE_ON_STREET = 0<br>TURN_SLIGHT_RIGHT = 1<br>TURN_RIGHT = 2<br>TURN_SHARP_RIGHT = 3<br>FINISH = 4<br>VIA_REACHED = 5<br>USE_ROUNDABOUT = 6 | [optional] 13 | **annotationText** | **String** | optional - A text describing the instruction in more detail, e.g. like surface of the way, warnings or involved costs. | [optional] 14 | **annotationImportance** | **Integer** | optional - 0 stands for INFO, 1 for warning, 2 for costs, 3 for costs and warning | [optional] 15 | **exitNumber** | **Integer** | optional - Only available for USE_ROUNDABOUT instructions. The count of exits at which the route leaves the roundabout. | [optional] 16 | **turnAngle** | **Double** | optional - Only available for USE_ROUNDABOUT instructions. The radian of the route within the roundabout - 0&lt;r&lt;2*PI for clockwise and -2PI&lt;r&lt;0 for counterclockwise transit. Null if the direction of rotation is undefined. | [optional] 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /client/docs/ResponseInstructions.md: -------------------------------------------------------------------------------- 1 | 2 | # ResponseInstructions 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /client/docs/Route.md: -------------------------------------------------------------------------------- 1 | 2 | # Route 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **vehicleId** | **String** | id of vehicle that operates route | [optional] 8 | **distance** | **Long** | distance of route in meter | [optional] 9 | **transportTime** | **Long** | transport time of route in ms | [optional] 10 | **completionTime** | **Long** | completion time of route in ms | [optional] 11 | **waitingTime** | **Long** | waiting time of route in ms | [optional] 12 | **activities** | [**List<Activity>**](Activity.md) | array of activities | [optional] 13 | **points** | [**List<RoutePoint>**](RoutePoint.md) | array of route planning points | [optional] 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /client/docs/RoutePoint.md: -------------------------------------------------------------------------------- 1 | 2 | # RoutePoint 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **type** | **String** | | [optional] 8 | **coordinates** | **List<Object>** | | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /client/docs/RouteResponse.md: -------------------------------------------------------------------------------- 1 | 2 | # RouteResponse 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **paths** | [**List<RouteResponsePath>**](RouteResponsePath.md) | | [optional] 8 | **info** | [**ResponseInfo**](ResponseInfo.md) | | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /client/docs/RouteResponsePath.md: -------------------------------------------------------------------------------- 1 | 2 | # RouteResponsePath 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **distance** | **Double** | The total distance of the route, in meter | [optional] 8 | **time** | **Long** | The total time of the route, in ms | [optional] 9 | **ascend** | **Double** | | [optional] 10 | **descend** | **Double** | The total descend (downhill) of the route, in meter | [optional] 11 | **points** | [**ResponseCoordinates**](ResponseCoordinates.md) | | [optional] 12 | **pointsEncoded** | **Boolean** | Is true if the points are encoded, if not paths[0].points contains the geo json of the path (then order is lon,lat,elevation), which is easier to handle but consumes more bandwidth compared to encoded version | [optional] 13 | **bbox** | **List<Double>** | The bounding box of the route, format <br> minLon, minLat, maxLon, maxLat | [optional] 14 | **snappedWaypoints** | [**ResponseCoordinates**](ResponseCoordinates.md) | | [optional] 15 | **instructions** | [**ResponseInstructions**](ResponseInstructions.md) | | [optional] 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /client/docs/Routing.md: -------------------------------------------------------------------------------- 1 | 2 | # Routing 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **calcPoints** | **Boolean** | indicates whether solution should come with route geometries | [optional] 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /client/docs/Service.md: -------------------------------------------------------------------------------- 1 | 2 | # Service 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **String** | Unique identifier of service | [optional] 8 | **type** | [**TypeEnum**](#TypeEnum) | type of service | [optional] 9 | **priority** | **Integer** | priority of service | [optional] 10 | **name** | **String** | name of service | [optional] 11 | **address** | [**Address**](Address.md) | | [optional] 12 | **duration** | **Long** | duration of service, i.e. time in ms the corresponding activity takes | [optional] 13 | **preparationTime** | **Long** | preparation time of service, e.g. search for a parking space. it only falls due if the location of previous activity differs from this location | [optional] 14 | **timeWindows** | [**List<TimeWindow>**](TimeWindow.md) | array of time windows. currently, only a single time window is allowed | [optional] 15 | **size** | **List<Integer>** | array of capacity dimensions | [optional] 16 | **requiredSkills** | **List<String>** | array of required skills | [optional] 17 | **allowedVehicles** | **List<String>** | array of allowed vehicle ids | [optional] 18 | 19 | 20 | 21 | ## Enum: TypeEnum 22 | Name | Value 23 | ---- | ----- 24 | SERVICE | "service" 25 | PICKUP | "pickup" 26 | DELIVERY | "delivery" 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /client/docs/Shipment.md: -------------------------------------------------------------------------------- 1 | 2 | # Shipment 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **id** | **String** | Unique identifier of service | [optional] 8 | **name** | **String** | name of shipment | [optional] 9 | **priority** | **Integer** | priority of service, i.e. 1 = high, 2 = normal, 3 = low. default is 2. | [optional] 10 | **pickup** | [**Stop**](Stop.md) | | [optional] 11 | **delivery** | [**Stop**](Stop.md) | | [optional] 12 | **size** | **List<Integer>** | array of capacity dimensions | [optional] 13 | **requiredSkills** | **List<String>** | array of required skills | [optional] 14 | **allowedVehicles** | **List<String>** | array of allowed vehicle ids | [optional] 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /client/docs/Solution.md: -------------------------------------------------------------------------------- 1 | 2 | # Solution 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **costs** | **Integer** | overall costs of solution | [optional] 8 | **distance** | **Integer** | overall travel distance in meters | [optional] 9 | **time** | **Long** | overall transport time in ms | [optional] 10 | **transportTime** | **Long** | overall transport time in ms | [optional] 11 | **maxOperationTime** | **Long** | operation time of the longest route in ms | [optional] 12 | **waitingTime** | **Long** | total waiting time in ms | [optional] 13 | **noVehicles** | **Integer** | number of employed vehicles | [optional] 14 | **noUnassigned** | **Integer** | number of jobs that could not be assigned to final solution | [optional] 15 | **routes** | [**List<Route>**](Route.md) | An array of routes | [optional] 16 | **unassigned** | [**SolutionUnassigned**](SolutionUnassigned.md) | | [optional] 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /client/docs/SolutionApi.md: -------------------------------------------------------------------------------- 1 | # SolutionApi 2 | 3 | All URIs are relative to *https://graphhopper.com/api/1* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**getSolution**](SolutionApi.md#getSolution) | **GET** /vrp/solution/{jobId} | Return the solution associated to the jobId 8 | 9 | 10 | 11 | # **getSolution** 12 | > Response getSolution(key, jobId) 13 | 14 | Return the solution associated to the jobId 15 | 16 | This endpoint returns the solution of a large problems. You can fetch it with the job_id, you have been sent. 17 | 18 | ### Example 19 | ```java 20 | // Import classes: 21 | //import com.graphhopper.directions.api.client.ApiException; 22 | //import com.graphhopper.directions.api.client.api.SolutionApi; 23 | 24 | 25 | SolutionApi apiInstance = new SolutionApi(); 26 | String key = "key_example"; // String | your API key 27 | String jobId = "jobId_example"; // String | Request solution with jobId 28 | try { 29 | Response result = apiInstance.getSolution(key, jobId); 30 | System.out.println(result); 31 | } catch (ApiException e) { 32 | System.err.println("Exception when calling SolutionApi#getSolution"); 33 | e.printStackTrace(); 34 | } 35 | ``` 36 | 37 | ### Parameters 38 | 39 | Name | Type | Description | Notes 40 | ------------- | ------------- | ------------- | ------------- 41 | **key** | **String**| your API key | 42 | **jobId** | **String**| Request solution with jobId | 43 | 44 | ### Return type 45 | 46 | [**Response**](Response.md) 47 | 48 | ### Authorization 49 | 50 | No authorization required 51 | 52 | ### HTTP request headers 53 | 54 | - **Content-Type**: application/json 55 | - **Accept**: application/json 56 | 57 | -------------------------------------------------------------------------------- /client/docs/SolutionUnassigned.md: -------------------------------------------------------------------------------- 1 | 2 | # SolutionUnassigned 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **services** | **List<String>** | An array of ids of unassigned services | [optional] 8 | **shipments** | **List<String>** | An array of ids of unassigned shipments | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /client/docs/Stop.md: -------------------------------------------------------------------------------- 1 | 2 | # Stop 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **address** | [**Address**](Address.md) | | [optional] 8 | **duration** | **Long** | duration of stop, i.e. time in ms the corresponding activity takes | [optional] 9 | **preparationTime** | **Long** | preparation time of service, e.g. search for a parking space. it only falls due if the location of previous activity differs from this location | [optional] 10 | **timeWindows** | [**List<TimeWindow>**](TimeWindow.md) | array of time windows. currently, only a single time window is allowed | [optional] 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /client/docs/TimeWindow.md: -------------------------------------------------------------------------------- 1 | 2 | # TimeWindow 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **earliest** | **Long** | earliest start time of corresponding activity | [optional] 8 | **latest** | **Long** | latest start time of corresponding activity | [optional] 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /client/docs/Vehicle.md: -------------------------------------------------------------------------------- 1 | 2 | # Vehicle 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **vehicleId** | **String** | Unique identifier of vehicle | [optional] 8 | **typeId** | **String** | Unique identifier referring to the available vehicle types | [optional] 9 | **startAddress** | [**Address**](Address.md) | | [optional] 10 | **endAddress** | [**Address**](Address.md) | | [optional] 11 | **_break** | [**ModelBreak**](ModelBreak.md) | | [optional] 12 | **returnToDepot** | **Boolean** | Indicates whether vehicle should return to start address or not. If not, it can end at any service activity. | [optional] 13 | **earliestStart** | **Long** | earliest start of vehicle at its start location | [optional] 14 | **latestEnd** | **Long** | latest end of vehicle at its end location | [optional] 15 | **skills** | **List<String>** | array of skills | [optional] 16 | **maxDistance** | **Long** | max distance of vehicle | [optional] 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /client/docs/VehicleType.md: -------------------------------------------------------------------------------- 1 | 2 | # VehicleType 3 | 4 | ## Properties 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **typeId** | **String** | Unique identifier for the vehicle type | [optional] 8 | **profile** | [**ProfileEnum**](#ProfileEnum) | Profile of vehicle type | [optional] 9 | **capacity** | **List<Integer>** | array of capacity dimensions | [optional] 10 | **speedFactor** | **Double** | speed_factor of vehicle type | [optional] 11 | **serviceTimeFactor** | **Double** | service time factor of vehicle type | [optional] 12 | **costPerMeter** | **Double** | cost parameter per distance unit, here meter is used | [optional] 13 | **costPerSecond** | **Double** | cost parameter per time unit, here second is used | [optional] 14 | **costPerActivation** | **Double** | cost parameter vehicle activation, i.e. fixed costs per vehicle | [optional] 15 | 16 | 17 | 18 | ## Enum: ProfileEnum 19 | Name | Value 20 | ---- | ----- 21 | CAR | "car" 22 | BIKE | "bike" 23 | FOOT | "foot" 24 | MTB | "mtb" 25 | MOTORCYCLE | "motorcycle" 26 | RACINGBIKE | "racingbike" 27 | TRUCK | "truck" 28 | SMALL_TRUCK | "small_truck" 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /client/docs/VrpApi.md: -------------------------------------------------------------------------------- 1 | # VrpApi 2 | 3 | All URIs are relative to *https://graphhopper.com/api/1* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**postVrp**](VrpApi.md#postVrp) | **POST** /vrp/optimize | Solves vehicle routing problems 8 | 9 | 10 | 11 | # **postVrp** 12 | > JobId postVrp(key, body) 13 | 14 | Solves vehicle routing problems 15 | 16 | This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. 17 | 18 | ### Example 19 | ```java 20 | // Import classes: 21 | //import com.graphhopper.directions.api.client.ApiException; 22 | //import com.graphhopper.directions.api.client.api.VrpApi; 23 | 24 | 25 | VrpApi apiInstance = new VrpApi(); 26 | String key = "key_example"; // String | your API key 27 | Request body = new Request(); // Request | Request object that contains the problem to be solved 28 | try { 29 | JobId result = apiInstance.postVrp(key, body); 30 | System.out.println(result); 31 | } catch (ApiException e) { 32 | System.err.println("Exception when calling VrpApi#postVrp"); 33 | e.printStackTrace(); 34 | } 35 | ``` 36 | 37 | ### Parameters 38 | 39 | Name | Type | Description | Notes 40 | ------------- | ------------- | ------------- | ------------- 41 | **key** | **String**| your API key | 42 | **body** | [**Request**](Request.md)| Request object that contains the problem to be solved | 43 | 44 | ### Return type 45 | 46 | [**JobId**](JobId.md) 47 | 48 | ### Authorization 49 | 50 | No authorization required 51 | 52 | ### HTTP request headers 53 | 54 | - **Content-Type**: application/json 55 | - **Accept**: application/json 56 | 57 | -------------------------------------------------------------------------------- /client/git_push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ 3 | # 4 | # Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" 5 | 6 | git_user_id=$1 7 | git_repo_id=$2 8 | release_note=$3 9 | 10 | if [ "$git_user_id" = "" ]; then 11 | git_user_id="GIT_USER_ID" 12 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" 13 | fi 14 | 15 | if [ "$git_repo_id" = "" ]; then 16 | git_repo_id="GIT_REPO_ID" 17 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" 18 | fi 19 | 20 | if [ "$release_note" = "" ]; then 21 | release_note="Minor update" 22 | echo "[INFO] No command line input provided. Set \$release_note to $release_note" 23 | fi 24 | 25 | # Initialize the local directory as a Git repository 26 | git init 27 | 28 | # Adds the files in the local repository and stages them for commit. 29 | git add . 30 | 31 | # Commits the tracked changes and prepares them to be pushed to a remote repository. 32 | git commit -m "$release_note" 33 | 34 | # Sets the new remote 35 | git_remote=`git remote` 36 | if [ "$git_remote" = "" ]; then # git remote not defined 37 | 38 | if [ "$GIT_TOKEN" = "" ]; then 39 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment." 40 | git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git 41 | else 42 | git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git 43 | fi 44 | 45 | fi 46 | 47 | git pull origin master 48 | 49 | # Pushes (Forces) the changes in the local repository up to the remote repository 50 | echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git" 51 | git push origin master 2>&1 | grep -v 'To https' 52 | 53 | -------------------------------------------------------------------------------- /client/gradle.properties: -------------------------------------------------------------------------------- 1 | # Uncomment to build for Android 2 | #target = android -------------------------------------------------------------------------------- /client/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graphhopper/directions-api-java-client/a3697f656b1915b93481a9db534e7d7b57a51439/client/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /client/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue May 17 23:08:05 CST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip 7 | -------------------------------------------------------------------------------- /client/gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 12 | set DEFAULT_JVM_OPTS= 13 | 14 | set DIRNAME=%~dp0 15 | if "%DIRNAME%" == "" set DIRNAME=. 16 | set APP_BASE_NAME=%~n0 17 | set APP_HOME=%DIRNAME% 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /client/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = "directions-api-client" -------------------------------------------------------------------------------- /client/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/ApiCallback.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client; 15 | 16 | import java.io.IOException; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | /** 22 | * Callback for asynchronous API call. 23 | * 24 | * @param The return type 25 | */ 26 | public interface ApiCallback { 27 | /** 28 | * This is called when the API call fails. 29 | * 30 | * @param e The exception causing the failure 31 | * @param statusCode Status code of the response if available, otherwise it would be 0 32 | * @param responseHeaders Headers of the response if available, otherwise it would be null 33 | */ 34 | void onFailure(ApiException e, int statusCode, Map> responseHeaders); 35 | 36 | /** 37 | * This is called when the API call succeeded. 38 | * 39 | * @param result The result deserialized from response 40 | * @param statusCode Status code of the response 41 | * @param responseHeaders Headers of the response 42 | */ 43 | void onSuccess(T result, int statusCode, Map> responseHeaders); 44 | 45 | /** 46 | * This is called when the API upload processing. 47 | * 48 | * @param bytesWritten bytes Written 49 | * @param contentLength content length of request body 50 | * @param done write end 51 | */ 52 | void onUploadProgress(long bytesWritten, long contentLength, boolean done); 53 | 54 | /** 55 | * This is called when the API downlond processing. 56 | * 57 | * @param bytesRead bytes Read 58 | * @param contentLength content lenngth of the response 59 | * @param done Read end 60 | */ 61 | void onDownloadProgress(long bytesRead, long contentLength, boolean done); 62 | } 63 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/ApiException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client; 15 | 16 | import java.util.Map; 17 | import java.util.List; 18 | 19 | 20 | public class ApiException extends Exception { 21 | private int code = 0; 22 | private Map> responseHeaders = null; 23 | private String responseBody = null; 24 | 25 | public ApiException() {} 26 | 27 | public ApiException(Throwable throwable) { 28 | super(throwable); 29 | } 30 | 31 | public ApiException(String message) { 32 | super(message); 33 | } 34 | 35 | public ApiException(String message, Throwable throwable, int code, Map> responseHeaders, String responseBody) { 36 | super(message, throwable); 37 | this.code = code; 38 | this.responseHeaders = responseHeaders; 39 | this.responseBody = responseBody; 40 | } 41 | 42 | public ApiException(String message, int code, Map> responseHeaders, String responseBody) { 43 | this(message, (Throwable) null, code, responseHeaders, responseBody); 44 | } 45 | 46 | public ApiException(String message, Throwable throwable, int code, Map> responseHeaders) { 47 | this(message, throwable, code, responseHeaders, null); 48 | } 49 | 50 | public ApiException(int code, Map> responseHeaders, String responseBody) { 51 | this((String) null, (Throwable) null, code, responseHeaders, responseBody); 52 | } 53 | 54 | public ApiException(int code, String message) { 55 | super(message); 56 | this.code = code; 57 | } 58 | 59 | public ApiException(int code, String message, Map> responseHeaders, String responseBody) { 60 | this(code, message); 61 | this.responseHeaders = responseHeaders; 62 | this.responseBody = responseBody; 63 | } 64 | 65 | /** 66 | * Get the HTTP status code. 67 | * 68 | * @return HTTP status code 69 | */ 70 | public int getCode() { 71 | return code; 72 | } 73 | 74 | /** 75 | * Get the HTTP response headers. 76 | * 77 | * @return A map of list of string 78 | */ 79 | public Map> getResponseHeaders() { 80 | return responseHeaders; 81 | } 82 | 83 | /** 84 | * Get the HTTP response body. 85 | * 86 | * @return Response body in the form of string 87 | */ 88 | public String getResponseBody() { 89 | return responseBody; 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/ApiResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client; 15 | 16 | import java.util.List; 17 | import java.util.Map; 18 | 19 | /** 20 | * API response returned by API call. 21 | * 22 | * @param The type of data that is deserialized from response body 23 | */ 24 | public class ApiResponse { 25 | final private int statusCode; 26 | final private Map> headers; 27 | final private T data; 28 | 29 | /** 30 | * @param statusCode The status code of HTTP response 31 | * @param headers The headers of HTTP response 32 | */ 33 | public ApiResponse(int statusCode, Map> headers) { 34 | this(statusCode, headers, null); 35 | } 36 | 37 | /** 38 | * @param statusCode The status code of HTTP response 39 | * @param headers The headers of HTTP response 40 | * @param data The object deserialized from response bod 41 | */ 42 | public ApiResponse(int statusCode, Map> headers, T data) { 43 | this.statusCode = statusCode; 44 | this.headers = headers; 45 | this.data = data; 46 | } 47 | 48 | public int getStatusCode() { 49 | return statusCode; 50 | } 51 | 52 | public Map> getHeaders() { 53 | return headers; 54 | } 55 | 56 | public T getData() { 57 | return data; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/Configuration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client; 15 | 16 | 17 | public class Configuration { 18 | private static ApiClient defaultApiClient = new ApiClient(); 19 | 20 | /** 21 | * Get the default API client, which would be used when creating API 22 | * instances without providing an API client. 23 | * 24 | * @return Default API client 25 | */ 26 | public static ApiClient getDefaultApiClient() { 27 | return defaultApiClient; 28 | } 29 | 30 | /** 31 | * Set the default API client, which would be used when creating API 32 | * instances without providing an API client. 33 | * 34 | * @param apiClient API client 35 | */ 36 | public static void setDefaultApiClient(ApiClient apiClient) { 37 | defaultApiClient = apiClient; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/Pair.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client; 15 | 16 | 17 | public class Pair { 18 | private String name = ""; 19 | private String value = ""; 20 | 21 | public Pair (String name, String value) { 22 | setName(name); 23 | setValue(value); 24 | } 25 | 26 | private void setName(String name) { 27 | if (!isValidString(name)) return; 28 | 29 | this.name = name; 30 | } 31 | 32 | private void setValue(String value) { 33 | if (!isValidString(value)) return; 34 | 35 | this.value = value; 36 | } 37 | 38 | public String getName() { 39 | return this.name; 40 | } 41 | 42 | public String getValue() { 43 | return this.value; 44 | } 45 | 46 | private boolean isValidString(String arg) { 47 | if (arg == null) return false; 48 | if (arg.trim().isEmpty()) return false; 49 | 50 | return true; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/ProgressRequestBody.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client; 15 | 16 | import com.squareup.okhttp.MediaType; 17 | import com.squareup.okhttp.RequestBody; 18 | 19 | import java.io.IOException; 20 | 21 | import okio.Buffer; 22 | import okio.BufferedSink; 23 | import okio.ForwardingSink; 24 | import okio.Okio; 25 | import okio.Sink; 26 | 27 | public class ProgressRequestBody extends RequestBody { 28 | 29 | public interface ProgressRequestListener { 30 | void onRequestProgress(long bytesWritten, long contentLength, boolean done); 31 | } 32 | 33 | private final RequestBody requestBody; 34 | 35 | private final ProgressRequestListener progressListener; 36 | 37 | private BufferedSink bufferedSink; 38 | 39 | public ProgressRequestBody(RequestBody requestBody, ProgressRequestListener progressListener) { 40 | this.requestBody = requestBody; 41 | this.progressListener = progressListener; 42 | } 43 | 44 | @Override 45 | public MediaType contentType() { 46 | return requestBody.contentType(); 47 | } 48 | 49 | @Override 50 | public long contentLength() throws IOException { 51 | return requestBody.contentLength(); 52 | } 53 | 54 | @Override 55 | public void writeTo(BufferedSink sink) throws IOException { 56 | if (bufferedSink == null) { 57 | bufferedSink = Okio.buffer(sink(sink)); 58 | } 59 | 60 | requestBody.writeTo(bufferedSink); 61 | bufferedSink.flush(); 62 | 63 | } 64 | 65 | private Sink sink(Sink sink) { 66 | return new ForwardingSink(sink) { 67 | 68 | long bytesWritten = 0L; 69 | long contentLength = 0L; 70 | 71 | @Override 72 | public void write(Buffer source, long byteCount) throws IOException { 73 | super.write(source, byteCount); 74 | if (contentLength == 0) { 75 | contentLength = contentLength(); 76 | } 77 | 78 | bytesWritten += byteCount; 79 | progressListener.onRequestProgress(bytesWritten, contentLength, bytesWritten == contentLength); 80 | } 81 | }; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/ProgressResponseBody.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client; 15 | 16 | import com.squareup.okhttp.MediaType; 17 | import com.squareup.okhttp.ResponseBody; 18 | 19 | import java.io.IOException; 20 | 21 | import okio.Buffer; 22 | import okio.BufferedSource; 23 | import okio.ForwardingSource; 24 | import okio.Okio; 25 | import okio.Source; 26 | 27 | public class ProgressResponseBody extends ResponseBody { 28 | 29 | public interface ProgressListener { 30 | void update(long bytesRead, long contentLength, boolean done); 31 | } 32 | 33 | private final ResponseBody responseBody; 34 | private final ProgressListener progressListener; 35 | private BufferedSource bufferedSource; 36 | 37 | public ProgressResponseBody(ResponseBody responseBody, ProgressListener progressListener) { 38 | this.responseBody = responseBody; 39 | this.progressListener = progressListener; 40 | } 41 | 42 | @Override 43 | public MediaType contentType() { 44 | return responseBody.contentType(); 45 | } 46 | 47 | @Override 48 | public long contentLength() throws IOException { 49 | return responseBody.contentLength(); 50 | } 51 | 52 | @Override 53 | public BufferedSource source() throws IOException { 54 | if (bufferedSource == null) { 55 | bufferedSource = Okio.buffer(source(responseBody.source())); 56 | } 57 | return bufferedSource; 58 | } 59 | 60 | private Source source(Source source) { 61 | return new ForwardingSource(source) { 62 | long totalBytesRead = 0L; 63 | 64 | @Override 65 | public long read(Buffer sink, long byteCount) throws IOException { 66 | long bytesRead = super.read(sink, byteCount); 67 | // read() returns the number of bytes read, or -1 if this source is exhausted. 68 | totalBytesRead += bytesRead != -1 ? bytesRead : 0; 69 | progressListener.update(totalBytesRead, responseBody.contentLength(), bytesRead == -1); 70 | return bytesRead; 71 | } 72 | }; 73 | } 74 | } 75 | 76 | 77 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/StringUtil.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client; 15 | 16 | 17 | public class StringUtil { 18 | /** 19 | * Check if the given array contains the given value (with case-insensitive comparison). 20 | * 21 | * @param array The array 22 | * @param value The value to search 23 | * @return true if the array contains the value 24 | */ 25 | public static boolean containsIgnoreCase(String[] array, String value) { 26 | for (String str : array) { 27 | if (value == null && str == null) return true; 28 | if (value != null && value.equalsIgnoreCase(str)) return true; 29 | } 30 | return false; 31 | } 32 | 33 | /** 34 | * Join an array of strings with the given separator. 35 | *

36 | * Note: This might be replaced by utility method from commons-lang or guava someday 37 | * if one of those libraries is added as dependency. 38 | *

39 | * 40 | * @param array The array of strings 41 | * @param separator The separator 42 | * @return the resulting string 43 | */ 44 | public static String join(String[] array, String separator) { 45 | int len = array.length; 46 | if (len == 0) return ""; 47 | 48 | StringBuilder out = new StringBuilder(); 49 | out.append(array[0]); 50 | for (int i = 1; i < len; i++) { 51 | out.append(separator).append(array[i]); 52 | } 53 | return out.toString(); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/auth/ApiKeyAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.auth; 15 | 16 | import com.graphhopper.directions.api.client.Pair; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | 22 | public class ApiKeyAuth implements Authentication { 23 | private final String location; 24 | private final String paramName; 25 | 26 | private String apiKey; 27 | private String apiKeyPrefix; 28 | 29 | public ApiKeyAuth(String location, String paramName) { 30 | this.location = location; 31 | this.paramName = paramName; 32 | } 33 | 34 | public String getLocation() { 35 | return location; 36 | } 37 | 38 | public String getParamName() { 39 | return paramName; 40 | } 41 | 42 | public String getApiKey() { 43 | return apiKey; 44 | } 45 | 46 | public void setApiKey(String apiKey) { 47 | this.apiKey = apiKey; 48 | } 49 | 50 | public String getApiKeyPrefix() { 51 | return apiKeyPrefix; 52 | } 53 | 54 | public void setApiKeyPrefix(String apiKeyPrefix) { 55 | this.apiKeyPrefix = apiKeyPrefix; 56 | } 57 | 58 | @Override 59 | public void applyToParams(List queryParams, Map headerParams) { 60 | if (apiKey == null) { 61 | return; 62 | } 63 | String value; 64 | if (apiKeyPrefix != null) { 65 | value = apiKeyPrefix + " " + apiKey; 66 | } else { 67 | value = apiKey; 68 | } 69 | if ("query".equals(location)) { 70 | queryParams.add(new Pair(paramName, value)); 71 | } else if ("header".equals(location)) { 72 | headerParams.put(paramName, value); 73 | } 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/auth/Authentication.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.auth; 15 | 16 | import com.graphhopper.directions.api.client.Pair; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | public interface Authentication { 22 | /** 23 | * Apply authentication settings to header and query params. 24 | * 25 | * @param queryParams List of query parameters 26 | * @param headerParams Map of header parameters 27 | */ 28 | void applyToParams(List queryParams, Map headerParams); 29 | } 30 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/auth/HttpBasicAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.auth; 15 | 16 | import com.graphhopper.directions.api.client.Pair; 17 | 18 | import com.squareup.okhttp.Credentials; 19 | 20 | import java.util.Map; 21 | import java.util.List; 22 | 23 | import java.io.UnsupportedEncodingException; 24 | 25 | public class HttpBasicAuth implements Authentication { 26 | private String username; 27 | private String password; 28 | 29 | public String getUsername() { 30 | return username; 31 | } 32 | 33 | public void setUsername(String username) { 34 | this.username = username; 35 | } 36 | 37 | public String getPassword() { 38 | return password; 39 | } 40 | 41 | public void setPassword(String password) { 42 | this.password = password; 43 | } 44 | 45 | @Override 46 | public void applyToParams(List queryParams, Map headerParams) { 47 | if (username == null && password == null) { 48 | return; 49 | } 50 | headerParams.put("Authorization", Credentials.basic( 51 | username == null ? "" : username, 52 | password == null ? "" : password)); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/auth/OAuth.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.auth; 15 | 16 | import com.graphhopper.directions.api.client.Pair; 17 | 18 | import java.util.Map; 19 | import java.util.List; 20 | 21 | 22 | public class OAuth implements Authentication { 23 | private String accessToken; 24 | 25 | public String getAccessToken() { 26 | return accessToken; 27 | } 28 | 29 | public void setAccessToken(String accessToken) { 30 | this.accessToken = accessToken; 31 | } 32 | 33 | @Override 34 | public void applyToParams(List queryParams, Map headerParams) { 35 | if (accessToken != null) { 36 | headerParams.put("Authorization", "Bearer " + accessToken); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/auth/OAuthFlow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.auth; 15 | 16 | public enum OAuthFlow { 17 | accessCode, implicit, password, application 18 | } 19 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/Address.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | 21 | /** 22 | * Address 23 | */ 24 | 25 | public class Address { 26 | @SerializedName("location_id") 27 | private String locationId = null; 28 | 29 | @SerializedName("name") 30 | private String name = null; 31 | 32 | @SerializedName("lon") 33 | private Double lon = null; 34 | 35 | @SerializedName("lat") 36 | private Double lat = null; 37 | 38 | public Address locationId(String locationId) { 39 | this.locationId = locationId; 40 | return this; 41 | } 42 | 43 | /** 44 | * Unique identifier of location 45 | * @return locationId 46 | **/ 47 | @ApiModelProperty(example = "null", value = "Unique identifier of location") 48 | public String getLocationId() { 49 | return locationId; 50 | } 51 | 52 | public void setLocationId(String locationId) { 53 | this.locationId = locationId; 54 | } 55 | 56 | public Address name(String name) { 57 | this.name = name; 58 | return this; 59 | } 60 | 61 | /** 62 | * name of location, e.g. street name plus house number 63 | * @return name 64 | **/ 65 | @ApiModelProperty(example = "null", value = "name of location, e.g. street name plus house number") 66 | public String getName() { 67 | return name; 68 | } 69 | 70 | public void setName(String name) { 71 | this.name = name; 72 | } 73 | 74 | public Address lon(Double lon) { 75 | this.lon = lon; 76 | return this; 77 | } 78 | 79 | /** 80 | * longitude 81 | * @return lon 82 | **/ 83 | @ApiModelProperty(example = "null", value = "longitude") 84 | public Double getLon() { 85 | return lon; 86 | } 87 | 88 | public void setLon(Double lon) { 89 | this.lon = lon; 90 | } 91 | 92 | public Address lat(Double lat) { 93 | this.lat = lat; 94 | return this; 95 | } 96 | 97 | /** 98 | * latitude 99 | * @return lat 100 | **/ 101 | @ApiModelProperty(example = "null", value = "latitude") 102 | public Double getLat() { 103 | return lat; 104 | } 105 | 106 | public void setLat(Double lat) { 107 | this.lat = lat; 108 | } 109 | 110 | 111 | @Override 112 | public boolean equals(java.lang.Object o) { 113 | if (this == o) { 114 | return true; 115 | } 116 | if (o == null || getClass() != o.getClass()) { 117 | return false; 118 | } 119 | Address address = (Address) o; 120 | return Objects.equals(this.locationId, address.locationId) && 121 | Objects.equals(this.name, address.name) && 122 | Objects.equals(this.lon, address.lon) && 123 | Objects.equals(this.lat, address.lat); 124 | } 125 | 126 | @Override 127 | public int hashCode() { 128 | return Objects.hash(locationId, name, lon, lat); 129 | } 130 | 131 | 132 | @Override 133 | public String toString() { 134 | StringBuilder sb = new StringBuilder(); 135 | sb.append("class Address {\n"); 136 | 137 | sb.append(" locationId: ").append(toIndentedString(locationId)).append("\n"); 138 | sb.append(" name: ").append(toIndentedString(name)).append("\n"); 139 | sb.append(" lon: ").append(toIndentedString(lon)).append("\n"); 140 | sb.append(" lat: ").append(toIndentedString(lat)).append("\n"); 141 | sb.append("}"); 142 | return sb.toString(); 143 | } 144 | 145 | /** 146 | * Convert the given object to string with each line indented by 4 spaces 147 | * (except the first line). 148 | */ 149 | private String toIndentedString(java.lang.Object o) { 150 | if (o == null) { 151 | return "null"; 152 | } 153 | return o.toString().replace("\n", "\n "); 154 | } 155 | 156 | } 157 | 158 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/Algorithm.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | 21 | /** 22 | * Algorithm 23 | */ 24 | 25 | public class Algorithm { 26 | /** 27 | * Gets or Sets problemType 28 | */ 29 | public enum ProblemTypeEnum { 30 | @SerializedName("min") 31 | MIN("min"), 32 | 33 | @SerializedName("min-max") 34 | MIN_MAX("min-max"); 35 | 36 | private String value; 37 | 38 | ProblemTypeEnum(String value) { 39 | this.value = value; 40 | } 41 | 42 | @Override 43 | public String toString() { 44 | return String.valueOf(value); 45 | } 46 | } 47 | 48 | @SerializedName("problem_type") 49 | private ProblemTypeEnum problemType = null; 50 | 51 | /** 52 | * Gets or Sets objective 53 | */ 54 | public enum ObjectiveEnum { 55 | @SerializedName("transport_time") 56 | TRANSPORT_TIME("transport_time"), 57 | 58 | @SerializedName("completion_time") 59 | COMPLETION_TIME("completion_time"); 60 | 61 | private String value; 62 | 63 | ObjectiveEnum(String value) { 64 | this.value = value; 65 | } 66 | 67 | @Override 68 | public String toString() { 69 | return String.valueOf(value); 70 | } 71 | } 72 | 73 | @SerializedName("objective") 74 | private ObjectiveEnum objective = null; 75 | 76 | public Algorithm problemType(ProblemTypeEnum problemType) { 77 | this.problemType = problemType; 78 | return this; 79 | } 80 | 81 | /** 82 | * Get problemType 83 | * @return problemType 84 | **/ 85 | @ApiModelProperty(example = "null", value = "") 86 | public ProblemTypeEnum getProblemType() { 87 | return problemType; 88 | } 89 | 90 | public void setProblemType(ProblemTypeEnum problemType) { 91 | this.problemType = problemType; 92 | } 93 | 94 | public Algorithm objective(ObjectiveEnum objective) { 95 | this.objective = objective; 96 | return this; 97 | } 98 | 99 | /** 100 | * Get objective 101 | * @return objective 102 | **/ 103 | @ApiModelProperty(example = "null", value = "") 104 | public ObjectiveEnum getObjective() { 105 | return objective; 106 | } 107 | 108 | public void setObjective(ObjectiveEnum objective) { 109 | this.objective = objective; 110 | } 111 | 112 | 113 | @Override 114 | public boolean equals(java.lang.Object o) { 115 | if (this == o) { 116 | return true; 117 | } 118 | if (o == null || getClass() != o.getClass()) { 119 | return false; 120 | } 121 | Algorithm algorithm = (Algorithm) o; 122 | return Objects.equals(this.problemType, algorithm.problemType) && 123 | Objects.equals(this.objective, algorithm.objective); 124 | } 125 | 126 | @Override 127 | public int hashCode() { 128 | return Objects.hash(problemType, objective); 129 | } 130 | 131 | 132 | @Override 133 | public String toString() { 134 | StringBuilder sb = new StringBuilder(); 135 | sb.append("class Algorithm {\n"); 136 | 137 | sb.append(" problemType: ").append(toIndentedString(problemType)).append("\n"); 138 | sb.append(" objective: ").append(toIndentedString(objective)).append("\n"); 139 | sb.append("}"); 140 | return sb.toString(); 141 | } 142 | 143 | /** 144 | * Convert the given object to string with each line indented by 4 spaces 145 | * (except the first line). 146 | */ 147 | private String toIndentedString(java.lang.Object o) { 148 | if (o == null) { 149 | return "null"; 150 | } 151 | return o.toString().replace("\n", "\n "); 152 | } 153 | 154 | } 155 | 156 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/CostMatrixData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import com.graphhopper.directions.api.client.model.CostMatrixDataInfo; 19 | import io.swagger.annotations.ApiModel; 20 | import io.swagger.annotations.ApiModelProperty; 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | /** 25 | * JSON data of matrix response 26 | */ 27 | @ApiModel(description = "JSON data of matrix response") 28 | 29 | public class CostMatrixData { 30 | @SerializedName("times") 31 | private List> times = new ArrayList>(); 32 | 33 | @SerializedName("distances") 34 | private List> distances = new ArrayList>(); 35 | 36 | @SerializedName("info") 37 | private CostMatrixDataInfo info = null; 38 | 39 | public CostMatrixData times(List> times) { 40 | this.times = times; 41 | return this; 42 | } 43 | 44 | public CostMatrixData addTimesItem(List timesItem) { 45 | this.times.add(timesItem); 46 | return this; 47 | } 48 | 49 | /** 50 | * Get times 51 | * @return times 52 | **/ 53 | @ApiModelProperty(example = "null", value = "") 54 | public List> getTimes() { 55 | return times; 56 | } 57 | 58 | public void setTimes(List> times) { 59 | this.times = times; 60 | } 61 | 62 | public CostMatrixData distances(List> distances) { 63 | this.distances = distances; 64 | return this; 65 | } 66 | 67 | public CostMatrixData addDistancesItem(List distancesItem) { 68 | this.distances.add(distancesItem); 69 | return this; 70 | } 71 | 72 | /** 73 | * Get distances 74 | * @return distances 75 | **/ 76 | @ApiModelProperty(example = "null", value = "") 77 | public List> getDistances() { 78 | return distances; 79 | } 80 | 81 | public void setDistances(List> distances) { 82 | this.distances = distances; 83 | } 84 | 85 | public CostMatrixData info(CostMatrixDataInfo info) { 86 | this.info = info; 87 | return this; 88 | } 89 | 90 | /** 91 | * Get info 92 | * @return info 93 | **/ 94 | @ApiModelProperty(example = "null", value = "") 95 | public CostMatrixDataInfo getInfo() { 96 | return info; 97 | } 98 | 99 | public void setInfo(CostMatrixDataInfo info) { 100 | this.info = info; 101 | } 102 | 103 | 104 | @Override 105 | public boolean equals(java.lang.Object o) { 106 | if (this == o) { 107 | return true; 108 | } 109 | if (o == null || getClass() != o.getClass()) { 110 | return false; 111 | } 112 | CostMatrixData costMatrixData = (CostMatrixData) o; 113 | return Objects.equals(this.times, costMatrixData.times) && 114 | Objects.equals(this.distances, costMatrixData.distances) && 115 | Objects.equals(this.info, costMatrixData.info); 116 | } 117 | 118 | @Override 119 | public int hashCode() { 120 | return Objects.hash(times, distances, info); 121 | } 122 | 123 | 124 | @Override 125 | public String toString() { 126 | StringBuilder sb = new StringBuilder(); 127 | sb.append("class CostMatrixData {\n"); 128 | 129 | sb.append(" times: ").append(toIndentedString(times)).append("\n"); 130 | sb.append(" distances: ").append(toIndentedString(distances)).append("\n"); 131 | sb.append(" info: ").append(toIndentedString(info)).append("\n"); 132 | sb.append("}"); 133 | return sb.toString(); 134 | } 135 | 136 | /** 137 | * Convert the given object to string with each line indented by 4 spaces 138 | * (except the first line). 139 | */ 140 | private String toIndentedString(java.lang.Object o) { 141 | if (o == null) { 142 | return "null"; 143 | } 144 | return o.toString().replace("\n", "\n "); 145 | } 146 | 147 | } 148 | 149 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/CostMatrixDataInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | 23 | /** 24 | * Additional information for your request 25 | */ 26 | @ApiModel(description = "Additional information for your request") 27 | 28 | public class CostMatrixDataInfo { 29 | @SerializedName("copyrights") 30 | private List copyrights = new ArrayList(); 31 | 32 | @SerializedName("took") 33 | private Double took = null; 34 | 35 | public CostMatrixDataInfo copyrights(List copyrights) { 36 | this.copyrights = copyrights; 37 | return this; 38 | } 39 | 40 | public CostMatrixDataInfo addCopyrightsItem(String copyrightsItem) { 41 | this.copyrights.add(copyrightsItem); 42 | return this; 43 | } 44 | 45 | /** 46 | * Get copyrights 47 | * @return copyrights 48 | **/ 49 | @ApiModelProperty(example = "null", value = "") 50 | public List getCopyrights() { 51 | return copyrights; 52 | } 53 | 54 | public void setCopyrights(List copyrights) { 55 | this.copyrights = copyrights; 56 | } 57 | 58 | public CostMatrixDataInfo took(Double took) { 59 | this.took = took; 60 | return this; 61 | } 62 | 63 | /** 64 | * Get took 65 | * @return took 66 | **/ 67 | @ApiModelProperty(example = "null", value = "") 68 | public Double getTook() { 69 | return took; 70 | } 71 | 72 | public void setTook(Double took) { 73 | this.took = took; 74 | } 75 | 76 | 77 | @Override 78 | public boolean equals(java.lang.Object o) { 79 | if (this == o) { 80 | return true; 81 | } 82 | if (o == null || getClass() != o.getClass()) { 83 | return false; 84 | } 85 | CostMatrixDataInfo costMatrixDataInfo = (CostMatrixDataInfo) o; 86 | return Objects.equals(this.copyrights, costMatrixDataInfo.copyrights) && 87 | Objects.equals(this.took, costMatrixDataInfo.took); 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash(copyrights, took); 93 | } 94 | 95 | 96 | @Override 97 | public String toString() { 98 | StringBuilder sb = new StringBuilder(); 99 | sb.append("class CostMatrixDataInfo {\n"); 100 | 101 | sb.append(" copyrights: ").append(toIndentedString(copyrights)).append("\n"); 102 | sb.append(" took: ").append(toIndentedString(took)).append("\n"); 103 | sb.append("}"); 104 | return sb.toString(); 105 | } 106 | 107 | /** 108 | * Convert the given object to string with each line indented by 4 spaces 109 | * (except the first line). 110 | */ 111 | private String toIndentedString(java.lang.Object o) { 112 | if (o == null) { 113 | return "null"; 114 | } 115 | return o.toString().replace("\n", "\n "); 116 | } 117 | 118 | } 119 | 120 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/GHError.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import com.graphhopper.directions.api.client.model.GHErrorHints; 19 | import io.swagger.annotations.ApiModel; 20 | import io.swagger.annotations.ApiModelProperty; 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | /** 25 | * GHError 26 | */ 27 | 28 | public class GHError { 29 | @SerializedName("code") 30 | private Integer code = null; 31 | 32 | @SerializedName("message") 33 | private String message = null; 34 | 35 | @SerializedName("hints") 36 | private List hints = new ArrayList(); 37 | 38 | public GHError code(Integer code) { 39 | this.code = code; 40 | return this; 41 | } 42 | 43 | /** 44 | * Get code 45 | * @return code 46 | **/ 47 | @ApiModelProperty(example = "null", value = "") 48 | public Integer getCode() { 49 | return code; 50 | } 51 | 52 | public void setCode(Integer code) { 53 | this.code = code; 54 | } 55 | 56 | public GHError message(String message) { 57 | this.message = message; 58 | return this; 59 | } 60 | 61 | /** 62 | * Get message 63 | * @return message 64 | **/ 65 | @ApiModelProperty(example = "null", value = "") 66 | public String getMessage() { 67 | return message; 68 | } 69 | 70 | public void setMessage(String message) { 71 | this.message = message; 72 | } 73 | 74 | public GHError hints(List hints) { 75 | this.hints = hints; 76 | return this; 77 | } 78 | 79 | public GHError addHintsItem(GHErrorHints hintsItem) { 80 | this.hints.add(hintsItem); 81 | return this; 82 | } 83 | 84 | /** 85 | * Get hints 86 | * @return hints 87 | **/ 88 | @ApiModelProperty(example = "null", value = "") 89 | public List getHints() { 90 | return hints; 91 | } 92 | 93 | public void setHints(List hints) { 94 | this.hints = hints; 95 | } 96 | 97 | 98 | @Override 99 | public boolean equals(java.lang.Object o) { 100 | if (this == o) { 101 | return true; 102 | } 103 | if (o == null || getClass() != o.getClass()) { 104 | return false; 105 | } 106 | GHError ghError = (GHError) o; 107 | return Objects.equals(this.code, ghError.code) && 108 | Objects.equals(this.message, ghError.message) && 109 | Objects.equals(this.hints, ghError.hints); 110 | } 111 | 112 | @Override 113 | public int hashCode() { 114 | return Objects.hash(code, message, hints); 115 | } 116 | 117 | 118 | @Override 119 | public String toString() { 120 | StringBuilder sb = new StringBuilder(); 121 | sb.append("class GHError {\n"); 122 | 123 | sb.append(" code: ").append(toIndentedString(code)).append("\n"); 124 | sb.append(" message: ").append(toIndentedString(message)).append("\n"); 125 | sb.append(" hints: ").append(toIndentedString(hints)).append("\n"); 126 | sb.append("}"); 127 | return sb.toString(); 128 | } 129 | 130 | /** 131 | * Convert the given object to string with each line indented by 4 spaces 132 | * (except the first line). 133 | */ 134 | private String toIndentedString(java.lang.Object o) { 135 | if (o == null) { 136 | return "null"; 137 | } 138 | return o.toString().replace("\n", "\n "); 139 | } 140 | 141 | } 142 | 143 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/GHErrorHints.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | 21 | /** 22 | * GHErrorHints 23 | */ 24 | 25 | public class GHErrorHints { 26 | @SerializedName("message") 27 | private String message = null; 28 | 29 | public GHErrorHints message(String message) { 30 | this.message = message; 31 | return this; 32 | } 33 | 34 | /** 35 | * Get message 36 | * @return message 37 | **/ 38 | @ApiModelProperty(example = "null", value = "") 39 | public String getMessage() { 40 | return message; 41 | } 42 | 43 | public void setMessage(String message) { 44 | this.message = message; 45 | } 46 | 47 | 48 | @Override 49 | public boolean equals(java.lang.Object o) { 50 | if (this == o) { 51 | return true; 52 | } 53 | if (o == null || getClass() != o.getClass()) { 54 | return false; 55 | } 56 | GHErrorHints ghErrorHints = (GHErrorHints) o; 57 | return Objects.equals(this.message, ghErrorHints.message); 58 | } 59 | 60 | @Override 61 | public int hashCode() { 62 | return Objects.hash(message); 63 | } 64 | 65 | 66 | @Override 67 | public String toString() { 68 | StringBuilder sb = new StringBuilder(); 69 | sb.append("class GHErrorHints {\n"); 70 | 71 | sb.append(" message: ").append(toIndentedString(message)).append("\n"); 72 | sb.append("}"); 73 | return sb.toString(); 74 | } 75 | 76 | /** 77 | * Convert the given object to string with each line indented by 4 spaces 78 | * (except the first line). 79 | */ 80 | private String toIndentedString(java.lang.Object o) { 81 | if (o == null) { 82 | return "null"; 83 | } 84 | return o.toString().replace("\n", "\n "); 85 | } 86 | 87 | } 88 | 89 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/GeocodingPoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | 21 | /** 22 | * GeocodingPoint 23 | */ 24 | 25 | public class GeocodingPoint { 26 | @SerializedName("lat") 27 | private Double lat = null; 28 | 29 | @SerializedName("lng") 30 | private Double lng = null; 31 | 32 | public GeocodingPoint lat(Double lat) { 33 | this.lat = lat; 34 | return this; 35 | } 36 | 37 | /** 38 | * Latitude 39 | * @return lat 40 | **/ 41 | @ApiModelProperty(example = "null", value = "Latitude") 42 | public Double getLat() { 43 | return lat; 44 | } 45 | 46 | public void setLat(Double lat) { 47 | this.lat = lat; 48 | } 49 | 50 | public GeocodingPoint lng(Double lng) { 51 | this.lng = lng; 52 | return this; 53 | } 54 | 55 | /** 56 | * Longitude 57 | * @return lng 58 | **/ 59 | @ApiModelProperty(example = "null", value = "Longitude") 60 | public Double getLng() { 61 | return lng; 62 | } 63 | 64 | public void setLng(Double lng) { 65 | this.lng = lng; 66 | } 67 | 68 | 69 | @Override 70 | public boolean equals(java.lang.Object o) { 71 | if (this == o) { 72 | return true; 73 | } 74 | if (o == null || getClass() != o.getClass()) { 75 | return false; 76 | } 77 | GeocodingPoint geocodingPoint = (GeocodingPoint) o; 78 | return Objects.equals(this.lat, geocodingPoint.lat) && 79 | Objects.equals(this.lng, geocodingPoint.lng); 80 | } 81 | 82 | @Override 83 | public int hashCode() { 84 | return Objects.hash(lat, lng); 85 | } 86 | 87 | 88 | @Override 89 | public String toString() { 90 | StringBuilder sb = new StringBuilder(); 91 | sb.append("class GeocodingPoint {\n"); 92 | 93 | sb.append(" lat: ").append(toIndentedString(lat)).append("\n"); 94 | sb.append(" lng: ").append(toIndentedString(lng)).append("\n"); 95 | sb.append("}"); 96 | return sb.toString(); 97 | } 98 | 99 | /** 100 | * Convert the given object to string with each line indented by 4 spaces 101 | * (except the first line). 102 | */ 103 | private String toIndentedString(java.lang.Object o) { 104 | if (o == null) { 105 | return "null"; 106 | } 107 | return o.toString().replace("\n", "\n "); 108 | } 109 | 110 | } 111 | 112 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/GeocodingResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import com.graphhopper.directions.api.client.model.GeocodingLocation; 19 | import io.swagger.annotations.ApiModel; 20 | import io.swagger.annotations.ApiModelProperty; 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | /** 25 | * GeocodingResponse 26 | */ 27 | 28 | public class GeocodingResponse { 29 | @SerializedName("hits") 30 | private List hits = new ArrayList(); 31 | 32 | @SerializedName("locale") 33 | private String locale = null; 34 | 35 | public GeocodingResponse hits(List hits) { 36 | this.hits = hits; 37 | return this; 38 | } 39 | 40 | public GeocodingResponse addHitsItem(GeocodingLocation hitsItem) { 41 | this.hits.add(hitsItem); 42 | return this; 43 | } 44 | 45 | /** 46 | * Get hits 47 | * @return hits 48 | **/ 49 | @ApiModelProperty(example = "null", value = "") 50 | public List getHits() { 51 | return hits; 52 | } 53 | 54 | public void setHits(List hits) { 55 | this.hits = hits; 56 | } 57 | 58 | public GeocodingResponse locale(String locale) { 59 | this.locale = locale; 60 | return this; 61 | } 62 | 63 | /** 64 | * Get locale 65 | * @return locale 66 | **/ 67 | @ApiModelProperty(example = "null", value = "") 68 | public String getLocale() { 69 | return locale; 70 | } 71 | 72 | public void setLocale(String locale) { 73 | this.locale = locale; 74 | } 75 | 76 | 77 | @Override 78 | public boolean equals(java.lang.Object o) { 79 | if (this == o) { 80 | return true; 81 | } 82 | if (o == null || getClass() != o.getClass()) { 83 | return false; 84 | } 85 | GeocodingResponse geocodingResponse = (GeocodingResponse) o; 86 | return Objects.equals(this.hits, geocodingResponse.hits) && 87 | Objects.equals(this.locale, geocodingResponse.locale); 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash(hits, locale); 93 | } 94 | 95 | 96 | @Override 97 | public String toString() { 98 | StringBuilder sb = new StringBuilder(); 99 | sb.append("class GeocodingResponse {\n"); 100 | 101 | sb.append(" hits: ").append(toIndentedString(hits)).append("\n"); 102 | sb.append(" locale: ").append(toIndentedString(locale)).append("\n"); 103 | sb.append("}"); 104 | return sb.toString(); 105 | } 106 | 107 | /** 108 | * Convert the given object to string with each line indented by 4 spaces 109 | * (except the first line). 110 | */ 111 | private String toIndentedString(java.lang.Object o) { 112 | if (o == null) { 113 | return "null"; 114 | } 115 | return o.toString().replace("\n", "\n "); 116 | } 117 | 118 | } 119 | 120 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/IsochroneResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import com.graphhopper.directions.api.client.model.IsochroneResponsePolygon; 19 | import io.swagger.annotations.ApiModel; 20 | import io.swagger.annotations.ApiModelProperty; 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | /** 25 | * IsochroneResponse 26 | */ 27 | 28 | public class IsochroneResponse { 29 | @SerializedName("polygons") 30 | private List polygons = new ArrayList(); 31 | 32 | @SerializedName("copyrights") 33 | private List copyrights = new ArrayList(); 34 | 35 | public IsochroneResponse polygons(List polygons) { 36 | this.polygons = polygons; 37 | return this; 38 | } 39 | 40 | public IsochroneResponse addPolygonsItem(IsochroneResponsePolygon polygonsItem) { 41 | this.polygons.add(polygonsItem); 42 | return this; 43 | } 44 | 45 | /** 46 | * Get polygons 47 | * @return polygons 48 | **/ 49 | @ApiModelProperty(example = "null", value = "") 50 | public List getPolygons() { 51 | return polygons; 52 | } 53 | 54 | public void setPolygons(List polygons) { 55 | this.polygons = polygons; 56 | } 57 | 58 | public IsochroneResponse copyrights(List copyrights) { 59 | this.copyrights = copyrights; 60 | return this; 61 | } 62 | 63 | public IsochroneResponse addCopyrightsItem(String copyrightsItem) { 64 | this.copyrights.add(copyrightsItem); 65 | return this; 66 | } 67 | 68 | /** 69 | * Get copyrights 70 | * @return copyrights 71 | **/ 72 | @ApiModelProperty(example = "null", value = "") 73 | public List getCopyrights() { 74 | return copyrights; 75 | } 76 | 77 | public void setCopyrights(List copyrights) { 78 | this.copyrights = copyrights; 79 | } 80 | 81 | 82 | @Override 83 | public boolean equals(java.lang.Object o) { 84 | if (this == o) { 85 | return true; 86 | } 87 | if (o == null || getClass() != o.getClass()) { 88 | return false; 89 | } 90 | IsochroneResponse isochroneResponse = (IsochroneResponse) o; 91 | return Objects.equals(this.polygons, isochroneResponse.polygons) && 92 | Objects.equals(this.copyrights, isochroneResponse.copyrights); 93 | } 94 | 95 | @Override 96 | public int hashCode() { 97 | return Objects.hash(polygons, copyrights); 98 | } 99 | 100 | 101 | @Override 102 | public String toString() { 103 | StringBuilder sb = new StringBuilder(); 104 | sb.append("class IsochroneResponse {\n"); 105 | 106 | sb.append(" polygons: ").append(toIndentedString(polygons)).append("\n"); 107 | sb.append(" copyrights: ").append(toIndentedString(copyrights)).append("\n"); 108 | sb.append("}"); 109 | return sb.toString(); 110 | } 111 | 112 | /** 113 | * Convert the given object to string with each line indented by 4 spaces 114 | * (except the first line). 115 | */ 116 | private String toIndentedString(java.lang.Object o) { 117 | if (o == null) { 118 | return "null"; 119 | } 120 | return o.toString().replace("\n", "\n "); 121 | } 122 | 123 | } 124 | 125 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/IsochroneResponsePolygon.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import com.graphhopper.directions.api.client.model.IsochroneResponsePolygonGeometry; 19 | import com.graphhopper.directions.api.client.model.IsochroneResponsePolygonProperties; 20 | import io.swagger.annotations.ApiModel; 21 | import io.swagger.annotations.ApiModelProperty; 22 | 23 | /** 24 | * A found path 25 | */ 26 | @ApiModel(description = "A found path") 27 | 28 | public class IsochroneResponsePolygon { 29 | @SerializedName("properties") 30 | private IsochroneResponsePolygonProperties properties = null; 31 | 32 | @SerializedName("type") 33 | private String type = null; 34 | 35 | @SerializedName("geometry") 36 | private IsochroneResponsePolygonGeometry geometry = null; 37 | 38 | public IsochroneResponsePolygon properties(IsochroneResponsePolygonProperties properties) { 39 | this.properties = properties; 40 | return this; 41 | } 42 | 43 | /** 44 | * Get properties 45 | * @return properties 46 | **/ 47 | @ApiModelProperty(example = "null", value = "") 48 | public IsochroneResponsePolygonProperties getProperties() { 49 | return properties; 50 | } 51 | 52 | public void setProperties(IsochroneResponsePolygonProperties properties) { 53 | this.properties = properties; 54 | } 55 | 56 | public IsochroneResponsePolygon type(String type) { 57 | this.type = type; 58 | return this; 59 | } 60 | 61 | /** 62 | * Get type 63 | * @return type 64 | **/ 65 | @ApiModelProperty(example = "null", value = "") 66 | public String getType() { 67 | return type; 68 | } 69 | 70 | public void setType(String type) { 71 | this.type = type; 72 | } 73 | 74 | public IsochroneResponsePolygon geometry(IsochroneResponsePolygonGeometry geometry) { 75 | this.geometry = geometry; 76 | return this; 77 | } 78 | 79 | /** 80 | * Get geometry 81 | * @return geometry 82 | **/ 83 | @ApiModelProperty(example = "null", value = "") 84 | public IsochroneResponsePolygonGeometry getGeometry() { 85 | return geometry; 86 | } 87 | 88 | public void setGeometry(IsochroneResponsePolygonGeometry geometry) { 89 | this.geometry = geometry; 90 | } 91 | 92 | 93 | @Override 94 | public boolean equals(java.lang.Object o) { 95 | if (this == o) { 96 | return true; 97 | } 98 | if (o == null || getClass() != o.getClass()) { 99 | return false; 100 | } 101 | IsochroneResponsePolygon isochroneResponsePolygon = (IsochroneResponsePolygon) o; 102 | return Objects.equals(this.properties, isochroneResponsePolygon.properties) && 103 | Objects.equals(this.type, isochroneResponsePolygon.type) && 104 | Objects.equals(this.geometry, isochroneResponsePolygon.geometry); 105 | } 106 | 107 | @Override 108 | public int hashCode() { 109 | return Objects.hash(properties, type, geometry); 110 | } 111 | 112 | 113 | @Override 114 | public String toString() { 115 | StringBuilder sb = new StringBuilder(); 116 | sb.append("class IsochroneResponsePolygon {\n"); 117 | 118 | sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); 119 | sb.append(" type: ").append(toIndentedString(type)).append("\n"); 120 | sb.append(" geometry: ").append(toIndentedString(geometry)).append("\n"); 121 | sb.append("}"); 122 | return sb.toString(); 123 | } 124 | 125 | /** 126 | * Convert the given object to string with each line indented by 4 spaces 127 | * (except the first line). 128 | */ 129 | private String toIndentedString(java.lang.Object o) { 130 | if (o == null) { 131 | return "null"; 132 | } 133 | return o.toString().replace("\n", "\n "); 134 | } 135 | 136 | } 137 | 138 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/IsochroneResponsePolygonGeometry.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import com.graphhopper.directions.api.client.model.ResponseCoordinatesArray; 19 | import io.swagger.annotations.ApiModel; 20 | import io.swagger.annotations.ApiModelProperty; 21 | import java.util.ArrayList; 22 | import java.util.List; 23 | 24 | /** 25 | * IsochroneResponsePolygonGeometry 26 | */ 27 | 28 | public class IsochroneResponsePolygonGeometry { 29 | @SerializedName("type") 30 | private String type = null; 31 | 32 | @SerializedName("coordinates") 33 | private List coordinates = new ArrayList(); 34 | 35 | public IsochroneResponsePolygonGeometry type(String type) { 36 | this.type = type; 37 | return this; 38 | } 39 | 40 | /** 41 | * Get type 42 | * @return type 43 | **/ 44 | @ApiModelProperty(example = "null", value = "") 45 | public String getType() { 46 | return type; 47 | } 48 | 49 | public void setType(String type) { 50 | this.type = type; 51 | } 52 | 53 | public IsochroneResponsePolygonGeometry coordinates(List coordinates) { 54 | this.coordinates = coordinates; 55 | return this; 56 | } 57 | 58 | public IsochroneResponsePolygonGeometry addCoordinatesItem(ResponseCoordinatesArray coordinatesItem) { 59 | this.coordinates.add(coordinatesItem); 60 | return this; 61 | } 62 | 63 | /** 64 | * Get coordinates 65 | * @return coordinates 66 | **/ 67 | @ApiModelProperty(example = "null", value = "") 68 | public List getCoordinates() { 69 | return coordinates; 70 | } 71 | 72 | public void setCoordinates(List coordinates) { 73 | this.coordinates = coordinates; 74 | } 75 | 76 | 77 | @Override 78 | public boolean equals(java.lang.Object o) { 79 | if (this == o) { 80 | return true; 81 | } 82 | if (o == null || getClass() != o.getClass()) { 83 | return false; 84 | } 85 | IsochroneResponsePolygonGeometry isochroneResponsePolygonGeometry = (IsochroneResponsePolygonGeometry) o; 86 | return Objects.equals(this.type, isochroneResponsePolygonGeometry.type) && 87 | Objects.equals(this.coordinates, isochroneResponsePolygonGeometry.coordinates); 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash(type, coordinates); 93 | } 94 | 95 | 96 | @Override 97 | public String toString() { 98 | StringBuilder sb = new StringBuilder(); 99 | sb.append("class IsochroneResponsePolygonGeometry {\n"); 100 | 101 | sb.append(" type: ").append(toIndentedString(type)).append("\n"); 102 | sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); 103 | sb.append("}"); 104 | return sb.toString(); 105 | } 106 | 107 | /** 108 | * Convert the given object to string with each line indented by 4 spaces 109 | * (except the first line). 110 | */ 111 | private String toIndentedString(java.lang.Object o) { 112 | if (o == null) { 113 | return "null"; 114 | } 115 | return o.toString().replace("\n", "\n "); 116 | } 117 | 118 | } 119 | 120 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/IsochroneResponsePolygonProperties.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | 21 | /** 22 | * IsochroneResponsePolygonProperties 23 | */ 24 | 25 | public class IsochroneResponsePolygonProperties { 26 | @SerializedName("bucket") 27 | private Integer bucket = null; 28 | 29 | public IsochroneResponsePolygonProperties bucket(Integer bucket) { 30 | this.bucket = bucket; 31 | return this; 32 | } 33 | 34 | /** 35 | * Get bucket 36 | * @return bucket 37 | **/ 38 | @ApiModelProperty(example = "null", value = "") 39 | public Integer getBucket() { 40 | return bucket; 41 | } 42 | 43 | public void setBucket(Integer bucket) { 44 | this.bucket = bucket; 45 | } 46 | 47 | 48 | @Override 49 | public boolean equals(java.lang.Object o) { 50 | if (this == o) { 51 | return true; 52 | } 53 | if (o == null || getClass() != o.getClass()) { 54 | return false; 55 | } 56 | IsochroneResponsePolygonProperties isochroneResponsePolygonProperties = (IsochroneResponsePolygonProperties) o; 57 | return Objects.equals(this.bucket, isochroneResponsePolygonProperties.bucket); 58 | } 59 | 60 | @Override 61 | public int hashCode() { 62 | return Objects.hash(bucket); 63 | } 64 | 65 | 66 | @Override 67 | public String toString() { 68 | StringBuilder sb = new StringBuilder(); 69 | sb.append("class IsochroneResponsePolygonProperties {\n"); 70 | 71 | sb.append(" bucket: ").append(toIndentedString(bucket)).append("\n"); 72 | sb.append("}"); 73 | return sb.toString(); 74 | } 75 | 76 | /** 77 | * Convert the given object to string with each line indented by 4 spaces 78 | * (except the first line). 79 | */ 80 | private String toIndentedString(java.lang.Object o) { 81 | if (o == null) { 82 | return "null"; 83 | } 84 | return o.toString().replace("\n", "\n "); 85 | } 86 | 87 | } 88 | 89 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/JobId.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | 21 | /** 22 | * JobId 23 | */ 24 | 25 | public class JobId { 26 | @SerializedName("job_id") 27 | private String jobId = null; 28 | 29 | public JobId jobId(String jobId) { 30 | this.jobId = jobId; 31 | return this; 32 | } 33 | 34 | /** 35 | * unique id for your job/request with which you can fetch your solution 36 | * @return jobId 37 | **/ 38 | @ApiModelProperty(example = "null", value = "unique id for your job/request with which you can fetch your solution") 39 | public String getJobId() { 40 | return jobId; 41 | } 42 | 43 | public void setJobId(String jobId) { 44 | this.jobId = jobId; 45 | } 46 | 47 | 48 | @Override 49 | public boolean equals(java.lang.Object o) { 50 | if (this == o) { 51 | return true; 52 | } 53 | if (o == null || getClass() != o.getClass()) { 54 | return false; 55 | } 56 | JobId jobId = (JobId) o; 57 | return Objects.equals(this.jobId, jobId.jobId); 58 | } 59 | 60 | @Override 61 | public int hashCode() { 62 | return Objects.hash(jobId); 63 | } 64 | 65 | 66 | @Override 67 | public String toString() { 68 | StringBuilder sb = new StringBuilder(); 69 | sb.append("class JobId {\n"); 70 | 71 | sb.append(" jobId: ").append(toIndentedString(jobId)).append("\n"); 72 | sb.append("}"); 73 | return sb.toString(); 74 | } 75 | 76 | /** 77 | * Convert the given object to string with each line indented by 4 spaces 78 | * (except the first line). 79 | */ 80 | private String toIndentedString(java.lang.Object o) { 81 | if (o == null) { 82 | return "null"; 83 | } 84 | return o.toString().replace("\n", "\n "); 85 | } 86 | 87 | } 88 | 89 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/Location.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | 21 | /** 22 | * Location 23 | */ 24 | 25 | public class Location { 26 | @SerializedName("lon") 27 | private Double lon = null; 28 | 29 | @SerializedName("lat") 30 | private Double lat = null; 31 | 32 | public Location lon(Double lon) { 33 | this.lon = lon; 34 | return this; 35 | } 36 | 37 | /** 38 | * longitude 39 | * @return lon 40 | **/ 41 | @ApiModelProperty(example = "null", value = "longitude") 42 | public Double getLon() { 43 | return lon; 44 | } 45 | 46 | public void setLon(Double lon) { 47 | this.lon = lon; 48 | } 49 | 50 | public Location lat(Double lat) { 51 | this.lat = lat; 52 | return this; 53 | } 54 | 55 | /** 56 | * latitude 57 | * @return lat 58 | **/ 59 | @ApiModelProperty(example = "null", value = "latitude") 60 | public Double getLat() { 61 | return lat; 62 | } 63 | 64 | public void setLat(Double lat) { 65 | this.lat = lat; 66 | } 67 | 68 | 69 | @Override 70 | public boolean equals(java.lang.Object o) { 71 | if (this == o) { 72 | return true; 73 | } 74 | if (o == null || getClass() != o.getClass()) { 75 | return false; 76 | } 77 | Location location = (Location) o; 78 | return Objects.equals(this.lon, location.lon) && 79 | Objects.equals(this.lat, location.lat); 80 | } 81 | 82 | @Override 83 | public int hashCode() { 84 | return Objects.hash(lon, lat); 85 | } 86 | 87 | 88 | @Override 89 | public String toString() { 90 | StringBuilder sb = new StringBuilder(); 91 | sb.append("class Location {\n"); 92 | 93 | sb.append(" lon: ").append(toIndentedString(lon)).append("\n"); 94 | sb.append(" lat: ").append(toIndentedString(lat)).append("\n"); 95 | sb.append("}"); 96 | return sb.toString(); 97 | } 98 | 99 | /** 100 | * Convert the given object to string with each line indented by 4 spaces 101 | * (except the first line). 102 | */ 103 | private String toIndentedString(java.lang.Object o) { 104 | if (o == null) { 105 | return "null"; 106 | } 107 | return o.toString().replace("\n", "\n "); 108 | } 109 | 110 | } 111 | 112 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/MatrixResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import com.graphhopper.directions.api.client.model.ResponseInfo; 19 | import io.swagger.annotations.ApiModel; 20 | import io.swagger.annotations.ApiModelProperty; 21 | import java.math.BigDecimal; 22 | import java.util.ArrayList; 23 | import java.util.List; 24 | 25 | /** 26 | * MatrixResponse 27 | */ 28 | 29 | public class MatrixResponse { 30 | @SerializedName("distances") 31 | private List> distances = new ArrayList>(); 32 | 33 | @SerializedName("times") 34 | private List> times = new ArrayList>(); 35 | 36 | @SerializedName("weights") 37 | private List> weights = new ArrayList>(); 38 | 39 | @SerializedName("info") 40 | private ResponseInfo info = null; 41 | 42 | public MatrixResponse distances(List> distances) { 43 | this.distances = distances; 44 | return this; 45 | } 46 | 47 | public MatrixResponse addDistancesItem(List distancesItem) { 48 | this.distances.add(distancesItem); 49 | return this; 50 | } 51 | 52 | /** 53 | * Get distances 54 | * @return distances 55 | **/ 56 | @ApiModelProperty(example = "null", value = "") 57 | public List> getDistances() { 58 | return distances; 59 | } 60 | 61 | public void setDistances(List> distances) { 62 | this.distances = distances; 63 | } 64 | 65 | public MatrixResponse times(List> times) { 66 | this.times = times; 67 | return this; 68 | } 69 | 70 | public MatrixResponse addTimesItem(List timesItem) { 71 | this.times.add(timesItem); 72 | return this; 73 | } 74 | 75 | /** 76 | * Get times 77 | * @return times 78 | **/ 79 | @ApiModelProperty(example = "null", value = "") 80 | public List> getTimes() { 81 | return times; 82 | } 83 | 84 | public void setTimes(List> times) { 85 | this.times = times; 86 | } 87 | 88 | public MatrixResponse weights(List> weights) { 89 | this.weights = weights; 90 | return this; 91 | } 92 | 93 | public MatrixResponse addWeightsItem(List weightsItem) { 94 | this.weights.add(weightsItem); 95 | return this; 96 | } 97 | 98 | /** 99 | * Get weights 100 | * @return weights 101 | **/ 102 | @ApiModelProperty(example = "null", value = "") 103 | public List> getWeights() { 104 | return weights; 105 | } 106 | 107 | public void setWeights(List> weights) { 108 | this.weights = weights; 109 | } 110 | 111 | public MatrixResponse info(ResponseInfo info) { 112 | this.info = info; 113 | return this; 114 | } 115 | 116 | /** 117 | * Get info 118 | * @return info 119 | **/ 120 | @ApiModelProperty(example = "null", value = "") 121 | public ResponseInfo getInfo() { 122 | return info; 123 | } 124 | 125 | public void setInfo(ResponseInfo info) { 126 | this.info = info; 127 | } 128 | 129 | 130 | @Override 131 | public boolean equals(java.lang.Object o) { 132 | if (this == o) { 133 | return true; 134 | } 135 | if (o == null || getClass() != o.getClass()) { 136 | return false; 137 | } 138 | MatrixResponse matrixResponse = (MatrixResponse) o; 139 | return Objects.equals(this.distances, matrixResponse.distances) && 140 | Objects.equals(this.times, matrixResponse.times) && 141 | Objects.equals(this.weights, matrixResponse.weights) && 142 | Objects.equals(this.info, matrixResponse.info); 143 | } 144 | 145 | @Override 146 | public int hashCode() { 147 | return Objects.hash(distances, times, weights, info); 148 | } 149 | 150 | 151 | @Override 152 | public String toString() { 153 | StringBuilder sb = new StringBuilder(); 154 | sb.append("class MatrixResponse {\n"); 155 | 156 | sb.append(" distances: ").append(toIndentedString(distances)).append("\n"); 157 | sb.append(" times: ").append(toIndentedString(times)).append("\n"); 158 | sb.append(" weights: ").append(toIndentedString(weights)).append("\n"); 159 | sb.append(" info: ").append(toIndentedString(info)).append("\n"); 160 | sb.append("}"); 161 | return sb.toString(); 162 | } 163 | 164 | /** 165 | * Convert the given object to string with each line indented by 4 spaces 166 | * (except the first line). 167 | */ 168 | private String toIndentedString(java.lang.Object o) { 169 | if (o == null) { 170 | return "null"; 171 | } 172 | return o.toString().replace("\n", "\n "); 173 | } 174 | 175 | } 176 | 177 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/ModelConfiguration.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import com.graphhopper.directions.api.client.model.Routing; 19 | import io.swagger.annotations.ApiModel; 20 | import io.swagger.annotations.ApiModelProperty; 21 | 22 | /** 23 | * ModelConfiguration 24 | */ 25 | 26 | public class ModelConfiguration { 27 | @SerializedName("routing") 28 | private Routing routing = null; 29 | 30 | public ModelConfiguration routing(Routing routing) { 31 | this.routing = routing; 32 | return this; 33 | } 34 | 35 | /** 36 | * Get routing 37 | * @return routing 38 | **/ 39 | @ApiModelProperty(example = "null", value = "") 40 | public Routing getRouting() { 41 | return routing; 42 | } 43 | 44 | public void setRouting(Routing routing) { 45 | this.routing = routing; 46 | } 47 | 48 | 49 | @Override 50 | public boolean equals(java.lang.Object o) { 51 | if (this == o) { 52 | return true; 53 | } 54 | if (o == null || getClass() != o.getClass()) { 55 | return false; 56 | } 57 | ModelConfiguration _configuration = (ModelConfiguration) o; 58 | return Objects.equals(this.routing, _configuration.routing); 59 | } 60 | 61 | @Override 62 | public int hashCode() { 63 | return Objects.hash(routing); 64 | } 65 | 66 | 67 | @Override 68 | public String toString() { 69 | StringBuilder sb = new StringBuilder(); 70 | sb.append("class ModelConfiguration {\n"); 71 | 72 | sb.append(" routing: ").append(toIndentedString(routing)).append("\n"); 73 | sb.append("}"); 74 | return sb.toString(); 75 | } 76 | 77 | /** 78 | * Convert the given object to string with each line indented by 4 spaces 79 | * (except the first line). 80 | */ 81 | private String toIndentedString(java.lang.Object o) { 82 | if (o == null) { 83 | return "null"; 84 | } 85 | return o.toString().replace("\n", "\n "); 86 | } 87 | 88 | } 89 | 90 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/Objective.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | 21 | /** 22 | * Objective 23 | */ 24 | 25 | public class Objective { 26 | /** 27 | * type of objective function, i.e. min or min-max 28 | */ 29 | public enum TypeEnum { 30 | @SerializedName("min") 31 | MIN("min"), 32 | 33 | @SerializedName("min-max") 34 | MIN_MAX("min-max"); 35 | 36 | private String value; 37 | 38 | TypeEnum(String value) { 39 | this.value = value; 40 | } 41 | 42 | @Override 43 | public String toString() { 44 | return String.valueOf(value); 45 | } 46 | } 47 | 48 | @SerializedName("type") 49 | private TypeEnum type = null; 50 | 51 | /** 52 | * objective function value 53 | */ 54 | public enum ValueEnum { 55 | @SerializedName("completion_time") 56 | COMPLETION_TIME("completion_time"), 57 | 58 | @SerializedName("transport_time") 59 | TRANSPORT_TIME("transport_time"), 60 | 61 | @SerializedName("vehicles") 62 | VEHICLES("vehicles"); 63 | 64 | private String value; 65 | 66 | ValueEnum(String value) { 67 | this.value = value; 68 | } 69 | 70 | @Override 71 | public String toString() { 72 | return String.valueOf(value); 73 | } 74 | } 75 | 76 | @SerializedName("value") 77 | private ValueEnum value = null; 78 | 79 | public Objective type(TypeEnum type) { 80 | this.type = type; 81 | return this; 82 | } 83 | 84 | /** 85 | * type of objective function, i.e. min or min-max 86 | * @return type 87 | **/ 88 | @ApiModelProperty(example = "null", value = "type of objective function, i.e. min or min-max ") 89 | public TypeEnum getType() { 90 | return type; 91 | } 92 | 93 | public void setType(TypeEnum type) { 94 | this.type = type; 95 | } 96 | 97 | public Objective value(ValueEnum value) { 98 | this.value = value; 99 | return this; 100 | } 101 | 102 | /** 103 | * objective function value 104 | * @return value 105 | **/ 106 | @ApiModelProperty(example = "null", value = "objective function value") 107 | public ValueEnum getValue() { 108 | return value; 109 | } 110 | 111 | public void setValue(ValueEnum value) { 112 | this.value = value; 113 | } 114 | 115 | 116 | @Override 117 | public boolean equals(java.lang.Object o) { 118 | if (this == o) { 119 | return true; 120 | } 121 | if (o == null || getClass() != o.getClass()) { 122 | return false; 123 | } 124 | Objective objective = (Objective) o; 125 | return Objects.equals(this.type, objective.type) && 126 | Objects.equals(this.value, objective.value); 127 | } 128 | 129 | @Override 130 | public int hashCode() { 131 | return Objects.hash(type, value); 132 | } 133 | 134 | 135 | @Override 136 | public String toString() { 137 | StringBuilder sb = new StringBuilder(); 138 | sb.append("class Objective {\n"); 139 | 140 | sb.append(" type: ").append(toIndentedString(type)).append("\n"); 141 | sb.append(" value: ").append(toIndentedString(value)).append("\n"); 142 | sb.append("}"); 143 | return sb.toString(); 144 | } 145 | 146 | /** 147 | * Convert the given object to string with each line indented by 4 spaces 148 | * (except the first line). 149 | */ 150 | private String toIndentedString(java.lang.Object o) { 151 | if (o == null) { 152 | return "null"; 153 | } 154 | return o.toString().replace("\n", "\n "); 155 | } 156 | 157 | } 158 | 159 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/Relation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | 23 | /** 24 | * Relation 25 | */ 26 | 27 | public class Relation { 28 | @SerializedName("type") 29 | private String type = null; 30 | 31 | @SerializedName("ids") 32 | private List ids = new ArrayList(); 33 | 34 | @SerializedName("vehicle_id") 35 | private String vehicleId = null; 36 | 37 | public Relation type(String type) { 38 | this.type = type; 39 | return this; 40 | } 41 | 42 | /** 43 | * identifier of relation 44 | * @return type 45 | **/ 46 | @ApiModelProperty(example = "null", value = "identifier of relation") 47 | public String getType() { 48 | return type; 49 | } 50 | 51 | public void setType(String type) { 52 | this.type = type; 53 | } 54 | 55 | public Relation ids(List ids) { 56 | this.ids = ids; 57 | return this; 58 | } 59 | 60 | public Relation addIdsItem(String idsItem) { 61 | this.ids.add(idsItem); 62 | return this; 63 | } 64 | 65 | /** 66 | * An array of ids that should be related 67 | * @return ids 68 | **/ 69 | @ApiModelProperty(example = "null", value = "An array of ids that should be related") 70 | public List getIds() { 71 | return ids; 72 | } 73 | 74 | public void setIds(List ids) { 75 | this.ids = ids; 76 | } 77 | 78 | public Relation vehicleId(String vehicleId) { 79 | this.vehicleId = vehicleId; 80 | return this; 81 | } 82 | 83 | /** 84 | * vehicle id 85 | * @return vehicleId 86 | **/ 87 | @ApiModelProperty(example = "null", value = "vehicle id") 88 | public String getVehicleId() { 89 | return vehicleId; 90 | } 91 | 92 | public void setVehicleId(String vehicleId) { 93 | this.vehicleId = vehicleId; 94 | } 95 | 96 | 97 | @Override 98 | public boolean equals(java.lang.Object o) { 99 | if (this == o) { 100 | return true; 101 | } 102 | if (o == null || getClass() != o.getClass()) { 103 | return false; 104 | } 105 | Relation relation = (Relation) o; 106 | return Objects.equals(this.type, relation.type) && 107 | Objects.equals(this.ids, relation.ids) && 108 | Objects.equals(this.vehicleId, relation.vehicleId); 109 | } 110 | 111 | @Override 112 | public int hashCode() { 113 | return Objects.hash(type, ids, vehicleId); 114 | } 115 | 116 | 117 | @Override 118 | public String toString() { 119 | StringBuilder sb = new StringBuilder(); 120 | sb.append("class Relation {\n"); 121 | 122 | sb.append(" type: ").append(toIndentedString(type)).append("\n"); 123 | sb.append(" ids: ").append(toIndentedString(ids)).append("\n"); 124 | sb.append(" vehicleId: ").append(toIndentedString(vehicleId)).append("\n"); 125 | sb.append("}"); 126 | return sb.toString(); 127 | } 128 | 129 | /** 130 | * Convert the given object to string with each line indented by 4 spaces 131 | * (except the first line). 132 | */ 133 | private String toIndentedString(java.lang.Object o) { 134 | if (o == null) { 135 | return "null"; 136 | } 137 | return o.toString().replace("\n", "\n "); 138 | } 139 | 140 | } 141 | 142 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/ResponseCoordinates.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import com.graphhopper.directions.api.client.model.ResponseCoordinatesArray; 19 | import io.swagger.annotations.ApiModel; 20 | import io.swagger.annotations.ApiModelProperty; 21 | 22 | /** 23 | * ResponseCoordinates 24 | */ 25 | 26 | public class ResponseCoordinates { 27 | @SerializedName("coordinates") 28 | private ResponseCoordinatesArray coordinates = null; 29 | 30 | public ResponseCoordinates coordinates(ResponseCoordinatesArray coordinates) { 31 | this.coordinates = coordinates; 32 | return this; 33 | } 34 | 35 | /** 36 | * Get coordinates 37 | * @return coordinates 38 | **/ 39 | @ApiModelProperty(example = "null", value = "") 40 | public ResponseCoordinatesArray getCoordinates() { 41 | return coordinates; 42 | } 43 | 44 | public void setCoordinates(ResponseCoordinatesArray coordinates) { 45 | this.coordinates = coordinates; 46 | } 47 | 48 | 49 | @Override 50 | public boolean equals(java.lang.Object o) { 51 | if (this == o) { 52 | return true; 53 | } 54 | if (o == null || getClass() != o.getClass()) { 55 | return false; 56 | } 57 | ResponseCoordinates responseCoordinates = (ResponseCoordinates) o; 58 | return Objects.equals(this.coordinates, responseCoordinates.coordinates); 59 | } 60 | 61 | @Override 62 | public int hashCode() { 63 | return Objects.hash(coordinates); 64 | } 65 | 66 | 67 | @Override 68 | public String toString() { 69 | StringBuilder sb = new StringBuilder(); 70 | sb.append("class ResponseCoordinates {\n"); 71 | 72 | sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); 73 | sb.append("}"); 74 | return sb.toString(); 75 | } 76 | 77 | /** 78 | * Convert the given object to string with each line indented by 4 spaces 79 | * (except the first line). 80 | */ 81 | private String toIndentedString(java.lang.Object o) { 82 | if (o == null) { 83 | return "null"; 84 | } 85 | return o.toString().replace("\n", "\n "); 86 | } 87 | 88 | } 89 | 90 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/ResponseCoordinatesArray.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import io.swagger.annotations.ApiModel; 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | /** 22 | * An array containing coordinates 23 | */ 24 | @ApiModel(description = "An array containing coordinates") 25 | 26 | public class ResponseCoordinatesArray extends ArrayList { 27 | 28 | @Override 29 | public boolean equals(java.lang.Object o) { 30 | if (this == o) { 31 | return true; 32 | } 33 | if (o == null || getClass() != o.getClass()) { 34 | return false; 35 | } 36 | return super.equals(o); 37 | } 38 | 39 | @Override 40 | public int hashCode() { 41 | return Objects.hash(super.hashCode()); 42 | } 43 | 44 | 45 | @Override 46 | public String toString() { 47 | StringBuilder sb = new StringBuilder(); 48 | sb.append("class ResponseCoordinatesArray {\n"); 49 | sb.append(" ").append(toIndentedString(super.toString())).append("\n"); 50 | sb.append("}"); 51 | return sb.toString(); 52 | } 53 | 54 | /** 55 | * Convert the given object to string with each line indented by 4 spaces 56 | * (except the first line). 57 | */ 58 | private String toIndentedString(java.lang.Object o) { 59 | if (o == null) { 60 | return "null"; 61 | } 62 | return o.toString().replace("\n", "\n "); 63 | } 64 | 65 | } 66 | 67 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/ResponseInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | 23 | /** 24 | * Additional information for your request 25 | */ 26 | @ApiModel(description = "Additional information for your request") 27 | 28 | public class ResponseInfo { 29 | @SerializedName("copyrights") 30 | private List copyrights = new ArrayList(); 31 | 32 | @SerializedName("took") 33 | private Double took = null; 34 | 35 | public ResponseInfo copyrights(List copyrights) { 36 | this.copyrights = copyrights; 37 | return this; 38 | } 39 | 40 | public ResponseInfo addCopyrightsItem(String copyrightsItem) { 41 | this.copyrights.add(copyrightsItem); 42 | return this; 43 | } 44 | 45 | /** 46 | * Get copyrights 47 | * @return copyrights 48 | **/ 49 | @ApiModelProperty(example = "null", value = "") 50 | public List getCopyrights() { 51 | return copyrights; 52 | } 53 | 54 | public void setCopyrights(List copyrights) { 55 | this.copyrights = copyrights; 56 | } 57 | 58 | public ResponseInfo took(Double took) { 59 | this.took = took; 60 | return this; 61 | } 62 | 63 | /** 64 | * Get took 65 | * @return took 66 | **/ 67 | @ApiModelProperty(example = "null", value = "") 68 | public Double getTook() { 69 | return took; 70 | } 71 | 72 | public void setTook(Double took) { 73 | this.took = took; 74 | } 75 | 76 | 77 | @Override 78 | public boolean equals(java.lang.Object o) { 79 | if (this == o) { 80 | return true; 81 | } 82 | if (o == null || getClass() != o.getClass()) { 83 | return false; 84 | } 85 | ResponseInfo responseInfo = (ResponseInfo) o; 86 | return Objects.equals(this.copyrights, responseInfo.copyrights) && 87 | Objects.equals(this.took, responseInfo.took); 88 | } 89 | 90 | @Override 91 | public int hashCode() { 92 | return Objects.hash(copyrights, took); 93 | } 94 | 95 | 96 | @Override 97 | public String toString() { 98 | StringBuilder sb = new StringBuilder(); 99 | sb.append("class ResponseInfo {\n"); 100 | 101 | sb.append(" copyrights: ").append(toIndentedString(copyrights)).append("\n"); 102 | sb.append(" took: ").append(toIndentedString(took)).append("\n"); 103 | sb.append("}"); 104 | return sb.toString(); 105 | } 106 | 107 | /** 108 | * Convert the given object to string with each line indented by 4 spaces 109 | * (except the first line). 110 | */ 111 | private String toIndentedString(java.lang.Object o) { 112 | if (o == null) { 113 | return "null"; 114 | } 115 | return o.toString().replace("\n", "\n "); 116 | } 117 | 118 | } 119 | 120 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/ResponseInstructions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.graphhopper.directions.api.client.model.ResponseInstruction; 18 | import io.swagger.annotations.ApiModel; 19 | import java.util.ArrayList; 20 | import java.util.List; 21 | 22 | /** 23 | * Contains information about the instructions for this route. The last instruction is always the Finish instruction and takes 0ms and 0meter. Keep in mind that instructions are currently under active development and can sometimes contain misleading information, so, make sure you always show an image of the map at the same time when navigating your users! 24 | */ 25 | @ApiModel(description = "Contains information about the instructions for this route. The last instruction is always the Finish instruction and takes 0ms and 0meter. Keep in mind that instructions are currently under active development and can sometimes contain misleading information, so, make sure you always show an image of the map at the same time when navigating your users!") 26 | 27 | public class ResponseInstructions extends ArrayList { 28 | 29 | @Override 30 | public boolean equals(java.lang.Object o) { 31 | if (this == o) { 32 | return true; 33 | } 34 | if (o == null || getClass() != o.getClass()) { 35 | return false; 36 | } 37 | return super.equals(o); 38 | } 39 | 40 | @Override 41 | public int hashCode() { 42 | return Objects.hash(super.hashCode()); 43 | } 44 | 45 | 46 | @Override 47 | public String toString() { 48 | StringBuilder sb = new StringBuilder(); 49 | sb.append("class ResponseInstructions {\n"); 50 | sb.append(" ").append(toIndentedString(super.toString())).append("\n"); 51 | sb.append("}"); 52 | return sb.toString(); 53 | } 54 | 55 | /** 56 | * Convert the given object to string with each line indented by 4 spaces 57 | * (except the first line). 58 | */ 59 | private String toIndentedString(java.lang.Object o) { 60 | if (o == null) { 61 | return "null"; 62 | } 63 | return o.toString().replace("\n", "\n "); 64 | } 65 | 66 | } 67 | 68 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/RoutePoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | 23 | /** 24 | * RoutePoint 25 | */ 26 | 27 | public class RoutePoint { 28 | @SerializedName("type") 29 | private String type = null; 30 | 31 | @SerializedName("coordinates") 32 | private List coordinates = new ArrayList(); 33 | 34 | public RoutePoint type(String type) { 35 | this.type = type; 36 | return this; 37 | } 38 | 39 | /** 40 | * Get type 41 | * @return type 42 | **/ 43 | @ApiModelProperty(example = "null", value = "") 44 | public String getType() { 45 | return type; 46 | } 47 | 48 | public void setType(String type) { 49 | this.type = type; 50 | } 51 | 52 | public RoutePoint coordinates(List coordinates) { 53 | this.coordinates = coordinates; 54 | return this; 55 | } 56 | 57 | public RoutePoint addCoordinatesItem(Object coordinatesItem) { 58 | this.coordinates.add(coordinatesItem); 59 | return this; 60 | } 61 | 62 | /** 63 | * Get coordinates 64 | * @return coordinates 65 | **/ 66 | @ApiModelProperty(example = "null", value = "") 67 | public List getCoordinates() { 68 | return coordinates; 69 | } 70 | 71 | public void setCoordinates(List coordinates) { 72 | this.coordinates = coordinates; 73 | } 74 | 75 | 76 | @Override 77 | public boolean equals(java.lang.Object o) { 78 | if (this == o) { 79 | return true; 80 | } 81 | if (o == null || getClass() != o.getClass()) { 82 | return false; 83 | } 84 | RoutePoint routePoint = (RoutePoint) o; 85 | return Objects.equals(this.type, routePoint.type) && 86 | Objects.equals(this.coordinates, routePoint.coordinates); 87 | } 88 | 89 | @Override 90 | public int hashCode() { 91 | return Objects.hash(type, coordinates); 92 | } 93 | 94 | 95 | @Override 96 | public String toString() { 97 | StringBuilder sb = new StringBuilder(); 98 | sb.append("class RoutePoint {\n"); 99 | 100 | sb.append(" type: ").append(toIndentedString(type)).append("\n"); 101 | sb.append(" coordinates: ").append(toIndentedString(coordinates)).append("\n"); 102 | sb.append("}"); 103 | return sb.toString(); 104 | } 105 | 106 | /** 107 | * Convert the given object to string with each line indented by 4 spaces 108 | * (except the first line). 109 | */ 110 | private String toIndentedString(java.lang.Object o) { 111 | if (o == null) { 112 | return "null"; 113 | } 114 | return o.toString().replace("\n", "\n "); 115 | } 116 | 117 | } 118 | 119 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/RouteResponse.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import com.graphhopper.directions.api.client.model.ResponseInfo; 19 | import com.graphhopper.directions.api.client.model.RouteResponsePath; 20 | import io.swagger.annotations.ApiModel; 21 | import io.swagger.annotations.ApiModelProperty; 22 | import java.util.ArrayList; 23 | import java.util.List; 24 | 25 | /** 26 | * RouteResponse 27 | */ 28 | 29 | public class RouteResponse { 30 | @SerializedName("paths") 31 | private List paths = new ArrayList(); 32 | 33 | @SerializedName("info") 34 | private ResponseInfo info = null; 35 | 36 | public RouteResponse paths(List paths) { 37 | this.paths = paths; 38 | return this; 39 | } 40 | 41 | public RouteResponse addPathsItem(RouteResponsePath pathsItem) { 42 | this.paths.add(pathsItem); 43 | return this; 44 | } 45 | 46 | /** 47 | * Get paths 48 | * @return paths 49 | **/ 50 | @ApiModelProperty(example = "null", value = "") 51 | public List getPaths() { 52 | return paths; 53 | } 54 | 55 | public void setPaths(List paths) { 56 | this.paths = paths; 57 | } 58 | 59 | public RouteResponse info(ResponseInfo info) { 60 | this.info = info; 61 | return this; 62 | } 63 | 64 | /** 65 | * Get info 66 | * @return info 67 | **/ 68 | @ApiModelProperty(example = "null", value = "") 69 | public ResponseInfo getInfo() { 70 | return info; 71 | } 72 | 73 | public void setInfo(ResponseInfo info) { 74 | this.info = info; 75 | } 76 | 77 | 78 | @Override 79 | public boolean equals(java.lang.Object o) { 80 | if (this == o) { 81 | return true; 82 | } 83 | if (o == null || getClass() != o.getClass()) { 84 | return false; 85 | } 86 | RouteResponse routeResponse = (RouteResponse) o; 87 | return Objects.equals(this.paths, routeResponse.paths) && 88 | Objects.equals(this.info, routeResponse.info); 89 | } 90 | 91 | @Override 92 | public int hashCode() { 93 | return Objects.hash(paths, info); 94 | } 95 | 96 | 97 | @Override 98 | public String toString() { 99 | StringBuilder sb = new StringBuilder(); 100 | sb.append("class RouteResponse {\n"); 101 | 102 | sb.append(" paths: ").append(toIndentedString(paths)).append("\n"); 103 | sb.append(" info: ").append(toIndentedString(info)).append("\n"); 104 | sb.append("}"); 105 | return sb.toString(); 106 | } 107 | 108 | /** 109 | * Convert the given object to string with each line indented by 4 spaces 110 | * (except the first line). 111 | */ 112 | private String toIndentedString(java.lang.Object o) { 113 | if (o == null) { 114 | return "null"; 115 | } 116 | return o.toString().replace("\n", "\n "); 117 | } 118 | 119 | } 120 | 121 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/Routing.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | 21 | /** 22 | * Routing 23 | */ 24 | 25 | public class Routing { 26 | @SerializedName("calc_points") 27 | private Boolean calcPoints = null; 28 | 29 | public Routing calcPoints(Boolean calcPoints) { 30 | this.calcPoints = calcPoints; 31 | return this; 32 | } 33 | 34 | /** 35 | * indicates whether solution should come with route geometries 36 | * @return calcPoints 37 | **/ 38 | @ApiModelProperty(example = "null", value = "indicates whether solution should come with route geometries") 39 | public Boolean getCalcPoints() { 40 | return calcPoints; 41 | } 42 | 43 | public void setCalcPoints(Boolean calcPoints) { 44 | this.calcPoints = calcPoints; 45 | } 46 | 47 | 48 | @Override 49 | public boolean equals(java.lang.Object o) { 50 | if (this == o) { 51 | return true; 52 | } 53 | if (o == null || getClass() != o.getClass()) { 54 | return false; 55 | } 56 | Routing routing = (Routing) o; 57 | return Objects.equals(this.calcPoints, routing.calcPoints); 58 | } 59 | 60 | @Override 61 | public int hashCode() { 62 | return Objects.hash(calcPoints); 63 | } 64 | 65 | 66 | @Override 67 | public String toString() { 68 | StringBuilder sb = new StringBuilder(); 69 | sb.append("class Routing {\n"); 70 | 71 | sb.append(" calcPoints: ").append(toIndentedString(calcPoints)).append("\n"); 72 | sb.append("}"); 73 | return sb.toString(); 74 | } 75 | 76 | /** 77 | * Convert the given object to string with each line indented by 4 spaces 78 | * (except the first line). 79 | */ 80 | private String toIndentedString(java.lang.Object o) { 81 | if (o == null) { 82 | return "null"; 83 | } 84 | return o.toString().replace("\n", "\n "); 85 | } 86 | 87 | } 88 | 89 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/SolutionUnassigned.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | import java.util.ArrayList; 21 | import java.util.List; 22 | 23 | /** 24 | * SolutionUnassigned 25 | */ 26 | 27 | public class SolutionUnassigned { 28 | @SerializedName("services") 29 | private List services = new ArrayList(); 30 | 31 | @SerializedName("shipments") 32 | private List shipments = new ArrayList(); 33 | 34 | public SolutionUnassigned services(List services) { 35 | this.services = services; 36 | return this; 37 | } 38 | 39 | public SolutionUnassigned addServicesItem(String servicesItem) { 40 | this.services.add(servicesItem); 41 | return this; 42 | } 43 | 44 | /** 45 | * An array of ids of unassigned services 46 | * @return services 47 | **/ 48 | @ApiModelProperty(example = "null", value = "An array of ids of unassigned services") 49 | public List getServices() { 50 | return services; 51 | } 52 | 53 | public void setServices(List services) { 54 | this.services = services; 55 | } 56 | 57 | public SolutionUnassigned shipments(List shipments) { 58 | this.shipments = shipments; 59 | return this; 60 | } 61 | 62 | public SolutionUnassigned addShipmentsItem(String shipmentsItem) { 63 | this.shipments.add(shipmentsItem); 64 | return this; 65 | } 66 | 67 | /** 68 | * An array of ids of unassigned shipments 69 | * @return shipments 70 | **/ 71 | @ApiModelProperty(example = "null", value = "An array of ids of unassigned shipments") 72 | public List getShipments() { 73 | return shipments; 74 | } 75 | 76 | public void setShipments(List shipments) { 77 | this.shipments = shipments; 78 | } 79 | 80 | 81 | @Override 82 | public boolean equals(java.lang.Object o) { 83 | if (this == o) { 84 | return true; 85 | } 86 | if (o == null || getClass() != o.getClass()) { 87 | return false; 88 | } 89 | SolutionUnassigned solutionUnassigned = (SolutionUnassigned) o; 90 | return Objects.equals(this.services, solutionUnassigned.services) && 91 | Objects.equals(this.shipments, solutionUnassigned.shipments); 92 | } 93 | 94 | @Override 95 | public int hashCode() { 96 | return Objects.hash(services, shipments); 97 | } 98 | 99 | 100 | @Override 101 | public String toString() { 102 | StringBuilder sb = new StringBuilder(); 103 | sb.append("class SolutionUnassigned {\n"); 104 | 105 | sb.append(" services: ").append(toIndentedString(services)).append("\n"); 106 | sb.append(" shipments: ").append(toIndentedString(shipments)).append("\n"); 107 | sb.append("}"); 108 | return sb.toString(); 109 | } 110 | 111 | /** 112 | * Convert the given object to string with each line indented by 4 spaces 113 | * (except the first line). 114 | */ 115 | private String toIndentedString(java.lang.Object o) { 116 | if (o == null) { 117 | return "null"; 118 | } 119 | return o.toString().replace("\n", "\n "); 120 | } 121 | 122 | } 123 | 124 | -------------------------------------------------------------------------------- /client/src/main/java/com/graphhopper/directions/api/client/model/TimeWindow.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.model; 15 | 16 | import java.util.Objects; 17 | import com.google.gson.annotations.SerializedName; 18 | import io.swagger.annotations.ApiModel; 19 | import io.swagger.annotations.ApiModelProperty; 20 | 21 | /** 22 | * TimeWindow 23 | */ 24 | 25 | public class TimeWindow { 26 | @SerializedName("earliest") 27 | private Long earliest = null; 28 | 29 | @SerializedName("latest") 30 | private Long latest = null; 31 | 32 | public TimeWindow earliest(Long earliest) { 33 | this.earliest = earliest; 34 | return this; 35 | } 36 | 37 | /** 38 | * earliest start time of corresponding activity 39 | * @return earliest 40 | **/ 41 | @ApiModelProperty(example = "null", value = "earliest start time of corresponding activity") 42 | public Long getEarliest() { 43 | return earliest; 44 | } 45 | 46 | public void setEarliest(Long earliest) { 47 | this.earliest = earliest; 48 | } 49 | 50 | public TimeWindow latest(Long latest) { 51 | this.latest = latest; 52 | return this; 53 | } 54 | 55 | /** 56 | * latest start time of corresponding activity 57 | * @return latest 58 | **/ 59 | @ApiModelProperty(example = "null", value = "latest start time of corresponding activity") 60 | public Long getLatest() { 61 | return latest; 62 | } 63 | 64 | public void setLatest(Long latest) { 65 | this.latest = latest; 66 | } 67 | 68 | 69 | @Override 70 | public boolean equals(java.lang.Object o) { 71 | if (this == o) { 72 | return true; 73 | } 74 | if (o == null || getClass() != o.getClass()) { 75 | return false; 76 | } 77 | TimeWindow timeWindow = (TimeWindow) o; 78 | return Objects.equals(this.earliest, timeWindow.earliest) && 79 | Objects.equals(this.latest, timeWindow.latest); 80 | } 81 | 82 | @Override 83 | public int hashCode() { 84 | return Objects.hash(earliest, latest); 85 | } 86 | 87 | 88 | @Override 89 | public String toString() { 90 | StringBuilder sb = new StringBuilder(); 91 | sb.append("class TimeWindow {\n"); 92 | 93 | sb.append(" earliest: ").append(toIndentedString(earliest)).append("\n"); 94 | sb.append(" latest: ").append(toIndentedString(latest)).append("\n"); 95 | sb.append("}"); 96 | return sb.toString(); 97 | } 98 | 99 | /** 100 | * Convert the given object to string with each line indented by 4 spaces 101 | * (except the first line). 102 | */ 103 | private String toIndentedString(java.lang.Object o) { 104 | if (o == null) { 105 | return "null"; 106 | } 107 | return o.toString().replace("\n", "\n "); 108 | } 109 | 110 | } 111 | 112 | -------------------------------------------------------------------------------- /client/src/test/java/com/graphhopper/directions/api/client/api/GeocodingApiTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.api; 15 | 16 | import com.graphhopper.directions.api.client.ApiException; 17 | import com.graphhopper.directions.api.client.model.GHError; 18 | import com.graphhopper.directions.api.client.model.GeocodingResponse; 19 | import org.junit.Test; 20 | import org.junit.Ignore; 21 | 22 | import java.util.ArrayList; 23 | import java.util.HashMap; 24 | import java.util.List; 25 | import java.util.Map; 26 | 27 | /** 28 | * API tests for GeocodingApi 29 | */ 30 | @Ignore 31 | public class GeocodingApiTest { 32 | 33 | private final GeocodingApi api = new GeocodingApi(); 34 | 35 | 36 | /** 37 | * Execute a Geocoding request 38 | * 39 | * This endpoint provides forward and reverse geocoding. For more details, review the official documentation at: https://graphhopper.com/api/1/docs/geocoding/ 40 | * 41 | * @throws ApiException 42 | * if the Api call fails 43 | */ 44 | @Test 45 | public void geocodeGetTest() throws ApiException { 46 | String key = null; 47 | String q = null; 48 | String locale = null; 49 | Integer limit = null; 50 | Boolean reverse = null; 51 | String point = null; 52 | String provider = null; 53 | GeocodingResponse response = api.geocodeGet(key, q, locale, limit, reverse, point, provider); 54 | 55 | // TODO: test validations 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /client/src/test/java/com/graphhopper/directions/api/client/api/IsochroneApiTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.api; 15 | 16 | import com.graphhopper.directions.api.client.ApiException; 17 | import com.graphhopper.directions.api.client.model.GHError; 18 | import com.graphhopper.directions.api.client.model.IsochroneResponse; 19 | import org.junit.Test; 20 | import org.junit.Ignore; 21 | 22 | import java.util.ArrayList; 23 | import java.util.HashMap; 24 | import java.util.List; 25 | import java.util.Map; 26 | 27 | /** 28 | * API tests for IsochroneApi 29 | */ 30 | @Ignore 31 | public class IsochroneApiTest { 32 | 33 | private final IsochroneApi api = new IsochroneApi(); 34 | 35 | 36 | /** 37 | * Isochrone Request 38 | * 39 | * The GraphHopper Isochrone API allows calculating an isochrone of a locations means to calculate 'a line connecting points at which a vehicle arrives at the same time,' see [Wikipedia](http://en.wikipedia.org/wiki/Isochrone_map). It is also called **reachability** or **walkability**. 40 | * 41 | * @throws ApiException 42 | * if the Api call fails 43 | */ 44 | @Test 45 | public void isochroneGetTest() throws ApiException { 46 | String point = null; 47 | String key = null; 48 | Integer timeLimit = null; 49 | Integer distanceLimit = null; 50 | String vehicle = null; 51 | Integer buckets = null; 52 | Boolean reverseFlow = null; 53 | IsochroneResponse response = api.isochroneGet(point, key, timeLimit, distanceLimit, vehicle, buckets, reverseFlow); 54 | 55 | // TODO: test validations 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /client/src/test/java/com/graphhopper/directions/api/client/api/MatrixApiTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.api; 15 | 16 | import com.graphhopper.directions.api.client.ApiException; 17 | import com.graphhopper.directions.api.client.model.GHError; 18 | import com.graphhopper.directions.api.client.model.MatrixRequest; 19 | import com.graphhopper.directions.api.client.model.MatrixResponse; 20 | import org.junit.Test; 21 | import org.junit.Ignore; 22 | 23 | import java.util.ArrayList; 24 | import java.util.HashMap; 25 | import java.util.List; 26 | import java.util.Map; 27 | 28 | /** 29 | * API tests for MatrixApi 30 | */ 31 | @Ignore 32 | public class MatrixApiTest { 33 | 34 | private final MatrixApi api = new MatrixApi(); 35 | 36 | 37 | /** 38 | * Matrix API 39 | * 40 | * The Matrix API is part of the GraphHopper Directions API and with this API you can calculate many-to-many distances, times or routes a lot more efficient than calling the Routing API multiple times. In the Routing API we support multiple points, so called 'via points', which results in one route being calculated. The Matrix API results in NxM routes or more precise NxM weights, distances or times being calculated but is a lot faster compared to NxM single requests. The most simple example is a tourist trying to decide which pizza is close to him instead of using beeline distance she can calculate a 1x4 matrix. Or a delivery service in the need of often big NxN matrices to solve vehicle routing problems. E.g. the GraphHopper Route Optimization API uses the Matrix API under the hood to achieve this. 41 | * 42 | * @throws ApiException 43 | * if the Api call fails 44 | */ 45 | @Test 46 | public void matrixGetTest() throws ApiException { 47 | String key = null; 48 | List point = null; 49 | String fromPoint = null; 50 | String toPoint = null; 51 | List outArray = null; 52 | String vehicle = null; 53 | MatrixResponse response = api.matrixGet(key, point, fromPoint, toPoint, outArray, vehicle); 54 | 55 | // TODO: test validations 56 | } 57 | 58 | /** 59 | * Matrix API Post 60 | * 61 | * The GET request has an URL length limitation, which hurts for many locations per request. In those cases use a HTTP POST request with JSON data as input. The only parameter in the URL will be the key which stays in the URL. Both request scenarios are identically except that all singular parameter names are named as their plural for a POST request. 62 | * 63 | * @throws ApiException 64 | * if the Api call fails 65 | */ 66 | @Test 67 | public void matrixPostTest() throws ApiException { 68 | String key = null; 69 | MatrixRequest body = null; 70 | MatrixResponse response = api.matrixPost(key, body); 71 | 72 | // TODO: test validations 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /client/src/test/java/com/graphhopper/directions/api/client/api/RoutingApiTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.api; 15 | 16 | import com.graphhopper.directions.api.client.ApiException; 17 | import com.graphhopper.directions.api.client.model.GHError; 18 | import com.graphhopper.directions.api.client.model.RouteResponse; 19 | import org.junit.Test; 20 | import org.junit.Ignore; 21 | 22 | import java.util.ArrayList; 23 | import java.util.HashMap; 24 | import java.util.List; 25 | import java.util.Map; 26 | 27 | /** 28 | * API tests for RoutingApi 29 | */ 30 | @Ignore 31 | public class RoutingApiTest { 32 | 33 | private final RoutingApi api = new RoutingApi(); 34 | 35 | 36 | /** 37 | * Routing Request 38 | * 39 | * The GraphHopper Routing API allows to calculate route and implement navigation via the turn instructions 40 | * 41 | * @throws ApiException 42 | * if the Api call fails 43 | */ 44 | @Test 45 | public void routeGetTest() throws ApiException { 46 | List point = null; 47 | Boolean pointsEncoded = null; 48 | String key = null; 49 | String locale = null; 50 | Boolean instructions = null; 51 | String vehicle = null; 52 | Boolean elevation = null; 53 | Boolean calcPoints = null; 54 | List pointHint = null; 55 | Boolean chDisable = null; 56 | String weighting = null; 57 | Boolean edgeTraversal = null; 58 | String algorithm = null; 59 | Integer heading = null; 60 | Integer headingPenalty = null; 61 | Boolean passThrough = null; 62 | Integer roundTripDistance = null; 63 | Long roundTripSeed = null; 64 | Integer alternativeRouteMaxPaths = null; 65 | Integer alternativeRouteMaxWeightFactor = null; 66 | Integer alternativeRouteMaxShareFactor = null; 67 | RouteResponse response = api.routeGet(point, pointsEncoded, key, locale, instructions, vehicle, elevation, calcPoints, pointHint, chDisable, weighting, edgeTraversal, algorithm, heading, headingPenalty, passThrough, roundTripDistance, roundTripSeed, alternativeRouteMaxPaths, alternativeRouteMaxWeightFactor, alternativeRouteMaxShareFactor); 68 | 69 | // TODO: test validations 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /client/src/test/java/com/graphhopper/directions/api/client/api/SolutionApiTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.api; 15 | 16 | import com.graphhopper.directions.api.client.ApiException; 17 | import com.graphhopper.directions.api.client.model.Response; 18 | import org.junit.Test; 19 | import org.junit.Ignore; 20 | 21 | import java.util.ArrayList; 22 | import java.util.HashMap; 23 | import java.util.List; 24 | import java.util.Map; 25 | 26 | /** 27 | * API tests for SolutionApi 28 | */ 29 | @Ignore 30 | public class SolutionApiTest { 31 | 32 | private final SolutionApi api = new SolutionApi(); 33 | 34 | 35 | /** 36 | * Return the solution associated to the jobId 37 | * 38 | * This endpoint returns the solution of a large problems. You can fetch it with the job_id, you have been sent. 39 | * 40 | * @throws ApiException 41 | * if the Api call fails 42 | */ 43 | @Test 44 | public void getSolutionTest() throws ApiException { 45 | String key = null; 46 | String jobId = null; 47 | Response response = api.getSolution(key, jobId); 48 | 49 | // TODO: test validations 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /client/src/test/java/com/graphhopper/directions/api/client/api/VrpApiTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * GraphHopper Directions API 3 | * You use the GraphHopper Directions API to add route planning, navigation and route optimization to your software. E.g. the Routing API has turn instructions and elevation data and the Route Optimization API solves your logistic problems and supports various constraints like time window and capacity restrictions. Also it is possible to get all distances between all locations with our fast Matrix API. 4 | * 5 | * OpenAPI spec version: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by the swagger code generator program. 9 | * https://github.com/swagger-api/swagger-codegen.git 10 | * Do not edit the class manually. 11 | */ 12 | 13 | 14 | package com.graphhopper.directions.api.client.api; 15 | 16 | import com.graphhopper.directions.api.client.ApiException; 17 | import com.graphhopper.directions.api.client.model.JobId; 18 | import com.graphhopper.directions.api.client.model.Request; 19 | import org.junit.Test; 20 | import org.junit.Ignore; 21 | 22 | import java.util.ArrayList; 23 | import java.util.HashMap; 24 | import java.util.List; 25 | import java.util.Map; 26 | 27 | /** 28 | * API tests for VrpApi 29 | */ 30 | @Ignore 31 | public class VrpApiTest { 32 | 33 | private final VrpApi api = new VrpApi(); 34 | 35 | 36 | /** 37 | * Solves vehicle routing problems 38 | * 39 | * This endpoint for solving vehicle routing problems, i.e. traveling salesman or vehicle routing problems, and returns the solution. 40 | * 41 | * @throws ApiException 42 | * if the Api call fails 43 | */ 44 | @Test 45 | public void postVrpTest() throws ApiException { 46 | String key = null; 47 | Request body = null; 48 | JobId response = api.postVrp(key, body); 49 | 50 | // TODO: test validations 51 | } 52 | 53 | } 54 | --------------------------------------------------------------------------------