-
Notifications
You must be signed in to change notification settings - Fork 69
/
struct_lite.pb.cc
999 lines (901 loc) · 33.2 KB
/
struct_lite.pb.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
// Copyright 2016-2019 Envoy Project Authors
// Copyright 2020 Google LLC
//
// 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.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: struct_lite.proto
// Protobuf C++ Version: 5.26.1
#include "struct_lite.pb.h"
#include <algorithm>
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/extension_set.h"
#include "google/protobuf/wire_format_lite.h"
#include "google/protobuf/io/zero_copy_stream_impl_lite.h"
#include "google/protobuf/generated_message_tctable_impl.h"
// @@protoc_insertion_point(includes)
// Must be included last.
#include "google/protobuf/port_def.inc"
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::google::protobuf;
namespace _pbi = ::google::protobuf::internal;
namespace _fl = ::google::protobuf::internal::field_layout;
namespace google {
namespace protobuf {
inline constexpr ListValue::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: values_{},
_cached_size_{0} {}
template <typename>
PROTOBUF_CONSTEXPR ListValue::ListValue(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct ListValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR ListValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~ListValueDefaultTypeInternal() {}
union {
ListValue _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ListValueDefaultTypeInternal _ListValue_default_instance_;
inline constexpr Struct::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: fields_{},
_cached_size_{0} {}
template <typename>
PROTOBUF_CONSTEXPR Struct::Struct(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct StructDefaultTypeInternal {
PROTOBUF_CONSTEXPR StructDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~StructDefaultTypeInternal() {}
union {
Struct _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StructDefaultTypeInternal _Struct_default_instance_;
inline constexpr Value::Impl_::Impl_(
::_pbi::ConstantInitialized) noexcept
: kind_{},
_cached_size_{0},
_oneof_case_{} {}
template <typename>
PROTOBUF_CONSTEXPR Value::Value(::_pbi::ConstantInitialized)
: _impl_(::_pbi::ConstantInitialized()) {}
struct ValueDefaultTypeInternal {
PROTOBUF_CONSTEXPR ValueDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~ValueDefaultTypeInternal() {}
union {
Value _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValueDefaultTypeInternal _Value_default_instance_;
} // namespace protobuf
} // namespace google
namespace google {
namespace protobuf {
PROTOBUF_CONSTINIT const uint32_t NullValue_internal_data_[] = {
65536u, 0u, };
bool NullValue_IsValid(int value) {
return 0 <= value && value <= 0;
}
static ::google::protobuf::internal::ExplicitlyConstructed<std::string>
NullValue_strings[1] = {};
static const char NullValue_names[] = {
"NULL_VALUE"
};
static const ::google::protobuf::internal::EnumEntry NullValue_entries[] =
{
{{&NullValue_names[0], 10}, 0},
};
static const int NullValue_entries_by_number[] = {
0, // 0 -> NULL_VALUE
};
const std::string& NullValue_Name(NullValue value) {
static const bool kDummy =
::google::protobuf::internal::InitializeEnumStrings(
NullValue_entries, NullValue_entries_by_number,
1, NullValue_strings);
(void)kDummy;
int idx = ::google::protobuf::internal::LookUpEnumName(
NullValue_entries, NullValue_entries_by_number, 1,
value);
return idx == -1 ? ::google::protobuf::internal::GetEmptyString()
: NullValue_strings[idx].get();
}
bool NullValue_Parse(absl::string_view name, NullValue* value) {
int int_value;
bool success = ::google::protobuf::internal::LookUpEnumValue(
NullValue_entries, 1, name, &int_value);
if (success) {
*value = static_cast<NullValue>(int_value);
}
return success;
}
// ===================================================================
// ===================================================================
class Struct::_Internal {
public:
};
Struct::Struct(::google::protobuf::Arena* arena)
: ::google::protobuf::MessageLite(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Struct)
}
inline PROTOBUF_NDEBUG_INLINE Struct::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
const Impl_& from)
: fields_{visibility, arena, from.fields_},
_cached_size_{0} {}
Struct::Struct(
::google::protobuf::Arena* arena,
const Struct& from)
: ::google::protobuf::MessageLite(arena) {
Struct* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<std::string>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.Struct)
}
inline PROTOBUF_NDEBUG_INLINE Struct::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: fields_{visibility, arena},
_cached_size_{0} {}
inline void Struct::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
}
Struct::~Struct() {
// @@protoc_insertion_point(destructor:google.protobuf.Struct)
_internal_metadata_.Delete<std::string>();
SharedDtor();
}
inline void Struct::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
_impl_.~Impl_();
}
const ::google::protobuf::MessageLite::ClassData*
Struct::GetClassData() const {
struct ClassData_ {
::google::protobuf::MessageLite::ClassData header;
char type_name[23];
};
PROTOBUF_CONSTINIT static const ClassData_ _data_ = {
{
nullptr, // OnDemandRegisterArenaDtor
PROTOBUF_FIELD_OFFSET(Struct, _impl_._cached_size_),
true,
},
"google.protobuf.Struct",
};
return &_data_.header;
}
PROTOBUF_NOINLINE void Struct::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Struct)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.fields_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* Struct::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<0, 1, 2, 37, 2> Struct::_table_ = {
{
0, // no _has_bits_
0, // no _extensions_
1, 0, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967294, // skipmap
offsetof(decltype(_table_), field_entries),
1, // num_field_entries
2, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_Struct_default_instance_._instance,
::_pbi::TcParser::GenericFallbackLite, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::google::protobuf::Struct>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
{::_pbi::TcParser::MiniParse, {}},
}}, {{
65535, 65535
}}, {{
// map<string, .google.protobuf.Value> fields = 1;
{PROTOBUF_FIELD_OFFSET(Struct, _impl_.fields_), 0, 0,
(0 | ::_fl::kFcRepeated | ::_fl::kMap)},
}}, {{
{::_pbi::TcParser::GetMapAuxInfo<
decltype(Struct()._impl_.fields_)>(
1, 0, 0, 9,
11)},
{::_pbi::TcParser::CreateInArenaStorageCb<::google::protobuf::Value>},
}}, {{
"\26\6\0\0\0\0\0\0"
"google.protobuf.Struct"
"fields"
}},
};
::uint8_t* Struct::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Struct)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
// map<string, .google.protobuf.Value> fields = 1;
if (!_internal_fields().empty()) {
using MapType = ::google::protobuf::Map<std::string, ::google::protobuf::Value>;
using WireHelper = _pbi::MapEntryFuncs<std::string, ::google::protobuf::Value,
_pbi::WireFormatLite::TYPE_STRING,
_pbi::WireFormatLite::TYPE_MESSAGE>;
const auto& field = _internal_fields();
if (stream->IsSerializationDeterministic() && field.size() > 1) {
for (const auto& entry : ::google::protobuf::internal::MapSorterPtr<MapType>(field)) {
target = WireHelper::InternalSerialize(
1, entry.first, entry.second, target, stream);
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
entry.first.data(), static_cast<int>(entry.first.length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Struct.fields");
}
} else {
for (const auto& entry : field) {
target = WireHelper::InternalSerialize(
1, entry.first, entry.second, target, stream);
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
entry.first.data(), static_cast<int>(entry.first.length()),
::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Struct.fields");
}
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(
_internal_metadata_.unknown_fields<std::string>(::google::protobuf::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Struct)
return target;
}
::size_t Struct::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Struct)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// map<string, .google.protobuf.Value> fields = 1;
total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_fields_size());
for (const auto& entry : _internal_fields()) {
total_size += _pbi::MapEntryFuncs<std::string, ::google::protobuf::Value,
_pbi::WireFormatLite::TYPE_STRING,
_pbi::WireFormatLite::TYPE_MESSAGE>::ByteSizeLong(entry.first, entry.second);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::google::protobuf::internal::GetEmptyString).size();
}
_impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
return total_size;
}
void Struct::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const Struct*>(
&from));
}
void Struct::MergeFrom(const Struct& from) {
Struct* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Struct)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_impl_.fields_.MergeFrom(from._impl_.fields_);
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void Struct::CopyFrom(const Struct& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Struct)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool Struct::IsInitialized() const {
return true;
}
void Struct::InternalSwap(Struct* PROTOBUF_RESTRICT other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.fields_.InternalSwap(&other->_impl_.fields_);
}
// ===================================================================
class Value::_Internal {
public:
static constexpr ::int32_t kOneofCaseOffset =
PROTOBUF_FIELD_OFFSET(::google::protobuf::Value, _impl_._oneof_case_);
};
void Value::set_allocated_struct_value(::google::protobuf::Struct* struct_value) {
::google::protobuf::Arena* message_arena = GetArena();
clear_kind();
if (struct_value) {
::google::protobuf::Arena* submessage_arena = struct_value->GetArena();
if (message_arena != submessage_arena) {
struct_value = ::google::protobuf::internal::GetOwnedMessage(message_arena, struct_value, submessage_arena);
}
set_has_struct_value();
_impl_.kind_.struct_value_ = struct_value;
}
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.struct_value)
}
void Value::set_allocated_list_value(::google::protobuf::ListValue* list_value) {
::google::protobuf::Arena* message_arena = GetArena();
clear_kind();
if (list_value) {
::google::protobuf::Arena* submessage_arena = list_value->GetArena();
if (message_arena != submessage_arena) {
list_value = ::google::protobuf::internal::GetOwnedMessage(message_arena, list_value, submessage_arena);
}
set_has_list_value();
_impl_.kind_.list_value_ = list_value;
}
// @@protoc_insertion_point(field_set_allocated:google.protobuf.Value.list_value)
}
Value::Value(::google::protobuf::Arena* arena)
: ::google::protobuf::MessageLite(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.Value)
}
inline PROTOBUF_NDEBUG_INLINE Value::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
const Impl_& from)
: kind_{},
_cached_size_{0},
_oneof_case_{from._oneof_case_[0]} {}
Value::Value(
::google::protobuf::Arena* arena,
const Value& from)
: ::google::protobuf::MessageLite(arena) {
Value* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<std::string>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
switch (kind_case()) {
case KIND_NOT_SET:
break;
case kNullValue:
_impl_.kind_.null_value_ = from._impl_.kind_.null_value_;
break;
case kNumberValue:
_impl_.kind_.number_value_ = from._impl_.kind_.number_value_;
break;
case kStringValue:
new (&_impl_.kind_.string_value_) decltype(_impl_.kind_.string_value_){arena, from._impl_.kind_.string_value_};
break;
case kBoolValue:
_impl_.kind_.bool_value_ = from._impl_.kind_.bool_value_;
break;
case kStructValue:
_impl_.kind_.struct_value_ = ::google::protobuf::MessageLite::CopyConstruct<::google::protobuf::Struct>(arena, *from._impl_.kind_.struct_value_);
break;
case kListValue:
_impl_.kind_.list_value_ = ::google::protobuf::MessageLite::CopyConstruct<::google::protobuf::ListValue>(arena, *from._impl_.kind_.list_value_);
break;
}
// @@protoc_insertion_point(copy_constructor:google.protobuf.Value)
}
inline PROTOBUF_NDEBUG_INLINE Value::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: kind_{},
_cached_size_{0},
_oneof_case_{} {}
inline void Value::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
}
Value::~Value() {
// @@protoc_insertion_point(destructor:google.protobuf.Value)
_internal_metadata_.Delete<std::string>();
SharedDtor();
}
inline void Value::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
if (has_kind()) {
clear_kind();
}
_impl_.~Impl_();
}
void Value::clear_kind() {
// @@protoc_insertion_point(one_of_clear_start:google.protobuf.Value)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
switch (kind_case()) {
case kNullValue: {
// No need to clear
break;
}
case kNumberValue: {
// No need to clear
break;
}
case kStringValue: {
_impl_.kind_.string_value_.Destroy();
break;
}
case kBoolValue: {
// No need to clear
break;
}
case kStructValue: {
if (GetArena() == nullptr) {
delete _impl_.kind_.struct_value_;
}
break;
}
case kListValue: {
if (GetArena() == nullptr) {
delete _impl_.kind_.list_value_;
}
break;
}
case KIND_NOT_SET: {
break;
}
}
_impl_._oneof_case_[0] = KIND_NOT_SET;
}
const ::google::protobuf::MessageLite::ClassData*
Value::GetClassData() const {
struct ClassData_ {
::google::protobuf::MessageLite::ClassData header;
char type_name[22];
};
PROTOBUF_CONSTINIT static const ClassData_ _data_ = {
{
nullptr, // OnDemandRegisterArenaDtor
PROTOBUF_FIELD_OFFSET(Value, _impl_._cached_size_),
true,
},
"google.protobuf.Value",
};
return &_data_.header;
}
PROTOBUF_NOINLINE void Value::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.Value)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
clear_kind();
_internal_metadata_.Clear<std::string>();
}
const char* Value::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<0, 6, 2, 42, 2> Value::_table_ = {
{
0, // no _has_bits_
0, // no _extensions_
6, 0, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967232, // skipmap
offsetof(decltype(_table_), field_entries),
6, // num_field_entries
2, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_Value_default_instance_._instance,
::_pbi::TcParser::GenericFallbackLite, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::google::protobuf::Value>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
{::_pbi::TcParser::MiniParse, {}},
}}, {{
65535, 65535
}}, {{
// .google.protobuf.NullValue null_value = 1;
{PROTOBUF_FIELD_OFFSET(Value, _impl_.kind_.null_value_), _Internal::kOneofCaseOffset + 0, 0,
(0 | ::_fl::kFcOneof | ::_fl::kOpenEnum)},
// double number_value = 2;
{PROTOBUF_FIELD_OFFSET(Value, _impl_.kind_.number_value_), _Internal::kOneofCaseOffset + 0, 0,
(0 | ::_fl::kFcOneof | ::_fl::kDouble)},
// string string_value = 3;
{PROTOBUF_FIELD_OFFSET(Value, _impl_.kind_.string_value_), _Internal::kOneofCaseOffset + 0, 0,
(0 | ::_fl::kFcOneof | ::_fl::kUtf8String | ::_fl::kRepAString)},
// bool bool_value = 4;
{PROTOBUF_FIELD_OFFSET(Value, _impl_.kind_.bool_value_), _Internal::kOneofCaseOffset + 0, 0,
(0 | ::_fl::kFcOneof | ::_fl::kBool)},
// .google.protobuf.Struct struct_value = 5;
{PROTOBUF_FIELD_OFFSET(Value, _impl_.kind_.struct_value_), _Internal::kOneofCaseOffset + 0, 0,
(0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
// .google.protobuf.ListValue list_value = 6;
{PROTOBUF_FIELD_OFFSET(Value, _impl_.kind_.list_value_), _Internal::kOneofCaseOffset + 0, 1,
(0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
}}, {{
{::_pbi::TcParser::GetTable<::google::protobuf::Struct>()},
{::_pbi::TcParser::GetTable<::google::protobuf::ListValue>()},
}}, {{
"\25\0\0\14\0\0\0\0"
"google.protobuf.Value"
"string_value"
}},
};
::uint8_t* Value::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Value)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
switch (kind_case()) {
case kNullValue: {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteEnumToArray(
1, this->_internal_null_value(), target);
break;
}
case kNumberValue: {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteDoubleToArray(
2, this->_internal_number_value(), target);
break;
}
case kStringValue: {
const std::string& _s = this->_internal_string_value();
::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
_s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.protobuf.Value.string_value");
target = stream->WriteStringMaybeAliased(3, _s, target);
break;
}
case kBoolValue: {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteBoolToArray(
4, this->_internal_bool_value(), target);
break;
}
case kStructValue: {
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
5, *_impl_.kind_.struct_value_, _impl_.kind_.struct_value_->GetCachedSize(), target, stream);
break;
}
case kListValue: {
target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
6, *_impl_.kind_.list_value_, _impl_.kind_.list_value_->GetCachedSize(), target, stream);
break;
}
default:
break;
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(
_internal_metadata_.unknown_fields<std::string>(::google::protobuf::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Value)
return target;
}
::size_t Value::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.Value)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
switch (kind_case()) {
// .google.protobuf.NullValue null_value = 1;
case kNullValue: {
total_size += 1 +
::_pbi::WireFormatLite::EnumSize(this->_internal_null_value());
break;
}
// double number_value = 2;
case kNumberValue: {
total_size += 9;
break;
}
// string string_value = 3;
case kStringValue: {
total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
this->_internal_string_value());
break;
}
// bool bool_value = 4;
case kBoolValue: {
total_size += 2;
break;
}
// .google.protobuf.Struct struct_value = 5;
case kStructValue: {
total_size +=
1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.kind_.struct_value_);
break;
}
// .google.protobuf.ListValue list_value = 6;
case kListValue: {
total_size +=
1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.kind_.list_value_);
break;
}
case KIND_NOT_SET: {
break;
}
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::google::protobuf::internal::GetEmptyString).size();
}
_impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
return total_size;
}
void Value::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const Value*>(
&from));
}
void Value::MergeFrom(const Value& from) {
Value* const _this = this;
::google::protobuf::Arena* arena = _this->GetArena();
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Value)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (const uint32_t oneof_from_case = from._impl_._oneof_case_[0]) {
const uint32_t oneof_to_case = _this->_impl_._oneof_case_[0];
const bool oneof_needs_init = oneof_to_case != oneof_from_case;
if (oneof_needs_init) {
if (oneof_to_case != 0) {
_this->clear_kind();
}
_this->_impl_._oneof_case_[0] = oneof_from_case;
}
switch (oneof_from_case) {
case kNullValue: {
_this->_impl_.kind_.null_value_ = from._impl_.kind_.null_value_;
break;
}
case kNumberValue: {
_this->_impl_.kind_.number_value_ = from._impl_.kind_.number_value_;
break;
}
case kStringValue: {
if (oneof_needs_init) {
_this->_impl_.kind_.string_value_.InitDefault();
}
_this->_impl_.kind_.string_value_.Set(from._internal_string_value(), arena);
break;
}
case kBoolValue: {
_this->_impl_.kind_.bool_value_ = from._impl_.kind_.bool_value_;
break;
}
case kStructValue: {
if (oneof_needs_init) {
_this->_impl_.kind_.struct_value_ =
::google::protobuf::MessageLite::CopyConstruct<::google::protobuf::Struct>(arena, *from._impl_.kind_.struct_value_);
} else {
_this->_impl_.kind_.struct_value_->MergeFrom(from._internal_struct_value());
}
break;
}
case kListValue: {
if (oneof_needs_init) {
_this->_impl_.kind_.list_value_ =
::google::protobuf::MessageLite::CopyConstruct<::google::protobuf::ListValue>(arena, *from._impl_.kind_.list_value_);
} else {
_this->_impl_.kind_.list_value_->MergeFrom(from._internal_list_value());
}
break;
}
case KIND_NOT_SET:
break;
}
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void Value::CopyFrom(const Value& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Value)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool Value::IsInitialized() const {
return true;
}
void Value::InternalSwap(Value* PROTOBUF_RESTRICT other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_.kind_, other->_impl_.kind_);
swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
}
// ===================================================================
class ListValue::_Internal {
public:
};
ListValue::ListValue(::google::protobuf::Arena* arena)
: ::google::protobuf::MessageLite(arena) {
SharedCtor(arena);
// @@protoc_insertion_point(arena_constructor:google.protobuf.ListValue)
}
inline PROTOBUF_NDEBUG_INLINE ListValue::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
const Impl_& from)
: values_{visibility, arena, from.values_},
_cached_size_{0} {}
ListValue::ListValue(
::google::protobuf::Arena* arena,
const ListValue& from)
: ::google::protobuf::MessageLite(arena) {
ListValue* const _this = this;
(void)_this;
_internal_metadata_.MergeFrom<std::string>(
from._internal_metadata_);
new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
// @@protoc_insertion_point(copy_constructor:google.protobuf.ListValue)
}
inline PROTOBUF_NDEBUG_INLINE ListValue::Impl_::Impl_(
::google::protobuf::internal::InternalVisibility visibility,
::google::protobuf::Arena* arena)
: values_{visibility, arena},
_cached_size_{0} {}
inline void ListValue::SharedCtor(::_pb::Arena* arena) {
new (&_impl_) Impl_(internal_visibility(), arena);
}
ListValue::~ListValue() {
// @@protoc_insertion_point(destructor:google.protobuf.ListValue)
_internal_metadata_.Delete<std::string>();
SharedDtor();
}
inline void ListValue::SharedDtor() {
ABSL_DCHECK(GetArena() == nullptr);
_impl_.~Impl_();
}
const ::google::protobuf::MessageLite::ClassData*
ListValue::GetClassData() const {
struct ClassData_ {
::google::protobuf::MessageLite::ClassData header;
char type_name[26];
};
PROTOBUF_CONSTINIT static const ClassData_ _data_ = {
{
nullptr, // OnDemandRegisterArenaDtor
PROTOBUF_FIELD_OFFSET(ListValue, _impl_._cached_size_),
true,
},
"google.protobuf.ListValue",
};
return &_data_.header;
}
PROTOBUF_NOINLINE void ListValue::Clear() {
// @@protoc_insertion_point(message_clear_start:google.protobuf.ListValue)
PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.values_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* ListValue::_InternalParse(
const char* ptr, ::_pbi::ParseContext* ctx) {
ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
return ptr;
}
PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
const ::_pbi::TcParseTable<0, 1, 1, 0, 2> ListValue::_table_ = {
{
0, // no _has_bits_
0, // no _extensions_
1, 0, // max_field_number, fast_idx_mask
offsetof(decltype(_table_), field_lookup_table),
4294967294, // skipmap
offsetof(decltype(_table_), field_entries),
1, // num_field_entries
1, // num_aux_entries
offsetof(decltype(_table_), aux_entries),
&_ListValue_default_instance_._instance,
::_pbi::TcParser::GenericFallbackLite, // fallback
#ifdef PROTOBUF_PREFETCH_PARSE_TABLE
::_pbi::TcParser::GetTable<::google::protobuf::ListValue>(), // to_prefetch
#endif // PROTOBUF_PREFETCH_PARSE_TABLE
}, {{
// repeated .google.protobuf.Value values = 1;
{::_pbi::TcParser::FastMtR1,
{10, 63, 0, PROTOBUF_FIELD_OFFSET(ListValue, _impl_.values_)}},
}}, {{
65535, 65535
}}, {{
// repeated .google.protobuf.Value values = 1;
{PROTOBUF_FIELD_OFFSET(ListValue, _impl_.values_), 0, 0,
(0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
}}, {{
{::_pbi::TcParser::GetTable<::google::protobuf::Value>()},
}}, {{
}},
};
::uint8_t* ListValue::_InternalSerialize(
::uint8_t* target,
::google::protobuf::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:google.protobuf.ListValue)
::uint32_t cached_has_bits = 0;
(void)cached_has_bits;
// repeated .google.protobuf.Value values = 1;
for (unsigned i = 0, n = static_cast<unsigned>(
this->_internal_values_size());
i < n; i++) {
const auto& repfield = this->_internal_values().Get(i);
target =
::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
1, repfield, repfield.GetCachedSize(),
target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(
_internal_metadata_.unknown_fields<std::string>(::google::protobuf::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::google::protobuf::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:google.protobuf.ListValue)
return target;
}
::size_t ListValue::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:google.protobuf.ListValue)
::size_t total_size = 0;
::uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
// repeated .google.protobuf.Value values = 1;
total_size += 1UL * this->_internal_values_size();
for (const auto& msg : this->_internal_values()) {
total_size += ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::google::protobuf::internal::GetEmptyString).size();
}
_impl_._cached_size_.Set(::_pbi::ToCachedSize(total_size));
return total_size;
}
void ListValue::CheckTypeAndMergeFrom(
const ::google::protobuf::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const ListValue*>(
&from));
}
void ListValue::MergeFrom(const ListValue& from) {
ListValue* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.ListValue)
ABSL_DCHECK_NE(&from, _this);
::uint32_t cached_has_bits = 0;
(void) cached_has_bits;
_this->_internal_mutable_values()->MergeFrom(
from._internal_values());
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void ListValue::CopyFrom(const ListValue& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.ListValue)
if (&from == this) return;
Clear();
MergeFrom(from);
}
PROTOBUF_NOINLINE bool ListValue::IsInitialized() const {
return true;
}
void ListValue::InternalSwap(ListValue* PROTOBUF_RESTRICT other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
_impl_.values_.InternalSwap(&other->_impl_.values_);
}
// @@protoc_insertion_point(namespace_scope)
} // namespace protobuf
} // namespace google
namespace google {
namespace protobuf {
} // namespace protobuf
} // namespace google
// @@protoc_insertion_point(global_scope)
#include "google/protobuf/port_undef.inc"