| @ -1,524 +1,187 @@ | |||
| // Generated by the protocol buffer compiler. DO NOT EDIT! | |||
| // source: phonenumber.proto | |||
| /* | |||
| * Copyright (C) 2009 Google Inc. | |||
| * | |||
| * Licensed under the Apache License, Version 2.0 (the "License"); | |||
| * you may not use this file except in compliance with the License. | |||
| * You may obtain a copy of the License at | |||
| * | |||
| * http://www.apache.org/licenses/LICENSE-2.0 | |||
| * | |||
| * Unless required by applicable law or agreed to in writing, software | |||
| * distributed under the License is distributed on an "AS IS" BASIS, | |||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
| * See the License for the specific language governing permissions and | |||
| * limitations under the License. | |||
| */ | |||
| /** | |||
| * Definition of the class representing international telephone numbers. This class is hand created | |||
| * based on the class file compiled from phonenumber.proto. Please refer to that file for detailed | |||
| * descriptions of the meaning of each field. | |||
| * | |||
| * @author Shaopeng Jia | |||
| */ | |||
| package com.google.i18n.phonenumbers; | |||
| import java.io.Serializable; | |||
| public final class Phonenumber { | |||
| private Phonenumber() {} | |||
| public static void registerAllExtensions( | |||
| com.google.protobuf.ExtensionRegistryLite registry) { | |||
| } | |||
| public static final class PhoneNumber extends | |||
| com.google.protobuf.GeneratedMessageLite { | |||
| // Use PhoneNumber.newBuilder() to construct. | |||
| private PhoneNumber() { | |||
| initFields(); | |||
| } | |||
| private PhoneNumber(boolean noInit) {} | |||
| private static final PhoneNumber defaultInstance; | |||
| public static PhoneNumber getDefaultInstance() { | |||
| return defaultInstance; | |||
| } | |||
| public PhoneNumber getDefaultInstanceForType() { | |||
| return defaultInstance; | |||
| public static final class PhoneNumber implements Serializable { | |||
| public enum CountryCodeSource { | |||
| FROM_NUMBER_WITH_PLUS_SIGN, | |||
| FROM_NUMBER_WITH_IDD, | |||
| FROM_NUMBER_WITHOUT_PLUS_SIGN, | |||
| FROM_DEFAULT_COUNTRY | |||
| } | |||
| public enum CountryCodeSource | |||
| implements com.google.protobuf.Internal.EnumLite { | |||
| FROM_NUMBER_WITH_PLUS_SIGN(0, 1), | |||
| FROM_NUMBER_WITH_IDD(1, 5), | |||
| FROM_NUMBER_WITHOUT_PLUS_SIGN(2, 10), | |||
| FROM_DEFAULT_COUNTRY(3, 20), | |||
| ; | |||
| public final int getNumber() { return value; } | |||
| public static CountryCodeSource valueOf(int value) { | |||
| switch (value) { | |||
| case 1: return FROM_NUMBER_WITH_PLUS_SIGN; | |||
| case 5: return FROM_NUMBER_WITH_IDD; | |||
| case 10: return FROM_NUMBER_WITHOUT_PLUS_SIGN; | |||
| case 20: return FROM_DEFAULT_COUNTRY; | |||
| default: return null; | |||
| } | |||
| } | |||
| public static com.google.protobuf.Internal.EnumLiteMap<CountryCodeSource> | |||
| internalGetValueMap() { | |||
| return internalValueMap; | |||
| } | |||
| private static com.google.protobuf.Internal.EnumLiteMap<CountryCodeSource> | |||
| internalValueMap = | |||
| new com.google.protobuf.Internal.EnumLiteMap<CountryCodeSource>() { | |||
| public CountryCodeSource findValueByNumber(int number) { | |||
| return CountryCodeSource.valueOf(number) | |||
| ; } | |||
| }; | |||
| private final int index; | |||
| private final int value; | |||
| private CountryCodeSource(int index, int value) { | |||
| this.index = index; | |||
| this.value = value; | |||
| } | |||
| // @@protoc_insertion_point(enum_scope:i18n.phonenumbers.PhoneNumber.CountryCodeSource) | |||
| public PhoneNumber() { | |||
| countryCodeSource_ = CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN; | |||
| } | |||
| // required int32 country_code = 1; | |||
| public static final int COUNTRY_CODE_FIELD_NUMBER = 1; | |||
| private boolean hasCountryCode; | |||
| private int countryCode_ = 0; | |||
| public boolean hasCountryCode() { return hasCountryCode; } | |||
| public int getCountryCode() { return countryCode_; } | |||
| public PhoneNumber setCountryCode(int value) { | |||
| hasCountryCode = true; | |||
| countryCode_ = value; | |||
| return this; | |||
| } | |||
| public PhoneNumber clearCountryCode() { | |||
| hasCountryCode = false; | |||
| countryCode_ = 0; | |||
| return this; | |||
| } | |||
| // required uint64 national_number = 2; | |||
| public static final int NATIONAL_NUMBER_FIELD_NUMBER = 2; | |||
| private boolean hasNationalNumber; | |||
| private long nationalNumber_ = 0L; | |||
| public boolean hasNationalNumber() { return hasNationalNumber; } | |||
| public long getNationalNumber() { return nationalNumber_; } | |||
| public PhoneNumber setNationalNumber(long value) { | |||
| hasNationalNumber = true; | |||
| nationalNumber_ = value; | |||
| return this; | |||
| } | |||
| public PhoneNumber clearNationalNumber() { | |||
| hasNationalNumber = false; | |||
| nationalNumber_ = 0L; | |||
| return this; | |||
| } | |||
| // optional string extension = 3; | |||
| public static final int EXTENSION_FIELD_NUMBER = 3; | |||
| private boolean hasExtension; | |||
| private java.lang.String extension_ = ""; | |||
| public boolean hasExtension() { return hasExtension; } | |||
| public java.lang.String getExtension() { return extension_; } | |||
| public String getExtension() { return extension_; } | |||
| public PhoneNumber setExtension(String value) { | |||
| if (value == null) { | |||
| throw new NullPointerException(); | |||
| } | |||
| hasExtension = true; | |||
| extension_ = value; | |||
| return this; | |||
| } | |||
| public PhoneNumber clearExtension() { | |||
| hasExtension = false; | |||
| extension_ = ""; | |||
| return this; | |||
| } | |||
| // optional bool italian_leading_zero = 4; | |||
| public static final int ITALIAN_LEADING_ZERO_FIELD_NUMBER = 4; | |||
| private boolean hasItalianLeadingZero; | |||
| private boolean italianLeadingZero_ = false; | |||
| public boolean hasItalianLeadingZero() { return hasItalianLeadingZero; } | |||
| public boolean getItalianLeadingZero() { return italianLeadingZero_; } | |||
| public PhoneNumber setItalianLeadingZero(boolean value) { | |||
| hasItalianLeadingZero = true; | |||
| italianLeadingZero_ = value; | |||
| return this; | |||
| } | |||
| public PhoneNumber clearItalianLeadingZero() { | |||
| hasItalianLeadingZero = false; | |||
| italianLeadingZero_ = false; | |||
| return this; | |||
| } | |||
| // optional string raw_input = 5; | |||
| public static final int RAW_INPUT_FIELD_NUMBER = 5; | |||
| private boolean hasRawInput; | |||
| private java.lang.String rawInput_ = ""; | |||
| private String rawInput_ = ""; | |||
| public boolean hasRawInput() { return hasRawInput; } | |||
| public java.lang.String getRawInput() { return rawInput_; } | |||
| // optional .i18n.phonenumbers.PhoneNumber.CountryCodeSource country_code_source = 6; | |||
| public static final int COUNTRY_CODE_SOURCE_FIELD_NUMBER = 6; | |||
| private boolean hasCountryCodeSource; | |||
| private com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.CountryCodeSource countryCodeSource_; | |||
| public boolean hasCountryCodeSource() { return hasCountryCodeSource; } | |||
| public com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.CountryCodeSource getCountryCodeSource() { return countryCodeSource_; } | |||
| private void initFields() { | |||
| countryCodeSource_ = com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN; | |||
| } | |||
| public final boolean isInitialized() { | |||
| if (!hasCountryCode) return false; | |||
| if (!hasNationalNumber) return false; | |||
| return true; | |||
| } | |||
| public void writeTo(com.google.protobuf.CodedOutputStream output) | |||
| throws java.io.IOException { | |||
| getSerializedSize(); | |||
| if (hasCountryCode()) { | |||
| output.writeInt32(1, getCountryCode()); | |||
| } | |||
| if (hasNationalNumber()) { | |||
| output.writeUInt64(2, getNationalNumber()); | |||
| } | |||
| if (hasExtension()) { | |||
| output.writeString(3, getExtension()); | |||
| } | |||
| if (hasItalianLeadingZero()) { | |||
| output.writeBool(4, getItalianLeadingZero()); | |||
| } | |||
| if (hasRawInput()) { | |||
| output.writeString(5, getRawInput()); | |||
| } | |||
| if (hasCountryCodeSource()) { | |||
| output.writeEnum(6, getCountryCodeSource().getNumber()); | |||
| public String getRawInput() { return rawInput_; } | |||
| public PhoneNumber setRawInput(String value) { | |||
| if (value == null) { | |||
| throw new NullPointerException(); | |||
| } | |||
| hasRawInput = true; | |||
| rawInput_ = value; | |||
| return this; | |||
| } | |||
| private int memoizedSerializedSize = -1; | |||
| public int getSerializedSize() { | |||
| int size = memoizedSerializedSize; | |||
| if (size != -1) return size; | |||
| size = 0; | |||
| if (hasCountryCode()) { | |||
| size += com.google.protobuf.CodedOutputStream | |||
| .computeInt32Size(1, getCountryCode()); | |||
| } | |||
| if (hasNationalNumber()) { | |||
| size += com.google.protobuf.CodedOutputStream | |||
| .computeUInt64Size(2, getNationalNumber()); | |||
| } | |||
| if (hasExtension()) { | |||
| size += com.google.protobuf.CodedOutputStream | |||
| .computeStringSize(3, getExtension()); | |||
| } | |||
| if (hasItalianLeadingZero()) { | |||
| size += com.google.protobuf.CodedOutputStream | |||
| .computeBoolSize(4, getItalianLeadingZero()); | |||
| } | |||
| if (hasRawInput()) { | |||
| size += com.google.protobuf.CodedOutputStream | |||
| .computeStringSize(5, getRawInput()); | |||
| } | |||
| if (hasCountryCodeSource()) { | |||
| size += com.google.protobuf.CodedOutputStream | |||
| .computeEnumSize(6, getCountryCodeSource().getNumber()); | |||
| } | |||
| memoizedSerializedSize = size; | |||
| return size; | |||
| } | |||
| public static com.google.i18n.phonenumbers.Phonenumber.PhoneNumber parseFrom( | |||
| com.google.protobuf.ByteString data) | |||
| throws com.google.protobuf.InvalidProtocolBufferException { | |||
| return newBuilder().mergeFrom(data).buildParsed(); | |||
| } | |||
| public static com.google.i18n.phonenumbers.Phonenumber.PhoneNumber parseFrom( | |||
| com.google.protobuf.ByteString data, | |||
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) | |||
| throws com.google.protobuf.InvalidProtocolBufferException { | |||
| return newBuilder().mergeFrom(data, extensionRegistry) | |||
| .buildParsed(); | |||
| } | |||
| public static com.google.i18n.phonenumbers.Phonenumber.PhoneNumber parseFrom(byte[] data) | |||
| throws com.google.protobuf.InvalidProtocolBufferException { | |||
| return newBuilder().mergeFrom(data).buildParsed(); | |||
| } | |||
| public static com.google.i18n.phonenumbers.Phonenumber.PhoneNumber parseFrom( | |||
| byte[] data, | |||
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) | |||
| throws com.google.protobuf.InvalidProtocolBufferException { | |||
| return newBuilder().mergeFrom(data, extensionRegistry) | |||
| .buildParsed(); | |||
| public PhoneNumber clearRawInput() { | |||
| hasRawInput = false; | |||
| rawInput_ = ""; | |||
| return this; | |||
| } | |||
| public static com.google.i18n.phonenumbers.Phonenumber.PhoneNumber parseFrom(java.io.InputStream input) | |||
| throws java.io.IOException { | |||
| return newBuilder().mergeFrom(input).buildParsed(); | |||
| } | |||
| public static com.google.i18n.phonenumbers.Phonenumber.PhoneNumber parseFrom( | |||
| java.io.InputStream input, | |||
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) | |||
| throws java.io.IOException { | |||
| return newBuilder().mergeFrom(input, extensionRegistry) | |||
| .buildParsed(); | |||
| } | |||
| public static com.google.i18n.phonenumbers.Phonenumber.PhoneNumber parseDelimitedFrom(java.io.InputStream input) | |||
| throws java.io.IOException { | |||
| Builder builder = newBuilder(); | |||
| if (builder.mergeDelimitedFrom(input)) { | |||
| return builder.buildParsed(); | |||
| } else { | |||
| return null; | |||
| } | |||
| } | |||
| public static com.google.i18n.phonenumbers.Phonenumber.PhoneNumber parseDelimitedFrom( | |||
| java.io.InputStream input, | |||
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) | |||
| throws java.io.IOException { | |||
| Builder builder = newBuilder(); | |||
| if (builder.mergeDelimitedFrom(input, extensionRegistry)) { | |||
| return builder.buildParsed(); | |||
| } else { | |||
| return null; | |||
| // optional CountryCodeSource country_code_source = 6; | |||
| private boolean hasCountryCodeSource; | |||
| private CountryCodeSource countryCodeSource_; | |||
| public boolean hasCountryCodeSource() { return hasCountryCodeSource; } | |||
| public CountryCodeSource getCountryCodeSource() { return countryCodeSource_; } | |||
| public PhoneNumber setCountryCodeSource(CountryCodeSource value) { | |||
| if (value == null) { | |||
| throw new NullPointerException(); | |||
| } | |||
| hasCountryCodeSource = true; | |||
| countryCodeSource_ = value; | |||
| return this; | |||
| } | |||
| public static com.google.i18n.phonenumbers.Phonenumber.PhoneNumber parseFrom( | |||
| com.google.protobuf.CodedInputStream input) | |||
| throws java.io.IOException { | |||
| return newBuilder().mergeFrom(input).buildParsed(); | |||
| } | |||
| public static com.google.i18n.phonenumbers.Phonenumber.PhoneNumber parseFrom( | |||
| com.google.protobuf.CodedInputStream input, | |||
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) | |||
| throws java.io.IOException { | |||
| return newBuilder().mergeFrom(input, extensionRegistry) | |||
| .buildParsed(); | |||
| public PhoneNumber clearCountryCodeSource() { | |||
| hasCountryCodeSource = false; | |||
| countryCodeSource_ = CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN; | |||
| return this; | |||
| } | |||
| public static Builder newBuilder() { return Builder.create(); } | |||
| public Builder newBuilderForType() { return newBuilder(); } | |||
| public static Builder newBuilder(com.google.i18n.phonenumbers.Phonenumber.PhoneNumber prototype) { | |||
| return newBuilder().mergeFrom(prototype); | |||
| public final PhoneNumber clear() { | |||
| clearCountryCode(); | |||
| clearNationalNumber(); | |||
| clearExtension(); | |||
| clearItalianLeadingZero(); | |||
| clearRawInput(); | |||
| clearCountryCodeSource(); | |||
| return this; | |||
| } | |||
| public Builder toBuilder() { return newBuilder(this); } | |||
| public static final class Builder extends | |||
| com.google.protobuf.GeneratedMessageLite.Builder< | |||
| com.google.i18n.phonenumbers.Phonenumber.PhoneNumber, Builder> { | |||
| private com.google.i18n.phonenumbers.Phonenumber.PhoneNumber result; | |||
| // Construct using com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.newBuilder() | |||
| private Builder() {} | |||
| private static Builder create() { | |||
| Builder builder = new Builder(); | |||
| builder.result = new com.google.i18n.phonenumbers.Phonenumber.PhoneNumber(); | |||
| return builder; | |||
| } | |||
| protected com.google.i18n.phonenumbers.Phonenumber.PhoneNumber internalGetResult() { | |||
| return result; | |||
| } | |||
| public Builder clear() { | |||
| if (result == null) { | |||
| throw new IllegalStateException( | |||
| "Cannot call clear() after build()."); | |||
| } | |||
| result = new com.google.i18n.phonenumbers.Phonenumber.PhoneNumber(); | |||
| return this; | |||
| } | |||
| public Builder clone() { | |||
| return create().mergeFrom(result); | |||
| } | |||
| public com.google.i18n.phonenumbers.Phonenumber.PhoneNumber getDefaultInstanceForType() { | |||
| return com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.getDefaultInstance(); | |||
| } | |||
| public boolean isInitialized() { | |||
| return result.isInitialized(); | |||
| } | |||
| public com.google.i18n.phonenumbers.Phonenumber.PhoneNumber build() { | |||
| if (result != null && !isInitialized()) { | |||
| throw newUninitializedMessageException(result); | |||
| } | |||
| return buildPartial(); | |||
| } | |||
| private com.google.i18n.phonenumbers.Phonenumber.PhoneNumber buildParsed() | |||
| throws com.google.protobuf.InvalidProtocolBufferException { | |||
| if (!isInitialized()) { | |||
| throw newUninitializedMessageException( | |||
| result).asInvalidProtocolBufferException(); | |||
| } | |||
| return buildPartial(); | |||
| } | |||
| public com.google.i18n.phonenumbers.Phonenumber.PhoneNumber buildPartial() { | |||
| if (result == null) { | |||
| throw new IllegalStateException( | |||
| "build() has already been called on this Builder."); | |||
| } | |||
| com.google.i18n.phonenumbers.Phonenumber.PhoneNumber returnMe = result; | |||
| result = null; | |||
| return returnMe; | |||
| } | |||
| public Builder mergeFrom(com.google.i18n.phonenumbers.Phonenumber.PhoneNumber other) { | |||
| if (other == com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.getDefaultInstance()) return this; | |||
| if (other.hasCountryCode()) { | |||
| setCountryCode(other.getCountryCode()); | |||
| } | |||
| if (other.hasNationalNumber()) { | |||
| setNationalNumber(other.getNationalNumber()); | |||
| } | |||
| if (other.hasExtension()) { | |||
| setExtension(other.getExtension()); | |||
| } | |||
| if (other.hasItalianLeadingZero()) { | |||
| setItalianLeadingZero(other.getItalianLeadingZero()); | |||
| } | |||
| if (other.hasRawInput()) { | |||
| setRawInput(other.getRawInput()); | |||
| } | |||
| if (other.hasCountryCodeSource()) { | |||
| setCountryCodeSource(other.getCountryCodeSource()); | |||
| } | |||
| return this; | |||
| } | |||
| public Builder mergeFrom( | |||
| com.google.protobuf.CodedInputStream input, | |||
| com.google.protobuf.ExtensionRegistryLite extensionRegistry) | |||
| throws java.io.IOException { | |||
| while (true) { | |||
| int tag = input.readTag(); | |||
| switch (tag) { | |||
| case 0: | |||
| return this; | |||
| default: { | |||
| if (!parseUnknownField(input, extensionRegistry, tag)) { | |||
| return this; | |||
| } | |||
| break; | |||
| } | |||
| case 8: { | |||
| setCountryCode(input.readInt32()); | |||
| break; | |||
| } | |||
| case 16: { | |||
| setNationalNumber(input.readUInt64()); | |||
| break; | |||
| } | |||
| case 26: { | |||
| setExtension(input.readString()); | |||
| break; | |||
| } | |||
| case 32: { | |||
| setItalianLeadingZero(input.readBool()); | |||
| break; | |||
| } | |||
| case 42: { | |||
| setRawInput(input.readString()); | |||
| break; | |||
| } | |||
| case 48: { | |||
| int rawValue = input.readEnum(); | |||
| com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.CountryCodeSource value = com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.CountryCodeSource.valueOf(rawValue); | |||
| if (value != null) { | |||
| setCountryCodeSource(value); | |||
| } | |||
| break; | |||
| } | |||
| } | |||
| } | |||
| } | |||
| // required int32 country_code = 1; | |||
| public boolean hasCountryCode() { | |||
| return result.hasCountryCode(); | |||
| } | |||
| public int getCountryCode() { | |||
| return result.getCountryCode(); | |||
| } | |||
| public Builder setCountryCode(int value) { | |||
| result.hasCountryCode = true; | |||
| result.countryCode_ = value; | |||
| return this; | |||
| } | |||
| public Builder clearCountryCode() { | |||
| result.hasCountryCode = false; | |||
| result.countryCode_ = 0; | |||
| return this; | |||
| } | |||
| // required uint64 national_number = 2; | |||
| public boolean hasNationalNumber() { | |||
| return result.hasNationalNumber(); | |||
| } | |||
| public long getNationalNumber() { | |||
| return result.getNationalNumber(); | |||
| } | |||
| public Builder setNationalNumber(long value) { | |||
| result.hasNationalNumber = true; | |||
| result.nationalNumber_ = value; | |||
| return this; | |||
| } | |||
| public Builder clearNationalNumber() { | |||
| result.hasNationalNumber = false; | |||
| result.nationalNumber_ = 0L; | |||
| return this; | |||
| } | |||
| // optional string extension = 3; | |||
| public boolean hasExtension() { | |||
| return result.hasExtension(); | |||
| } | |||
| public java.lang.String getExtension() { | |||
| return result.getExtension(); | |||
| } | |||
| public Builder setExtension(java.lang.String value) { | |||
| if (value == null) { | |||
| throw new NullPointerException(); | |||
| } | |||
| result.hasExtension = true; | |||
| result.extension_ = value; | |||
| return this; | |||
| } | |||
| public Builder clearExtension() { | |||
| result.hasExtension = false; | |||
| result.extension_ = getDefaultInstance().getExtension(); | |||
| return this; | |||
| } | |||
| // optional bool italian_leading_zero = 4; | |||
| public boolean hasItalianLeadingZero() { | |||
| return result.hasItalianLeadingZero(); | |||
| } | |||
| public boolean getItalianLeadingZero() { | |||
| return result.getItalianLeadingZero(); | |||
| } | |||
| public Builder setItalianLeadingZero(boolean value) { | |||
| result.hasItalianLeadingZero = true; | |||
| result.italianLeadingZero_ = value; | |||
| return this; | |||
| } | |||
| public Builder clearItalianLeadingZero() { | |||
| result.hasItalianLeadingZero = false; | |||
| result.italianLeadingZero_ = false; | |||
| return this; | |||
| } | |||
| // optional string raw_input = 5; | |||
| public boolean hasRawInput() { | |||
| return result.hasRawInput(); | |||
| } | |||
| public java.lang.String getRawInput() { | |||
| return result.getRawInput(); | |||
| } | |||
| public Builder setRawInput(java.lang.String value) { | |||
| if (value == null) { | |||
| throw new NullPointerException(); | |||
| } | |||
| result.hasRawInput = true; | |||
| result.rawInput_ = value; | |||
| return this; | |||
| public PhoneNumber mergeFrom(PhoneNumber other) { | |||
| if (other.hasCountryCode()) { | |||
| setCountryCode(other.getCountryCode()); | |||
| } | |||
| public Builder clearRawInput() { | |||
| result.hasRawInput = false; | |||
| result.rawInput_ = getDefaultInstance().getRawInput(); | |||
| return this; | |||
| if (other.hasNationalNumber()) { | |||
| setNationalNumber(other.getNationalNumber()); | |||
| } | |||
| // optional .i18n.phonenumbers.PhoneNumber.CountryCodeSource country_code_source = 6; | |||
| public boolean hasCountryCodeSource() { | |||
| return result.hasCountryCodeSource(); | |||
| if (other.hasExtension()) { | |||
| setExtension(other.getExtension()); | |||
| } | |||
| public com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.CountryCodeSource getCountryCodeSource() { | |||
| return result.getCountryCodeSource(); | |||
| if (other.hasItalianLeadingZero()) { | |||
| setItalianLeadingZero(other.getItalianLeadingZero()); | |||
| } | |||
| public Builder setCountryCodeSource(com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.CountryCodeSource value) { | |||
| if (value == null) { | |||
| throw new NullPointerException(); | |||
| } | |||
| result.hasCountryCodeSource = true; | |||
| result.countryCodeSource_ = value; | |||
| return this; | |||
| if (other.hasRawInput()) { | |||
| setRawInput(other.getRawInput()); | |||
| } | |||
| public Builder clearCountryCodeSource() { | |||
| result.hasCountryCodeSource = false; | |||
| result.countryCodeSource_ = com.google.i18n.phonenumbers.Phonenumber.PhoneNumber.CountryCodeSource.FROM_NUMBER_WITH_PLUS_SIGN; | |||
| return this; | |||
| if (other.hasCountryCodeSource()) { | |||
| setCountryCodeSource(other.getCountryCodeSource()); | |||
| } | |||
| // @@protoc_insertion_point(builder_scope:i18n.phonenumbers.PhoneNumber) | |||
| return this; | |||
| } | |||
| static { | |||
| defaultInstance = new PhoneNumber(true); | |||
| com.google.i18n.phonenumbers.Phonenumber.internalForceInit(); | |||
| defaultInstance.initFields(); | |||
| public boolean exactlySameAs(PhoneNumber other) { | |||
| return (countryCode_ == other.countryCode_ && nationalNumber_ == other.nationalNumber_ && | |||
| extension_.equals(other.extension_) && italianLeadingZero_ == other.italianLeadingZero_ && | |||
| rawInput_.equals(other.rawInput_) && countryCodeSource_ == other.countryCodeSource_); | |||
| } | |||
| // @@protoc_insertion_point(class_scope:i18n.phonenumbers.PhoneNumber) | |||
| } | |||
| static { | |||
| } | |||
| public static void internalForceInit() {} | |||
| // @@protoc_insertion_point(outer_class_scope) | |||
| } | |||