Skip to content

Commit

Permalink
docs: various formatting and grammar fixes for proto documentation
Browse files Browse the repository at this point in the history
feat: adds support for new toll passes
feat: adds support for specifying units in the ComputeRouteMatrix request

PiperOrigin-RevId: 623543022
  • Loading branch information
Google APIs authored and Copybara-Service committed Apr 10, 2024
1 parent 92b4564 commit fc89055
Show file tree
Hide file tree
Showing 17 changed files with 113 additions and 85 deletions.
7 changes: 4 additions & 3 deletions google/maps/routing/v2/fallback_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,13 @@ enum FallbackRoutingMode {
// Not used.
FALLBACK_ROUTING_MODE_UNSPECIFIED = 0;

// Indicates the `TRAFFIC_UNAWARE` [google.maps.routing.v2.RoutingPreference]
// was used to compute the response.
// Indicates the `TRAFFIC_UNAWARE`
// [`RoutingPreference`][google.maps.routing.v2.RoutingPreference] was used to
// compute the response.
FALLBACK_TRAFFIC_UNAWARE = 1;

// Indicates the `TRAFFIC_AWARE`
// [RoutingPreference][google.maps.routing.v2.RoutingPreference] was used to
// [`RoutingPreference`][google.maps.routing.v2.RoutingPreference] was used to
// compute the response.
FALLBACK_TRAFFIC_AWARE = 2;
}
6 changes: 3 additions & 3 deletions google/maps/routing/v2/geocoding_results.proto
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ option objc_class_prefix = "GMRV2";
option php_namespace = "Google\\Maps\\Routing\\V2";
option ruby_package = "Google::Maps::Routing::V2";

// Contains [GeocodedWaypoints][google.maps.routing.v2.GeocodedWaypoint] for
// Contains [`GeocodedWaypoints`][google.maps.routing.v2.GeocodedWaypoint] for
// origin, destination and intermediate waypoints. Only populated for address
// waypoints.
message GeocodingResults {
Expand Down Expand Up @@ -57,8 +57,8 @@ message GeocodedWaypoint {
optional int32 intermediate_waypoint_request_index = 2;

// The type(s) of the result, in the form of zero or more type tags.
// Supported types:
// https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types
// Supported types: [Address types and address component
// types](https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types).
repeated string type = 3;

// Indicates that the geocoder did not return an exact match for the original
Expand Down
2 changes: 1 addition & 1 deletion google/maps/routing/v2/location.proto
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ message Location {
// values can be from 0 to 360, where 0 specifies a heading of due North, 90
// specifies a heading of due East, and so on. You can use this field only for
// `DRIVE` and `TWO_WHEELER`
// [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
// [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
google.protobuf.Int32Value heading = 2;
}
2 changes: 1 addition & 1 deletion google/maps/routing/v2/maneuver.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ option php_namespace = "Google\\Maps\\Routing\\V2";
option ruby_package = "Google::Maps::Routing::V2";

// A set of values that specify the navigation action to take for the current
// step (e.g., turn left, merge, straight, etc.).
// step (for example, turn left, merge, or straight).
enum Maneuver {
// Not used.
MANEUVER_UNSPECIFIED = 0;
Expand Down
7 changes: 4 additions & 3 deletions google/maps/routing/v2/navigation_instruction.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ option php_namespace = "Google\\Maps\\Routing\\V2";
option ruby_package = "Google::Maps::Routing::V2";

// Encapsulates navigation instructions for a
// [RouteLegStep][google.maps.routing.v2.RouteLegStep]
// [`RouteLegStep`][google.maps.routing.v2.RouteLegStep].
message NavigationInstruction {
// Encapsulates the navigation instructions for the current step (e.g., turn
// left, merge, straight, etc.). This field determines which icon to display.
// Encapsulates the navigation instructions for the current step (for example,
// turn left, merge, or straight). This field determines which icon to
// display.
Maneuver maneuver = 1;

// Instructions for navigating this step.
Expand Down
4 changes: 2 additions & 2 deletions google/maps/routing/v2/polyline.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ message Polyline {
string encoded_polyline = 1;

// Specifies a polyline using the [GeoJSON LineString
// format](https://tools.ietf.org/html/rfc7946#section-3.1.4)
// format](https://tools.ietf.org/html/rfc7946#section-3.1.4).
google.protobuf.Struct geo_json_linestring = 2;
}
}
Expand Down Expand Up @@ -65,7 +65,7 @@ enum PolylineEncoding {
POLYLINE_ENCODING_UNSPECIFIED = 0;

// Specifies a polyline encoded using the [polyline encoding
// algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm).
// algorithm](/maps/documentation/utilities/polylinealgorithm).
ENCODED_POLYLINE = 1;

// Specifies a polyline using the [GeoJSON LineString
Expand Down
20 changes: 10 additions & 10 deletions google/maps/routing/v2/route.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,11 @@ message Route {

// Duration taking traffic conditions into consideration, represented in
// text form. Note: If you did not request traffic information, this value
// will be the same value as static_duration.
// will be the same value as `static_duration`.
google.type.LocalizedText duration = 2;

// Duration without taking traffic conditions into
// consideration, represented in text form.
// Duration without taking traffic conditions into consideration,
// represented in text form.
google.type.LocalizedText static_duration = 3;

// Transit fare represented in text form.
Expand All @@ -68,8 +68,8 @@ message Route {

// A collection of legs (path segments between waypoints) that make up the
// route. Each leg corresponds to the trip between two non-`via`
// [Waypoints][google.maps.routing.v2.Waypoint]. For example, a route with no
// intermediate waypoints has only one leg. A route that includes one
// [`Waypoints`][google.maps.routing.v2.Waypoint]. For example, a route with
// no intermediate waypoints has only one leg. A route that includes one
// non-`via` intermediate waypoint has two legs. A route that includes one
// `via` intermediate waypoint has one leg. The order of the legs matches the
// order of waypoints from `origin` to `intermediates` to `destination`.
Expand Down Expand Up @@ -106,7 +106,7 @@ message Route {
RouteTravelAdvisory travel_advisory = 9;

// If you set
// [optimize_waypoint_order][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order]
// [`optimize_waypoint_order`][google.maps.routing.v2.ComputeRoutesRequest.optimize_waypoint_order]
// to true, this field contains the optimized ordering of intermediate
// waypoints. Otherwise, this field is empty.
// For example, if you give an input of Origin: LA; Intermediate waypoints:
Expand Down Expand Up @@ -136,7 +136,7 @@ message Route {
message RouteTravelAdvisory {
// Contains information about tolls on the route. This field is only populated
// if tolls are expected on the route. If this field is set, but the
// estimatedPrice subfield is not populated, then the route contains tolls,
// `estimatedPrice` subfield is not populated, then the route contains tolls,
// but the estimated price is unknown. If this field is not set, then there
// are no tolls expected on the route.
TollInfo toll_info = 2;
Expand Down Expand Up @@ -287,7 +287,7 @@ message RouteLeg {
StepsOverview steps_overview = 10;
}

// Contains a segment of a [RouteLeg][google.maps.routing.v2.RouteLeg]. A
// Contains a segment of a [`RouteLeg`][google.maps.routing.v2.RouteLeg]. A
// step corresponds to a single navigation instruction. Route legs are made up
// of steps.
message RouteLegStep {
Expand Down Expand Up @@ -338,7 +338,7 @@ message RouteLegStep {

// Additional information for the `RouteLegStep` related to `TRANSIT` routes.
message RouteLegStepTransitDetails {
// Details about the transit stops for the `RouteLegStep`
// Details about the transit stops for the `RouteLegStep`.
message TransitStopDetails {
// Information about the arrival stop for the step.
TransitStop arrival_stop = 1;
Expand All @@ -353,7 +353,7 @@ message RouteLegStepTransitDetails {
google.protobuf.Timestamp departure_time = 4;
}

// Localized descriptions of values for RouteTransitDetails.
// Localized descriptions of values for `RouteTransitDetails`.
message TransitDetailsLocalizedValues {
// Time in its formatted text representation with a corresponding time zone.
LocalizedTime arrival_time = 1;
Expand Down
4 changes: 2 additions & 2 deletions google/maps/routing/v2/route_label.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ option objc_class_prefix = "GMRV2";
option php_namespace = "Google\\Maps\\Routing\\V2";
option ruby_package = "Google::Maps::Routing::V2";

// Labels for the [Route][google.maps.routing.v2.Route] that are useful to
// Labels for the [`Route`][google.maps.routing.v2.Route] that are useful to
// identify specific properties of the route to compare against others.
enum RouteLabel {
// Default - not used.
Expand All @@ -37,7 +37,7 @@ enum RouteLabel {

// An alternative to the default "best" route. Routes like this will be
// returned when
// [compute_alternative_routes][google.maps.routing.v2.ComputeRoutesRequest.compute_alternative_routes]
// [`compute_alternative_routes`][google.maps.routing.v2.ComputeRoutesRequest.compute_alternative_routes]
// is specified.
DEFAULT_ROUTE_ALTERNATE = 2;

Expand Down
10 changes: 5 additions & 5 deletions google/maps/routing/v2/route_modifiers.proto
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ option ruby_package = "Google::Maps::Routing::V2";
message RouteModifiers {
// When set to true, avoids toll roads where reasonable, giving preference to
// routes not containing toll roads. Applies only to the `DRIVE` and
// `TWO_WHEELER` [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
// `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_tolls = 1;

// When set to true, avoids highways where reasonable, giving preference to
// routes not containing highways. Applies only to the `DRIVE` and
// `TWO_WHEELER` [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
// `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_highways = 2;

// When set to true, avoids ferries where reasonable, giving preference to
// routes not containing ferries. Applies only to the `DRIVE` and`TWO_WHEELER`
// [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
// [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_ferries = 3;

// When set to true, avoids navigating indoors where reasonable, giving
// preference to routes not containing indoor navigation. Applies only to the
// `WALK` [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
// `WALK` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
bool avoid_indoor = 4;

// Specifies the vehicle information.
Expand All @@ -60,6 +60,6 @@ message RouteModifiers {
// toll passes are not provided, the API treats the toll pass as unknown and
// tries to return the cash price.
// Applies only to the `DRIVE` and `TWO_WHEELER`
// [RouteTravelMode][google.maps.routing.v2.RouteTravelMode].
// [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
repeated TollPass toll_passes = 6;
}

0 comments on commit fc89055

Please sign in to comment.