@Generated("by gapic-generator-java")
Package com.google.maps.routing.v2
A client to Routes API
The interfaces provided are listed below, along with usage samples.
======================= RoutesClient =======================
Service Description: The Routes API.
Sample for RoutesClient:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (RoutesClient routesClient = RoutesClient.create()) {
ComputeRoutesRequest request =
ComputeRoutesRequest.newBuilder()
.setOrigin(Waypoint.newBuilder().build())
.setDestination(Waypoint.newBuilder().build())
.addAllIntermediates(new ArrayList<Waypoint>())
.setTravelMode(RouteTravelMode.forNumber(0))
.setRoutingPreference(RoutingPreference.forNumber(0))
.setPolylineQuality(PolylineQuality.forNumber(0))
.setPolylineEncoding(PolylineEncoding.forNumber(0))
.setDepartureTime(Timestamp.newBuilder().build())
.setArrivalTime(Timestamp.newBuilder().build())
.setComputeAlternativeRoutes(true)
.setRouteModifiers(RouteModifiers.newBuilder().build())
.setLanguageCode("languageCode-2092349083")
.setRegionCode("regionCode-1991004415")
.setUnits(Units.forNumber(0))
.setOptimizeWaypointOrder(true)
.addAllRequestedReferenceRoutes(new ArrayList<ComputeRoutesRequest.ReferenceRoute>())
.addAllExtraComputations(new ArrayList<ComputeRoutesRequest.ExtraComputation>())
.setTrafficModel(TrafficModel.forNumber(0))
.setTransitPreferences(TransitPreferences.newBuilder().build())
.build();
ComputeRoutesResponse response = routesClient.computeRoutes(request);
}
-
Class Summary Class Description ComputeRouteMatrixRequest ComputeRouteMatrix request messageComputeRouteMatrixRequest.Builder ComputeRouteMatrix request messageComputeRoutesRequest ComputeRoutes request message.ComputeRoutesRequest.Builder ComputeRoutes request message.ComputeRoutesResponse ComputeRoutes the response message.ComputeRoutesResponse.Builder ComputeRoutes the response message.FallbackInfo Information related to how and why a fallback result was used.FallbackInfo.Builder Information related to how and why a fallback result was used.FallbackInfoProto GeocodedWaypoint Details about the locations used as waypoints.GeocodedWaypoint.Builder Details about the locations used as waypoints.GeocodingResults Contains [GeocodedWaypoints][google.maps.routing.v2.GeocodedWaypoint] for origin, destination and intermediate waypoints.GeocodingResults.Builder Contains [GeocodedWaypoints][google.maps.routing.v2.GeocodedWaypoint] for origin, destination and intermediate waypoints.GeocodingResultsProto LocalizedTime Localized description of time.LocalizedTime.Builder Localized description of time.LocalizedTimeProto Location Encapsulates a location (a geographic point, and an optional heading).Location.Builder Encapsulates a location (a geographic point, and an optional heading).LocationProto ManeuverProto NavigationInstruction Encapsulates navigation instructions for a [RouteLegStep][google.maps.routing.v2.RouteLegStep]NavigationInstruction.Builder Encapsulates navigation instructions for a [RouteLegStep][google.maps.routing.v2.RouteLegStep]NavigationInstructionProto Polyline Encapsulates an encoded polyline.Polyline.Builder Encapsulates an encoded polyline.PolylineProto Route Contains a route, which consists of a series of connected road segments that join beginning, ending, and intermediate waypoints.Route.Builder Contains a route, which consists of a series of connected road segments that join beginning, ending, and intermediate waypoints.Route.RouteLocalizedValues Text representations of certain properties.Route.RouteLocalizedValues.Builder Text representations of certain properties.RouteLabelProto RouteLeg Contains a segment between non-`via` waypoints.RouteLeg.Builder Contains a segment between non-`via` waypoints.RouteLeg.RouteLegLocalizedValues Text representations of certain properties.RouteLeg.RouteLegLocalizedValues.Builder Text representations of certain properties.RouteLeg.StepsOverview Provides overview information about a list of `RouteLegStep`s.RouteLeg.StepsOverview.Builder Provides overview information about a list of `RouteLegStep`s.RouteLeg.StepsOverview.MultiModalSegment Provides summarized information about different multi-modal segments of the `RouteLeg.steps`.RouteLeg.StepsOverview.MultiModalSegment.Builder Provides summarized information about different multi-modal segments of the `RouteLeg.steps`.RouteLegStep Contains a segment of a [RouteLeg][google.maps.routing.v2.RouteLeg].RouteLegStep.Builder Contains a segment of a [RouteLeg][google.maps.routing.v2.RouteLeg].RouteLegStep.RouteLegStepLocalizedValues Text representations of certain properties.RouteLegStep.RouteLegStepLocalizedValues.Builder Text representations of certain properties.RouteLegStepTransitDetails Additional information for the `RouteLegStep` related to `TRANSIT` routes.RouteLegStepTransitDetails.Builder Additional information for the `RouteLegStep` related to `TRANSIT` routes.RouteLegStepTransitDetails.TransitDetailsLocalizedValues Localized descriptions of values for RouteTransitDetails.RouteLegStepTransitDetails.TransitDetailsLocalizedValues.Builder Localized descriptions of values for RouteTransitDetails.RouteLegStepTransitDetails.TransitStopDetails Details about the transit stops for the `RouteLegStep`RouteLegStepTransitDetails.TransitStopDetails.Builder Details about the transit stops for the `RouteLegStep`RouteLegStepTravelAdvisory Contains the additional information that the user should be informed about, such as possible traffic zone restrictions on a leg step.RouteLegStepTravelAdvisory.Builder Contains the additional information that the user should be informed about, such as possible traffic zone restrictions on a leg step.RouteLegTravelAdvisory Contains the additional information that the user should be informed about on a leg step, such as possible traffic zone restrictions.RouteLegTravelAdvisory.Builder Contains the additional information that the user should be informed about on a leg step, such as possible traffic zone restrictions.RouteMatrixDestination A single destination for ComputeRouteMatrixRequestRouteMatrixDestination.Builder A single destination for ComputeRouteMatrixRequestRouteMatrixElement Contains route information computed for an origin/destination pair in the ComputeRouteMatrix API.RouteMatrixElement.Builder Contains route information computed for an origin/destination pair in the ComputeRouteMatrix API.RouteMatrixElement.LocalizedValues Text representations of certain properties.RouteMatrixElement.LocalizedValues.Builder Text representations of certain properties.RouteMatrixOrigin A single origin for ComputeRouteMatrixRequestRouteMatrixOrigin.Builder A single origin for ComputeRouteMatrixRequestRouteModifiers Encapsulates a set of optional conditions to satisfy when calculating the routes.RouteModifiers.Builder Encapsulates a set of optional conditions to satisfy when calculating the routes.RouteModifiersProto RouteProto RoutesClient Service Description: The Routes API.RoutesGrpc The Routes API.RoutesGrpc.RoutesBlockingStub A stub to allow clients to do synchronous rpc calls to service Routes.RoutesGrpc.RoutesFutureStub A stub to allow clients to do ListenableFuture-style rpc calls to service Routes.RoutesGrpc.RoutesImplBase Base class for the server implementation of the service Routes.RoutesGrpc.RoutesStub A stub to allow clients to do asynchronous rpc calls to service Routes.RoutesServiceProto RoutesSettings Settings class to configure an instance ofRoutesClient
.RoutesSettings.Builder Builder for RoutesSettings.RouteTravelAdvisory Contains the additional information that the user should be informed about, such as possible traffic zone restrictions.RouteTravelAdvisory.Builder Contains the additional information that the user should be informed about, such as possible traffic zone restrictions.RouteTravelModeProto RoutingPreferenceProto SpeedReadingInterval Traffic density indicator on a contiguous segment of a polyline or path.SpeedReadingInterval.Builder Traffic density indicator on a contiguous segment of a polyline or path.SpeedReadingIntervalProto TollInfo Encapsulates toll information on a [Route][google.maps.routing.v2.Route] or on a [RouteLeg][google.maps.routing.v2.RouteLeg].TollInfo.Builder Encapsulates toll information on a [Route][google.maps.routing.v2.Route] or on a [RouteLeg][google.maps.routing.v2.RouteLeg].TollInfoProto TollPassesProto TrafficModelProto TransitAgency A transit agency that operates a transit line.TransitAgency.Builder A transit agency that operates a transit line.TransitLine Contains information about the transit line used in this step.TransitLine.Builder Contains information about the transit line used in this step.TransitPreferences Preferences for `TRANSIT` based routes that influence the route that is returned.TransitPreferences.Builder Preferences for `TRANSIT` based routes that influence the route that is returned.TransitPreferencesProto TransitProto TransitStop Information about a transit stop.TransitStop.Builder Information about a transit stop.TransitVehicle Information about a vehicle used in transit routes.TransitVehicle.Builder Information about a vehicle used in transit routes.UnitsProto VehicleEmissionTypeProto VehicleInfo Contains the vehicle information, such as the vehicle emission type.VehicleInfo.Builder Contains the vehicle information, such as the vehicle emission type.VehicleInfoProto Waypoint Encapsulates a waypoint.Waypoint.Builder Encapsulates a waypoint.WaypointProto -
Enum Summary Enum Description ComputeRouteMatrixRequest.ExtraComputation Extra computations to perform while completing the request.ComputeRoutesRequest.ExtraComputation Extra computations to perform while completing the request.ComputeRoutesRequest.ReferenceRoute A supported reference route on the ComputeRoutesRequest.FallbackReason Reasons for using fallback response.FallbackRoutingMode Actual routing mode used for returned fallback response.Maneuver A set of values that specify the navigation action to take for the current step (e.g., turn left, merge, straight, etc.).Polyline.PolylineTypeCase PolylineEncoding Specifies the preferred type of polyline to be returned.PolylineQuality A set of values that specify the quality of the polyline.RouteLabel Labels for the [Route][google.maps.routing.v2.Route] that are useful to identify specific properties of the route to compare against others.RouteMatrixElementCondition The condition of the route being returned.RouteTravelMode A set of values used to specify the mode of travel.RoutingPreference A set of values that specify factors to take into consideration when calculating the route.SpeedReadingInterval.Speed The classification of polyline speed based on traffic data.SpeedReadingInterval.SpeedTypeCase TollPass List of toll passes around the world that we support.TrafficModel Specifies the assumptions to use when calculating time in traffic.TransitPreferences.TransitRoutingPreference Specifies routing preferences for transit routes.TransitPreferences.TransitTravelMode A set of values used to specify the mode of transit.TransitVehicle.TransitVehicleType The type of vehicles for transit routes.Units A set of values that specify the unit of measure used in the display.VehicleEmissionType A set of values describing the vehicle's emission type.Waypoint.LocationTypeCase