xref: /aosp_15_r20/external/googleapis/google/maps/addressvalidation/v1/geocode.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC
2*d5c09012SAndroid Build Coastguard Worker//
3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*d5c09012SAndroid Build Coastguard Worker//
7*d5c09012SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*d5c09012SAndroid Build Coastguard Worker//
9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*d5c09012SAndroid Build Coastguard Worker// limitations under the License.
14*d5c09012SAndroid Build Coastguard Worker
15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3";
16*d5c09012SAndroid Build Coastguard Worker
17*d5c09012SAndroid Build Coastguard Workerpackage google.maps.addressvalidation.v1;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workerimport "google/geo/type/viewport.proto";
20*d5c09012SAndroid Build Coastguard Workerimport "google/type/latlng.proto";
21*d5c09012SAndroid Build Coastguard Worker
22*d5c09012SAndroid Build Coastguard Workeroption cc_enable_arenas = true;
23*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Maps.AddressValidation.V1";
24*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/maps/addressvalidation/apiv1/addressvalidationpb;addressvalidationpb";
25*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
26*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "GeocodeProto";
27*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.maps.addressvalidation.v1";
28*d5c09012SAndroid Build Coastguard Workeroption objc_class_prefix = "GMPAVV1";
29*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Maps\\AddressValidation\\V1";
30*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Maps::AddressValidation::V1";
31*d5c09012SAndroid Build Coastguard Worker
32*d5c09012SAndroid Build Coastguard Worker// Contains information about the place the input was geocoded to.
33*d5c09012SAndroid Build Coastguard Workermessage Geocode {
34*d5c09012SAndroid Build Coastguard Worker  // The geocoded location of the input.
35*d5c09012SAndroid Build Coastguard Worker  //
36*d5c09012SAndroid Build Coastguard Worker  // Using place IDs is preferred over using addresses,
37*d5c09012SAndroid Build Coastguard Worker  // latitude/longitude coordinates, or plus codes. Using coordinates when
38*d5c09012SAndroid Build Coastguard Worker  // routing or calculating driving directions will always result in the point
39*d5c09012SAndroid Build Coastguard Worker  // being snapped to the road nearest to those coordinates. This may not be a
40*d5c09012SAndroid Build Coastguard Worker  // road that will quickly or safely lead to the destination and may not be
41*d5c09012SAndroid Build Coastguard Worker  // near an access point to the property. Additionally, when a location is
42*d5c09012SAndroid Build Coastguard Worker  // reverse geocoded, there is no guarantee that the returned address will
43*d5c09012SAndroid Build Coastguard Worker  // match the original.
44*d5c09012SAndroid Build Coastguard Worker  google.type.LatLng location = 1;
45*d5c09012SAndroid Build Coastguard Worker
46*d5c09012SAndroid Build Coastguard Worker  // The plus code corresponding to the `location`.
47*d5c09012SAndroid Build Coastguard Worker  PlusCode plus_code = 2;
48*d5c09012SAndroid Build Coastguard Worker
49*d5c09012SAndroid Build Coastguard Worker  // The bounds of the geocoded place.
50*d5c09012SAndroid Build Coastguard Worker  google.geo.type.Viewport bounds = 4;
51*d5c09012SAndroid Build Coastguard Worker
52*d5c09012SAndroid Build Coastguard Worker  // The size of the geocoded place, in meters. This is another measure of the
53*d5c09012SAndroid Build Coastguard Worker  // coarseness of the geocoded location, but in physical size rather than in
54*d5c09012SAndroid Build Coastguard Worker  // semantic meaning.
55*d5c09012SAndroid Build Coastguard Worker  float feature_size_meters = 5;
56*d5c09012SAndroid Build Coastguard Worker
57*d5c09012SAndroid Build Coastguard Worker  // The PlaceID of the place this input geocodes to.
58*d5c09012SAndroid Build Coastguard Worker  //
59*d5c09012SAndroid Build Coastguard Worker  // For more information about Place IDs see
60*d5c09012SAndroid Build Coastguard Worker  // [here](https://developers.google.com/maps/documentation/places/web-service/place-id).
61*d5c09012SAndroid Build Coastguard Worker  string place_id = 6;
62*d5c09012SAndroid Build Coastguard Worker
63*d5c09012SAndroid Build Coastguard Worker  // The type(s) of place that the input geocoded to. For example,
64*d5c09012SAndroid Build Coastguard Worker  // `['locality', 'political']`. The full list of types can be found
65*d5c09012SAndroid Build Coastguard Worker  // [here](https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types).
66*d5c09012SAndroid Build Coastguard Worker  repeated string place_types = 7;
67*d5c09012SAndroid Build Coastguard Worker}
68*d5c09012SAndroid Build Coastguard Worker
69*d5c09012SAndroid Build Coastguard Worker// Plus code (http://plus.codes) is a location reference with two formats:
70*d5c09012SAndroid Build Coastguard Worker// global code defining a 14mx14m (1/8000th of a degree) or smaller rectangle,
71*d5c09012SAndroid Build Coastguard Worker// and compound code, replacing the prefix with a reference location.
72*d5c09012SAndroid Build Coastguard Workermessage PlusCode {
73*d5c09012SAndroid Build Coastguard Worker  // Place's global (full) code, such as "9FWM33GV+HQ", representing an
74*d5c09012SAndroid Build Coastguard Worker  // 1/8000 by 1/8000 degree area (~14 by 14 meters).
75*d5c09012SAndroid Build Coastguard Worker  string global_code = 1;
76*d5c09012SAndroid Build Coastguard Worker
77*d5c09012SAndroid Build Coastguard Worker  // Place's compound code, such as "33GV+HQ, Ramberg, Norway", containing
78*d5c09012SAndroid Build Coastguard Worker  // the suffix of the global code and replacing the prefix with a formatted
79*d5c09012SAndroid Build Coastguard Worker  // name of a reference entity.
80*d5c09012SAndroid Build Coastguard Worker  string compound_code = 2;
81*d5c09012SAndroid Build Coastguard Worker}
82