@ -47,6 +47,28 @@ public final class Phonemetadata {
public NumberFormat build ( ) {
public NumberFormat build ( ) {
return this ;
return this ;
}
}
public Builder mergeFrom ( NumberFormat other ) {
if ( other . hasPattern ( ) ) {
setPattern ( other . getPattern ( ) ) ;
}
if ( other . hasFormat ( ) ) {
setFormat ( other . getFormat ( ) ) ;
}
for ( int i = 0 ; i < other . leadingDigitsPatternSize ( ) ; i + + ) {
addLeadingDigitsPattern ( other . getLeadingDigitsPattern ( i ) ) ;
}
if ( other . hasNationalPrefixFormattingRule ( ) ) {
setNationalPrefixFormattingRule ( other . getNationalPrefixFormattingRule ( ) ) ;
}
if ( other . hasDomesticCarrierCodeFormattingRule ( ) ) {
setDomesticCarrierCodeFormattingRule ( other . getDomesticCarrierCodeFormattingRule ( ) ) ;
}
if ( other . hasNationalPrefixOptionalWhenFormatting ( ) ) {
setNationalPrefixOptionalWhenFormatting ( other . isNationalPrefixOptionalWhenFormatting ( ) ) ;
}
return this ;
}
}
}
public static Builder newBuilder ( ) {
public static Builder newBuilder ( ) {
@ -134,27 +156,6 @@ public final class Phonemetadata {
return this ;
return this ;
}
}
public NumberFormat mergeFrom ( NumberFormat other ) {
if ( other . hasPattern ( ) ) {
setPattern ( other . getPattern ( ) ) ;
}
if ( other . hasFormat ( ) ) {
setFormat ( other . getFormat ( ) ) ;
}
int leadingDigitsPatternSize = other . leadingDigitsPatternSize ( ) ;
for ( int i = 0 ; i < leadingDigitsPatternSize ; i + + ) {
addLeadingDigitsPattern ( other . getLeadingDigitsPattern ( i ) ) ;
}
if ( other . hasNationalPrefixFormattingRule ( ) ) {
setNationalPrefixFormattingRule ( other . getNationalPrefixFormattingRule ( ) ) ;
}
if ( other . hasDomesticCarrierCodeFormattingRule ( ) ) {
setDomesticCarrierCodeFormattingRule ( other . getDomesticCarrierCodeFormattingRule ( ) ) ;
}
setNationalPrefixOptionalWhenFormatting ( other . isNationalPrefixOptionalWhenFormatting ( ) ) ;
return this ;
}
public void writeExternal ( ObjectOutput objectOutput ) throws IOException {
public void writeExternal ( ObjectOutput objectOutput ) throws IOException {
objectOutput . writeUTF ( pattern_ ) ;
objectOutput . writeUTF ( pattern_ ) ;
objectOutput . writeUTF ( format_ ) ;
objectOutput . writeUTF ( format_ ) ;
@ -205,7 +206,27 @@ public final class Phonemetadata {
public PhoneNumberDesc build ( ) {
public PhoneNumberDesc build ( ) {
return this ;
return this ;
}
}
public Builder mergeFrom ( PhoneNumberDesc other ) {
if ( other . hasNationalNumberPattern ( ) ) {
setNationalNumberPattern ( other . getNationalNumberPattern ( ) ) ;
}
if ( other . hasPossibleNumberPattern ( ) ) {
setPossibleNumberPattern ( other . getPossibleNumberPattern ( ) ) ;
}
for ( int i = 0 ; i < other . getPossibleLengthCount ( ) ; i + + ) {
addPossibleLength ( other . getPossibleLength ( i ) ) ;
}
for ( int i = 0 ; i < other . getPossibleLengthLocalOnlyCount ( ) ; i + + ) {
addPossibleLengthLocalOnly ( other . getPossibleLengthLocalOnly ( i ) ) ;
}
if ( other . hasExampleNumber ( ) ) {
setExampleNumber ( other . getExampleNumber ( ) ) ;
}
return this ;
}
}
}
public static Builder newBuilder ( ) {
public static Builder newBuilder ( ) {
return new Builder ( ) ;
return new Builder ( ) ;
}
}
@ -220,6 +241,11 @@ 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 ;
@ -231,6 +257,11 @@ public final class Phonemetadata {
possibleNumberPattern_ = value ;
possibleNumberPattern_ = value ;
return this ;
return this ;
}
}
public PhoneNumberDesc clearPossibleNumberPattern ( ) {
hasPossibleNumberPattern = false ;
possibleNumberPattern_ = "" ;
return this ;
}
/ / repeated int32 possible_length = 9 ;
/ / repeated int32 possible_length = 9 ;
private java . util . List < Integer > possibleLength_ = new java . util . ArrayList < Integer > ( ) ;
private java . util . List < Integer > possibleLength_ = new java . util . ArrayList < Integer > ( ) ;
@ -278,23 +309,9 @@ public final class Phonemetadata {
exampleNumber_ = value ;
exampleNumber_ = value ;
return this ;
return this ;
}
}
public PhoneNumberDesc mergeFrom ( PhoneNumberDesc other ) {
if ( other . hasNationalNumberPattern ( ) ) {
setNationalNumberPattern ( other . getNationalNumberPattern ( ) ) ;
}
if ( other . hasPossibleNumberPattern ( ) ) {
setPossibleNumberPattern ( other . getPossibleNumberPattern ( ) ) ;
}
for ( int i = 0 ; i < other . getPossibleLengthCount ( ) ; i + + ) {
addPossibleLength ( other . getPossibleLength ( i ) ) ;
}
for ( int i = 0 ; i < other . getPossibleLengthLocalOnlyCount ( ) ; i + + ) {
addPossibleLengthLocalOnly ( other . getPossibleLengthLocalOnly ( i ) ) ;
}
if ( other . hasExampleNumber ( ) ) {
setExampleNumber ( other . getExampleNumber ( ) ) ;
}
public PhoneNumberDesc clearExampleNumber ( ) {
hasExampleNumber = false ;
exampleNumber_ = "" ;
return this ;
return this ;
}
}
@ -645,6 +662,11 @@ 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 ;
@ -656,6 +678,11 @@ 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 ;
@ -667,6 +694,11 @@ 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 ;
@ -689,6 +721,11 @@ 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 ;
@ -700,6 +737,11 @@ 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_ = new java . util . ArrayList < NumberFormat > ( ) ;
private java . util . List < NumberFormat > numberFormat_ = new java . util . ArrayList < NumberFormat > ( ) ;
@ -754,6 +796,11 @@ public final class Phonemetadata {
mainCountryForCode_ = value ;
mainCountryForCode_ = value ;
return this ;
return this ;
}
}
public PhoneMetadata clearMainCountryForCode ( ) {
hasMainCountryForCode = false ;
mainCountryForCode_ = false ;
return this ;
}
/ / optional string leading_digits = 23 ;
/ / optional string leading_digits = 23 ;
private boolean hasLeadingDigits ;
private boolean hasLeadingDigits ;
@ -776,6 +823,11 @@ public final class Phonemetadata {
leadingZeroPossible_ = value ;
leadingZeroPossible_ = value ;
return this ;
return this ;
}
}
public PhoneMetadata clearLeadingZeroPossible ( ) {
hasLeadingZeroPossible = false ;
leadingZeroPossible_ = false ;
return this ;
}
/ / optional bool mobile_number_portable_region = 32 [ default = false ] ;
/ / optional bool mobile_number_portable_region = 32 [ default = false ] ;
private boolean hasMobileNumberPortableRegion ;
private boolean hasMobileNumberPortableRegion ;
@ -787,6 +839,11 @@ public final class Phonemetadata {
mobileNumberPortableRegion_ = value ;
mobileNumberPortableRegion_ = value ;
return this ;
return this ;
}
}
public PhoneMetadata clearMobileNumberPortableRegion ( ) {
hasMobileNumberPortableRegion = false ;
mobileNumberPortableRegion_ = false ;
return this ;
}
public void writeExternal ( ObjectOutput objectOutput ) throws IOException {
public void writeExternal ( ObjectOutput objectOutput ) throws IOException {
objectOutput . writeBoolean ( hasGeneralDesc ) ;
objectOutput . writeBoolean ( hasGeneralDesc ) ;