|
|
@ -26,16 +26,17 @@ package i18n.phonenumbers; |
|
|
|
|
|
|
|
|
message PhoneNumber { |
|
|
message PhoneNumber { |
|
|
// The country calling code for this number, as defined by the International Telecommunication Union |
|
|
// The country calling code for this number, as defined by the International Telecommunication Union |
|
|
// (ITU). Fox example, this would be 1 for NANPA countries, and 33 for France. |
|
|
|
|
|
|
|
|
// (ITU). For example, this would be 1 for NANPA countries, and 33 for France. |
|
|
required int32 country_code = 1; |
|
|
required int32 country_code = 1; |
|
|
|
|
|
|
|
|
// National (significant) Number is defined in International Telecommunication Union (ITU) |
|
|
// National (significant) Number is defined in International Telecommunication Union (ITU) |
|
|
// Recommendation E.164. It is a language/country-neutral representation of a phone number at a |
|
|
// Recommendation E.164. It is a language/country-neutral representation of a phone number at a |
|
|
// country level. For countries which have the concept of Area Code, the National (significant) |
|
|
|
|
|
// Number contains the area code. It contains a maximum number of digits which equal to 15 - n, |
|
|
|
|
|
// where n is the number of digits of the country code. Take note that National (significant) Number |
|
|
|
|
|
// does not contain National(trunk) prefix. Obviously, as a uint64, it will never contain any |
|
|
|
|
|
// formatting (hypens, spaces, parentheses), nor any alphanumeric spellings. |
|
|
|
|
|
|
|
|
// country level. For countries which have the concept of an "area code" or "national destination |
|
|
|
|
|
// code", this is included in the National (significant) Number. Although the ITU says the maximum |
|
|
|
|
|
// length should be 15, we have found longer numbers in some countries e.g. Germany. |
|
|
|
|
|
// Note that the National (significant) Number does not contain the National(trunk) prefix. |
|
|
|
|
|
// Obviously, as a uint64, it will never contain any formatting (hyphens, spaces, parentheses), nor |
|
|
|
|
|
// any alphanumeric spellings. |
|
|
required uint64 national_number = 2; |
|
|
required uint64 national_number = 2; |
|
|
|
|
|
|
|
|
// Extension is not standardized in ITU recommendations, except for being defined as a series of |
|
|
// Extension is not standardized in ITU recommendations, except for being defined as a series of |
|
|
|