Skip to content

Commit 1106a82

Browse files
feat: [routing] adds support for specifying region_code in the ComputeRoutesRequest (#4103)
* feat: adds support for specifying region_code in the ComputeRoutesRequest feat: adds support for specifying region_code and language_code in the ComputeRouteMatrixRequest PiperOrigin-RevId: 517493769 Source-Link: googleapis/googleapis@8fa8ae4 Source-Link: googleapis/googleapis-gen@45fd970 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcHMtcm91dGluZy8uT3dsQm90LnlhbWwiLCJoIjoiNDVmZDk3MGIxYTE1ODkzN2RlYTU1NTRkNWI1ZWU0Y2NmNWRiNzgwZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 10afbc0 commit 1106a82

8 files changed

Lines changed: 176 additions & 2 deletions

File tree

packages/google-maps-routing/protos/google/maps/routing/v2/routes_service.proto

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,11 @@ message ComputeRoutesRequest {
211211
// display language is inferred from the location of the route request.
212212
string language_code = 10 [(google.api.field_behavior) = OPTIONAL];
213213

214+
// Optional. The region code, specified as a ccTLD ("top-level domain")
215+
// two-character value. For more information see
216+
// https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
217+
string region_code = 16 [(google.api.field_behavior) = OPTIONAL];
218+
214219
// Optional. Specifies the units of measure for the display fields. This
215220
// includes the `instruction` field in `NavigationInstruction`. The units of
216221
// measure used for the route, leg, step distance, and duration are not
@@ -299,6 +304,19 @@ message ComputeRouteMatrixRequest {
299304
google.protobuf.Timestamp departure_time = 5
300305
[(google.api.field_behavior) = OPTIONAL];
301306

307+
// Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
308+
// information, see
309+
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See
310+
// [Language Support](https://developers.google.com/maps/faq#languagesupport)
311+
// for the list of supported languages. When you don't provide this value, the
312+
// display language is inferred from the location of the first origin.
313+
string language_code = 6 [(google.api.field_behavior) = OPTIONAL];
314+
315+
// Optional. The region code, specified as a ccTLD ("top-level domain")
316+
// two-character value. For more information see
317+
// https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
318+
string region_code = 9 [(google.api.field_behavior) = OPTIONAL];
319+
302320
// Optional. A list of extra computations which may be used to complete the
303321
// request. Note: These extra computations may return extra fields on the
304322
// response. These extra fields must also be specified in the field mask to be

packages/google-maps-routing/protos/protos.d.ts

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-maps-routing/protos/protos.js

Lines changed: 69 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-maps-routing/protos/protos.json

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-maps-routing/samples/generated/v2/routes.compute_route_matrix.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,21 @@ function main(origins, destinations) {
6363
* has already occurred, the request fails.
6464
*/
6565
// const departureTime = {}
66+
/**
67+
* Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
68+
* information, see
69+
* http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. See
70+
* Language Support (https://developers.google.com/maps/faq#languagesupport)
71+
* for the list of supported languages. When you don't provide this value, the
72+
* display language is inferred from the location of the first origin.
73+
*/
74+
// const languageCode = 'abc123'
75+
/**
76+
* Optional. The region code, specified as a ccTLD ("top-level domain")
77+
* two-character value. For more information see
78+
* https://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
79+
*/
80+
// const regionCode = 'abc123'
6681
/**
6782
* Optional. A list of extra computations which may be used to complete the
6883
* request. Note: These extra computations may return extra fields on the

0 commit comments

Comments
 (0)