Built motion from commit 44377920.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / type / postal_address.proto
1 // Copyright 2016 Google Inc.
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 syntax = "proto3";
16
17 package google.type;
18
19 option go_package = "google.golang.org/genproto/googleapis/type/postaladdress;postaladdress";
20 option java_multiple_files = true;
21 option java_outer_classname = "PostalAddressProto";
22 option java_package = "com.google.type";
23 option objc_class_prefix = "GTP";
24
25 // Represents a postal address, e.g. for postal delivery or payments addresses.
26 // Given a postal address, a postal service can deliver items to a premise, P.O.
27 // Box or similar.
28 // It is not intended to model geographical locations (roads, towns,
29 // mountains).
30 //
31 // In typical usage an address would be created via user input or from importing
32 // existing data, depending on the type of process.
33 //
34 // Advice on address input / editing:
35 //  - Use an i18n-ready address widget such as
36 //    https://github.com/googlei18n/libaddressinput)
37 // - Users should not be presented with UI elements for input or editing of
38 //   fields outside countries where that field is used.
39 //
40 // For more guidance on how to use this schema, please see:
41 // https://support.google.com/business/answer/6397478
42 message PostalAddress {
43   // The schema revision of the `PostalAddress`.
44   // All new revisions **must** be backward compatible with old revisions.
45   int32 revision = 1;
46
47   // Required. CLDR region code of the country/region of the address. This
48   // is never inferred and it is up to the user to ensure the value is
49   // correct. See http://cldr.unicode.org/ and
50   // http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html
51   // for details. Example: "CH" for Switzerland.
52   string region_code = 2;
53
54   // Optional. BCP-47 language code of the contents of this address (if
55   // known). This is often the UI language of the input form or is expected
56   // to match one of the languages used in the address' country/region, or their
57   // transliterated equivalents.
58   // This can affect formatting in certain countries, but is not critical
59   // to the correctness of the data and will never affect any validation or
60   // other non-formatting related operations.
61   //
62   // If this value is not known, it should be omitted (rather than specifying a
63   // possibly incorrect default).
64   //
65   // Examples: "zh-Hant", "ja", "ja-Latn", "en".
66   string language_code = 3;
67
68   // Optional. Postal code of the address. Not all countries use or require
69   // postal codes to be present, but where they are used, they may trigger
70   // additional validation with other parts of the address (e.g. state/zip
71   // validation in the U.S.A.).
72   string postal_code = 4;
73
74   // Optional. Additional, country-specific, sorting code. This is not used
75   // in most regions. Where it is used, the value is either a string like
76   // "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number
77   // alone, representing the "sector code" (Jamaica), "delivery area indicator"
78   // (Malawi) or "post office indicator" (e.g. Côte d'Ivoire).
79   string sorting_code = 5;
80
81   // Optional. Highest administrative subdivision which is used for postal
82   // addresses of a country or region.
83   // For example, this can be a state, a province, an oblast, or a prefecture.
84   // Specifically, for Spain this is the province and not the autonomous
85   // community (e.g. "Barcelona" and not "Catalonia").
86   // Many countries don't use an administrative area in postal addresses. E.g.
87   // in Switzerland this should be left unpopulated.
88   string administrative_area = 6;
89
90   // Optional. Generally refers to the city/town portion of the address.
91   // Examples: US city, IT comune, UK post town.
92   // In regions of the world where localities are not well defined or do not fit
93   // into this structure well, leave locality empty and use address_lines.
94   string locality = 7;
95
96   // Optional. Sublocality of the address.
97   // For example, this can be neighborhoods, boroughs, districts.
98   string sublocality = 8;
99
100   // Unstructured address lines describing the lower levels of an address.
101   //
102   // Because values in address_lines do not have type information and may
103   // sometimes contain multiple values in a single field (e.g.
104   // "Austin, TX"), it is important that the line order is clear. The order of
105   // address lines should be "envelope order" for the country/region of the
106   // address. In places where this can vary (e.g. Japan), address_language is
107   // used to make it explicit (e.g. "ja" for large-to-small ordering and
108   // "ja-Latn" or "en" for small-to-large). This way, the most specific line of
109   // an address can be selected based on the language.
110   //
111   // The minimum permitted structural representation of an address consists
112   // of a region_code with all remaining information placed in the
113   // address_lines. It would be possible to format such an address very
114   // approximately without geocoding, but no semantic reasoning could be
115   // made about any of the address components until it was at least
116   // partially resolved.
117   //
118   // Creating an address only containing a region_code and address_lines, and
119   // then geocoding is the recommended way to handle completely unstructured
120   // addresses (as opposed to guessing which parts of the address should be
121   // localities or administrative areas).
122   repeated string address_lines = 9;
123
124   // Optional. The recipient at the address.
125   // This field may, under certain circumstances, contain multiline information.
126   // For example, it might contain "care of" information.
127   repeated string recipients = 10;
128
129   // Optional. The name of the organization at the address.
130   string organization = 11;
131 }