1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.maps.routing.v2; 18 19import "google/rpc/status.proto"; 20 21option cc_enable_arenas = true; 22option csharp_namespace = "Google.Maps.Routing.V2"; 23option go_package = "cloud.google.com/go/maps/routing/apiv2/routingpb;routingpb"; 24option java_multiple_files = true; 25option java_outer_classname = "GeocodingResultsProto"; 26option java_package = "com.google.maps.routing.v2"; 27option objc_class_prefix = "GMRV2"; 28option php_namespace = "Google\\Maps\\Routing\\V2"; 29option ruby_package = "Google::Maps::Routing::V2"; 30 31// Contains [`GeocodedWaypoints`][google.maps.routing.v2.GeocodedWaypoint] for 32// origin, destination and intermediate waypoints. Only populated for address 33// waypoints. 34message GeocodingResults { 35 // Origin geocoded waypoint. 36 GeocodedWaypoint origin = 1; 37 38 // Destination geocoded waypoint. 39 GeocodedWaypoint destination = 2; 40 41 // A list of intermediate geocoded waypoints each containing an index field 42 // that corresponds to the zero-based position of the waypoint in the order 43 // they were specified in the request. 44 repeated GeocodedWaypoint intermediates = 3; 45} 46 47// Details about the locations used as waypoints. Only populated for address 48// waypoints. Includes details about the geocoding results for the purposes of 49// determining what the address was geocoded to. 50message GeocodedWaypoint { 51 // Indicates the status code resulting from the geocoding operation. 52 google.rpc.Status geocoder_status = 1; 53 54 // The index of the corresponding intermediate waypoint in the request. 55 // Only populated if the corresponding waypoint is an intermediate 56 // waypoint. 57 optional int32 intermediate_waypoint_request_index = 2; 58 59 // The type(s) of the result, in the form of zero or more type tags. 60 // Supported types: [Address types and address component 61 // types](https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types). 62 repeated string type = 3; 63 64 // Indicates that the geocoder did not return an exact match for the original 65 // request, though it was able to match part of the requested address. You may 66 // wish to examine the original request for misspellings and/or an incomplete 67 // address. 68 bool partial_match = 4; 69 70 // The place ID for this result. 71 string place_id = 5; 72} 73