• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // NO CHECKED-IN PROTOBUF GENCODE
3 // source: phonenumber.proto
4 // Protobuf C++ Version: 5.29.4
5 
6 #include "phonenumber.pb.h"
7 
8 #include <algorithm>
9 #include <type_traits>
10 #include "google/protobuf/io/coded_stream.h"
11 #include "google/protobuf/generated_message_tctable_impl.h"
12 #include "google/protobuf/extension_set.h"
13 #include "google/protobuf/generated_message_util.h"
14 #include "google/protobuf/wire_format_lite.h"
15 #include "google/protobuf/io/zero_copy_stream_impl_lite.h"
16 // @@protoc_insertion_point(includes)
17 
18 // Must be included last.
19 #include "google/protobuf/port_def.inc"
20 PROTOBUF_PRAGMA_INIT_SEG
21 namespace _pb = ::google::protobuf;
22 namespace _pbi = ::google::protobuf::internal;
23 namespace _fl = ::google::protobuf::internal::field_layout;
24 namespace i18n {
25 namespace phonenumbers {
26 
Impl_(::_pbi::ConstantInitialized)27 inline constexpr PhoneNumber::Impl_::Impl_(
28     ::_pbi::ConstantInitialized) noexcept
29       : _cached_size_{0},
30         extension_(
31             &::google::protobuf::internal::fixed_address_empty_string,
32             ::_pbi::ConstantInitialized()),
33         raw_input_(
34             &::google::protobuf::internal::fixed_address_empty_string,
35             ::_pbi::ConstantInitialized()),
36         preferred_domestic_carrier_code_(
37             &::google::protobuf::internal::fixed_address_empty_string,
38             ::_pbi::ConstantInitialized()),
39         national_number_{::uint64_t{0u}},
40         country_code_{0},
41         italian_leading_zero_{false},
42         country_code_source_{static_cast< ::i18n::phonenumbers::PhoneNumber_CountryCodeSource >(0)},
43         number_of_leading_zeros_{1} {}
44 
45 template <typename>
PhoneNumber(::_pbi::ConstantInitialized)46 PROTOBUF_CONSTEXPR PhoneNumber::PhoneNumber(::_pbi::ConstantInitialized)
47 #if defined(PROTOBUF_CUSTOM_VTABLE)
48     : ::google::protobuf::MessageLite(_class_data_.base()),
49 #else   // PROTOBUF_CUSTOM_VTABLE
50     : ::google::protobuf::MessageLite(),
51 #endif  // PROTOBUF_CUSTOM_VTABLE
52       _impl_(::_pbi::ConstantInitialized()) {
53 }
54 struct PhoneNumberDefaultTypeInternal {
PhoneNumberDefaultTypeInternali18n::phonenumbers::PhoneNumberDefaultTypeInternal55   PROTOBUF_CONSTEXPR PhoneNumberDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~PhoneNumberDefaultTypeInternali18n::phonenumbers::PhoneNumberDefaultTypeInternal56   ~PhoneNumberDefaultTypeInternal() {}
57   union {
58     PhoneNumber _instance;
59   };
60 };
61 
62 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
63     PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PhoneNumberDefaultTypeInternal _PhoneNumber_default_instance_;
64 }  // namespace phonenumbers
65 }  // namespace i18n
66 namespace i18n {
67 namespace phonenumbers {
68 PROTOBUF_CONSTINIT const uint32_t PhoneNumber_CountryCodeSource_internal_data_[] = {
69     131072u, 32u, 262408u, };
PhoneNumber_CountryCodeSource_IsValid(int value)70 bool PhoneNumber_CountryCodeSource_IsValid(int value) {
71   return 0 <= value && value <= 20 && ((1049635u >> value) & 1) != 0;
72 }
73 static ::google::protobuf::internal::ExplicitlyConstructed<std::string>
74     PhoneNumber_CountryCodeSource_strings[5] = {};
75 
76 static const char PhoneNumber_CountryCodeSource_names[] = {
77     "FROM_DEFAULT_COUNTRY"
78     "FROM_NUMBER_WITHOUT_PLUS_SIGN"
79     "FROM_NUMBER_WITH_IDD"
80     "FROM_NUMBER_WITH_PLUS_SIGN"
81     "UNSPECIFIED"
82 };
83 
84 static const ::google::protobuf::internal::EnumEntry PhoneNumber_CountryCodeSource_entries[] =
85     {
86         {{&PhoneNumber_CountryCodeSource_names[0], 20}, 20},
87         {{&PhoneNumber_CountryCodeSource_names[20], 29}, 10},
88         {{&PhoneNumber_CountryCodeSource_names[49], 20}, 5},
89         {{&PhoneNumber_CountryCodeSource_names[69], 26}, 1},
90         {{&PhoneNumber_CountryCodeSource_names[95], 11}, 0},
91 };
92 
93 static const int PhoneNumber_CountryCodeSource_entries_by_number[] = {
94     4,  // 0 -> UNSPECIFIED
95     3,  // 1 -> FROM_NUMBER_WITH_PLUS_SIGN
96     2,  // 5 -> FROM_NUMBER_WITH_IDD
97     1,  // 10 -> FROM_NUMBER_WITHOUT_PLUS_SIGN
98     0,  // 20 -> FROM_DEFAULT_COUNTRY
99 };
100 
PhoneNumber_CountryCodeSource_Name(PhoneNumber_CountryCodeSource value)101 const std::string& PhoneNumber_CountryCodeSource_Name(PhoneNumber_CountryCodeSource value) {
102   static const bool kDummy =
103       ::google::protobuf::internal::InitializeEnumStrings(
104           PhoneNumber_CountryCodeSource_entries, PhoneNumber_CountryCodeSource_entries_by_number,
105           5, PhoneNumber_CountryCodeSource_strings);
106   (void)kDummy;
107 
108   int idx = ::google::protobuf::internal::LookUpEnumName(
109       PhoneNumber_CountryCodeSource_entries, PhoneNumber_CountryCodeSource_entries_by_number, 5,
110       value);
111   return idx == -1 ? ::google::protobuf::internal::GetEmptyString()
112                    : PhoneNumber_CountryCodeSource_strings[idx].get();
113 }
114 
PhoneNumber_CountryCodeSource_Parse(absl::string_view name,PhoneNumber_CountryCodeSource * value)115 bool PhoneNumber_CountryCodeSource_Parse(absl::string_view name, PhoneNumber_CountryCodeSource* value) {
116   int int_value;
117   bool success = ::google::protobuf::internal::LookUpEnumValue(
118       PhoneNumber_CountryCodeSource_entries, 5, name, &int_value);
119   if (success) {
120     *value = static_cast<PhoneNumber_CountryCodeSource>(int_value);
121   }
122   return success;
123 }
124 #if (__cplusplus < 201703) && \
125   (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
126 
127 constexpr PhoneNumber_CountryCodeSource PhoneNumber::UNSPECIFIED;
128 constexpr PhoneNumber_CountryCodeSource PhoneNumber::FROM_NUMBER_WITH_PLUS_SIGN;
129 constexpr PhoneNumber_CountryCodeSource PhoneNumber::FROM_NUMBER_WITH_IDD;
130 constexpr PhoneNumber_CountryCodeSource PhoneNumber::FROM_NUMBER_WITHOUT_PLUS_SIGN;
131 constexpr PhoneNumber_CountryCodeSource PhoneNumber::FROM_DEFAULT_COUNTRY;
132 constexpr PhoneNumber_CountryCodeSource PhoneNumber::CountryCodeSource_MIN;
133 constexpr PhoneNumber_CountryCodeSource PhoneNumber::CountryCodeSource_MAX;
134 constexpr int PhoneNumber::CountryCodeSource_ARRAYSIZE;
135 
136 #endif  // (__cplusplus < 201703) &&
137         // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
138 // ===================================================================
139 
140 class PhoneNumber::_Internal {
141  public:
142   using HasBits =
143       decltype(std::declval<PhoneNumber>()._impl_._has_bits_);
144   static constexpr ::int32_t kHasBitsOffset =
145       8 * PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_._has_bits_);
MissingRequiredFields(const HasBits & has_bits)146   static bool MissingRequiredFields(const HasBits& has_bits) {
147     return ((has_bits[0] & 0x00000018) ^ 0x00000018) != 0;
148   }
149 };
150 
PhoneNumber(::google::protobuf::Arena * arena)151 PhoneNumber::PhoneNumber(::google::protobuf::Arena* arena)
152 #if defined(PROTOBUF_CUSTOM_VTABLE)
153     : ::google::protobuf::MessageLite(arena, _class_data_.base()) {
154 #else   // PROTOBUF_CUSTOM_VTABLE
155     : ::google::protobuf::MessageLite(arena) {
156 #endif  // PROTOBUF_CUSTOM_VTABLE
157   SharedCtor(arena);
158   // @@protoc_insertion_point(arena_constructor:i18n.phonenumbers.PhoneNumber)
159 }
160 inline PROTOBUF_NDEBUG_INLINE PhoneNumber::Impl_::Impl_(
161     ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
162     const Impl_& from, const ::i18n::phonenumbers::PhoneNumber& from_msg)
163       : _has_bits_{from._has_bits_},
164         _cached_size_{0},
165         extension_(arena, from.extension_),
166         raw_input_(arena, from.raw_input_),
167         preferred_domestic_carrier_code_(arena, from.preferred_domestic_carrier_code_) {}
168 
169 PhoneNumber::PhoneNumber(
170     ::google::protobuf::Arena* arena,
171     const PhoneNumber& from)
172 #if defined(PROTOBUF_CUSTOM_VTABLE)
173     : ::google::protobuf::MessageLite(arena, _class_data_.base()) {
174 #else   // PROTOBUF_CUSTOM_VTABLE
175     : ::google::protobuf::MessageLite(arena) {
176 #endif  // PROTOBUF_CUSTOM_VTABLE
177   PhoneNumber* const _this = this;
178   (void)_this;
179   _internal_metadata_.MergeFrom<std::string>(
180       from._internal_metadata_);
181   new (&_impl_) Impl_(internal_visibility(), arena, from._impl_, from);
182   ::memcpy(reinterpret_cast<char *>(&_impl_) +
183                offsetof(Impl_, national_number_),
184            reinterpret_cast<const char *>(&from._impl_) +
185                offsetof(Impl_, national_number_),
186            offsetof(Impl_, number_of_leading_zeros_) -
187                offsetof(Impl_, national_number_) +
188                sizeof(Impl_::number_of_leading_zeros_));
189 
190   // @@protoc_insertion_point(copy_constructor:i18n.phonenumbers.PhoneNumber)
191 }
192 inline PROTOBUF_NDEBUG_INLINE PhoneNumber::Impl_::Impl_(
193     ::google::protobuf::internal::InternalVisibility visibility,
194     ::google::protobuf::Arena* arena)
195       : _cached_size_{0},
196         extension_(arena),
197         raw_input_(arena),
198         preferred_domestic_carrier_code_(arena),
199         number_of_leading_zeros_{1} {}
200 
201 inline void PhoneNumber::SharedCtor(::_pb::Arena* arena) {
202   new (&_impl_) Impl_(internal_visibility(), arena);
203   ::memset(reinterpret_cast<char *>(&_impl_) +
204                offsetof(Impl_, national_number_),
205            0,
206            offsetof(Impl_, country_code_source_) -
207                offsetof(Impl_, national_number_) +
208                sizeof(Impl_::country_code_source_));
209 }
210 PhoneNumber::~PhoneNumber() {
211   // @@protoc_insertion_point(destructor:i18n.phonenumbers.PhoneNumber)
212   SharedDtor(*this);
213 }
214 inline void PhoneNumber::SharedDtor(MessageLite& self) {
215   PhoneNumber& this_ = static_cast<PhoneNumber&>(self);
216   this_._internal_metadata_.Delete<std::string>();
217   ABSL_DCHECK(this_.GetArena() == nullptr);
218   this_._impl_.extension_.Destroy();
219   this_._impl_.raw_input_.Destroy();
220   this_._impl_.preferred_domestic_carrier_code_.Destroy();
221   this_._impl_.~Impl_();
222 }
223 
224 inline void* PhoneNumber::PlacementNew_(const void*, void* mem,
225                                         ::google::protobuf::Arena* arena) {
226   return ::new (mem) PhoneNumber(arena);
227 }
228 constexpr auto PhoneNumber::InternalNewImpl_() {
229   return ::google::protobuf::internal::MessageCreator::CopyInit(sizeof(PhoneNumber),
230                                             alignof(PhoneNumber));
231 }
232 PROTOBUF_CONSTINIT
233 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
234 const ::google::protobuf::internal::ClassDataLite<30> PhoneNumber::_class_data_ = {
235     {
236         &_PhoneNumber_default_instance_._instance,
237         &_table_.header,
238         nullptr,  // OnDemandRegisterArenaDtor
239         PhoneNumber::IsInitializedImpl,
240         &PhoneNumber::MergeImpl,
241         ::google::protobuf::MessageLite::GetNewImpl<PhoneNumber>(),
242 #if defined(PROTOBUF_CUSTOM_VTABLE)
243         &PhoneNumber::SharedDtor,
244         ::google::protobuf::MessageLite::GetClearImpl<PhoneNumber>(), &PhoneNumber::ByteSizeLong,
245             &PhoneNumber::_InternalSerialize,
246 #endif  // PROTOBUF_CUSTOM_VTABLE
247         PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_._cached_size_),
248         true,
249     },
250     "i18n.phonenumbers.PhoneNumber",
251 };
252 const ::google::protobuf::internal::ClassData* PhoneNumber::GetClassData() const {
253   return _class_data_.base();
254 }
255 PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
256 const ::_pbi::TcParseTable<3, 8, 1, 0, 2> PhoneNumber::_table_ = {
257   {
258     PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_._has_bits_),
259     0, // no _extensions_
260     8, 56,  // max_field_number, fast_idx_mask
261     offsetof(decltype(_table_), field_lookup_table),
262     4294967040,  // skipmap
263     offsetof(decltype(_table_), field_entries),
264     8,  // num_field_entries
265     1,  // num_aux_entries
266     offsetof(decltype(_table_), aux_entries),
267     _class_data_.base(),
268     nullptr,  // post_loop_handler
269     ::_pbi::TcParser::GenericFallbackLite,  // fallback
270     #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
271     ::_pbi::TcParser::GetTable<::i18n::phonenumbers::PhoneNumber>(),  // to_prefetch
272     #endif  // PROTOBUF_PREFETCH_PARSE_TABLE
273   }, {{
274     // optional int32 number_of_leading_zeros = 8 [default = 1];
275     {::_pbi::TcParser::FastV32S1,
276      {64, 7, 0, PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.number_of_leading_zeros_)}},
277     // required int32 country_code = 1;
278     {::_pbi::TcParser::FastV32S1,
279      {8, 4, 0, PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.country_code_)}},
280     // required uint64 national_number = 2;
281     {::_pbi::TcParser::FastV64S1,
282      {16, 3, 0, PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.national_number_)}},
283     // optional string extension = 3;
284     {::_pbi::TcParser::FastBS1,
285      {26, 0, 0, PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.extension_)}},
286     // optional bool italian_leading_zero = 4;
287     {::_pbi::TcParser::FastV8S1,
288      {32, 5, 0, PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.italian_leading_zero_)}},
289     // optional string raw_input = 5;
290     {::_pbi::TcParser::FastBS1,
291      {42, 1, 0, PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.raw_input_)}},
292     // optional .i18n.phonenumbers.PhoneNumber.CountryCodeSource country_code_source = 6;
293     {::_pbi::TcParser::FastEvS1,
294      {48, 6, 0, PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.country_code_source_)}},
295     // optional string preferred_domestic_carrier_code = 7;
296     {::_pbi::TcParser::FastBS1,
297      {58, 2, 0, PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.preferred_domestic_carrier_code_)}},
298   }}, {{
299     65535, 65535
300   }}, {{
301     // required int32 country_code = 1;
302     {PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.country_code_), _Internal::kHasBitsOffset + 4, 0,
303     (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
304     // required uint64 national_number = 2;
305     {PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.national_number_), _Internal::kHasBitsOffset + 3, 0,
306     (0 | ::_fl::kFcOptional | ::_fl::kUInt64)},
307     // optional string extension = 3;
308     {PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.extension_), _Internal::kHasBitsOffset + 0, 0,
309     (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
310     // optional bool italian_leading_zero = 4;
311     {PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.italian_leading_zero_), _Internal::kHasBitsOffset + 5, 0,
312     (0 | ::_fl::kFcOptional | ::_fl::kBool)},
313     // optional string raw_input = 5;
314     {PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.raw_input_), _Internal::kHasBitsOffset + 1, 0,
315     (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
316     // optional .i18n.phonenumbers.PhoneNumber.CountryCodeSource country_code_source = 6;
317     {PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.country_code_source_), _Internal::kHasBitsOffset + 6, 0,
318     (0 | ::_fl::kFcOptional | ::_fl::kEnum)},
319     // optional string preferred_domestic_carrier_code = 7;
320     {PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.preferred_domestic_carrier_code_), _Internal::kHasBitsOffset + 2, 0,
321     (0 | ::_fl::kFcOptional | ::_fl::kBytes | ::_fl::kRepAString)},
322     // optional int32 number_of_leading_zeros = 8 [default = 1];
323     {PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.number_of_leading_zeros_), _Internal::kHasBitsOffset + 7, 0,
324     (0 | ::_fl::kFcOptional | ::_fl::kInt32)},
325   }}, {{
326     {::_pbi::FieldAuxEnumData{}, ::i18n::phonenumbers::PhoneNumber_CountryCodeSource_internal_data_},
327   }}, {{
328   }},
329 };
330 
331 PROTOBUF_NOINLINE void PhoneNumber::Clear() {
332 // @@protoc_insertion_point(message_clear_start:i18n.phonenumbers.PhoneNumber)
333   ::google::protobuf::internal::TSanWrite(&_impl_);
334   ::uint32_t cached_has_bits = 0;
335   // Prevent compiler warnings about cached_has_bits being unused
336   (void) cached_has_bits;
337 
338   cached_has_bits = _impl_._has_bits_[0];
339   if (cached_has_bits & 0x00000007u) {
340     if (cached_has_bits & 0x00000001u) {
341       _impl_.extension_.ClearNonDefaultToEmpty();
342     }
343     if (cached_has_bits & 0x00000002u) {
344       _impl_.raw_input_.ClearNonDefaultToEmpty();
345     }
346     if (cached_has_bits & 0x00000004u) {
347       _impl_.preferred_domestic_carrier_code_.ClearNonDefaultToEmpty();
348     }
349   }
350   if (cached_has_bits & 0x000000f8u) {
351     ::memset(&_impl_.national_number_, 0, static_cast<::size_t>(
352         reinterpret_cast<char*>(&_impl_.country_code_source_) -
353         reinterpret_cast<char*>(&_impl_.national_number_)) + sizeof(_impl_.country_code_source_));
354     _impl_.number_of_leading_zeros_ = 1;
355   }
356   _impl_._has_bits_.Clear();
357   _internal_metadata_.Clear<std::string>();
358 }
359 
360 #if defined(PROTOBUF_CUSTOM_VTABLE)
361         ::uint8_t* PhoneNumber::_InternalSerialize(
362             const MessageLite& base, ::uint8_t* target,
363             ::google::protobuf::io::EpsCopyOutputStream* stream) {
364           const PhoneNumber& this_ = static_cast<const PhoneNumber&>(base);
365 #else   // PROTOBUF_CUSTOM_VTABLE
366         ::uint8_t* PhoneNumber::_InternalSerialize(
367             ::uint8_t* target,
368             ::google::protobuf::io::EpsCopyOutputStream* stream) const {
369           const PhoneNumber& this_ = *this;
370 #endif  // PROTOBUF_CUSTOM_VTABLE
371           // @@protoc_insertion_point(serialize_to_array_start:i18n.phonenumbers.PhoneNumber)
372           ::uint32_t cached_has_bits = 0;
373           (void)cached_has_bits;
374 
375           cached_has_bits = this_._impl_._has_bits_[0];
376           // required int32 country_code = 1;
377           if (cached_has_bits & 0x00000010u) {
378             target = ::google::protobuf::internal::WireFormatLite::
379                 WriteInt32ToArrayWithField<1>(
380                     stream, this_._internal_country_code(), target);
381           }
382 
383           // required uint64 national_number = 2;
384           if (cached_has_bits & 0x00000008u) {
385             target = stream->EnsureSpace(target);
386             target = ::_pbi::WireFormatLite::WriteUInt64ToArray(
387                 2, this_._internal_national_number(), target);
388           }
389 
390           // optional string extension = 3;
391           if (cached_has_bits & 0x00000001u) {
392             const std::string& _s = this_._internal_extension();
393             target = stream->WriteStringMaybeAliased(3, _s, target);
394           }
395 
396           // optional bool italian_leading_zero = 4;
397           if (cached_has_bits & 0x00000020u) {
398             target = stream->EnsureSpace(target);
399             target = ::_pbi::WireFormatLite::WriteBoolToArray(
400                 4, this_._internal_italian_leading_zero(), target);
401           }
402 
403           // optional string raw_input = 5;
404           if (cached_has_bits & 0x00000002u) {
405             const std::string& _s = this_._internal_raw_input();
406             target = stream->WriteStringMaybeAliased(5, _s, target);
407           }
408 
409           // optional .i18n.phonenumbers.PhoneNumber.CountryCodeSource country_code_source = 6;
410           if (cached_has_bits & 0x00000040u) {
411             target = stream->EnsureSpace(target);
412             target = ::_pbi::WireFormatLite::WriteEnumToArray(
413                 6, this_._internal_country_code_source(), target);
414           }
415 
416           // optional string preferred_domestic_carrier_code = 7;
417           if (cached_has_bits & 0x00000004u) {
418             const std::string& _s = this_._internal_preferred_domestic_carrier_code();
419             target = stream->WriteStringMaybeAliased(7, _s, target);
420           }
421 
422           // optional int32 number_of_leading_zeros = 8 [default = 1];
423           if (cached_has_bits & 0x00000080u) {
424             target = ::google::protobuf::internal::WireFormatLite::
425                 WriteInt32ToArrayWithField<8>(
426                     stream, this_._internal_number_of_leading_zeros(), target);
427           }
428 
429           if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
430             target = stream->WriteRaw(
431                 this_._internal_metadata_.unknown_fields<std::string>(::google::protobuf::internal::GetEmptyString).data(),
432                 static_cast<int>(this_._internal_metadata_.unknown_fields<std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
433           }
434           // @@protoc_insertion_point(serialize_to_array_end:i18n.phonenumbers.PhoneNumber)
435           return target;
436         }
437 
438 #if defined(PROTOBUF_CUSTOM_VTABLE)
439         ::size_t PhoneNumber::ByteSizeLong(const MessageLite& base) {
440           const PhoneNumber& this_ = static_cast<const PhoneNumber&>(base);
441 #else   // PROTOBUF_CUSTOM_VTABLE
442         ::size_t PhoneNumber::ByteSizeLong() const {
443           const PhoneNumber& this_ = *this;
444 #endif  // PROTOBUF_CUSTOM_VTABLE
445           // @@protoc_insertion_point(message_byte_size_start:i18n.phonenumbers.PhoneNumber)
446           ::size_t total_size = 0;
447 
448           ::uint32_t cached_has_bits = 0;
449           // Prevent compiler warnings about cached_has_bits being unused
450           (void)cached_has_bits;
451 
452           ::_pbi::Prefetch5LinesFrom7Lines(&this_);
453           cached_has_bits = this_._impl_._has_bits_[0];
454           if (cached_has_bits & 0x00000007u) {
455             // optional string extension = 3;
456             if (cached_has_bits & 0x00000001u) {
457               total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
458                                               this_._internal_extension());
459             }
460             // optional string raw_input = 5;
461             if (cached_has_bits & 0x00000002u) {
462               total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
463                                               this_._internal_raw_input());
464             }
465             // optional string preferred_domestic_carrier_code = 7;
466             if (cached_has_bits & 0x00000004u) {
467               total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
468                                               this_._internal_preferred_domestic_carrier_code());
469             }
470           }
471           if (cached_has_bits & 0x00000018u) {
472             // required uint64 national_number = 2;
473             if (cached_has_bits & 0x00000008u) {
474               total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(
475                   this_._internal_national_number());
476             }
477             // required int32 country_code = 1;
478             if (cached_has_bits & 0x00000010u) {
479               total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
480                   this_._internal_country_code());
481             }
482           }
483           if (cached_has_bits & 0x000000e0u) {
484             // optional bool italian_leading_zero = 4;
485             if (cached_has_bits & 0x00000020u) {
486               total_size += 2;
487             }
488             // optional .i18n.phonenumbers.PhoneNumber.CountryCodeSource country_code_source = 6;
489             if (cached_has_bits & 0x00000040u) {
490               total_size += 1 +
491                             ::_pbi::WireFormatLite::EnumSize(this_._internal_country_code_source());
492             }
493             // optional int32 number_of_leading_zeros = 8 [default = 1];
494             if (cached_has_bits & 0x00000080u) {
495               total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
496                   this_._internal_number_of_leading_zeros());
497             }
498           }
499           if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
500             total_size += this_._internal_metadata_.unknown_fields<std::string>(::google::protobuf::internal::GetEmptyString).size();
501           }
502           this_._impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
503           return total_size;
504         }
505 
506 void PhoneNumber::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
507   auto* const _this = static_cast<PhoneNumber*>(&to_msg);
508   auto& from = static_cast<const PhoneNumber&>(from_msg);
509   // @@protoc_insertion_point(class_specific_merge_from_start:i18n.phonenumbers.PhoneNumber)
510   ABSL_DCHECK_NE(&from, _this);
511   ::uint32_t cached_has_bits = 0;
512   (void) cached_has_bits;
513 
514   cached_has_bits = from._impl_._has_bits_[0];
515   if (cached_has_bits & 0x000000ffu) {
516     if (cached_has_bits & 0x00000001u) {
517       _this->_internal_set_extension(from._internal_extension());
518     }
519     if (cached_has_bits & 0x00000002u) {
520       _this->_internal_set_raw_input(from._internal_raw_input());
521     }
522     if (cached_has_bits & 0x00000004u) {
523       _this->_internal_set_preferred_domestic_carrier_code(from._internal_preferred_domestic_carrier_code());
524     }
525     if (cached_has_bits & 0x00000008u) {
526       _this->_impl_.national_number_ = from._impl_.national_number_;
527     }
528     if (cached_has_bits & 0x00000010u) {
529       _this->_impl_.country_code_ = from._impl_.country_code_;
530     }
531     if (cached_has_bits & 0x00000020u) {
532       _this->_impl_.italian_leading_zero_ = from._impl_.italian_leading_zero_;
533     }
534     if (cached_has_bits & 0x00000040u) {
535       _this->_impl_.country_code_source_ = from._impl_.country_code_source_;
536     }
537     if (cached_has_bits & 0x00000080u) {
538       _this->_impl_.number_of_leading_zeros_ = from._impl_.number_of_leading_zeros_;
539     }
540   }
541   _this->_impl_._has_bits_[0] |= cached_has_bits;
542   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
543 }
544 
545 void PhoneNumber::CopyFrom(const PhoneNumber& from) {
546 // @@protoc_insertion_point(class_specific_copy_from_start:i18n.phonenumbers.PhoneNumber)
547   if (&from == this) return;
548   Clear();
549   MergeFrom(from);
550 }
551 
552 PROTOBUF_NOINLINE bool PhoneNumber::IsInitializedImpl(
553     const MessageLite& msg) {
554   auto& this_ = static_cast<const PhoneNumber&>(msg);
555   if (_Internal::MissingRequiredFields(this_._impl_._has_bits_)) {
556     return false;
557   }
558   return true;
559 }
560 
561 void PhoneNumber::InternalSwap(PhoneNumber* PROTOBUF_RESTRICT other) {
562   using std::swap;
563   auto* arena = GetArena();
564   ABSL_DCHECK_EQ(arena, other->GetArena());
565   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
566   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
567   ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.extension_, &other->_impl_.extension_, arena);
568   ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.raw_input_, &other->_impl_.raw_input_, arena);
569   ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.preferred_domestic_carrier_code_, &other->_impl_.preferred_domestic_carrier_code_, arena);
570   ::google::protobuf::internal::memswap<
571       PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.number_of_leading_zeros_)
572       + sizeof(PhoneNumber::_impl_.number_of_leading_zeros_)
573       - PROTOBUF_FIELD_OFFSET(PhoneNumber, _impl_.national_number_)>(
574           reinterpret_cast<char*>(&_impl_.national_number_),
575           reinterpret_cast<char*>(&other->_impl_.national_number_));
576 }
577 
578 // @@protoc_insertion_point(namespace_scope)
579 }  // namespace phonenumbers
580 }  // namespace i18n
581 namespace google {
582 namespace protobuf {
583 }  // namespace protobuf
584 }  // namespace google
585 // @@protoc_insertion_point(global_scope)
586 #include "google/protobuf/port_undef.inc"
587