usps_data.proto 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.maps.addressvalidation.v1;
  16. option cc_enable_arenas = true;
  17. option csharp_namespace = "Google.Maps.AddressValidation.V1";
  18. option go_package = "google.golang.org/genproto/googleapis/maps/addressvalidation/v1;addressvalidation";
  19. option java_multiple_files = true;
  20. option java_outer_classname = "UspsDataProto";
  21. option java_package = "com.google.maps.addressvalidation.v1";
  22. option objc_class_prefix = "GMPAVV1";
  23. option php_namespace = "Google\\Maps\\AddressValidation\\V1";
  24. option ruby_package = "Google::Maps::AddressValidation::V1";
  25. // USPS representation of a US address.
  26. message UspsAddress {
  27. // First address line.
  28. string first_address_line = 1;
  29. // Firm name.
  30. string firm = 2;
  31. // Second address line.
  32. string second_address_line = 3;
  33. // Puerto Rican urbanization name.
  34. string urbanization = 4;
  35. // City + state + postal code.
  36. string city_state_zip_address_line = 5;
  37. // City name.
  38. string city = 6;
  39. // 2 letter state code.
  40. string state = 7;
  41. // Postal code e.g. 10009.
  42. string zip_code = 8;
  43. // 4-digit postal code extension e.g. 5023.
  44. string zip_code_extension = 9;
  45. }
  46. // The USPS data for the address.
  47. message UspsData {
  48. // USPS standardized address.
  49. UspsAddress standardized_address = 1;
  50. // 2 digit delivery point code
  51. string delivery_point_code = 2;
  52. // The delivery point check digit. This number is added to the end of the
  53. // delivery_point_barcode for mechanically scanned mail. Adding all the
  54. // digits of the delivery_point_barcode, delivery_point_check_digit, postal
  55. // code, and ZIP+4 together should yield a number divisible by 10.
  56. string delivery_point_check_digit = 3;
  57. // The possible values for DPV confirmation. Returns a single character.
  58. //
  59. // * `Y`: Address was DPV confirmed for primary and any secondary numbers.
  60. // * `N`: Primary and any secondary number information failed to
  61. // DPV confirm.
  62. // * `S`: Address was DPV confirmed for the primary number only, and the
  63. // secondary number information was present by not confirmed.
  64. // * `D`: Address was DPV confirmed for the primary number only, and the
  65. // secondary number information was missing.
  66. string dpv_confirmation = 4;
  67. // The footnotes from delivery point validation.
  68. // Multiple footnotes may be strung together in the same string.
  69. //
  70. // * `AA`: Input address matched to the ZIP+4 file
  71. // * `A1`: Input address was not matched to the ZIP+4 file
  72. // * `BB`: Matched to DPV (all components)
  73. // * `CC`: Secondary number not matched (present but invalid)
  74. // * `N1`: High-rise address missing secondary number
  75. // * `M1`: Primary number missing
  76. // * `M3`: Primary number invalid
  77. // * `P1`: Input address RR or HC box number missing
  78. // * `P3`: Input address PO, RR, or HC Box number invalid
  79. // * `F1`: Input address matched to a military address
  80. // * `G1`: Input address matched to a general delivery address
  81. // * `U1`: Input address matched to a unique ZIP code
  82. // * `PB`: Input address matched to PBSA record
  83. // * `RR`: DPV confirmed address with PMB information
  84. // * `R1`: DPV confirmed address without PMB information
  85. // * `R7`: Carrier Route R777 or R779 record
  86. string dpv_footnote = 5;
  87. // Indicates if the address is a CMRA (Commercial Mail Receiving Agency)--a
  88. // private business receiving mail for clients. Returns a single character.
  89. //
  90. // * `Y`: The address is a CMRA
  91. // * `N`: The address is not a CMRA
  92. string dpv_cmra = 6;
  93. // Is this place vacant?
  94. // Returns a single character.
  95. //
  96. // * `Y`: The address is vacant
  97. // * `N`: The address is not vacant
  98. string dpv_vacant = 7;
  99. // Is this a no stat address or an active address?
  100. // No stat addresses are ones which are not continuously occupied or addresses
  101. // that the USPS does not service. Returns a single character.
  102. //
  103. // * `Y`: The address is not active
  104. // * `N`: The address is active
  105. string dpv_no_stat = 8;
  106. // The carrier route code.
  107. // A four character code consisting of a one letter prefix and a three digit
  108. // route designator.
  109. //
  110. // Prefixes:
  111. //
  112. // * `C`: Carrier route (or city route)
  113. // * `R`: Rural route
  114. // * `H`: Highway Contract Route
  115. // * `B`: Post Office Box Section
  116. // * `G`: General delivery unit
  117. string carrier_route = 9;
  118. // Carrier route rate sort indicator.
  119. string carrier_route_indicator = 10;
  120. // The delivery address is matchable, but the EWS file indicates that an exact
  121. // match will be available soon.
  122. bool ews_no_match = 11;
  123. // Main post office city.
  124. string post_office_city = 12;
  125. // Main post office state.
  126. string post_office_state = 13;
  127. // Abbreviated city.
  128. string abbreviated_city = 14;
  129. // FIPS county code.
  130. string fips_county_code = 15;
  131. // County name.
  132. string county = 16;
  133. // Enhanced Line of Travel (eLOT) number.
  134. string elot_number = 17;
  135. // eLOT Ascending/Descending Flag (A/D).
  136. string elot_flag = 18;
  137. // LACSLink return code.
  138. string lacs_link_return_code = 19;
  139. // LACSLink indicator.
  140. string lacs_link_indicator = 20;
  141. // PO Box only postal code.
  142. bool po_box_only_postal_code = 21;
  143. // Footnotes from matching a street or highrise record to suite information.
  144. // If business name match is found, the secondary number is returned.
  145. //
  146. // * `A`: SuiteLink record match, business address improved.
  147. // * `00`: No match, business address is not improved.
  148. string suitelink_footnote = 22;
  149. // PMB (Private Mail Box) unit designator.
  150. string pmb_designator = 23;
  151. // PMB (Private Mail Box) number;
  152. string pmb_number = 24;
  153. // Type of the address record that matches the input address.
  154. //
  155. // * `F`: FIRM. This is a match to a Firm Record, which is the finest level of
  156. // match available for an address.
  157. // * `G`: GENERAL DELIVERY. This is a match to a General Delivery record.
  158. // * `H`: BUILDING / APARTMENT. This is a match to a Building or Apartment
  159. // record.
  160. // * `P`: POST OFFICE BOX. This is a match to a Post Office Box.
  161. // * `R`: RURAL ROUTE or HIGHWAY CONTRACT: This is a match to either a Rural
  162. // Route or a Highway Contract record, both of which may have associated Box
  163. // Number ranges.
  164. // * `S`: STREET RECORD: This is a match to a Street record containing a valid
  165. // primary number range.
  166. string address_record_type = 25;
  167. // Indicator that a default address was found, but more specific addresses
  168. // exists.
  169. bool default_address = 26;
  170. // Error message for USPS data retrieval. This is populated when USPS
  171. // processing is suspended because of the detection of artificially created
  172. // addresses.
  173. //
  174. // The USPS data fields might not be populated when this error is present.
  175. string error_message = 27;
  176. // Indicator that the request has been CASS processed.
  177. bool cass_processed = 28;
  178. }