blob: 91d6d2f5e364a7b0f953492c750c26ef1bfb86ff [file] [log] [blame]
{
"clientLibrary": {
"name": "cloud.google.com/go/maps/routing/apiv2",
"version": "1.6.0",
"language": "GO",
"apis": [
{
"id": "google.maps.routing.v2",
"version": "v2"
}
]
},
"snippets": [
{
"regionTag": "routes_v2_generated_Routes_ComputeRoutes_sync",
"title": "routes ComputeRoutes Sample",
"description": "ComputeRoutes returns the primary route along with optional alternate routes, given a set\nof terminal and intermediate waypoints.\n\n**NOTE: ** This method requires that you specify a response field mask in\nthe input. You can provide the response field mask by using URL parameter\n`$fields` or `fields`, or by using an HTTP/gRPC header `X-Goog-FieldMask`\n(see the [available URL parameters and\nheaders](https: //cloud.google.com/apis/docs/system-parameters). The value\nis a comma separated list of field paths. See detailed documentation about\n[how to construct the field\npaths](https: //github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/field_mask.proto).\n\nFor example, in this method: \n\n* Field mask of all available fields (for manual inspection): \n`X-Goog-FieldMask: *`\n* Field mask of Route-level duration, distance, and polyline (an example\nproduction setup): \n`X-Goog-FieldMask: \nroutes.duration,routes.distanceMeters,routes.polyline.encodedPolyline`\n\nGoogle discourage the use of the wildcard (`*`) response field mask, or\nspecifying the field mask at the top level (`routes`), because: \n\n* Selecting only the fields that you need helps our server save computation\ncycles, allowing us to return the result to you with a lower latency.\n* Selecting only the fields that you need\nin your production job ensures stable latency performance. We might add\nmore response fields in the future, and those new fields might require\nextra computation time. If you select all fields, or if you select all\nfields at the top level, then you might experience performance degradation\nbecause any new field we add will be automatically included in the\nresponse.\n* Selecting only the fields that you need results in a smaller response\nsize, and thus higher network throughput.",
"file": "RoutesClient/ComputeRoutes/main.go",
"language": "GO",
"clientMethod": {
"shortName": "ComputeRoutes",
"fullName": "google.maps.routing.v2.RoutesClient.ComputeRoutes",
"parameters": [
{
"type": "context.Context",
"name": "ctx"
},
{
"type": "routingpb.ComputeRoutesRequest",
"name": "req"
},
{
"type": "...gax.CallOption",
"name": "opts"
}
],
"resultType": "*routingpb.ComputeRoutesResponse",
"client": {
"shortName": "RoutesClient",
"fullName": "google.maps.routing.v2.RoutesClient"
},
"method": {
"shortName": "ComputeRoutes",
"fullName": "google.maps.routing.v2.Routes.ComputeRoutes",
"service": {
"shortName": "Routes",
"fullName": "google.maps.routing.v2.Routes"
}
}
},
"origin": "API_DEFINITION",
"segments": [
{
"start": 18,
"end": 53,
"type": "FULL"
}
]
}
]
}