diff options
Diffstat (limited to 'libphonenumber/src/com/google/i18n/phonenumbers/nano/Phonemetadata.java')
-rw-r--r-- | libphonenumber/src/com/google/i18n/phonenumbers/nano/Phonemetadata.java | 1040 |
1 files changed, 0 insertions, 1040 deletions
diff --git a/libphonenumber/src/com/google/i18n/phonenumbers/nano/Phonemetadata.java b/libphonenumber/src/com/google/i18n/phonenumbers/nano/Phonemetadata.java deleted file mode 100644 index abf4a67b..00000000 --- a/libphonenumber/src/com/google/i18n/phonenumbers/nano/Phonemetadata.java +++ /dev/null @@ -1,1040 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! - -package com.google.i18n.phonenumbers.nano; - -@SuppressWarnings("hiding") -public interface Phonemetadata { - - public static final class NumberFormat extends - com.google.protobuf.nano.MessageNano { - - private static volatile NumberFormat[] _emptyArray; - public static NumberFormat[] emptyArray() { - // Lazily initializes the empty array - if (_emptyArray == null) { - synchronized ( - com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { - if (_emptyArray == null) { - _emptyArray = new NumberFormat[0]; - } - } - } - return _emptyArray; - } - - // required string pattern = 1; - public java.lang.String pattern; - - // required string format = 2; - public java.lang.String format; - - // repeated string leading_digits_pattern = 3; - public java.lang.String[] leadingDigitsPattern; - - // optional string national_prefix_formatting_rule = 4; - public java.lang.String nationalPrefixFormattingRule; - - // optional bool national_prefix_optional_when_formatting = 6; - public boolean nationalPrefixOptionalWhenFormatting; - - // optional string domestic_carrier_code_formatting_rule = 5; - public java.lang.String domesticCarrierCodeFormattingRule; - - public NumberFormat() { - clear(); - } - - public NumberFormat clear() { - pattern = ""; - format = ""; - leadingDigitsPattern = com.google.protobuf.nano.WireFormatNano.EMPTY_STRING_ARRAY; - nationalPrefixFormattingRule = ""; - nationalPrefixOptionalWhenFormatting = false; - domesticCarrierCodeFormattingRule = ""; - cachedSize = -1; - return this; - } - - @Override - public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output) - throws java.io.IOException { - output.writeString(1, this.pattern); - output.writeString(2, this.format); - if (this.leadingDigitsPattern != null && this.leadingDigitsPattern.length > 0) { - for (int i = 0; i < this.leadingDigitsPattern.length; i++) { - java.lang.String element = this.leadingDigitsPattern[i]; - if (element != null) { - output.writeString(3, element); - } - } - } - if (!this.nationalPrefixFormattingRule.equals("")) { - output.writeString(4, this.nationalPrefixFormattingRule); - } - if (!this.domesticCarrierCodeFormattingRule.equals("")) { - output.writeString(5, this.domesticCarrierCodeFormattingRule); - } - if (this.nationalPrefixOptionalWhenFormatting != false) { - output.writeBool(6, this.nationalPrefixOptionalWhenFormatting); - } - super.writeTo(output); - } - - @Override - protected int computeSerializedSize() { - int size = super.computeSerializedSize(); - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(1, this.pattern); - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(2, this.format); - if (this.leadingDigitsPattern != null && this.leadingDigitsPattern.length > 0) { - int dataCount = 0; - int dataSize = 0; - for (int i = 0; i < this.leadingDigitsPattern.length; i++) { - java.lang.String element = this.leadingDigitsPattern[i]; - if (element != null) { - dataCount++; - dataSize += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSizeNoTag(element); - } - } - size += dataSize; - size += 1 * dataCount; - } - if (!this.nationalPrefixFormattingRule.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(4, this.nationalPrefixFormattingRule); - } - if (!this.domesticCarrierCodeFormattingRule.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(5, this.domesticCarrierCodeFormattingRule); - } - if (this.nationalPrefixOptionalWhenFormatting != false) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeBoolSize(6, this.nationalPrefixOptionalWhenFormatting); - } - return size; - } - - @Override - public NumberFormat mergeFrom( - com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - return this; - default: { - if (!com.google.protobuf.nano.WireFormatNano.parseUnknownField(input, tag)) { - return this; - } - break; - } - case 10: { - this.pattern = input.readString(); - break; - } - case 18: { - this.format = input.readString(); - break; - } - case 26: { - int arrayLength = com.google.protobuf.nano.WireFormatNano - .getRepeatedFieldArrayLength(input, 26); - int i = this.leadingDigitsPattern == null ? 0 : this.leadingDigitsPattern.length; - java.lang.String[] newArray = new java.lang.String[i + arrayLength]; - if (i != 0) { - java.lang.System.arraycopy(this.leadingDigitsPattern, 0, newArray, 0, i); - } - for (; i < newArray.length - 1; i++) { - newArray[i] = input.readString(); - input.readTag(); - } - // Last one without readTag. - newArray[i] = input.readString(); - this.leadingDigitsPattern = newArray; - break; - } - case 34: { - this.nationalPrefixFormattingRule = input.readString(); - break; - } - case 42: { - this.domesticCarrierCodeFormattingRule = input.readString(); - break; - } - case 48: { - this.nationalPrefixOptionalWhenFormatting = input.readBool(); - break; - } - } - } - } - - public static NumberFormat parseFrom(byte[] data) - throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { - return com.google.protobuf.nano.MessageNano.mergeFrom(new NumberFormat(), data); - } - - public static NumberFormat parseFrom( - com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - return new NumberFormat().mergeFrom(input); - } - } - - public static final class PhoneNumberDesc extends - com.google.protobuf.nano.MessageNano { - - private static volatile PhoneNumberDesc[] _emptyArray; - public static PhoneNumberDesc[] emptyArray() { - // Lazily initializes the empty array - if (_emptyArray == null) { - synchronized ( - com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { - if (_emptyArray == null) { - _emptyArray = new PhoneNumberDesc[0]; - } - } - } - return _emptyArray; - } - - // optional string national_number_pattern = 2; - public java.lang.String nationalNumberPattern; - - // optional string possible_number_pattern = 3; - public java.lang.String possibleNumberPattern; - - // optional string example_number = 6; - public java.lang.String exampleNumber; - - public PhoneNumberDesc() { - clear(); - } - - public PhoneNumberDesc clear() { - nationalNumberPattern = ""; - possibleNumberPattern = ""; - exampleNumber = ""; - cachedSize = -1; - return this; - } - - @Override - public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output) - throws java.io.IOException { - if (!this.nationalNumberPattern.equals("")) { - output.writeString(2, this.nationalNumberPattern); - } - if (!this.possibleNumberPattern.equals("")) { - output.writeString(3, this.possibleNumberPattern); - } - if (!this.exampleNumber.equals("")) { - output.writeString(6, this.exampleNumber); - } - super.writeTo(output); - } - - @Override - protected int computeSerializedSize() { - int size = super.computeSerializedSize(); - if (!this.nationalNumberPattern.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(2, this.nationalNumberPattern); - } - if (!this.possibleNumberPattern.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(3, this.possibleNumberPattern); - } - if (!this.exampleNumber.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(6, this.exampleNumber); - } - return size; - } - - @Override - public PhoneNumberDesc mergeFrom( - com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - return this; - default: { - if (!com.google.protobuf.nano.WireFormatNano.parseUnknownField(input, tag)) { - return this; - } - break; - } - case 18: { - this.nationalNumberPattern = input.readString(); - break; - } - case 26: { - this.possibleNumberPattern = input.readString(); - break; - } - case 50: { - this.exampleNumber = input.readString(); - break; - } - } - } - } - - public static PhoneNumberDesc parseFrom(byte[] data) - throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { - return com.google.protobuf.nano.MessageNano.mergeFrom(new PhoneNumberDesc(), data); - } - - public static PhoneNumberDesc parseFrom( - com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - return new PhoneNumberDesc().mergeFrom(input); - } - } - - public static final class PhoneMetadata extends - com.google.protobuf.nano.MessageNano { - - private static volatile PhoneMetadata[] _emptyArray; - public static PhoneMetadata[] emptyArray() { - // Lazily initializes the empty array - if (_emptyArray == null) { - synchronized ( - com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { - if (_emptyArray == null) { - _emptyArray = new PhoneMetadata[0]; - } - } - } - return _emptyArray; - } - - // optional .i18n.phonenumbers.PhoneNumberDesc general_desc = 1; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc generalDesc; - - // optional .i18n.phonenumbers.PhoneNumberDesc fixed_line = 2; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc fixedLine; - - // optional .i18n.phonenumbers.PhoneNumberDesc mobile = 3; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc mobile; - - // optional .i18n.phonenumbers.PhoneNumberDesc toll_free = 4; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc tollFree; - - // optional .i18n.phonenumbers.PhoneNumberDesc premium_rate = 5; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc premiumRate; - - // optional .i18n.phonenumbers.PhoneNumberDesc shared_cost = 6; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc sharedCost; - - // optional .i18n.phonenumbers.PhoneNumberDesc personal_number = 7; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc personalNumber; - - // optional .i18n.phonenumbers.PhoneNumberDesc voip = 8; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc voip; - - // optional .i18n.phonenumbers.PhoneNumberDesc pager = 21; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc pager; - - // optional .i18n.phonenumbers.PhoneNumberDesc uan = 25; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc uan; - - // optional .i18n.phonenumbers.PhoneNumberDesc emergency = 27; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc emergency; - - // optional .i18n.phonenumbers.PhoneNumberDesc voicemail = 28; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc voicemail; - - // optional .i18n.phonenumbers.PhoneNumberDesc short_code = 29; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc shortCode; - - // optional .i18n.phonenumbers.PhoneNumberDesc standard_rate = 30; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc standardRate; - - // optional .i18n.phonenumbers.PhoneNumberDesc carrier_specific = 31; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc carrierSpecific; - - // optional .i18n.phonenumbers.PhoneNumberDesc no_international_dialling = 24; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc noInternationalDialling; - - // required string id = 9; - public java.lang.String id; - - // optional int32 country_code = 10; - public int countryCode; - - // optional string international_prefix = 11; - public java.lang.String internationalPrefix; - - // optional string preferred_international_prefix = 17; - public java.lang.String preferredInternationalPrefix; - - // optional string national_prefix = 12; - public java.lang.String nationalPrefix; - - // optional string preferred_extn_prefix = 13; - public java.lang.String preferredExtnPrefix; - - // optional string national_prefix_for_parsing = 15; - public java.lang.String nationalPrefixForParsing; - - // optional string national_prefix_transform_rule = 16; - public java.lang.String nationalPrefixTransformRule; - - // optional bool same_mobile_and_fixed_line_pattern = 18 [default = false]; - public boolean sameMobileAndFixedLinePattern; - - // repeated .i18n.phonenumbers.NumberFormat number_format = 19; - public com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat[] numberFormat; - - // repeated .i18n.phonenumbers.NumberFormat intl_number_format = 20; - public com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat[] intlNumberFormat; - - // optional bool main_country_for_code = 22 [default = false]; - public boolean mainCountryForCode; - - // optional string leading_digits = 23; - public java.lang.String leadingDigits; - - // optional bool leading_zero_possible = 26 [default = false]; - public boolean leadingZeroPossible; - - // optional bool mobile_number_portable_region = 32 [default = false]; - public boolean mobileNumberPortableRegion; - - public PhoneMetadata() { - clear(); - } - - public PhoneMetadata clear() { - generalDesc = null; - fixedLine = null; - mobile = null; - tollFree = null; - premiumRate = null; - sharedCost = null; - personalNumber = null; - voip = null; - pager = null; - uan = null; - emergency = null; - voicemail = null; - shortCode = null; - standardRate = null; - carrierSpecific = null; - noInternationalDialling = null; - id = ""; - countryCode = 0; - internationalPrefix = ""; - preferredInternationalPrefix = ""; - nationalPrefix = ""; - preferredExtnPrefix = ""; - nationalPrefixForParsing = ""; - nationalPrefixTransformRule = ""; - sameMobileAndFixedLinePattern = false; - numberFormat = com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat.emptyArray(); - intlNumberFormat = com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat.emptyArray(); - mainCountryForCode = false; - leadingDigits = ""; - leadingZeroPossible = false; - mobileNumberPortableRegion = false; - cachedSize = -1; - return this; - } - - @Override - public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output) - throws java.io.IOException { - if (this.generalDesc != null) { - output.writeMessage(1, this.generalDesc); - } - if (this.fixedLine != null) { - output.writeMessage(2, this.fixedLine); - } - if (this.mobile != null) { - output.writeMessage(3, this.mobile); - } - if (this.tollFree != null) { - output.writeMessage(4, this.tollFree); - } - if (this.premiumRate != null) { - output.writeMessage(5, this.premiumRate); - } - if (this.sharedCost != null) { - output.writeMessage(6, this.sharedCost); - } - if (this.personalNumber != null) { - output.writeMessage(7, this.personalNumber); - } - if (this.voip != null) { - output.writeMessage(8, this.voip); - } - output.writeString(9, this.id); - if (this.countryCode != 0) { - output.writeInt32(10, this.countryCode); - } - if (!this.internationalPrefix.equals("")) { - output.writeString(11, this.internationalPrefix); - } - if (!this.nationalPrefix.equals("")) { - output.writeString(12, this.nationalPrefix); - } - if (!this.preferredExtnPrefix.equals("")) { - output.writeString(13, this.preferredExtnPrefix); - } - if (!this.nationalPrefixForParsing.equals("")) { - output.writeString(15, this.nationalPrefixForParsing); - } - if (!this.nationalPrefixTransformRule.equals("")) { - output.writeString(16, this.nationalPrefixTransformRule); - } - if (!this.preferredInternationalPrefix.equals("")) { - output.writeString(17, this.preferredInternationalPrefix); - } - if (this.sameMobileAndFixedLinePattern != false) { - output.writeBool(18, this.sameMobileAndFixedLinePattern); - } - if (this.numberFormat != null && this.numberFormat.length > 0) { - for (int i = 0; i < this.numberFormat.length; i++) { - com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat element = this.numberFormat[i]; - if (element != null) { - output.writeMessage(19, element); - } - } - } - if (this.intlNumberFormat != null && this.intlNumberFormat.length > 0) { - for (int i = 0; i < this.intlNumberFormat.length; i++) { - com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat element = this.intlNumberFormat[i]; - if (element != null) { - output.writeMessage(20, element); - } - } - } - if (this.pager != null) { - output.writeMessage(21, this.pager); - } - if (this.mainCountryForCode != false) { - output.writeBool(22, this.mainCountryForCode); - } - if (!this.leadingDigits.equals("")) { - output.writeString(23, this.leadingDigits); - } - if (this.noInternationalDialling != null) { - output.writeMessage(24, this.noInternationalDialling); - } - if (this.uan != null) { - output.writeMessage(25, this.uan); - } - if (this.leadingZeroPossible != false) { - output.writeBool(26, this.leadingZeroPossible); - } - if (this.emergency != null) { - output.writeMessage(27, this.emergency); - } - if (this.voicemail != null) { - output.writeMessage(28, this.voicemail); - } - if (this.shortCode != null) { - output.writeMessage(29, this.shortCode); - } - if (this.standardRate != null) { - output.writeMessage(30, this.standardRate); - } - if (this.carrierSpecific != null) { - output.writeMessage(31, this.carrierSpecific); - } - if (this.mobileNumberPortableRegion != false) { - output.writeBool(32, this.mobileNumberPortableRegion); - } - super.writeTo(output); - } - - @Override - protected int computeSerializedSize() { - int size = super.computeSerializedSize(); - if (this.generalDesc != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(1, this.generalDesc); - } - if (this.fixedLine != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(2, this.fixedLine); - } - if (this.mobile != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(3, this.mobile); - } - if (this.tollFree != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(4, this.tollFree); - } - if (this.premiumRate != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(5, this.premiumRate); - } - if (this.sharedCost != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(6, this.sharedCost); - } - if (this.personalNumber != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(7, this.personalNumber); - } - if (this.voip != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(8, this.voip); - } - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(9, this.id); - if (this.countryCode != 0) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeInt32Size(10, this.countryCode); - } - if (!this.internationalPrefix.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(11, this.internationalPrefix); - } - if (!this.nationalPrefix.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(12, this.nationalPrefix); - } - if (!this.preferredExtnPrefix.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(13, this.preferredExtnPrefix); - } - if (!this.nationalPrefixForParsing.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(15, this.nationalPrefixForParsing); - } - if (!this.nationalPrefixTransformRule.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(16, this.nationalPrefixTransformRule); - } - if (!this.preferredInternationalPrefix.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(17, this.preferredInternationalPrefix); - } - if (this.sameMobileAndFixedLinePattern != false) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeBoolSize(18, this.sameMobileAndFixedLinePattern); - } - if (this.numberFormat != null && this.numberFormat.length > 0) { - for (int i = 0; i < this.numberFormat.length; i++) { - com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat element = this.numberFormat[i]; - if (element != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(19, element); - } - } - } - if (this.intlNumberFormat != null && this.intlNumberFormat.length > 0) { - for (int i = 0; i < this.intlNumberFormat.length; i++) { - com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat element = this.intlNumberFormat[i]; - if (element != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(20, element); - } - } - } - if (this.pager != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(21, this.pager); - } - if (this.mainCountryForCode != false) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeBoolSize(22, this.mainCountryForCode); - } - if (!this.leadingDigits.equals("")) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeStringSize(23, this.leadingDigits); - } - if (this.noInternationalDialling != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(24, this.noInternationalDialling); - } - if (this.uan != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(25, this.uan); - } - if (this.leadingZeroPossible != false) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeBoolSize(26, this.leadingZeroPossible); - } - if (this.emergency != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(27, this.emergency); - } - if (this.voicemail != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(28, this.voicemail); - } - if (this.shortCode != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(29, this.shortCode); - } - if (this.standardRate != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(30, this.standardRate); - } - if (this.carrierSpecific != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(31, this.carrierSpecific); - } - if (this.mobileNumberPortableRegion != false) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeBoolSize(32, this.mobileNumberPortableRegion); - } - return size; - } - - @Override - public PhoneMetadata mergeFrom( - com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - return this; - default: { - if (!com.google.protobuf.nano.WireFormatNano.parseUnknownField(input, tag)) { - return this; - } - break; - } - case 10: { - if (this.generalDesc == null) { - this.generalDesc = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.generalDesc); - break; - } - case 18: { - if (this.fixedLine == null) { - this.fixedLine = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.fixedLine); - break; - } - case 26: { - if (this.mobile == null) { - this.mobile = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.mobile); - break; - } - case 34: { - if (this.tollFree == null) { - this.tollFree = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.tollFree); - break; - } - case 42: { - if (this.premiumRate == null) { - this.premiumRate = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.premiumRate); - break; - } - case 50: { - if (this.sharedCost == null) { - this.sharedCost = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.sharedCost); - break; - } - case 58: { - if (this.personalNumber == null) { - this.personalNumber = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.personalNumber); - break; - } - case 66: { - if (this.voip == null) { - this.voip = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.voip); - break; - } - case 74: { - this.id = input.readString(); - break; - } - case 80: { - this.countryCode = input.readInt32(); - break; - } - case 90: { - this.internationalPrefix = input.readString(); - break; - } - case 98: { - this.nationalPrefix = input.readString(); - break; - } - case 106: { - this.preferredExtnPrefix = input.readString(); - break; - } - case 122: { - this.nationalPrefixForParsing = input.readString(); - break; - } - case 130: { - this.nationalPrefixTransformRule = input.readString(); - break; - } - case 138: { - this.preferredInternationalPrefix = input.readString(); - break; - } - case 144: { - this.sameMobileAndFixedLinePattern = input.readBool(); - break; - } - case 154: { - int arrayLength = com.google.protobuf.nano.WireFormatNano - .getRepeatedFieldArrayLength(input, 154); - int i = this.numberFormat == null ? 0 : this.numberFormat.length; - com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat[] newArray = - new com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat[i + arrayLength]; - if (i != 0) { - java.lang.System.arraycopy(this.numberFormat, 0, newArray, 0, i); - } - for (; i < newArray.length - 1; i++) { - newArray[i] = new com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat(); - input.readMessage(newArray[i]); - input.readTag(); - } - // Last one without readTag. - newArray[i] = new com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat(); - input.readMessage(newArray[i]); - this.numberFormat = newArray; - break; - } - case 162: { - int arrayLength = com.google.protobuf.nano.WireFormatNano - .getRepeatedFieldArrayLength(input, 162); - int i = this.intlNumberFormat == null ? 0 : this.intlNumberFormat.length; - com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat[] newArray = - new com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat[i + arrayLength]; - if (i != 0) { - java.lang.System.arraycopy(this.intlNumberFormat, 0, newArray, 0, i); - } - for (; i < newArray.length - 1; i++) { - newArray[i] = new com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat(); - input.readMessage(newArray[i]); - input.readTag(); - } - // Last one without readTag. - newArray[i] = new com.google.i18n.phonenumbers.nano.Phonemetadata.NumberFormat(); - input.readMessage(newArray[i]); - this.intlNumberFormat = newArray; - break; - } - case 170: { - if (this.pager == null) { - this.pager = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.pager); - break; - } - case 176: { - this.mainCountryForCode = input.readBool(); - break; - } - case 186: { - this.leadingDigits = input.readString(); - break; - } - case 194: { - if (this.noInternationalDialling == null) { - this.noInternationalDialling = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.noInternationalDialling); - break; - } - case 202: { - if (this.uan == null) { - this.uan = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.uan); - break; - } - case 208: { - this.leadingZeroPossible = input.readBool(); - break; - } - case 218: { - if (this.emergency == null) { - this.emergency = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.emergency); - break; - } - case 226: { - if (this.voicemail == null) { - this.voicemail = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.voicemail); - break; - } - case 234: { - if (this.shortCode == null) { - this.shortCode = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.shortCode); - break; - } - case 242: { - if (this.standardRate == null) { - this.standardRate = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.standardRate); - break; - } - case 250: { - if (this.carrierSpecific == null) { - this.carrierSpecific = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneNumberDesc(); - } - input.readMessage(this.carrierSpecific); - break; - } - case 256: { - this.mobileNumberPortableRegion = input.readBool(); - break; - } - } - } - } - - public static PhoneMetadata parseFrom(byte[] data) - throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { - return com.google.protobuf.nano.MessageNano.mergeFrom(new PhoneMetadata(), data); - } - - public static PhoneMetadata parseFrom( - com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - return new PhoneMetadata().mergeFrom(input); - } - } - - public static final class PhoneMetadataCollection extends - com.google.protobuf.nano.MessageNano { - - private static volatile PhoneMetadataCollection[] _emptyArray; - public static PhoneMetadataCollection[] emptyArray() { - // Lazily initializes the empty array - if (_emptyArray == null) { - synchronized ( - com.google.protobuf.nano.InternalNano.LAZY_INIT_LOCK) { - if (_emptyArray == null) { - _emptyArray = new PhoneMetadataCollection[0]; - } - } - } - return _emptyArray; - } - - // repeated .i18n.phonenumbers.PhoneMetadata metadata = 1; - public com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata[] metadata; - - public PhoneMetadataCollection() { - clear(); - } - - public PhoneMetadataCollection clear() { - metadata = com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata.emptyArray(); - cachedSize = -1; - return this; - } - - @Override - public void writeTo(com.google.protobuf.nano.CodedOutputByteBufferNano output) - throws java.io.IOException { - if (this.metadata != null && this.metadata.length > 0) { - for (int i = 0; i < this.metadata.length; i++) { - com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata element = this.metadata[i]; - if (element != null) { - output.writeMessage(1, element); - } - } - } - super.writeTo(output); - } - - @Override - protected int computeSerializedSize() { - int size = super.computeSerializedSize(); - if (this.metadata != null && this.metadata.length > 0) { - for (int i = 0; i < this.metadata.length; i++) { - com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata element = this.metadata[i]; - if (element != null) { - size += com.google.protobuf.nano.CodedOutputByteBufferNano - .computeMessageSize(1, element); - } - } - } - return size; - } - - @Override - public PhoneMetadataCollection mergeFrom( - com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - while (true) { - int tag = input.readTag(); - switch (tag) { - case 0: - return this; - default: { - if (!com.google.protobuf.nano.WireFormatNano.parseUnknownField(input, tag)) { - return this; - } - break; - } - case 10: { - int arrayLength = com.google.protobuf.nano.WireFormatNano - .getRepeatedFieldArrayLength(input, 10); - int i = this.metadata == null ? 0 : this.metadata.length; - com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata[] newArray = - new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata[i + arrayLength]; - if (i != 0) { - java.lang.System.arraycopy(this.metadata, 0, newArray, 0, i); - } - for (; i < newArray.length - 1; i++) { - newArray[i] = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata(); - input.readMessage(newArray[i]); - input.readTag(); - } - // Last one without readTag. - newArray[i] = new com.google.i18n.phonenumbers.nano.Phonemetadata.PhoneMetadata(); - input.readMessage(newArray[i]); - this.metadata = newArray; - break; - } - } - } - } - - public static PhoneMetadataCollection parseFrom(byte[] data) - throws com.google.protobuf.nano.InvalidProtocolBufferNanoException { - return com.google.protobuf.nano.MessageNano.mergeFrom(new PhoneMetadataCollection(), data); - } - - public static PhoneMetadataCollection parseFrom( - com.google.protobuf.nano.CodedInputByteBufferNano input) - throws java.io.IOException { - return new PhoneMetadataCollection().mergeFrom(input); - } - } -} |