898 lines
34 KiB
C++
Executable File
898 lines
34 KiB
C++
Executable File
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: phonenumber.proto
|
|
|
|
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
|
|
#include "phonenumber.pb.h"
|
|
|
|
#include <algorithm>
|
|
|
|
#include <google/protobuf/stubs/common.h>
|
|
#include <google/protobuf/stubs/port.h>
|
|
#include <google/protobuf/stubs/once.h>
|
|
#include <google/protobuf/io/coded_stream.h>
|
|
#include <google/protobuf/wire_format_lite_inl.h>
|
|
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
|
|
// @@protoc_insertion_point(includes)
|
|
|
|
namespace i18n {
|
|
namespace phonenumbers {
|
|
class PhoneNumberDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<PhoneNumber> {
|
|
} _PhoneNumber_default_instance_;
|
|
|
|
namespace protobuf_phonenumber_2eproto {
|
|
|
|
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField
|
|
const TableStruct::entries[] = {
|
|
{0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0},
|
|
};
|
|
|
|
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField
|
|
const TableStruct::aux[] = {
|
|
::google::protobuf::internal::AuxillaryParseTableField(),
|
|
};
|
|
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const
|
|
TableStruct::schema[] = {
|
|
{ NULL, NULL, 0, -1, -1, false },
|
|
};
|
|
|
|
|
|
void TableStruct::Shutdown() {
|
|
_PhoneNumber_default_instance_.Shutdown();
|
|
}
|
|
|
|
void TableStruct::InitDefaultsImpl() {
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
::google::protobuf::internal::InitProtobufDefaults();
|
|
_PhoneNumber_default_instance_.DefaultConstruct();
|
|
}
|
|
|
|
void InitDefaults() {
|
|
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
|
::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl);
|
|
}
|
|
void AddDescriptorsImpl() {
|
|
InitDefaults();
|
|
::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown);
|
|
}
|
|
|
|
void AddDescriptors() {
|
|
static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
|
|
::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
|
|
}
|
|
|
|
} // namespace protobuf_phonenumber_2eproto
|
|
|
|
bool PhoneNumber_CountryCodeSource_IsValid(int value) {
|
|
switch (value) {
|
|
case 1:
|
|
case 5:
|
|
case 10:
|
|
case 20:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
const PhoneNumber_CountryCodeSource PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN;
|
|
const PhoneNumber_CountryCodeSource PhoneNumber::FROM_NUMBER_WITH_IDD;
|
|
const PhoneNumber_CountryCodeSource PhoneNumber::FROM_NUMBER_WITHOUT_PLUS_SIGN;
|
|
const PhoneNumber_CountryCodeSource PhoneNumber::FROM_DEFAULT_COUNTRY;
|
|
const PhoneNumber_CountryCodeSource PhoneNumber::CountryCodeSource_MIN;
|
|
const PhoneNumber_CountryCodeSource PhoneNumber::CountryCodeSource_MAX;
|
|
const int PhoneNumber::CountryCodeSource_ARRAYSIZE;
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
// ===================================================================
|
|
|
|
#if !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
const int PhoneNumber::kCountryCodeFieldNumber;
|
|
const int PhoneNumber::kNationalNumberFieldNumber;
|
|
const int PhoneNumber::kExtensionFieldNumber;
|
|
const int PhoneNumber::kItalianLeadingZeroFieldNumber;
|
|
const int PhoneNumber::kNumberOfLeadingZerosFieldNumber;
|
|
const int PhoneNumber::kRawInputFieldNumber;
|
|
const int PhoneNumber::kCountryCodeSourceFieldNumber;
|
|
const int PhoneNumber::kPreferredDomesticCarrierCodeFieldNumber;
|
|
#endif // !defined(_MSC_VER) || _MSC_VER >= 1900
|
|
|
|
PhoneNumber::PhoneNumber()
|
|
: ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
|
|
if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
|
|
protobuf_phonenumber_2eproto::InitDefaults();
|
|
}
|
|
SharedCtor();
|
|
// @@protoc_insertion_point(constructor:i18n.phonenumbers.PhoneNumber)
|
|
}
|
|
PhoneNumber::PhoneNumber(const PhoneNumber& from)
|
|
: ::google::protobuf::MessageLite(),
|
|
_internal_metadata_(NULL),
|
|
_has_bits_(from._has_bits_),
|
|
_cached_size_(0) {
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
extension_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
if (from.has_extension()) {
|
|
extension_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extension_);
|
|
}
|
|
raw_input_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
if (from.has_raw_input()) {
|
|
raw_input_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.raw_input_);
|
|
}
|
|
preferred_domestic_carrier_code_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
if (from.has_preferred_domestic_carrier_code()) {
|
|
preferred_domestic_carrier_code_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.preferred_domestic_carrier_code_);
|
|
}
|
|
::memcpy(&national_number_, &from.national_number_,
|
|
static_cast<size_t>(reinterpret_cast<char*>(&number_of_leading_zeros_) -
|
|
reinterpret_cast<char*>(&national_number_)) + sizeof(number_of_leading_zeros_));
|
|
// @@protoc_insertion_point(copy_constructor:i18n.phonenumbers.PhoneNumber)
|
|
}
|
|
|
|
void PhoneNumber::SharedCtor() {
|
|
_cached_size_ = 0;
|
|
extension_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
raw_input_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
preferred_domestic_carrier_code_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
::memset(&national_number_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&italian_leading_zero_) -
|
|
reinterpret_cast<char*>(&national_number_)) + sizeof(italian_leading_zero_));
|
|
country_code_source_ = 1;
|
|
number_of_leading_zeros_ = 1;
|
|
}
|
|
|
|
PhoneNumber::~PhoneNumber() {
|
|
// @@protoc_insertion_point(destructor:i18n.phonenumbers.PhoneNumber)
|
|
SharedDtor();
|
|
}
|
|
|
|
void PhoneNumber::SharedDtor() {
|
|
extension_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
raw_input_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
preferred_domestic_carrier_code_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
|
|
void PhoneNumber::SetCachedSize(int size) const {
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
}
|
|
const PhoneNumber& PhoneNumber::default_instance() {
|
|
protobuf_phonenumber_2eproto::InitDefaults();
|
|
return *internal_default_instance();
|
|
}
|
|
|
|
PhoneNumber* PhoneNumber::New(::google::protobuf::Arena* arena) const {
|
|
PhoneNumber* n = new PhoneNumber;
|
|
if (arena != NULL) {
|
|
arena->Own(n);
|
|
}
|
|
return n;
|
|
}
|
|
|
|
void PhoneNumber::Clear() {
|
|
// @@protoc_insertion_point(message_clear_start:i18n.phonenumbers.PhoneNumber)
|
|
if (_has_bits_[0 / 32] & 7u) {
|
|
if (has_extension()) {
|
|
GOOGLE_DCHECK(!extension_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
|
|
(*extension_.UnsafeRawStringPointer())->clear();
|
|
}
|
|
if (has_raw_input()) {
|
|
GOOGLE_DCHECK(!raw_input_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
|
|
(*raw_input_.UnsafeRawStringPointer())->clear();
|
|
}
|
|
if (has_preferred_domestic_carrier_code()) {
|
|
GOOGLE_DCHECK(!preferred_domestic_carrier_code_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
|
|
(*preferred_domestic_carrier_code_.UnsafeRawStringPointer())->clear();
|
|
}
|
|
}
|
|
if (_has_bits_[0 / 32] & 248u) {
|
|
::memset(&national_number_, 0, static_cast<size_t>(
|
|
reinterpret_cast<char*>(&italian_leading_zero_) -
|
|
reinterpret_cast<char*>(&national_number_)) + sizeof(italian_leading_zero_));
|
|
country_code_source_ = 1;
|
|
number_of_leading_zeros_ = 1;
|
|
}
|
|
_has_bits_.Clear();
|
|
_internal_metadata_.Clear();
|
|
}
|
|
|
|
bool PhoneNumber::MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input) {
|
|
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
|
|
::google::protobuf::uint32 tag;
|
|
::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
|
|
::google::protobuf::NewPermanentCallback(&_internal_metadata_,
|
|
&::google::protobuf::internal::InternalMetadataWithArenaLite::
|
|
mutable_unknown_fields));
|
|
::google::protobuf::io::CodedOutputStream unknown_fields_stream(
|
|
&unknown_fields_string, false);
|
|
// @@protoc_insertion_point(parse_start:i18n.phonenumbers.PhoneNumber)
|
|
for (;;) {
|
|
::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
|
|
tag = p.first;
|
|
if (!p.second) goto handle_unusual;
|
|
switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
|
|
// required int32 country_code = 1;
|
|
case 1: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(8u)) {
|
|
set_has_country_code();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
|
input, &country_code_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// required uint64 national_number = 2;
|
|
case 2: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(16u)) {
|
|
set_has_national_number();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::uint64, ::google::protobuf::internal::WireFormatLite::TYPE_UINT64>(
|
|
input, &national_number_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional string extension = 3;
|
|
case 3: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(26u)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_extension()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional bool italian_leading_zero = 4;
|
|
case 4: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(32u)) {
|
|
set_has_italian_leading_zero();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
|
input, &italian_leading_zero_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional string raw_input = 5;
|
|
case 5: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(42u)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_raw_input()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional .i18n.phonenumbers.PhoneNumber.CountryCodeSource country_code_source = 6;
|
|
case 6: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(48u)) {
|
|
int value;
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
|
input, &value)));
|
|
if (::i18n::phonenumbers::PhoneNumber_CountryCodeSource_IsValid(value)) {
|
|
set_country_code_source(static_cast< ::i18n::phonenumbers::PhoneNumber_CountryCodeSource >(value));
|
|
} else {
|
|
unknown_fields_stream.WriteVarint32(48u);
|
|
unknown_fields_stream.WriteVarint32(
|
|
static_cast< ::google::protobuf::uint32>(value));
|
|
}
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional string preferred_domestic_carrier_code = 7;
|
|
case 7: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(58u)) {
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_preferred_domestic_carrier_code()));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
// optional int32 number_of_leading_zeros = 8 [default = 1];
|
|
case 8: {
|
|
if (static_cast< ::google::protobuf::uint8>(tag) ==
|
|
static_cast< ::google::protobuf::uint8>(64u)) {
|
|
set_has_number_of_leading_zeros();
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
|
|
input, &number_of_leading_zeros_)));
|
|
} else {
|
|
goto handle_unusual;
|
|
}
|
|
break;
|
|
}
|
|
|
|
default: {
|
|
handle_unusual:
|
|
if (tag == 0 ||
|
|
::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
|
|
goto success;
|
|
}
|
|
DO_(::google::protobuf::internal::WireFormatLite::SkipField(
|
|
input, tag, &unknown_fields_stream));
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
success:
|
|
// @@protoc_insertion_point(parse_success:i18n.phonenumbers.PhoneNumber)
|
|
return true;
|
|
failure:
|
|
// @@protoc_insertion_point(parse_failure:i18n.phonenumbers.PhoneNumber)
|
|
return false;
|
|
#undef DO_
|
|
}
|
|
|
|
void PhoneNumber::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// @@protoc_insertion_point(serialize_start:i18n.phonenumbers.PhoneNumber)
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = _has_bits_[0];
|
|
// required int32 country_code = 1;
|
|
if (cached_has_bits & 0x00000010u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->country_code(), output);
|
|
}
|
|
|
|
// required uint64 national_number = 2;
|
|
if (cached_has_bits & 0x00000008u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteUInt64(2, this->national_number(), output);
|
|
}
|
|
|
|
// optional string extension = 3;
|
|
if (cached_has_bits & 0x00000001u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
3, this->extension(), output);
|
|
}
|
|
|
|
// optional bool italian_leading_zero = 4;
|
|
if (cached_has_bits & 0x00000020u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBool(4, this->italian_leading_zero(), output);
|
|
}
|
|
|
|
// optional string raw_input = 5;
|
|
if (cached_has_bits & 0x00000002u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
5, this->raw_input(), output);
|
|
}
|
|
|
|
// optional .i18n.phonenumbers.PhoneNumber.CountryCodeSource country_code_source = 6;
|
|
if (cached_has_bits & 0x00000040u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteEnum(
|
|
6, this->country_code_source(), output);
|
|
}
|
|
|
|
// optional string preferred_domestic_carrier_code = 7;
|
|
if (cached_has_bits & 0x00000004u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
|
|
7, this->preferred_domestic_carrier_code(), output);
|
|
}
|
|
|
|
// optional int32 number_of_leading_zeros = 8 [default = 1];
|
|
if (cached_has_bits & 0x00000080u) {
|
|
::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->number_of_leading_zeros(), output);
|
|
}
|
|
|
|
output->WriteRaw(unknown_fields().data(),
|
|
static_cast<int>(unknown_fields().size()));
|
|
// @@protoc_insertion_point(serialize_end:i18n.phonenumbers.PhoneNumber)
|
|
}
|
|
|
|
size_t PhoneNumber::RequiredFieldsByteSizeFallback() const {
|
|
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:i18n.phonenumbers.PhoneNumber)
|
|
size_t total_size = 0;
|
|
|
|
if (has_national_number()) {
|
|
// required uint64 national_number = 2;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->national_number());
|
|
}
|
|
|
|
if (has_country_code()) {
|
|
// required int32 country_code = 1;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
this->country_code());
|
|
}
|
|
|
|
return total_size;
|
|
}
|
|
size_t PhoneNumber::ByteSizeLong() const {
|
|
// @@protoc_insertion_point(message_byte_size_start:i18n.phonenumbers.PhoneNumber)
|
|
size_t total_size = 0;
|
|
|
|
total_size += unknown_fields().size();
|
|
|
|
if (((_has_bits_[0] & 0x00000018) ^ 0x00000018) == 0) { // All required fields are present.
|
|
// required uint64 national_number = 2;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::UInt64Size(
|
|
this->national_number());
|
|
|
|
// required int32 country_code = 1;
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
this->country_code());
|
|
|
|
} else {
|
|
total_size += RequiredFieldsByteSizeFallback();
|
|
}
|
|
if (_has_bits_[0 / 32] & 7u) {
|
|
// optional string extension = 3;
|
|
if (has_extension()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this->extension());
|
|
}
|
|
|
|
// optional string raw_input = 5;
|
|
if (has_raw_input()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this->raw_input());
|
|
}
|
|
|
|
// optional string preferred_domestic_carrier_code = 7;
|
|
if (has_preferred_domestic_carrier_code()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this->preferred_domestic_carrier_code());
|
|
}
|
|
|
|
}
|
|
if (_has_bits_[0 / 32] & 224u) {
|
|
// optional bool italian_leading_zero = 4;
|
|
if (has_italian_leading_zero()) {
|
|
total_size += 1 + 1;
|
|
}
|
|
|
|
// optional .i18n.phonenumbers.PhoneNumber.CountryCodeSource country_code_source = 6;
|
|
if (has_country_code_source()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::EnumSize(this->country_code_source());
|
|
}
|
|
|
|
// optional int32 number_of_leading_zeros = 8 [default = 1];
|
|
if (has_number_of_leading_zeros()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::Int32Size(
|
|
this->number_of_leading_zeros());
|
|
}
|
|
|
|
}
|
|
int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = cached_size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
return total_size;
|
|
}
|
|
|
|
void PhoneNumber::CheckTypeAndMergeFrom(
|
|
const ::google::protobuf::MessageLite& from) {
|
|
MergeFrom(*::google::protobuf::down_cast<const PhoneNumber*>(&from));
|
|
}
|
|
|
|
void PhoneNumber::MergeFrom(const PhoneNumber& from) {
|
|
// @@protoc_insertion_point(class_specific_merge_from_start:i18n.phonenumbers.PhoneNumber)
|
|
GOOGLE_DCHECK_NE(&from, this);
|
|
_internal_metadata_.MergeFrom(from._internal_metadata_);
|
|
::google::protobuf::uint32 cached_has_bits = 0;
|
|
(void) cached_has_bits;
|
|
|
|
cached_has_bits = from._has_bits_[0];
|
|
if (cached_has_bits & 255u) {
|
|
if (cached_has_bits & 0x00000001u) {
|
|
set_has_extension();
|
|
extension_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.extension_);
|
|
}
|
|
if (cached_has_bits & 0x00000002u) {
|
|
set_has_raw_input();
|
|
raw_input_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.raw_input_);
|
|
}
|
|
if (cached_has_bits & 0x00000004u) {
|
|
set_has_preferred_domestic_carrier_code();
|
|
preferred_domestic_carrier_code_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.preferred_domestic_carrier_code_);
|
|
}
|
|
if (cached_has_bits & 0x00000008u) {
|
|
national_number_ = from.national_number_;
|
|
}
|
|
if (cached_has_bits & 0x00000010u) {
|
|
country_code_ = from.country_code_;
|
|
}
|
|
if (cached_has_bits & 0x00000020u) {
|
|
italian_leading_zero_ = from.italian_leading_zero_;
|
|
}
|
|
if (cached_has_bits & 0x00000040u) {
|
|
country_code_source_ = from.country_code_source_;
|
|
}
|
|
if (cached_has_bits & 0x00000080u) {
|
|
number_of_leading_zeros_ = from.number_of_leading_zeros_;
|
|
}
|
|
_has_bits_[0] |= cached_has_bits;
|
|
}
|
|
}
|
|
|
|
void PhoneNumber::CopyFrom(const PhoneNumber& from) {
|
|
// @@protoc_insertion_point(class_specific_copy_from_start:i18n.phonenumbers.PhoneNumber)
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool PhoneNumber::IsInitialized() const {
|
|
if ((_has_bits_[0] & 0x00000018) != 0x00000018) return false;
|
|
return true;
|
|
}
|
|
|
|
void PhoneNumber::Swap(PhoneNumber* other) {
|
|
if (other == this) return;
|
|
InternalSwap(other);
|
|
}
|
|
void PhoneNumber::InternalSwap(PhoneNumber* other) {
|
|
extension_.Swap(&other->extension_);
|
|
raw_input_.Swap(&other->raw_input_);
|
|
preferred_domestic_carrier_code_.Swap(&other->preferred_domestic_carrier_code_);
|
|
std::swap(national_number_, other->national_number_);
|
|
std::swap(country_code_, other->country_code_);
|
|
std::swap(italian_leading_zero_, other->italian_leading_zero_);
|
|
std::swap(country_code_source_, other->country_code_source_);
|
|
std::swap(number_of_leading_zeros_, other->number_of_leading_zeros_);
|
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
|
_internal_metadata_.Swap(&other->_internal_metadata_);
|
|
std::swap(_cached_size_, other->_cached_size_);
|
|
}
|
|
|
|
::std::string PhoneNumber::GetTypeName() const {
|
|
return "i18n.phonenumbers.PhoneNumber";
|
|
}
|
|
|
|
#if PROTOBUF_INLINE_NOT_IN_HEADERS
|
|
// PhoneNumber
|
|
|
|
// required int32 country_code = 1;
|
|
bool PhoneNumber::has_country_code() const {
|
|
return (_has_bits_[0] & 0x00000010u) != 0;
|
|
}
|
|
void PhoneNumber::set_has_country_code() {
|
|
_has_bits_[0] |= 0x00000010u;
|
|
}
|
|
void PhoneNumber::clear_has_country_code() {
|
|
_has_bits_[0] &= ~0x00000010u;
|
|
}
|
|
void PhoneNumber::clear_country_code() {
|
|
country_code_ = 0;
|
|
clear_has_country_code();
|
|
}
|
|
::google::protobuf::int32 PhoneNumber::country_code() const {
|
|
// @@protoc_insertion_point(field_get:i18n.phonenumbers.PhoneNumber.country_code)
|
|
return country_code_;
|
|
}
|
|
void PhoneNumber::set_country_code(::google::protobuf::int32 value) {
|
|
set_has_country_code();
|
|
country_code_ = value;
|
|
// @@protoc_insertion_point(field_set:i18n.phonenumbers.PhoneNumber.country_code)
|
|
}
|
|
|
|
// required uint64 national_number = 2;
|
|
bool PhoneNumber::has_national_number() const {
|
|
return (_has_bits_[0] & 0x00000008u) != 0;
|
|
}
|
|
void PhoneNumber::set_has_national_number() {
|
|
_has_bits_[0] |= 0x00000008u;
|
|
}
|
|
void PhoneNumber::clear_has_national_number() {
|
|
_has_bits_[0] &= ~0x00000008u;
|
|
}
|
|
void PhoneNumber::clear_national_number() {
|
|
national_number_ = GOOGLE_ULONGLONG(0);
|
|
clear_has_national_number();
|
|
}
|
|
::google::protobuf::uint64 PhoneNumber::national_number() const {
|
|
// @@protoc_insertion_point(field_get:i18n.phonenumbers.PhoneNumber.national_number)
|
|
return national_number_;
|
|
}
|
|
void PhoneNumber::set_national_number(::google::protobuf::uint64 value) {
|
|
set_has_national_number();
|
|
national_number_ = value;
|
|
// @@protoc_insertion_point(field_set:i18n.phonenumbers.PhoneNumber.national_number)
|
|
}
|
|
|
|
// optional string extension = 3;
|
|
bool PhoneNumber::has_extension() const {
|
|
return (_has_bits_[0] & 0x00000001u) != 0;
|
|
}
|
|
void PhoneNumber::set_has_extension() {
|
|
_has_bits_[0] |= 0x00000001u;
|
|
}
|
|
void PhoneNumber::clear_has_extension() {
|
|
_has_bits_[0] &= ~0x00000001u;
|
|
}
|
|
void PhoneNumber::clear_extension() {
|
|
extension_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
clear_has_extension();
|
|
}
|
|
const ::std::string& PhoneNumber::extension() const {
|
|
// @@protoc_insertion_point(field_get:i18n.phonenumbers.PhoneNumber.extension)
|
|
return extension_.GetNoArena();
|
|
}
|
|
void PhoneNumber::set_extension(const ::std::string& value) {
|
|
set_has_extension();
|
|
extension_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
|
// @@protoc_insertion_point(field_set:i18n.phonenumbers.PhoneNumber.extension)
|
|
}
|
|
#if LANG_CXX11
|
|
void PhoneNumber::set_extension(::std::string&& value) {
|
|
set_has_extension();
|
|
extension_.SetNoArena(
|
|
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
|
// @@protoc_insertion_point(field_set_rvalue:i18n.phonenumbers.PhoneNumber.extension)
|
|
}
|
|
#endif
|
|
void PhoneNumber::set_extension(const char* value) {
|
|
GOOGLE_DCHECK(value != NULL);
|
|
set_has_extension();
|
|
extension_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
|
// @@protoc_insertion_point(field_set_char:i18n.phonenumbers.PhoneNumber.extension)
|
|
}
|
|
void PhoneNumber::set_extension(const char* value, size_t size) {
|
|
set_has_extension();
|
|
extension_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
::std::string(reinterpret_cast<const char*>(value), size));
|
|
// @@protoc_insertion_point(field_set_pointer:i18n.phonenumbers.PhoneNumber.extension)
|
|
}
|
|
::std::string* PhoneNumber::mutable_extension() {
|
|
set_has_extension();
|
|
// @@protoc_insertion_point(field_mutable:i18n.phonenumbers.PhoneNumber.extension)
|
|
return extension_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
::std::string* PhoneNumber::release_extension() {
|
|
// @@protoc_insertion_point(field_release:i18n.phonenumbers.PhoneNumber.extension)
|
|
clear_has_extension();
|
|
return extension_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
void PhoneNumber::set_allocated_extension(::std::string* extension) {
|
|
if (extension != NULL) {
|
|
set_has_extension();
|
|
} else {
|
|
clear_has_extension();
|
|
}
|
|
extension_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), extension);
|
|
// @@protoc_insertion_point(field_set_allocated:i18n.phonenumbers.PhoneNumber.extension)
|
|
}
|
|
|
|
// optional bool italian_leading_zero = 4;
|
|
bool PhoneNumber::has_italian_leading_zero() const {
|
|
return (_has_bits_[0] & 0x00000020u) != 0;
|
|
}
|
|
void PhoneNumber::set_has_italian_leading_zero() {
|
|
_has_bits_[0] |= 0x00000020u;
|
|
}
|
|
void PhoneNumber::clear_has_italian_leading_zero() {
|
|
_has_bits_[0] &= ~0x00000020u;
|
|
}
|
|
void PhoneNumber::clear_italian_leading_zero() {
|
|
italian_leading_zero_ = false;
|
|
clear_has_italian_leading_zero();
|
|
}
|
|
bool PhoneNumber::italian_leading_zero() const {
|
|
// @@protoc_insertion_point(field_get:i18n.phonenumbers.PhoneNumber.italian_leading_zero)
|
|
return italian_leading_zero_;
|
|
}
|
|
void PhoneNumber::set_italian_leading_zero(bool value) {
|
|
set_has_italian_leading_zero();
|
|
italian_leading_zero_ = value;
|
|
// @@protoc_insertion_point(field_set:i18n.phonenumbers.PhoneNumber.italian_leading_zero)
|
|
}
|
|
|
|
// optional int32 number_of_leading_zeros = 8 [default = 1];
|
|
bool PhoneNumber::has_number_of_leading_zeros() const {
|
|
return (_has_bits_[0] & 0x00000080u) != 0;
|
|
}
|
|
void PhoneNumber::set_has_number_of_leading_zeros() {
|
|
_has_bits_[0] |= 0x00000080u;
|
|
}
|
|
void PhoneNumber::clear_has_number_of_leading_zeros() {
|
|
_has_bits_[0] &= ~0x00000080u;
|
|
}
|
|
void PhoneNumber::clear_number_of_leading_zeros() {
|
|
number_of_leading_zeros_ = 1;
|
|
clear_has_number_of_leading_zeros();
|
|
}
|
|
::google::protobuf::int32 PhoneNumber::number_of_leading_zeros() const {
|
|
// @@protoc_insertion_point(field_get:i18n.phonenumbers.PhoneNumber.number_of_leading_zeros)
|
|
return number_of_leading_zeros_;
|
|
}
|
|
void PhoneNumber::set_number_of_leading_zeros(::google::protobuf::int32 value) {
|
|
set_has_number_of_leading_zeros();
|
|
number_of_leading_zeros_ = value;
|
|
// @@protoc_insertion_point(field_set:i18n.phonenumbers.PhoneNumber.number_of_leading_zeros)
|
|
}
|
|
|
|
// optional string raw_input = 5;
|
|
bool PhoneNumber::has_raw_input() const {
|
|
return (_has_bits_[0] & 0x00000002u) != 0;
|
|
}
|
|
void PhoneNumber::set_has_raw_input() {
|
|
_has_bits_[0] |= 0x00000002u;
|
|
}
|
|
void PhoneNumber::clear_has_raw_input() {
|
|
_has_bits_[0] &= ~0x00000002u;
|
|
}
|
|
void PhoneNumber::clear_raw_input() {
|
|
raw_input_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
clear_has_raw_input();
|
|
}
|
|
const ::std::string& PhoneNumber::raw_input() const {
|
|
// @@protoc_insertion_point(field_get:i18n.phonenumbers.PhoneNumber.raw_input)
|
|
return raw_input_.GetNoArena();
|
|
}
|
|
void PhoneNumber::set_raw_input(const ::std::string& value) {
|
|
set_has_raw_input();
|
|
raw_input_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
|
// @@protoc_insertion_point(field_set:i18n.phonenumbers.PhoneNumber.raw_input)
|
|
}
|
|
#if LANG_CXX11
|
|
void PhoneNumber::set_raw_input(::std::string&& value) {
|
|
set_has_raw_input();
|
|
raw_input_.SetNoArena(
|
|
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
|
// @@protoc_insertion_point(field_set_rvalue:i18n.phonenumbers.PhoneNumber.raw_input)
|
|
}
|
|
#endif
|
|
void PhoneNumber::set_raw_input(const char* value) {
|
|
GOOGLE_DCHECK(value != NULL);
|
|
set_has_raw_input();
|
|
raw_input_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
|
// @@protoc_insertion_point(field_set_char:i18n.phonenumbers.PhoneNumber.raw_input)
|
|
}
|
|
void PhoneNumber::set_raw_input(const char* value, size_t size) {
|
|
set_has_raw_input();
|
|
raw_input_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
::std::string(reinterpret_cast<const char*>(value), size));
|
|
// @@protoc_insertion_point(field_set_pointer:i18n.phonenumbers.PhoneNumber.raw_input)
|
|
}
|
|
::std::string* PhoneNumber::mutable_raw_input() {
|
|
set_has_raw_input();
|
|
// @@protoc_insertion_point(field_mutable:i18n.phonenumbers.PhoneNumber.raw_input)
|
|
return raw_input_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
::std::string* PhoneNumber::release_raw_input() {
|
|
// @@protoc_insertion_point(field_release:i18n.phonenumbers.PhoneNumber.raw_input)
|
|
clear_has_raw_input();
|
|
return raw_input_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
void PhoneNumber::set_allocated_raw_input(::std::string* raw_input) {
|
|
if (raw_input != NULL) {
|
|
set_has_raw_input();
|
|
} else {
|
|
clear_has_raw_input();
|
|
}
|
|
raw_input_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), raw_input);
|
|
// @@protoc_insertion_point(field_set_allocated:i18n.phonenumbers.PhoneNumber.raw_input)
|
|
}
|
|
|
|
// optional .i18n.phonenumbers.PhoneNumber.CountryCodeSource country_code_source = 6;
|
|
bool PhoneNumber::has_country_code_source() const {
|
|
return (_has_bits_[0] & 0x00000040u) != 0;
|
|
}
|
|
void PhoneNumber::set_has_country_code_source() {
|
|
_has_bits_[0] |= 0x00000040u;
|
|
}
|
|
void PhoneNumber::clear_has_country_code_source() {
|
|
_has_bits_[0] &= ~0x00000040u;
|
|
}
|
|
void PhoneNumber::clear_country_code_source() {
|
|
country_code_source_ = 1;
|
|
clear_has_country_code_source();
|
|
}
|
|
::i18n::phonenumbers::PhoneNumber_CountryCodeSource PhoneNumber::country_code_source() const {
|
|
// @@protoc_insertion_point(field_get:i18n.phonenumbers.PhoneNumber.country_code_source)
|
|
return static_cast< ::i18n::phonenumbers::PhoneNumber_CountryCodeSource >(country_code_source_);
|
|
}
|
|
void PhoneNumber::set_country_code_source(::i18n::phonenumbers::PhoneNumber_CountryCodeSource value) {
|
|
assert(::i18n::phonenumbers::PhoneNumber_CountryCodeSource_IsValid(value));
|
|
set_has_country_code_source();
|
|
country_code_source_ = value;
|
|
// @@protoc_insertion_point(field_set:i18n.phonenumbers.PhoneNumber.country_code_source)
|
|
}
|
|
|
|
// optional string preferred_domestic_carrier_code = 7;
|
|
bool PhoneNumber::has_preferred_domestic_carrier_code() const {
|
|
return (_has_bits_[0] & 0x00000004u) != 0;
|
|
}
|
|
void PhoneNumber::set_has_preferred_domestic_carrier_code() {
|
|
_has_bits_[0] |= 0x00000004u;
|
|
}
|
|
void PhoneNumber::clear_has_preferred_domestic_carrier_code() {
|
|
_has_bits_[0] &= ~0x00000004u;
|
|
}
|
|
void PhoneNumber::clear_preferred_domestic_carrier_code() {
|
|
preferred_domestic_carrier_code_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
clear_has_preferred_domestic_carrier_code();
|
|
}
|
|
const ::std::string& PhoneNumber::preferred_domestic_carrier_code() const {
|
|
// @@protoc_insertion_point(field_get:i18n.phonenumbers.PhoneNumber.preferred_domestic_carrier_code)
|
|
return preferred_domestic_carrier_code_.GetNoArena();
|
|
}
|
|
void PhoneNumber::set_preferred_domestic_carrier_code(const ::std::string& value) {
|
|
set_has_preferred_domestic_carrier_code();
|
|
preferred_domestic_carrier_code_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
|
// @@protoc_insertion_point(field_set:i18n.phonenumbers.PhoneNumber.preferred_domestic_carrier_code)
|
|
}
|
|
#if LANG_CXX11
|
|
void PhoneNumber::set_preferred_domestic_carrier_code(::std::string&& value) {
|
|
set_has_preferred_domestic_carrier_code();
|
|
preferred_domestic_carrier_code_.SetNoArena(
|
|
&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
|
|
// @@protoc_insertion_point(field_set_rvalue:i18n.phonenumbers.PhoneNumber.preferred_domestic_carrier_code)
|
|
}
|
|
#endif
|
|
void PhoneNumber::set_preferred_domestic_carrier_code(const char* value) {
|
|
GOOGLE_DCHECK(value != NULL);
|
|
set_has_preferred_domestic_carrier_code();
|
|
preferred_domestic_carrier_code_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
|
// @@protoc_insertion_point(field_set_char:i18n.phonenumbers.PhoneNumber.preferred_domestic_carrier_code)
|
|
}
|
|
void PhoneNumber::set_preferred_domestic_carrier_code(const char* value, size_t size) {
|
|
set_has_preferred_domestic_carrier_code();
|
|
preferred_domestic_carrier_code_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
::std::string(reinterpret_cast<const char*>(value), size));
|
|
// @@protoc_insertion_point(field_set_pointer:i18n.phonenumbers.PhoneNumber.preferred_domestic_carrier_code)
|
|
}
|
|
::std::string* PhoneNumber::mutable_preferred_domestic_carrier_code() {
|
|
set_has_preferred_domestic_carrier_code();
|
|
// @@protoc_insertion_point(field_mutable:i18n.phonenumbers.PhoneNumber.preferred_domestic_carrier_code)
|
|
return preferred_domestic_carrier_code_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
::std::string* PhoneNumber::release_preferred_domestic_carrier_code() {
|
|
// @@protoc_insertion_point(field_release:i18n.phonenumbers.PhoneNumber.preferred_domestic_carrier_code)
|
|
clear_has_preferred_domestic_carrier_code();
|
|
return preferred_domestic_carrier_code_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
void PhoneNumber::set_allocated_preferred_domestic_carrier_code(::std::string* preferred_domestic_carrier_code) {
|
|
if (preferred_domestic_carrier_code != NULL) {
|
|
set_has_preferred_domestic_carrier_code();
|
|
} else {
|
|
clear_has_preferred_domestic_carrier_code();
|
|
}
|
|
preferred_domestic_carrier_code_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), preferred_domestic_carrier_code);
|
|
// @@protoc_insertion_point(field_set_allocated:i18n.phonenumbers.PhoneNumber.preferred_domestic_carrier_code)
|
|
}
|
|
|
|
#endif // PROTOBUF_INLINE_NOT_IN_HEADERS
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
|
|
} // namespace phonenumbers
|
|
} // namespace i18n
|
|
|
|
// @@protoc_insertion_point(global_scope)
|