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
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: cookieBanner.proto
#include "cookieBanner.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>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>
PROTOBUF_PRAGMA_INIT_SEG
namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;
namespace mozilla {
namespace cookieBanner {
PROTOBUF_CONSTEXPR GoogleSOCSCookie_extraData::GoogleSOCSCookie_extraData(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.platform_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.region_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
, /*decltype(_impl_.unused1_)*/0u
, /*decltype(_impl_.unused2_)*/0u} {}
struct GoogleSOCSCookie_extraDataDefaultTypeInternal {
PROTOBUF_CONSTEXPR GoogleSOCSCookie_extraDataDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~GoogleSOCSCookie_extraDataDefaultTypeInternal() {}
union {
GoogleSOCSCookie_extraData _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GoogleSOCSCookie_extraDataDefaultTypeInternal _GoogleSOCSCookie_extraData_default_instance_;
PROTOBUF_CONSTEXPR GoogleSOCSCookie_timeData::GoogleSOCSCookie_timeData(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.timestamp_)*/uint64_t{0u}} {}
struct GoogleSOCSCookie_timeDataDefaultTypeInternal {
PROTOBUF_CONSTEXPR GoogleSOCSCookie_timeDataDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~GoogleSOCSCookie_timeDataDefaultTypeInternal() {}
union {
GoogleSOCSCookie_timeData _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GoogleSOCSCookie_timeDataDefaultTypeInternal _GoogleSOCSCookie_timeData_default_instance_;
PROTOBUF_CONSTEXPR GoogleSOCSCookie::GoogleSOCSCookie(
::_pbi::ConstantInitialized): _impl_{
/*decltype(_impl_._has_bits_)*/{}
, /*decltype(_impl_._cached_size_)*/{}
, /*decltype(_impl_.data_)*/nullptr
, /*decltype(_impl_.time_)*/nullptr
, /*decltype(_impl_.gdpr_choice_)*/0u} {}
struct GoogleSOCSCookieDefaultTypeInternal {
PROTOBUF_CONSTEXPR GoogleSOCSCookieDefaultTypeInternal()
: _instance(::_pbi::ConstantInitialized{}) {}
~GoogleSOCSCookieDefaultTypeInternal() {}
union {
GoogleSOCSCookie _instance;
};
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GoogleSOCSCookieDefaultTypeInternal _GoogleSOCSCookie_default_instance_;
} // namespace cookieBanner
} // namespace mozilla
namespace mozilla {
namespace cookieBanner {
// ===================================================================
class GoogleSOCSCookie_extraData::_Internal {
public:
using HasBits = decltype(std::declval<GoogleSOCSCookie_extraData>()._impl_._has_bits_);
static void set_has_unused1(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static void set_has_platform(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static void set_has_region(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static void set_has_unused2(HasBits* has_bits) {
(*has_bits)[0] |= 8u;
}
static bool MissingRequiredFields(const HasBits& has_bits) {
return ((has_bits[0] & 0x0000000f) ^ 0x0000000f) != 0;
}
};
GoogleSOCSCookie_extraData::GoogleSOCSCookie_extraData(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:mozilla.cookieBanner.GoogleSOCSCookie.extraData)
}
GoogleSOCSCookie_extraData::GoogleSOCSCookie_extraData(const GoogleSOCSCookie_extraData& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
GoogleSOCSCookie_extraData* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.platform_){}
, decltype(_impl_.region_){}
, decltype(_impl_.unused1_){}
, decltype(_impl_.unused2_){}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
_impl_.platform_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.platform_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_platform()) {
_this->_impl_.platform_.Set(from._internal_platform(),
_this->GetArenaForAllocation());
}
_impl_.region_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.region_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
if (from._internal_has_region()) {
_this->_impl_.region_.Set(from._internal_region(),
_this->GetArenaForAllocation());
}
::memcpy(&_impl_.unused1_, &from._impl_.unused1_,
static_cast<size_t>(reinterpret_cast<char*>(&_impl_.unused2_) -
reinterpret_cast<char*>(&_impl_.unused1_)) + sizeof(_impl_.unused2_));
// @@protoc_insertion_point(copy_constructor:mozilla.cookieBanner.GoogleSOCSCookie.extraData)
}
inline void GoogleSOCSCookie_extraData::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.platform_){}
, decltype(_impl_.region_){}
, decltype(_impl_.unused1_){0u}
, decltype(_impl_.unused2_){0u}
};
_impl_.platform_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.platform_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.region_.InitDefault();
#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
_impl_.region_.Set("", GetArenaForAllocation());
#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
}
GoogleSOCSCookie_extraData::~GoogleSOCSCookie_extraData() {
// @@protoc_insertion_point(destructor:mozilla.cookieBanner.GoogleSOCSCookie.extraData)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void GoogleSOCSCookie_extraData::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
_impl_.platform_.Destroy();
_impl_.region_.Destroy();
}
void GoogleSOCSCookie_extraData::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void GoogleSOCSCookie_extraData::Clear() {
// @@protoc_insertion_point(message_clear_start:mozilla.cookieBanner.GoogleSOCSCookie.extraData)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
_impl_.platform_.ClearNonDefaultToEmpty();
}
if (cached_has_bits & 0x00000002u) {
_impl_.region_.ClearNonDefaultToEmpty();
}
}
if (cached_has_bits & 0x0000000cu) {
::memset(&_impl_.unused1_, 0, static_cast<size_t>(
reinterpret_cast<char*>(&_impl_.unused2_) -
reinterpret_cast<char*>(&_impl_.unused1_)) + sizeof(_impl_.unused2_));
}
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* GoogleSOCSCookie_extraData::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// required uint32 unused1 = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_unused1(&has_bits);
_impl_.unused1_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// required string platform = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
auto str = _internal_mutable_platform();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// required string region = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
auto str = _internal_mutable_region();
ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// required uint32 unused2 = 4;
case 4:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
_Internal::set_has_unused2(&has_bits);
_impl_.unused2_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* GoogleSOCSCookie_extraData::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:mozilla.cookieBanner.GoogleSOCSCookie.extraData)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// required uint32 unused1 = 1;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_unused1(), target);
}
// required string platform = 2;
if (cached_has_bits & 0x00000001u) {
target = stream->WriteStringMaybeAliased(
2, this->_internal_platform(), target);
}
// required string region = 3;
if (cached_has_bits & 0x00000002u) {
target = stream->WriteStringMaybeAliased(
3, this->_internal_region(), target);
}
// required uint32 unused2 = 4;
if (cached_has_bits & 0x00000008u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(4, this->_internal_unused2(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:mozilla.cookieBanner.GoogleSOCSCookie.extraData)
return target;
}
size_t GoogleSOCSCookie_extraData::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:mozilla.cookieBanner.GoogleSOCSCookie.extraData)
size_t total_size = 0;
if (_internal_has_platform()) {
// required string platform = 2;
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_platform());
}
if (_internal_has_region()) {
// required string region = 3;
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_region());
}
if (_internal_has_unused1()) {
// required uint32 unused1 = 1;
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_unused1());
}
if (_internal_has_unused2()) {
// required uint32 unused2 = 4;
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_unused2());
}
return total_size;
}
size_t GoogleSOCSCookie_extraData::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mozilla.cookieBanner.GoogleSOCSCookie.extraData)
size_t total_size = 0;
if (((_impl_._has_bits_[0] & 0x0000000f) ^ 0x0000000f) == 0) { // All required fields are present.
// required string platform = 2;
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_platform());
// required string region = 3;
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
this->_internal_region());
// required uint32 unused1 = 1;
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_unused1());
// required uint32 unused2 = 4;
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_unused2());
} else {
total_size += RequiredFieldsByteSizeFallback();
}
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void GoogleSOCSCookie_extraData::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const GoogleSOCSCookie_extraData*>(
&from));
}
void GoogleSOCSCookie_extraData::MergeFrom(const GoogleSOCSCookie_extraData& from) {
GoogleSOCSCookie_extraData* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:mozilla.cookieBanner.GoogleSOCSCookie.extraData)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x0000000fu) {
if (cached_has_bits & 0x00000001u) {
_this->_internal_set_platform(from._internal_platform());
}
if (cached_has_bits & 0x00000002u) {
_this->_internal_set_region(from._internal_region());
}
if (cached_has_bits & 0x00000004u) {
_this->_impl_.unused1_ = from._impl_.unused1_;
}
if (cached_has_bits & 0x00000008u) {
_this->_impl_.unused2_ = from._impl_.unused2_;
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void GoogleSOCSCookie_extraData::CopyFrom(const GoogleSOCSCookie_extraData& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.cookieBanner.GoogleSOCSCookie.extraData)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool GoogleSOCSCookie_extraData::IsInitialized() const {
if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false;
return true;
}
void GoogleSOCSCookie_extraData::InternalSwap(GoogleSOCSCookie_extraData* other) {
using std::swap;
auto* lhs_arena = GetArenaForAllocation();
auto* rhs_arena = other->GetArenaForAllocation();
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.platform_, lhs_arena,
&other->_impl_.platform_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
&_impl_.region_, lhs_arena,
&other->_impl_.region_, rhs_arena
);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(GoogleSOCSCookie_extraData, _impl_.unused2_)
+ sizeof(GoogleSOCSCookie_extraData::_impl_.unused2_)
- PROTOBUF_FIELD_OFFSET(GoogleSOCSCookie_extraData, _impl_.unused1_)>(
reinterpret_cast<char*>(&_impl_.unused1_),
reinterpret_cast<char*>(&other->_impl_.unused1_));
}
std::string GoogleSOCSCookie_extraData::GetTypeName() const {
return "mozilla.cookieBanner.GoogleSOCSCookie.extraData";
}
// ===================================================================
class GoogleSOCSCookie_timeData::_Internal {
public:
using HasBits = decltype(std::declval<GoogleSOCSCookie_timeData>()._impl_._has_bits_);
static void set_has_timestamp(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static bool MissingRequiredFields(const HasBits& has_bits) {
return ((has_bits[0] & 0x00000001) ^ 0x00000001) != 0;
}
};
GoogleSOCSCookie_timeData::GoogleSOCSCookie_timeData(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:mozilla.cookieBanner.GoogleSOCSCookie.timeData)
}
GoogleSOCSCookie_timeData::GoogleSOCSCookie_timeData(const GoogleSOCSCookie_timeData& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
GoogleSOCSCookie_timeData* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.timestamp_){}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
_this->_impl_.timestamp_ = from._impl_.timestamp_;
// @@protoc_insertion_point(copy_constructor:mozilla.cookieBanner.GoogleSOCSCookie.timeData)
}
inline void GoogleSOCSCookie_timeData::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.timestamp_){uint64_t{0u}}
};
}
GoogleSOCSCookie_timeData::~GoogleSOCSCookie_timeData() {
// @@protoc_insertion_point(destructor:mozilla.cookieBanner.GoogleSOCSCookie.timeData)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void GoogleSOCSCookie_timeData::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
}
void GoogleSOCSCookie_timeData::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void GoogleSOCSCookie_timeData::Clear() {
// @@protoc_insertion_point(message_clear_start:mozilla.cookieBanner.GoogleSOCSCookie.timeData)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
_impl_.timestamp_ = uint64_t{0u};
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* GoogleSOCSCookie_timeData::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// required uint64 timeStamp = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_timestamp(&has_bits);
_impl_.timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* GoogleSOCSCookie_timeData::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:mozilla.cookieBanner.GoogleSOCSCookie.timeData)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// required uint64 timeStamp = 1;
if (cached_has_bits & 0x00000001u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt64ToArray(1, this->_internal_timestamp(), target);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:mozilla.cookieBanner.GoogleSOCSCookie.timeData)
return target;
}
size_t GoogleSOCSCookie_timeData::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mozilla.cookieBanner.GoogleSOCSCookie.timeData)
size_t total_size = 0;
// required uint64 timeStamp = 1;
if (_internal_has_timestamp()) {
total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_timestamp());
}
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void GoogleSOCSCookie_timeData::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const GoogleSOCSCookie_timeData*>(
&from));
}
void GoogleSOCSCookie_timeData::MergeFrom(const GoogleSOCSCookie_timeData& from) {
GoogleSOCSCookie_timeData* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:mozilla.cookieBanner.GoogleSOCSCookie.timeData)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
if (from._internal_has_timestamp()) {
_this->_internal_set_timestamp(from._internal_timestamp());
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void GoogleSOCSCookie_timeData::CopyFrom(const GoogleSOCSCookie_timeData& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.cookieBanner.GoogleSOCSCookie.timeData)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool GoogleSOCSCookie_timeData::IsInitialized() const {
if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false;
return true;
}
void GoogleSOCSCookie_timeData::InternalSwap(GoogleSOCSCookie_timeData* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
swap(_impl_.timestamp_, other->_impl_.timestamp_);
}
std::string GoogleSOCSCookie_timeData::GetTypeName() const {
return "mozilla.cookieBanner.GoogleSOCSCookie.timeData";
}
// ===================================================================
class GoogleSOCSCookie::_Internal {
public:
using HasBits = decltype(std::declval<GoogleSOCSCookie>()._impl_._has_bits_);
static void set_has_gdpr_choice(HasBits* has_bits) {
(*has_bits)[0] |= 4u;
}
static const ::mozilla::cookieBanner::GoogleSOCSCookie_extraData& data(const GoogleSOCSCookie* msg);
static void set_has_data(HasBits* has_bits) {
(*has_bits)[0] |= 1u;
}
static const ::mozilla::cookieBanner::GoogleSOCSCookie_timeData& time(const GoogleSOCSCookie* msg);
static void set_has_time(HasBits* has_bits) {
(*has_bits)[0] |= 2u;
}
static bool MissingRequiredFields(const HasBits& has_bits) {
return ((has_bits[0] & 0x00000007) ^ 0x00000007) != 0;
}
};
const ::mozilla::cookieBanner::GoogleSOCSCookie_extraData&
GoogleSOCSCookie::_Internal::data(const GoogleSOCSCookie* msg) {
return *msg->_impl_.data_;
}
const ::mozilla::cookieBanner::GoogleSOCSCookie_timeData&
GoogleSOCSCookie::_Internal::time(const GoogleSOCSCookie* msg) {
return *msg->_impl_.time_;
}
GoogleSOCSCookie::GoogleSOCSCookie(::PROTOBUF_NAMESPACE_ID::Arena* arena,
bool is_message_owned)
: ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
SharedCtor(arena, is_message_owned);
// @@protoc_insertion_point(arena_constructor:mozilla.cookieBanner.GoogleSOCSCookie)
}
GoogleSOCSCookie::GoogleSOCSCookie(const GoogleSOCSCookie& from)
: ::PROTOBUF_NAMESPACE_ID::MessageLite() {
GoogleSOCSCookie* const _this = this; (void)_this;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){from._impl_._has_bits_}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.data_){nullptr}
, decltype(_impl_.time_){nullptr}
, decltype(_impl_.gdpr_choice_){}};
_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
if (from._internal_has_data()) {
_this->_impl_.data_ = new ::mozilla::cookieBanner::GoogleSOCSCookie_extraData(*from._impl_.data_);
}
if (from._internal_has_time()) {
_this->_impl_.time_ = new ::mozilla::cookieBanner::GoogleSOCSCookie_timeData(*from._impl_.time_);
}
_this->_impl_.gdpr_choice_ = from._impl_.gdpr_choice_;
// @@protoc_insertion_point(copy_constructor:mozilla.cookieBanner.GoogleSOCSCookie)
}
inline void GoogleSOCSCookie::SharedCtor(
::_pb::Arena* arena, bool is_message_owned) {
(void)arena;
(void)is_message_owned;
new (&_impl_) Impl_{
decltype(_impl_._has_bits_){}
, /*decltype(_impl_._cached_size_)*/{}
, decltype(_impl_.data_){nullptr}
, decltype(_impl_.time_){nullptr}
, decltype(_impl_.gdpr_choice_){0u}
};
}
GoogleSOCSCookie::~GoogleSOCSCookie() {
// @@protoc_insertion_point(destructor:mozilla.cookieBanner.GoogleSOCSCookie)
if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
(void)arena;
return;
}
SharedDtor();
}
inline void GoogleSOCSCookie::SharedDtor() {
GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
if (this != internal_default_instance()) delete _impl_.data_;
if (this != internal_default_instance()) delete _impl_.time_;
}
void GoogleSOCSCookie::SetCachedSize(int size) const {
_impl_._cached_size_.Set(size);
}
void GoogleSOCSCookie::Clear() {
// @@protoc_insertion_point(message_clear_start:mozilla.cookieBanner.GoogleSOCSCookie)
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
if (cached_has_bits & 0x00000003u) {
if (cached_has_bits & 0x00000001u) {
GOOGLE_DCHECK(_impl_.data_ != nullptr);
_impl_.data_->Clear();
}
if (cached_has_bits & 0x00000002u) {
GOOGLE_DCHECK(_impl_.time_ != nullptr);
_impl_.time_->Clear();
}
}
_impl_.gdpr_choice_ = 0u;
_impl_._has_bits_.Clear();
_internal_metadata_.Clear<std::string>();
}
const char* GoogleSOCSCookie::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
_Internal::HasBits has_bits{};
while (!ctx->Done(&ptr)) {
uint32_t tag;
ptr = ::_pbi::ReadTag(ptr, &tag);
switch (tag >> 3) {
// required uint32 gdpr_choice = 1;
case 1:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
_Internal::set_has_gdpr_choice(&has_bits);
_impl_.gdpr_choice_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// required .mozilla.cookieBanner.GoogleSOCSCookie.extraData data = 2;
case 2:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
ptr = ctx->ParseMessage(_internal_mutable_data(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
// required .mozilla.cookieBanner.GoogleSOCSCookie.timeData time = 3;
case 3:
if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
ptr = ctx->ParseMessage(_internal_mutable_time(), ptr);
CHK_(ptr);
} else
goto handle_unusual;
continue;
default:
goto handle_unusual;
} // switch
handle_unusual:
if ((tag == 0) || ((tag & 7) == 4)) {
CHK_(ptr);
ctx->SetLastTag(tag);
goto message_done;
}
ptr = UnknownFieldParse(
tag,
_internal_metadata_.mutable_unknown_fields<std::string>(),
ptr, ctx);
CHK_(ptr != nullptr);
} // while
message_done:
_impl_._has_bits_.Or(has_bits);
return ptr;
failure:
ptr = nullptr;
goto message_done;
#undef CHK_
}
uint8_t* GoogleSOCSCookie::_InternalSerialize(
uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
// @@protoc_insertion_point(serialize_to_array_start:mozilla.cookieBanner.GoogleSOCSCookie)
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = _impl_._has_bits_[0];
// required uint32 gdpr_choice = 1;
if (cached_has_bits & 0x00000004u) {
target = stream->EnsureSpace(target);
target = ::_pbi::WireFormatLite::WriteUInt32ToArray(1, this->_internal_gdpr_choice(), target);
}
// required .mozilla.cookieBanner.GoogleSOCSCookie.extraData data = 2;
if (cached_has_bits & 0x00000001u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(2, _Internal::data(this),
_Internal::data(this).GetCachedSize(), target, stream);
}
// required .mozilla.cookieBanner.GoogleSOCSCookie.timeData time = 3;
if (cached_has_bits & 0x00000002u) {
target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
InternalWriteMessage(3, _Internal::time(this),
_Internal::time(this).GetCachedSize(), target, stream);
}
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
}
// @@protoc_insertion_point(serialize_to_array_end:mozilla.cookieBanner.GoogleSOCSCookie)
return target;
}
size_t GoogleSOCSCookie::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:mozilla.cookieBanner.GoogleSOCSCookie)
size_t total_size = 0;
if (_internal_has_data()) {
// required .mozilla.cookieBanner.GoogleSOCSCookie.extraData data = 2;
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.data_);
}
if (_internal_has_time()) {
// required .mozilla.cookieBanner.GoogleSOCSCookie.timeData time = 3;
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.time_);
}
if (_internal_has_gdpr_choice()) {
// required uint32 gdpr_choice = 1;
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_gdpr_choice());
}
return total_size;
}
size_t GoogleSOCSCookie::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:mozilla.cookieBanner.GoogleSOCSCookie)
size_t total_size = 0;
if (((_impl_._has_bits_[0] & 0x00000007) ^ 0x00000007) == 0) { // All required fields are present.
// required .mozilla.cookieBanner.GoogleSOCSCookie.extraData data = 2;
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.data_);
// required .mozilla.cookieBanner.GoogleSOCSCookie.timeData time = 3;
total_size += 1 +
::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
*_impl_.time_);
// required uint32 gdpr_choice = 1;
total_size += ::_pbi::WireFormatLite::UInt32SizePlusOne(this->_internal_gdpr_choice());
} else {
total_size += RequiredFieldsByteSizeFallback();
}
uint32_t cached_has_bits = 0;
// Prevent compiler warnings about cached_has_bits being unused
(void) cached_has_bits;
if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
}
int cached_size = ::_pbi::ToCachedSize(total_size);
SetCachedSize(cached_size);
return total_size;
}
void GoogleSOCSCookie::CheckTypeAndMergeFrom(
const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
MergeFrom(*::_pbi::DownCast<const GoogleSOCSCookie*>(
&from));
}
void GoogleSOCSCookie::MergeFrom(const GoogleSOCSCookie& from) {
GoogleSOCSCookie* const _this = this;
// @@protoc_insertion_point(class_specific_merge_from_start:mozilla.cookieBanner.GoogleSOCSCookie)
GOOGLE_DCHECK_NE(&from, _this);
uint32_t cached_has_bits = 0;
(void) cached_has_bits;
cached_has_bits = from._impl_._has_bits_[0];
if (cached_has_bits & 0x00000007u) {
if (cached_has_bits & 0x00000001u) {
_this->_internal_mutable_data()->::mozilla::cookieBanner::GoogleSOCSCookie_extraData::MergeFrom(
from._internal_data());
}
if (cached_has_bits & 0x00000002u) {
_this->_internal_mutable_time()->::mozilla::cookieBanner::GoogleSOCSCookie_timeData::MergeFrom(
from._internal_time());
}
if (cached_has_bits & 0x00000004u) {
_this->_impl_.gdpr_choice_ = from._impl_.gdpr_choice_;
}
_this->_impl_._has_bits_[0] |= cached_has_bits;
}
_this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
}
void GoogleSOCSCookie::CopyFrom(const GoogleSOCSCookie& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:mozilla.cookieBanner.GoogleSOCSCookie)
if (&from == this) return;
Clear();
MergeFrom(from);
}
bool GoogleSOCSCookie::IsInitialized() const {
if (_Internal::MissingRequiredFields(_impl_._has_bits_)) return false;
if (_internal_has_data()) {
if (!_impl_.data_->IsInitialized()) return false;
}
if (_internal_has_time()) {
if (!_impl_.time_->IsInitialized()) return false;
}
return true;
}
void GoogleSOCSCookie::InternalSwap(GoogleSOCSCookie* other) {
using std::swap;
_internal_metadata_.InternalSwap(&other->_internal_metadata_);
swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
::PROTOBUF_NAMESPACE_ID::internal::memswap<
PROTOBUF_FIELD_OFFSET(GoogleSOCSCookie, _impl_.gdpr_choice_)
+ sizeof(GoogleSOCSCookie::_impl_.gdpr_choice_)
- PROTOBUF_FIELD_OFFSET(GoogleSOCSCookie, _impl_.data_)>(
reinterpret_cast<char*>(&_impl_.data_),
reinterpret_cast<char*>(&other->_impl_.data_));
}
std::string GoogleSOCSCookie::GetTypeName() const {
return "mozilla.cookieBanner.GoogleSOCSCookie";
}
// @@protoc_insertion_point(namespace_scope)
} // namespace cookieBanner
} // namespace mozilla
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::mozilla::cookieBanner::GoogleSOCSCookie_extraData*
Arena::CreateMaybeMessage< ::mozilla::cookieBanner::GoogleSOCSCookie_extraData >(Arena* arena) {
return Arena::CreateMessageInternal< ::mozilla::cookieBanner::GoogleSOCSCookie_extraData >(arena);
}
template<> PROTOBUF_NOINLINE ::mozilla::cookieBanner::GoogleSOCSCookie_timeData*
Arena::CreateMaybeMessage< ::mozilla::cookieBanner::GoogleSOCSCookie_timeData >(Arena* arena) {
return Arena::CreateMessageInternal< ::mozilla::cookieBanner::GoogleSOCSCookie_timeData >(arena);
}
template<> PROTOBUF_NOINLINE ::mozilla::cookieBanner::GoogleSOCSCookie*
Arena::CreateMaybeMessage< ::mozilla::cookieBanner::GoogleSOCSCookie >(Arena* arena) {
return Arena::CreateMessageInternal< ::mozilla::cookieBanner::GoogleSOCSCookie >(arena);
}
PROTOBUF_NAMESPACE_CLOSE
// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
|