|
|
@ -22,11 +22,14 @@ |
|
|
|
|
|
|
|
|
package com.google.i18n.phonenumbers; |
|
|
package com.google.i18n.phonenumbers; |
|
|
|
|
|
|
|
|
import java.io.Serializable; |
|
|
|
|
|
|
|
|
import java.io.Externalizable; |
|
|
|
|
|
import java.io.IOException; |
|
|
|
|
|
import java.io.ObjectInput; |
|
|
|
|
|
import java.io.ObjectOutput; |
|
|
|
|
|
|
|
|
public final class Phonemetadata { |
|
|
public final class Phonemetadata { |
|
|
private Phonemetadata() {} |
|
|
private Phonemetadata() {} |
|
|
public static final class NumberFormat implements Serializable { |
|
|
|
|
|
|
|
|
public static final class NumberFormat implements Externalizable { |
|
|
private static final long serialVersionUID = 1; |
|
|
private static final long serialVersionUID = 1; |
|
|
public NumberFormat() {} |
|
|
public NumberFormat() {} |
|
|
|
|
|
|
|
|
@ -40,11 +43,6 @@ public final class Phonemetadata { |
|
|
pattern_ = value; |
|
|
pattern_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public NumberFormat clearPattern() { |
|
|
|
|
|
hasPattern = false; |
|
|
|
|
|
pattern_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// required string format = 2; |
|
|
// required string format = 2; |
|
|
private boolean hasFormat; |
|
|
private boolean hasFormat; |
|
|
@ -56,11 +54,6 @@ public final class Phonemetadata { |
|
|
format_ = value; |
|
|
format_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public NumberFormat clearFormat() { |
|
|
|
|
|
hasFormat = false; |
|
|
|
|
|
format_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// optional string leading_digits = 3; |
|
|
// optional string leading_digits = 3; |
|
|
private boolean hasLeadingDigits; |
|
|
private boolean hasLeadingDigits; |
|
|
@ -72,11 +65,6 @@ public final class Phonemetadata { |
|
|
leadingDigits_ = value; |
|
|
leadingDigits_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public NumberFormat clearLeadingDigits() { |
|
|
|
|
|
hasLeadingDigits = false; |
|
|
|
|
|
leadingDigits_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// optional string national_prefix_formatting_rule = 4; |
|
|
// optional string national_prefix_formatting_rule = 4; |
|
|
private boolean hasNationalPrefixFormattingRule; |
|
|
private boolean hasNationalPrefixFormattingRule; |
|
|
@ -88,44 +76,33 @@ public final class Phonemetadata { |
|
|
nationalPrefixFormattingRule_ = value; |
|
|
nationalPrefixFormattingRule_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public NumberFormat clearNationalPrefixFormattingRule() { |
|
|
|
|
|
hasNationalPrefixFormattingRule = false; |
|
|
|
|
|
nationalPrefixFormattingRule_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public final NumberFormat clear() { |
|
|
|
|
|
clearPattern(); |
|
|
|
|
|
clearFormat(); |
|
|
|
|
|
clearLeadingDigits(); |
|
|
|
|
|
clearNationalPrefixFormattingRule(); |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public NumberFormat mergeFrom(NumberFormat other) { |
|
|
|
|
|
if (other.hasPattern()) { |
|
|
|
|
|
setPattern(other.getPattern()); |
|
|
|
|
|
|
|
|
public void writeExternal(ObjectOutput objectOutput) throws IOException { |
|
|
|
|
|
objectOutput.writeUTF(pattern_); |
|
|
|
|
|
objectOutput.writeUTF(format_); |
|
|
|
|
|
objectOutput.writeBoolean(hasLeadingDigits); |
|
|
|
|
|
if (hasLeadingDigits) { |
|
|
|
|
|
objectOutput.writeUTF(leadingDigits_); |
|
|
} |
|
|
} |
|
|
if (other.hasFormat()) { |
|
|
|
|
|
setFormat(other.getFormat()); |
|
|
|
|
|
|
|
|
objectOutput.writeBoolean(hasNationalPrefixFormattingRule); |
|
|
|
|
|
if (hasNationalPrefixFormattingRule) { |
|
|
|
|
|
objectOutput.writeUTF(nationalPrefixFormattingRule_); |
|
|
} |
|
|
} |
|
|
if (other.hasLeadingDigits()) { |
|
|
|
|
|
setLeadingDigits(other.getLeadingDigits()); |
|
|
|
|
|
} |
|
|
|
|
|
if (other.hasNationalPrefixFormattingRule()) { |
|
|
|
|
|
setNationalPrefixFormattingRule(other.getNationalPrefixFormattingRule()); |
|
|
|
|
|
} |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public final boolean isInitialized() { |
|
|
|
|
|
if (!hasPattern) return false; |
|
|
|
|
|
if (!hasFormat) return false; |
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
public void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException { |
|
|
|
|
|
setPattern(objectInput.readUTF()); |
|
|
|
|
|
setFormat(objectInput.readUTF()); |
|
|
|
|
|
if (objectInput.readBoolean()) { |
|
|
|
|
|
setLeadingDigits(objectInput.readUTF()); |
|
|
|
|
|
} |
|
|
|
|
|
if (objectInput.readBoolean()) { |
|
|
|
|
|
setNationalPrefixFormattingRule(objectInput.readUTF()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static final class PhoneNumberDesc implements Serializable { |
|
|
|
|
|
|
|
|
public static final class PhoneNumberDesc implements Externalizable { |
|
|
private static final long serialVersionUID = 1; |
|
|
private static final long serialVersionUID = 1; |
|
|
public PhoneNumberDesc() {} |
|
|
public PhoneNumberDesc() {} |
|
|
|
|
|
|
|
|
@ -139,11 +116,6 @@ public final class Phonemetadata { |
|
|
nationalNumberPattern_ = value; |
|
|
nationalNumberPattern_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneNumberDesc clearNationalNumberPattern() { |
|
|
|
|
|
hasNationalNumberPattern = false; |
|
|
|
|
|
nationalNumberPattern_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// optional string possible_number_pattern = 3; |
|
|
// optional string possible_number_pattern = 3; |
|
|
private boolean hasPossibleNumberPattern; |
|
|
private boolean hasPossibleNumberPattern; |
|
|
@ -155,11 +127,6 @@ public final class Phonemetadata { |
|
|
possibleNumberPattern_ = value; |
|
|
possibleNumberPattern_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneNumberDesc clearPossibleNumberPattern() { |
|
|
|
|
|
hasPossibleNumberPattern = false; |
|
|
|
|
|
possibleNumberPattern_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// optional string example_number = 6; |
|
|
// optional string example_number = 6; |
|
|
private boolean hasExampleNumber; |
|
|
private boolean hasExampleNumber; |
|
|
@ -171,18 +138,6 @@ public final class Phonemetadata { |
|
|
exampleNumber_ = value; |
|
|
exampleNumber_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneNumberDesc clearExampleNumber() { |
|
|
|
|
|
hasExampleNumber = false; |
|
|
|
|
|
exampleNumber_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public final PhoneNumberDesc clear() { |
|
|
|
|
|
clearNationalNumberPattern(); |
|
|
|
|
|
clearPossibleNumberPattern(); |
|
|
|
|
|
clearExampleNumber(); |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public PhoneNumberDesc mergeFrom(PhoneNumberDesc other) { |
|
|
public PhoneNumberDesc mergeFrom(PhoneNumberDesc other) { |
|
|
if (other.hasNationalNumberPattern()) { |
|
|
if (other.hasNationalNumberPattern()) { |
|
|
@ -202,9 +157,40 @@ public final class Phonemetadata { |
|
|
possibleNumberPattern_.equals(other.possibleNumberPattern_) && |
|
|
possibleNumberPattern_.equals(other.possibleNumberPattern_) && |
|
|
exampleNumber_.equals(other.exampleNumber_); |
|
|
exampleNumber_.equals(other.exampleNumber_); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void writeExternal(ObjectOutput objectOutput) throws IOException { |
|
|
|
|
|
objectOutput.writeBoolean(hasNationalNumberPattern); |
|
|
|
|
|
if (hasNationalNumberPattern) { |
|
|
|
|
|
objectOutput.writeUTF(nationalNumberPattern_); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
objectOutput.writeBoolean(hasPossibleNumberPattern); |
|
|
|
|
|
if (hasPossibleNumberPattern) { |
|
|
|
|
|
objectOutput.writeUTF(possibleNumberPattern_); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
objectOutput.writeBoolean(hasExampleNumber); |
|
|
|
|
|
if (hasExampleNumber) { |
|
|
|
|
|
objectOutput.writeUTF(exampleNumber_); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException { |
|
|
|
|
|
if (objectInput.readBoolean()) { |
|
|
|
|
|
setNationalNumberPattern(objectInput.readUTF()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (objectInput.readBoolean()) { |
|
|
|
|
|
setPossibleNumberPattern(objectInput.readUTF()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (objectInput.readBoolean()) { |
|
|
|
|
|
setExampleNumber(objectInput.readUTF()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static final class PhoneMetadata implements Serializable { |
|
|
|
|
|
|
|
|
public static final class PhoneMetadata implements Externalizable { |
|
|
private static final long serialVersionUID = 1; |
|
|
private static final long serialVersionUID = 1; |
|
|
public PhoneMetadata() {} |
|
|
public PhoneMetadata() {} |
|
|
|
|
|
|
|
|
@ -221,11 +207,6 @@ public final class Phonemetadata { |
|
|
generalDesc_ = value; |
|
|
generalDesc_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearGeneralDesc() { |
|
|
|
|
|
hasGeneralDesc = false; |
|
|
|
|
|
generalDesc_ = null; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// required PhoneNumberDesc fixed_line = 2; |
|
|
// required PhoneNumberDesc fixed_line = 2; |
|
|
private boolean hasFixedLine; |
|
|
private boolean hasFixedLine; |
|
|
@ -240,11 +221,6 @@ public final class Phonemetadata { |
|
|
fixedLine_ = value; |
|
|
fixedLine_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearFixedLine() { |
|
|
|
|
|
hasFixedLine = false; |
|
|
|
|
|
fixedLine_ = null; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// required PhoneNumberDesc mobile = 3; |
|
|
// required PhoneNumberDesc mobile = 3; |
|
|
private boolean hasMobile; |
|
|
private boolean hasMobile; |
|
|
@ -259,11 +235,6 @@ public final class Phonemetadata { |
|
|
mobile_ = value; |
|
|
mobile_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearMobile() { |
|
|
|
|
|
hasMobile = false; |
|
|
|
|
|
mobile_ = null; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// required PhoneNumberDesc toll_free = 4; |
|
|
// required PhoneNumberDesc toll_free = 4; |
|
|
private boolean hasTollFree; |
|
|
private boolean hasTollFree; |
|
|
@ -278,11 +249,6 @@ public final class Phonemetadata { |
|
|
tollFree_ = value; |
|
|
tollFree_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearTollFree() { |
|
|
|
|
|
hasTollFree = false; |
|
|
|
|
|
tollFree_ = null; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// required PhoneNumberDesc premium_rate = 5; |
|
|
// required PhoneNumberDesc premium_rate = 5; |
|
|
private boolean hasPremiumRate; |
|
|
private boolean hasPremiumRate; |
|
|
@ -297,11 +263,6 @@ public final class Phonemetadata { |
|
|
premiumRate_ = value; |
|
|
premiumRate_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearPremiumRate() { |
|
|
|
|
|
hasPremiumRate = false; |
|
|
|
|
|
premiumRate_ = null; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// required PhoneNumberDesc shared_cost = 6; |
|
|
// required PhoneNumberDesc shared_cost = 6; |
|
|
private boolean hasSharedCost; |
|
|
private boolean hasSharedCost; |
|
|
@ -316,11 +277,6 @@ public final class Phonemetadata { |
|
|
sharedCost_ = value; |
|
|
sharedCost_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearSharedCost() { |
|
|
|
|
|
hasSharedCost = false; |
|
|
|
|
|
sharedCost_ = null; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// required PhoneNumberDesc personal_number = 7; |
|
|
// required PhoneNumberDesc personal_number = 7; |
|
|
private boolean hasPersonalNumber; |
|
|
private boolean hasPersonalNumber; |
|
|
@ -335,11 +291,6 @@ public final class Phonemetadata { |
|
|
personalNumber_ = value; |
|
|
personalNumber_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearPersonalNumber() { |
|
|
|
|
|
hasPersonalNumber = false; |
|
|
|
|
|
personalNumber_ = null; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// required PhoneNumberDesc voip = 8; |
|
|
// required PhoneNumberDesc voip = 8; |
|
|
private boolean hasVoip; |
|
|
private boolean hasVoip; |
|
|
@ -354,11 +305,6 @@ public final class Phonemetadata { |
|
|
voip_ = value; |
|
|
voip_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearVoip() { |
|
|
|
|
|
hasVoip = false; |
|
|
|
|
|
voip_ = null; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// required string id = 9; |
|
|
// required string id = 9; |
|
|
private boolean hasId; |
|
|
private boolean hasId; |
|
|
@ -370,11 +316,6 @@ public final class Phonemetadata { |
|
|
id_ = value; |
|
|
id_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearId() { |
|
|
|
|
|
hasId = false; |
|
|
|
|
|
id_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// required int32 country_code = 10; |
|
|
// required int32 country_code = 10; |
|
|
private boolean hasCountryCode; |
|
|
private boolean hasCountryCode; |
|
|
@ -386,11 +327,6 @@ public final class Phonemetadata { |
|
|
countryCode_ = value; |
|
|
countryCode_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearCountryCode() { |
|
|
|
|
|
hasCountryCode = false; |
|
|
|
|
|
countryCode_ = 0; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// required string international_prefix = 11; |
|
|
// required string international_prefix = 11; |
|
|
private boolean hasInternationalPrefix; |
|
|
private boolean hasInternationalPrefix; |
|
|
@ -402,11 +338,6 @@ public final class Phonemetadata { |
|
|
internationalPrefix_ = value; |
|
|
internationalPrefix_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearInternationalPrefix() { |
|
|
|
|
|
hasInternationalPrefix = false; |
|
|
|
|
|
internationalPrefix_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// optional string preferred_international_prefix = 17; |
|
|
// optional string preferred_international_prefix = 17; |
|
|
private boolean hasPreferredInternationalPrefix; |
|
|
private boolean hasPreferredInternationalPrefix; |
|
|
@ -418,11 +349,6 @@ public final class Phonemetadata { |
|
|
preferredInternationalPrefix_ = value; |
|
|
preferredInternationalPrefix_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearPreferredInternationalPrefix() { |
|
|
|
|
|
hasPreferredInternationalPrefix = false; |
|
|
|
|
|
preferredInternationalPrefix_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// optional string national_prefix = 12; |
|
|
// optional string national_prefix = 12; |
|
|
private boolean hasNationalPrefix; |
|
|
private boolean hasNationalPrefix; |
|
|
@ -434,11 +360,6 @@ public final class Phonemetadata { |
|
|
nationalPrefix_ = value; |
|
|
nationalPrefix_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearNationalPrefix() { |
|
|
|
|
|
hasNationalPrefix = false; |
|
|
|
|
|
nationalPrefix_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// optional string preferred_extn_prefix = 13; |
|
|
// optional string preferred_extn_prefix = 13; |
|
|
private boolean hasPreferredExtnPrefix; |
|
|
private boolean hasPreferredExtnPrefix; |
|
|
@ -450,11 +371,6 @@ public final class Phonemetadata { |
|
|
preferredExtnPrefix_ = value; |
|
|
preferredExtnPrefix_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearPreferredExtnPrefix() { |
|
|
|
|
|
hasPreferredExtnPrefix = false; |
|
|
|
|
|
preferredExtnPrefix_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// optional string national_prefix_for_parsing = 15; |
|
|
// optional string national_prefix_for_parsing = 15; |
|
|
private boolean hasNationalPrefixForParsing; |
|
|
private boolean hasNationalPrefixForParsing; |
|
|
@ -466,11 +382,6 @@ public final class Phonemetadata { |
|
|
nationalPrefixForParsing_ = value; |
|
|
nationalPrefixForParsing_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearNationalPrefixForParsing() { |
|
|
|
|
|
hasNationalPrefixForParsing = false; |
|
|
|
|
|
nationalPrefixForParsing_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// optional string national_prefix_transform_rule = 16; |
|
|
// optional string national_prefix_transform_rule = 16; |
|
|
private boolean hasNationalPrefixTransformRule; |
|
|
private boolean hasNationalPrefixTransformRule; |
|
|
@ -482,11 +393,6 @@ public final class Phonemetadata { |
|
|
nationalPrefixTransformRule_ = value; |
|
|
nationalPrefixTransformRule_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearNationalPrefixTransformRule() { |
|
|
|
|
|
hasNationalPrefixTransformRule = false; |
|
|
|
|
|
nationalPrefixTransformRule_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// optional bool same_mobile_and_fixed_line_pattern = 18 [default = false]; |
|
|
// optional bool same_mobile_and_fixed_line_pattern = 18 [default = false]; |
|
|
private boolean hasSameMobileAndFixedLinePattern; |
|
|
private boolean hasSameMobileAndFixedLinePattern; |
|
|
@ -498,15 +404,9 @@ public final class Phonemetadata { |
|
|
sameMobileAndFixedLinePattern_ = value; |
|
|
sameMobileAndFixedLinePattern_ = value; |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearSameMobileAndFixedLinePattern() { |
|
|
|
|
|
hasSameMobileAndFixedLinePattern = false; |
|
|
|
|
|
sameMobileAndFixedLinePattern_ = false; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// repeated NumberFormat number_format = 19; |
|
|
// repeated NumberFormat number_format = 19; |
|
|
private java.util.List<NumberFormat> numberFormat_ = |
|
|
|
|
|
java.util.Collections.emptyList(); |
|
|
|
|
|
|
|
|
private java.util.List<NumberFormat> numberFormat_ = new java.util.ArrayList<NumberFormat>(); |
|
|
public java.util.List<NumberFormat> getNumberFormatList() { |
|
|
public java.util.List<NumberFormat> getNumberFormatList() { |
|
|
return numberFormat_; |
|
|
return numberFormat_; |
|
|
} |
|
|
} |
|
|
@ -514,31 +414,17 @@ public final class Phonemetadata { |
|
|
public NumberFormat getNumberFormat(int index) { |
|
|
public NumberFormat getNumberFormat(int index) { |
|
|
return numberFormat_.get(index); |
|
|
return numberFormat_.get(index); |
|
|
} |
|
|
} |
|
|
public PhoneMetadata setNumberFormat(int index, NumberFormat value) { |
|
|
|
|
|
if (value == null) { |
|
|
|
|
|
throw new NullPointerException(); |
|
|
|
|
|
} |
|
|
|
|
|
numberFormat_.set(index, value); |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
public PhoneMetadata addNumberFormat(NumberFormat value) { |
|
|
public PhoneMetadata addNumberFormat(NumberFormat value) { |
|
|
if (value == null) { |
|
|
if (value == null) { |
|
|
throw new NullPointerException(); |
|
|
throw new NullPointerException(); |
|
|
} |
|
|
} |
|
|
if (numberFormat_.isEmpty()) { |
|
|
|
|
|
numberFormat_ = new java.util.ArrayList<NumberFormat>(); |
|
|
|
|
|
} |
|
|
|
|
|
numberFormat_.add(value); |
|
|
numberFormat_.add(value); |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearNumberFormat() { |
|
|
|
|
|
numberFormat_ = java.util.Collections.emptyList(); |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// repeated NumberFormat intl_number_format = 20; |
|
|
// repeated NumberFormat intl_number_format = 20; |
|
|
private java.util.List<NumberFormat> intlNumberFormat_ = |
|
|
private java.util.List<NumberFormat> intlNumberFormat_ = |
|
|
java.util.Collections.emptyList(); |
|
|
|
|
|
|
|
|
new java.util.ArrayList<NumberFormat>(); |
|
|
public java.util.List<NumberFormat> getIntlNumberFormatList() { |
|
|
public java.util.List<NumberFormat> getIntlNumberFormatList() { |
|
|
return intlNumberFormat_; |
|
|
return intlNumberFormat_; |
|
|
} |
|
|
} |
|
|
@ -546,108 +432,225 @@ public final class Phonemetadata { |
|
|
public NumberFormat getIntlNumberFormat(int index) { |
|
|
public NumberFormat getIntlNumberFormat(int index) { |
|
|
return intlNumberFormat_.get(index); |
|
|
return intlNumberFormat_.get(index); |
|
|
} |
|
|
} |
|
|
public PhoneMetadata setIntlNumberFormat(int index, NumberFormat value) { |
|
|
|
|
|
if (value == null) { |
|
|
|
|
|
throw new NullPointerException(); |
|
|
|
|
|
} |
|
|
|
|
|
intlNumberFormat_.set(index, value); |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public PhoneMetadata addIntlNumberFormat(NumberFormat value) { |
|
|
public PhoneMetadata addIntlNumberFormat(NumberFormat value) { |
|
|
if (value == null) { |
|
|
if (value == null) { |
|
|
throw new NullPointerException(); |
|
|
throw new NullPointerException(); |
|
|
} |
|
|
} |
|
|
if (intlNumberFormat_.isEmpty()) { |
|
|
|
|
|
intlNumberFormat_ = new java.util.ArrayList<NumberFormat>(); |
|
|
|
|
|
} |
|
|
|
|
|
intlNumberFormat_.add(value); |
|
|
intlNumberFormat_.add(value); |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadata clearIntlNumberFormat() { |
|
|
|
|
|
intlNumberFormat_ = java.util.Collections.emptyList(); |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// optional string national_prefix_formatting_rule = 21; |
|
|
|
|
|
private boolean hasNationalPrefixFormattingRule; |
|
|
|
|
|
private String nationalPrefixFormattingRule_ = ""; |
|
|
|
|
|
public boolean hasNationalPrefixFormattingRule() { return hasNationalPrefixFormattingRule; } |
|
|
|
|
|
public String getNationalPrefixFormattingRule() { return nationalPrefixFormattingRule_; } |
|
|
|
|
|
public PhoneMetadata setNationalPrefixFormattingRule(String value) { |
|
|
|
|
|
hasNationalPrefixFormattingRule = true; |
|
|
|
|
|
nationalPrefixFormattingRule_ = value; |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
public PhoneMetadata clearNationalPrefixFormattingRule() { |
|
|
|
|
|
hasNationalPrefixFormattingRule = false; |
|
|
|
|
|
nationalPrefixFormattingRule_ = ""; |
|
|
|
|
|
return this; |
|
|
|
|
|
|
|
|
public void writeExternal(ObjectOutput objectOutput) throws IOException { |
|
|
|
|
|
objectOutput.writeBoolean(hasGeneralDesc); |
|
|
|
|
|
if (hasGeneralDesc) { |
|
|
|
|
|
generalDesc_.writeExternal(objectOutput); |
|
|
|
|
|
} |
|
|
|
|
|
objectOutput.writeBoolean(hasFixedLine); |
|
|
|
|
|
if (hasFixedLine) { |
|
|
|
|
|
fixedLine_.writeExternal(objectOutput); |
|
|
|
|
|
} |
|
|
|
|
|
objectOutput.writeBoolean(hasMobile); |
|
|
|
|
|
if (hasMobile) { |
|
|
|
|
|
mobile_.writeExternal(objectOutput); |
|
|
|
|
|
} |
|
|
|
|
|
objectOutput.writeBoolean(hasTollFree); |
|
|
|
|
|
if (hasTollFree) { |
|
|
|
|
|
tollFree_.writeExternal(objectOutput); |
|
|
|
|
|
} |
|
|
|
|
|
objectOutput.writeBoolean(hasPremiumRate); |
|
|
|
|
|
if (hasPremiumRate) { |
|
|
|
|
|
premiumRate_.writeExternal(objectOutput); |
|
|
|
|
|
} |
|
|
|
|
|
objectOutput.writeBoolean(hasSharedCost); |
|
|
|
|
|
if (hasSharedCost) { |
|
|
|
|
|
sharedCost_.writeExternal(objectOutput); |
|
|
|
|
|
} |
|
|
|
|
|
objectOutput.writeBoolean(hasPersonalNumber); |
|
|
|
|
|
if (hasPersonalNumber) { |
|
|
|
|
|
personalNumber_.writeExternal(objectOutput); |
|
|
|
|
|
} |
|
|
|
|
|
objectOutput.writeBoolean(hasVoip); |
|
|
|
|
|
if (hasVoip) { |
|
|
|
|
|
voip_.writeExternal(objectOutput); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
objectOutput.writeUTF(id_); |
|
|
|
|
|
objectOutput.writeInt(countryCode_); |
|
|
|
|
|
objectOutput.writeUTF(internationalPrefix_); |
|
|
|
|
|
|
|
|
|
|
|
objectOutput.writeBoolean(hasPreferredInternationalPrefix); |
|
|
|
|
|
if (hasPreferredInternationalPrefix) { |
|
|
|
|
|
objectOutput.writeUTF(preferredInternationalPrefix_); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
objectOutput.writeBoolean(hasNationalPrefix); |
|
|
|
|
|
if (hasNationalPrefix) { |
|
|
|
|
|
objectOutput.writeUTF(nationalPrefix_); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
objectOutput.writeBoolean(hasPreferredExtnPrefix); |
|
|
|
|
|
if (hasPreferredExtnPrefix) { |
|
|
|
|
|
objectOutput.writeUTF(preferredExtnPrefix_); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
objectOutput.writeBoolean(hasNationalPrefixForParsing); |
|
|
|
|
|
if (hasNationalPrefixForParsing) { |
|
|
|
|
|
objectOutput.writeUTF(nationalPrefixForParsing_); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
objectOutput.writeBoolean(hasNationalPrefixTransformRule); |
|
|
|
|
|
if (hasNationalPrefixTransformRule) { |
|
|
|
|
|
objectOutput.writeUTF(nationalPrefixTransformRule_); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
objectOutput.writeBoolean(sameMobileAndFixedLinePattern_); |
|
|
|
|
|
|
|
|
|
|
|
int numberFormatSize = getNumberFormatCount(); |
|
|
|
|
|
objectOutput.writeInt(numberFormatSize); |
|
|
|
|
|
for (int i = 0; i < numberFormatSize; i++) { |
|
|
|
|
|
numberFormat_.get(i).writeExternal(objectOutput); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int intlNumberFormatSize = getIntlNumberFormatCount(); |
|
|
|
|
|
objectOutput.writeInt(intlNumberFormatSize); |
|
|
|
|
|
for (int i = 0; i < intlNumberFormatSize; i++) { |
|
|
|
|
|
intlNumberFormat_.get(i).writeExternal(objectOutput); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public final PhoneMetadata clear() { |
|
|
|
|
|
clearGeneralDesc(); |
|
|
|
|
|
clearFixedLine(); |
|
|
|
|
|
clearMobile(); |
|
|
|
|
|
clearTollFree(); |
|
|
|
|
|
clearPremiumRate(); |
|
|
|
|
|
clearSharedCost(); |
|
|
|
|
|
clearPersonalNumber(); |
|
|
|
|
|
clearVoip(); |
|
|
|
|
|
clearId(); |
|
|
|
|
|
clearCountryCode(); |
|
|
|
|
|
clearInternationalPrefix(); |
|
|
|
|
|
clearPreferredInternationalPrefix(); |
|
|
|
|
|
clearNationalPrefix(); |
|
|
|
|
|
clearPreferredExtnPrefix(); |
|
|
|
|
|
clearNationalPrefixForParsing(); |
|
|
|
|
|
clearNationalPrefixTransformRule(); |
|
|
|
|
|
clearSameMobileAndFixedLinePattern(); |
|
|
|
|
|
clearNumberFormat(); |
|
|
|
|
|
clearIntlNumberFormat(); |
|
|
|
|
|
clearNationalPrefixFormattingRule(); |
|
|
|
|
|
return this; |
|
|
|
|
|
|
|
|
public void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException { |
|
|
|
|
|
boolean hasDesc = objectInput.readBoolean(); |
|
|
|
|
|
if (hasDesc) { |
|
|
|
|
|
PhoneNumberDesc desc = new PhoneNumberDesc(); |
|
|
|
|
|
desc.readExternal(objectInput); |
|
|
|
|
|
setGeneralDesc(desc); |
|
|
|
|
|
} |
|
|
|
|
|
hasDesc = objectInput.readBoolean(); |
|
|
|
|
|
if (hasDesc) { |
|
|
|
|
|
PhoneNumberDesc desc = new PhoneNumberDesc(); |
|
|
|
|
|
desc.readExternal(objectInput); |
|
|
|
|
|
setFixedLine(desc); |
|
|
|
|
|
} |
|
|
|
|
|
hasDesc = objectInput.readBoolean(); |
|
|
|
|
|
if (hasDesc) { |
|
|
|
|
|
PhoneNumberDesc desc = new PhoneNumberDesc(); |
|
|
|
|
|
desc.readExternal(objectInput); |
|
|
|
|
|
setMobile(desc); |
|
|
|
|
|
} |
|
|
|
|
|
hasDesc = objectInput.readBoolean(); |
|
|
|
|
|
if (hasDesc) { |
|
|
|
|
|
PhoneNumberDesc desc = new PhoneNumberDesc(); |
|
|
|
|
|
desc.readExternal(objectInput); |
|
|
|
|
|
setTollFree(desc); |
|
|
|
|
|
} |
|
|
|
|
|
hasDesc = objectInput.readBoolean(); |
|
|
|
|
|
if (hasDesc) { |
|
|
|
|
|
PhoneNumberDesc desc = new PhoneNumberDesc(); |
|
|
|
|
|
desc.readExternal(objectInput); |
|
|
|
|
|
setPremiumRate(desc); |
|
|
|
|
|
} |
|
|
|
|
|
hasDesc = objectInput.readBoolean(); |
|
|
|
|
|
if (hasDesc) { |
|
|
|
|
|
PhoneNumberDesc desc = new PhoneNumberDesc(); |
|
|
|
|
|
desc.readExternal(objectInput); |
|
|
|
|
|
setSharedCost(desc); |
|
|
|
|
|
} |
|
|
|
|
|
hasDesc = objectInput.readBoolean(); |
|
|
|
|
|
if (hasDesc) { |
|
|
|
|
|
PhoneNumberDesc desc = new PhoneNumberDesc(); |
|
|
|
|
|
desc.readExternal(objectInput); |
|
|
|
|
|
setPersonalNumber(desc); |
|
|
|
|
|
} |
|
|
|
|
|
hasDesc = objectInput.readBoolean(); |
|
|
|
|
|
if (hasDesc) { |
|
|
|
|
|
PhoneNumberDesc desc = new PhoneNumberDesc(); |
|
|
|
|
|
desc.readExternal(objectInput); |
|
|
|
|
|
setVoip(desc); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setId(objectInput.readUTF()); |
|
|
|
|
|
setCountryCode(objectInput.readInt()); |
|
|
|
|
|
setInternationalPrefix(objectInput.readUTF()); |
|
|
|
|
|
|
|
|
|
|
|
boolean hasString = objectInput.readBoolean(); |
|
|
|
|
|
if (hasString) { |
|
|
|
|
|
setPreferredInternationalPrefix(objectInput.readUTF()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
hasString = objectInput.readBoolean(); |
|
|
|
|
|
if (hasString) { |
|
|
|
|
|
setNationalPrefix(objectInput.readUTF()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
hasString = objectInput.readBoolean(); |
|
|
|
|
|
if (hasString) { |
|
|
|
|
|
setPreferredExtnPrefix(objectInput.readUTF()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
hasString = objectInput.readBoolean(); |
|
|
|
|
|
if (hasString) { |
|
|
|
|
|
setNationalPrefixForParsing(objectInput.readUTF()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
hasString = objectInput.readBoolean(); |
|
|
|
|
|
if (hasString) { |
|
|
|
|
|
setNationalPrefixTransformRule(objectInput.readUTF()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
setSameMobileAndFixedLinePattern(objectInput.readBoolean()); |
|
|
|
|
|
|
|
|
|
|
|
int nationalFormatSize = objectInput.readInt(); |
|
|
|
|
|
for (int i = 0; i < nationalFormatSize; i++) { |
|
|
|
|
|
NumberFormat numFormat = new NumberFormat(); |
|
|
|
|
|
numFormat.readExternal(objectInput); |
|
|
|
|
|
numberFormat_.add(numFormat); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
int intlNumberFormatSize = objectInput.readInt(); |
|
|
|
|
|
for (int i = 0; i < intlNumberFormatSize; i++) { |
|
|
|
|
|
NumberFormat numFormat = new NumberFormat(); |
|
|
|
|
|
numFormat.readExternal(objectInput); |
|
|
|
|
|
intlNumberFormat_.add(numFormat); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static final class PhoneMetadataCollection implements Serializable { |
|
|
|
|
|
|
|
|
public static final class PhoneMetadataCollection implements Externalizable { |
|
|
private static final long serialVersionUID = 1; |
|
|
private static final long serialVersionUID = 1; |
|
|
public PhoneMetadataCollection() {} |
|
|
public PhoneMetadataCollection() {} |
|
|
|
|
|
|
|
|
// repeated PhoneMetadata metadata = 1; |
|
|
// repeated PhoneMetadata metadata = 1; |
|
|
private java.util.List<PhoneMetadata> metadata_ = |
|
|
|
|
|
java.util.Collections.emptyList(); |
|
|
|
|
|
|
|
|
private java.util.List<PhoneMetadata> metadata_ = new java.util.ArrayList<PhoneMetadata>(); |
|
|
|
|
|
|
|
|
public java.util.List<PhoneMetadata> getMetadataList() { |
|
|
public java.util.List<PhoneMetadata> getMetadataList() { |
|
|
return metadata_; |
|
|
return metadata_; |
|
|
} |
|
|
} |
|
|
public int getMetadataCount() { return metadata_.size(); } |
|
|
public int getMetadataCount() { return metadata_.size(); } |
|
|
public PhoneMetadata getMetadata(int index) { |
|
|
|
|
|
return metadata_.get(index); |
|
|
|
|
|
} |
|
|
|
|
|
public PhoneMetadataCollection setMetadata(int index, PhoneMetadata value) { |
|
|
|
|
|
if (value == null) { |
|
|
|
|
|
throw new NullPointerException(); |
|
|
|
|
|
} |
|
|
|
|
|
metadata_.set(index, value); |
|
|
|
|
|
return this; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public PhoneMetadataCollection addMetadata(PhoneMetadata value) { |
|
|
public PhoneMetadataCollection addMetadata(PhoneMetadata value) { |
|
|
if (value == null) { |
|
|
if (value == null) { |
|
|
throw new NullPointerException(); |
|
|
throw new NullPointerException(); |
|
|
} |
|
|
} |
|
|
if (metadata_.isEmpty()) { |
|
|
|
|
|
metadata_ = new java.util.ArrayList<PhoneMetadata>(); |
|
|
|
|
|
} |
|
|
|
|
|
metadata_.add(value); |
|
|
metadata_.add(value); |
|
|
return this; |
|
|
return this; |
|
|
} |
|
|
} |
|
|
public PhoneMetadataCollection clearMetadata() { |
|
|
|
|
|
metadata_ = java.util.Collections.emptyList(); |
|
|
|
|
|
return this; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void writeExternal(ObjectOutput objectOutput) throws IOException { |
|
|
|
|
|
int size = getMetadataCount(); |
|
|
|
|
|
objectOutput.writeInt(size); |
|
|
|
|
|
for (int i = 0; i < size; i++) { |
|
|
|
|
|
metadata_.get(i).writeExternal(objectOutput); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public final PhoneMetadataCollection clear() { |
|
|
|
|
|
clearMetadata(); |
|
|
|
|
|
return this; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void readExternal(ObjectInput objectInput) throws IOException, ClassNotFoundException { |
|
|
|
|
|
int size = objectInput.readInt(); |
|
|
|
|
|
for (int i = 0; i < size; i++) { |
|
|
|
|
|
PhoneMetadata metadata = new PhoneMetadata(); |
|
|
|
|
|
metadata.readExternal(objectInput); |
|
|
|
|
|
metadata_.add(metadata); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |