| 1 |
// Copyright 2026 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 |
|
| 15 |
// Code generated by protoc-gen-go. DO NOT EDIT. |
| 16 |
// versions: |
| 17 |
// protoc-gen-go v1.26.0 |
| 18 |
// protoc v4.24.4 |
| 19 |
// source: google/type/postal_address.proto |
| 20 |
|
| 21 |
package postaladdress |
| 22 |
|
| 23 |
import ( |
| 24 |
reflect "reflect" |
| 25 |
sync "sync" |
| 26 |
|
| 27 |
protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 28 |
protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 29 |
) |
| 30 |
|
| 31 |
const ( |
| 32 |
// Verify that this generated code is sufficiently up-to-date. |
| 33 |
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| 34 |
// Verify that runtime/protoimpl is sufficiently up-to-date. |
| 35 |
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| 36 |
) |
| 37 |
|
| 38 |
// Represents a postal address, such as for postal delivery or payments |
| 39 |
// addresses. With a postal address, a postal service can deliver items to a |
| 40 |
// premise, P.O. box, or similar. A postal address is not intended to model |
| 41 |
// geographical locations like roads, towns, or mountains. |
| 42 |
// |
| 43 |
// In typical usage, an address would be created by user input or from importing |
| 44 |
// existing data, depending on the type of process. |
| 45 |
// |
| 46 |
// Advice on address input or editing: |
| 47 |
// |
| 48 |
// - Use an internationalization-ready address widget such as |
| 49 |
// https://github.com/google/libaddressinput. |
| 50 |
// - Users should not be presented with UI elements for input or editing of |
| 51 |
// fields outside countries where that field is used. |
| 52 |
// |
| 53 |
// For more guidance on how to use this schema, see: |
| 54 |
// https://support.google.com/business/answer/6397478. |
| 55 |
type PostalAddress struct { |
| 56 |
state protoimpl.MessageState |
| 57 |
sizeCache protoimpl.SizeCache |
| 58 |
unknownFields protoimpl.UnknownFields |
| 59 |
|
| 60 |
// The schema revision of the `PostalAddress`. This must be set to 0, which is |
| 61 |
// the latest revision. |
| 62 |
// |
| 63 |
// All new revisions **must** be backward compatible with old revisions. |
| 64 |
Revision int32 `protobuf:"varint,1,opt,name=revision,proto3" json:"revision,omitempty"` |
| 65 |
// Required. CLDR region code of the country/region of the address. This |
| 66 |
// is never inferred and it is up to the user to ensure the value is |
| 67 |
// correct. See https://cldr.unicode.org/ and |
| 68 |
// https://www.unicode.org/cldr/charts/30/supplemental/territory_information.html |
| 69 |
// for details. Example: "CH" for Switzerland. |
| 70 |
RegionCode string `protobuf:"bytes,2,opt,name=region_code,json=regionCode,proto3" json:"region_code,omitempty"` |
| 71 |
// Optional. BCP-47 language code of the contents of this address (if |
| 72 |
// known). This is often the UI language of the input form or is expected |
| 73 |
// to match one of the languages used in the address' country/region, or their |
| 74 |
// transliterated equivalents. |
| 75 |
// This can affect formatting in certain countries, but is not critical |
| 76 |
// to the correctness of the data and will never affect any validation or |
| 77 |
// other non-formatting related operations. |
| 78 |
// |
| 79 |
// If this value is not known, it should be omitted (rather than specifying a |
| 80 |
// possibly incorrect default). |
| 81 |
// |
| 82 |
// Examples: "zh-Hant", "ja", "ja-Latn", "en". |
| 83 |
LanguageCode string `protobuf:"bytes,3,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"` |
| 84 |
// Optional. Postal code of the address. Not all countries use or require |
| 85 |
// postal codes to be present, but where they are used, they may trigger |
| 86 |
// additional validation with other parts of the address (for example, |
| 87 |
// state or zip code validation in the United States). |
| 88 |
PostalCode string `protobuf:"bytes,4,opt,name=postal_code,json=postalCode,proto3" json:"postal_code,omitempty"` |
| 89 |
// Optional. Additional, country-specific, sorting code. This is not used |
| 90 |
// in most regions. Where it is used, the value is either a string like |
| 91 |
// "CEDEX", optionally followed by a number (for example, "CEDEX 7"), or just |
| 92 |
// a number alone, representing the "sector code" (Jamaica), "delivery area |
| 93 |
// indicator" (Malawi) or "post office indicator" (Côte d'Ivoire). |
| 94 |
SortingCode string `protobuf:"bytes,5,opt,name=sorting_code,json=sortingCode,proto3" json:"sorting_code,omitempty"` |
| 95 |
// Optional. Highest administrative subdivision which is used for postal |
| 96 |
// addresses of a country or region. |
| 97 |
// For example, this can be a state, a province, an oblast, or a prefecture. |
| 98 |
// For Spain, this is the province and not the autonomous |
| 99 |
// community (for example, "Barcelona" and not "Catalonia"). |
| 100 |
// Many countries don't use an administrative area in postal addresses. For |
| 101 |
// example, in Switzerland, this should be left unpopulated. |
| 102 |
AdministrativeArea string `protobuf:"bytes,6,opt,name=administrative_area,json=administrativeArea,proto3" json:"administrative_area,omitempty"` |
| 103 |
// Optional. Generally refers to the city or town portion of the address. |
| 104 |
// Examples: US city, IT comune, UK post town. |
| 105 |
// In regions of the world where localities are not well defined or do not fit |
| 106 |
// into this structure well, leave `locality` empty and use `address_lines`. |
| 107 |
Locality string `protobuf:"bytes,7,opt,name=locality,proto3" json:"locality,omitempty"` |
| 108 |
// Optional. Sublocality of the address. |
| 109 |
// For example, this can be a neighborhood, borough, or district. |
| 110 |
Sublocality string `protobuf:"bytes,8,opt,name=sublocality,proto3" json:"sublocality,omitempty"` |
| 111 |
// Unstructured address lines describing the lower levels of an address. |
| 112 |
// |
| 113 |
// Because values in `address_lines` do not have type information and may |
| 114 |
// sometimes contain multiple values in a single field (for example, |
| 115 |
// "Austin, TX"), it is important that the line order is clear. The order of |
| 116 |
// address lines should be "envelope order" for the country or region of the |
| 117 |
// address. In places where this can vary (for example, Japan), |
| 118 |
// `address_language` is used to make it explicit (for example, "ja" for |
| 119 |
// large-to-small ordering and "ja-Latn" or "en" for small-to-large). In this |
| 120 |
// way, the most specific line of an address can be selected based on the |
| 121 |
// language. |
| 122 |
// |
| 123 |
// The minimum permitted structural representation of an address consists |
| 124 |
// of a `region_code` with all remaining information placed in the |
| 125 |
// `address_lines`. It would be possible to format such an address very |
| 126 |
// approximately without geocoding, but no semantic reasoning could be |
| 127 |
// made about any of the address components until it was at least |
| 128 |
// partially resolved. |
| 129 |
// |
| 130 |
// Creating an address only containing a `region_code` and `address_lines` and |
| 131 |
// then geocoding is the recommended way to handle completely unstructured |
| 132 |
// addresses (as opposed to guessing which parts of the address should be |
| 133 |
// localities or administrative areas). |
| 134 |
AddressLines []string `protobuf:"bytes,9,rep,name=address_lines,json=addressLines,proto3" json:"address_lines,omitempty"` |
| 135 |
// Optional. The recipient at the address. |
| 136 |
// This field may, under certain circumstances, contain multiline information. |
| 137 |
// For example, it might contain "care of" information. |
| 138 |
Recipients []string `protobuf:"bytes,10,rep,name=recipients,proto3" json:"recipients,omitempty"` |
| 139 |
// Optional. The name of the organization at the address. |
| 140 |
Organization string `protobuf:"bytes,11,opt,name=organization,proto3" json:"organization,omitempty"` |
| 141 |
} |
| 142 |
|
| 143 |
func (x *PostalAddress) Reset() { |
| 144 |
*x = PostalAddress{} |
| 145 |
if protoimpl.UnsafeEnabled { |
| 146 |
mi := &file_google_type_postal_address_proto_msgTypes[0] |
| 147 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 148 |
ms.StoreMessageInfo(mi) |
| 149 |
} |
| 150 |
} |
| 151 |
|
| 152 |
func (x *PostalAddress) String() string { |
| 153 |
return protoimpl.X.MessageStringOf(x) |
| 154 |
} |
| 155 |
|
| 156 |
func (*PostalAddress) ProtoMessage() {} |
| 157 |
|
| 158 |
func (x *PostalAddress) ProtoReflect() protoreflect.Message { |
| 159 |
mi := &file_google_type_postal_address_proto_msgTypes[0] |
| 160 |
if protoimpl.UnsafeEnabled && x != nil { |
| 161 |
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 162 |
if ms.LoadMessageInfo() == nil { |
| 163 |
ms.StoreMessageInfo(mi) |
| 164 |
} |
| 165 |
return ms |
| 166 |
} |
| 167 |
return mi.MessageOf(x) |
| 168 |
} |
| 169 |
|
| 170 |
// Deprecated: Use PostalAddress.ProtoReflect.Descriptor instead. |
| 171 |
func (*PostalAddress) Descriptor() ([]byte, []int) { |
| 172 |
return file_google_type_postal_address_proto_rawDescGZIP(), []int{0} |
| 173 |
} |
| 174 |
|
| 175 |
func (x *PostalAddress) GetRevision() int32 { |
| 176 |
if x != nil { |
| 177 |
return x.Revision |
| 178 |
} |
| 179 |
return 0 |
| 180 |
} |
| 181 |
|
| 182 |
func (x *PostalAddress) GetRegionCode() string { |
| 183 |
if x != nil { |
| 184 |
return x.RegionCode |
| 185 |
} |
| 186 |
return "" |
| 187 |
} |
| 188 |
|
| 189 |
func (x *PostalAddress) GetLanguageCode() string { |
| 190 |
if x != nil { |
| 191 |
return x.LanguageCode |
| 192 |
} |
| 193 |
return "" |
| 194 |
} |
| 195 |
|
| 196 |
func (x *PostalAddress) GetPostalCode() string { |
| 197 |
if x != nil { |
| 198 |
return x.PostalCode |
| 199 |
} |
| 200 |
return "" |
| 201 |
} |
| 202 |
|
| 203 |
func (x *PostalAddress) GetSortingCode() string { |
| 204 |
if x != nil { |
| 205 |
return x.SortingCode |
| 206 |
} |
| 207 |
return "" |
| 208 |
} |
| 209 |
|
| 210 |
func (x *PostalAddress) GetAdministrativeArea() string { |
| 211 |
if x != nil { |
| 212 |
return x.AdministrativeArea |
| 213 |
} |
| 214 |
return "" |
| 215 |
} |
| 216 |
|
| 217 |
func (x *PostalAddress) GetLocality() string { |
| 218 |
if x != nil { |
| 219 |
return x.Locality |
| 220 |
} |
| 221 |
return "" |
| 222 |
} |
| 223 |
|
| 224 |
func (x *PostalAddress) GetSublocality() string { |
| 225 |
if x != nil { |
| 226 |
return x.Sublocality |
| 227 |
} |
| 228 |
return "" |
| 229 |
} |
| 230 |
|
| 231 |
func (x *PostalAddress) GetAddressLines() []string { |
| 232 |
if x != nil { |
| 233 |
return x.AddressLines |
| 234 |
} |
| 235 |
return nil |
| 236 |
} |
| 237 |
|
| 238 |
func (x *PostalAddress) GetRecipients() []string { |
| 239 |
if x != nil { |
| 240 |
return x.Recipients |
| 241 |
} |
| 242 |
return nil |
| 243 |
} |
| 244 |
|
| 245 |
func (x *PostalAddress) GetOrganization() string { |
| 246 |
if x != nil { |
| 247 |
return x.Organization |
| 248 |
} |
| 249 |
return "" |
| 250 |
} |
| 251 |
|
| 252 |
var File_google_type_postal_address_proto protoreflect.FileDescriptor |
| 253 |
|
| 254 |
var file_google_type_postal_address_proto_rawDesc = []byte{ |
| 255 |
0x0a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x70, 0x6f, |
| 256 |
0x73, 0x74, 0x61, 0x6c, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2e, 0x70, 0x72, 0x6f, |
| 257 |
0x74, 0x6f, 0x12, 0x0b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x22, |
| 258 |
0x8d, 0x03, 0x0a, 0x0d, 0x50, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, |
| 259 |
0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, |
| 260 |
0x01, 0x28, 0x05, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, |
| 261 |
0x0b, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, |
| 262 |
0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, |
| 263 |
0x0a, 0x0d, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, |
| 264 |
0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x43, |
| 265 |
0x6f, 0x64, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, |
| 266 |
0x64, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, |
| 267 |
0x43, 0x6f, 0x64, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x5f, |
| 268 |
0x63, 0x6f, 0x64, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x72, 0x74, |
| 269 |
0x69, 0x6e, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x61, 0x64, 0x6d, 0x69, 0x6e, |
| 270 |
0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x61, 0x18, 0x06, |
| 271 |
0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x69, 0x73, 0x74, 0x72, 0x61, |
| 272 |
0x74, 0x69, 0x76, 0x65, 0x41, 0x72, 0x65, 0x61, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, |
| 273 |
0x6c, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, |
| 274 |
0x6c, 0x69, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, 0x73, 0x75, 0x62, 0x6c, 0x6f, 0x63, 0x61, 0x6c, |
| 275 |
0x69, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x75, 0x62, 0x6c, 0x6f, |
| 276 |
0x63, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, |
| 277 |
0x73, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x61, |
| 278 |
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x6e, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x72, |
| 279 |
0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, |
| 280 |
0x0a, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x6f, |
| 281 |
0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, |
| 282 |
0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, |
| 283 |
0x75, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x74, 0x79, |
| 284 |
0x70, 0x65, 0x42, 0x12, 0x50, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, |
| 285 |
0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x46, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, |
| 286 |
0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, |
| 287 |
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, |
| 288 |
0x74, 0x79, 0x70, 0x65, 0x2f, 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x61, 0x64, 0x64, 0x72, 0x65, |
| 289 |
0x73, 0x73, 0x3b, 0x70, 0x6f, 0x73, 0x74, 0x61, 0x6c, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, |
| 290 |
0xa2, 0x02, 0x03, 0x47, 0x54, 0x50, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
| 291 |
} |
| 292 |
|
| 293 |
var ( |
| 294 |
file_google_type_postal_address_proto_rawDescOnce sync.Once |
| 295 |
file_google_type_postal_address_proto_rawDescData = file_google_type_postal_address_proto_rawDesc |
| 296 |
) |
| 297 |
|
| 298 |
func file_google_type_postal_address_proto_rawDescGZIP() []byte { |
| 299 |
file_google_type_postal_address_proto_rawDescOnce.Do(func() { |
| 300 |
file_google_type_postal_address_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_type_postal_address_proto_rawDescData) |
| 301 |
}) |
| 302 |
return file_google_type_postal_address_proto_rawDescData |
| 303 |
} |
| 304 |
|
| 305 |
var file_google_type_postal_address_proto_msgTypes = make([]protoimpl.MessageInfo, 1) |
| 306 |
var file_google_type_postal_address_proto_goTypes = []interface{}{ |
| 307 |
(*PostalAddress)(nil), // 0: google.type.PostalAddress |
| 308 |
} |
| 309 |
var file_google_type_postal_address_proto_depIdxs = []int32{ |
| 310 |
0, // [0:0] is the sub-list for method output_type |
| 311 |
0, // [0:0] is the sub-list for method input_type |
| 312 |
0, // [0:0] is the sub-list for extension type_name |
| 313 |
0, // [0:0] is the sub-list for extension extendee |
| 314 |
0, // [0:0] is the sub-list for field type_name |
| 315 |
} |
| 316 |
|
| 317 |
func init() { file_google_type_postal_address_proto_init() } |
| 318 |
func file_google_type_postal_address_proto_init() { |
| 319 |
if File_google_type_postal_address_proto != nil { |
| 320 |
return |
| 321 |
} |
| 322 |
if !protoimpl.UnsafeEnabled { |
| 323 |
file_google_type_postal_address_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| 324 |
switch v := v.(*PostalAddress); i { |
| 325 |
case 0: |
| 326 |
return &v.state |
| 327 |
case 1: |
| 328 |
return &v.sizeCache |
| 329 |
case 2: |
| 330 |
return &v.unknownFields |
| 331 |
default: |
| 332 |
return nil |
| 333 |
} |
| 334 |
} |
| 335 |
} |
| 336 |
type x struct{} |
| 337 |
out := protoimpl.TypeBuilder{ |
| 338 |
File: protoimpl.DescBuilder{ |
| 339 |
GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 340 |
RawDescriptor: file_google_type_postal_address_proto_rawDesc, |
| 341 |
NumEnums: 0, |
| 342 |
NumMessages: 1, |
| 343 |
NumExtensions: 0, |
| 344 |
NumServices: 0, |
| 345 |
}, |
| 346 |
GoTypes: file_google_type_postal_address_proto_goTypes, |
| 347 |
DependencyIndexes: file_google_type_postal_address_proto_depIdxs, |
| 348 |
MessageInfos: file_google_type_postal_address_proto_msgTypes, |
| 349 |
}.Build() |
| 350 |
File_google_type_postal_address_proto = out.File |
| 351 |
file_google_type_postal_address_proto_rawDesc = nil |
| 352 |
file_google_type_postal_address_proto_goTypes = nil |
| 353 |
file_google_type_postal_address_proto_depIdxs = nil |
| 354 |
} |