1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: isolation_info.proto
3 
4 #include "isolation_info.pb.h"
5 
6 #include <algorithm>
7 
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
12 // @@protoc_insertion_point(includes)
13 #include <google/protobuf/port_def.inc>
14 
15 PROTOBUF_PRAGMA_INIT_SEG
16 
17 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
18 namespace _pbi = _pb::internal;
19 
20 namespace net {
21 namespace proto {
IsolationInfo(::_pbi::ConstantInitialized)22 PROTOBUF_CONSTEXPR IsolationInfo::IsolationInfo(
23     ::_pbi::ConstantInitialized): _impl_{
24     /*decltype(_impl_._has_bits_)*/{}
25   , /*decltype(_impl_._cached_size_)*/{}
26   , /*decltype(_impl_.top_frame_origin_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
27   , /*decltype(_impl_.frame_origin_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28   , /*decltype(_impl_.site_for_cookies_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
29   , /*decltype(_impl_.request_type_)*/0} {}
30 struct IsolationInfoDefaultTypeInternal {
IsolationInfoDefaultTypeInternalnet::proto::IsolationInfoDefaultTypeInternal31   PROTOBUF_CONSTEXPR IsolationInfoDefaultTypeInternal()
32       : _instance(::_pbi::ConstantInitialized{}) {}
~IsolationInfoDefaultTypeInternalnet::proto::IsolationInfoDefaultTypeInternal33   ~IsolationInfoDefaultTypeInternal() {}
34   union {
35     IsolationInfo _instance;
36   };
37 };
38 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 IsolationInfoDefaultTypeInternal _IsolationInfo_default_instance_;
39 }  // namespace proto
40 }  // namespace net
41 namespace net {
42 namespace proto {
43 
44 // ===================================================================
45 
46 class IsolationInfo::_Internal {
47  public:
48   using HasBits = decltype(std::declval<IsolationInfo>()._impl_._has_bits_);
set_has_request_type(HasBits * has_bits)49   static void set_has_request_type(HasBits* has_bits) {
50     (*has_bits)[0] |= 8u;
51   }
set_has_top_frame_origin(HasBits * has_bits)52   static void set_has_top_frame_origin(HasBits* has_bits) {
53     (*has_bits)[0] |= 1u;
54   }
set_has_frame_origin(HasBits * has_bits)55   static void set_has_frame_origin(HasBits* has_bits) {
56     (*has_bits)[0] |= 2u;
57   }
set_has_site_for_cookies(HasBits * has_bits)58   static void set_has_site_for_cookies(HasBits* has_bits) {
59     (*has_bits)[0] |= 4u;
60   }
61 };
62 
IsolationInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)63 IsolationInfo::IsolationInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
64                          bool is_message_owned)
65   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
66   SharedCtor(arena, is_message_owned);
67   // @@protoc_insertion_point(arena_constructor:net.proto.IsolationInfo)
68 }
IsolationInfo(const IsolationInfo & from)69 IsolationInfo::IsolationInfo(const IsolationInfo& from)
70   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
71   IsolationInfo* const _this = this; (void)_this;
72   new (&_impl_) Impl_{
73       decltype(_impl_._has_bits_){from._impl_._has_bits_}
74     , /*decltype(_impl_._cached_size_)*/{}
75     , decltype(_impl_.top_frame_origin_){}
76     , decltype(_impl_.frame_origin_){}
77     , decltype(_impl_.site_for_cookies_){}
78     , decltype(_impl_.request_type_){}};
79 
80   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
81   _impl_.top_frame_origin_.InitDefault();
82   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
83     _impl_.top_frame_origin_.Set("", GetArenaForAllocation());
84   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
85   if (from._internal_has_top_frame_origin()) {
86     _this->_impl_.top_frame_origin_.Set(from._internal_top_frame_origin(),
87       _this->GetArenaForAllocation());
88   }
89   _impl_.frame_origin_.InitDefault();
90   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
91     _impl_.frame_origin_.Set("", GetArenaForAllocation());
92   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
93   if (from._internal_has_frame_origin()) {
94     _this->_impl_.frame_origin_.Set(from._internal_frame_origin(),
95       _this->GetArenaForAllocation());
96   }
97   _impl_.site_for_cookies_.InitDefault();
98   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
99     _impl_.site_for_cookies_.Set("", GetArenaForAllocation());
100   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
101   if (from._internal_has_site_for_cookies()) {
102     _this->_impl_.site_for_cookies_.Set(from._internal_site_for_cookies(),
103       _this->GetArenaForAllocation());
104   }
105   _this->_impl_.request_type_ = from._impl_.request_type_;
106   // @@protoc_insertion_point(copy_constructor:net.proto.IsolationInfo)
107 }
108 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)109 inline void IsolationInfo::SharedCtor(
110     ::_pb::Arena* arena, bool is_message_owned) {
111   (void)arena;
112   (void)is_message_owned;
113   new (&_impl_) Impl_{
114       decltype(_impl_._has_bits_){}
115     , /*decltype(_impl_._cached_size_)*/{}
116     , decltype(_impl_.top_frame_origin_){}
117     , decltype(_impl_.frame_origin_){}
118     , decltype(_impl_.site_for_cookies_){}
119     , decltype(_impl_.request_type_){0}
120   };
121   _impl_.top_frame_origin_.InitDefault();
122   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
123     _impl_.top_frame_origin_.Set("", GetArenaForAllocation());
124   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
125   _impl_.frame_origin_.InitDefault();
126   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
127     _impl_.frame_origin_.Set("", GetArenaForAllocation());
128   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
129   _impl_.site_for_cookies_.InitDefault();
130   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
131     _impl_.site_for_cookies_.Set("", GetArenaForAllocation());
132   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
133 }
134 
~IsolationInfo()135 IsolationInfo::~IsolationInfo() {
136   // @@protoc_insertion_point(destructor:net.proto.IsolationInfo)
137   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
138   (void)arena;
139     return;
140   }
141   SharedDtor();
142 }
143 
SharedDtor()144 inline void IsolationInfo::SharedDtor() {
145   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
146   _impl_.top_frame_origin_.Destroy();
147   _impl_.frame_origin_.Destroy();
148   _impl_.site_for_cookies_.Destroy();
149 }
150 
SetCachedSize(int size) const151 void IsolationInfo::SetCachedSize(int size) const {
152   _impl_._cached_size_.Set(size);
153 }
154 
Clear()155 void IsolationInfo::Clear() {
156 // @@protoc_insertion_point(message_clear_start:net.proto.IsolationInfo)
157   uint32_t cached_has_bits = 0;
158   // Prevent compiler warnings about cached_has_bits being unused
159   (void) cached_has_bits;
160 
161   cached_has_bits = _impl_._has_bits_[0];
162   if (cached_has_bits & 0x00000007u) {
163     if (cached_has_bits & 0x00000001u) {
164       _impl_.top_frame_origin_.ClearNonDefaultToEmpty();
165     }
166     if (cached_has_bits & 0x00000002u) {
167       _impl_.frame_origin_.ClearNonDefaultToEmpty();
168     }
169     if (cached_has_bits & 0x00000004u) {
170       _impl_.site_for_cookies_.ClearNonDefaultToEmpty();
171     }
172   }
173   _impl_.request_type_ = 0;
174   _impl_._has_bits_.Clear();
175   _internal_metadata_.Clear<std::string>();
176 }
177 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)178 const char* IsolationInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
179 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
180   _Internal::HasBits has_bits{};
181   while (!ctx->Done(&ptr)) {
182     uint32_t tag;
183     ptr = ::_pbi::ReadTag(ptr, &tag);
184     switch (tag >> 3) {
185       // optional int32 request_type = 1;
186       case 1:
187         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
188           _Internal::set_has_request_type(&has_bits);
189           _impl_.request_type_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
190           CHK_(ptr);
191         } else
192           goto handle_unusual;
193         continue;
194       // optional string top_frame_origin = 2;
195       case 2:
196         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
197           auto str = _internal_mutable_top_frame_origin();
198           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
199           CHK_(ptr);
200         } else
201           goto handle_unusual;
202         continue;
203       // optional string frame_origin = 3;
204       case 3:
205         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 26)) {
206           auto str = _internal_mutable_frame_origin();
207           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
208           CHK_(ptr);
209         } else
210           goto handle_unusual;
211         continue;
212       // optional string site_for_cookies = 4;
213       case 4:
214         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
215           auto str = _internal_mutable_site_for_cookies();
216           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
217           CHK_(ptr);
218         } else
219           goto handle_unusual;
220         continue;
221       default:
222         goto handle_unusual;
223     }  // switch
224   handle_unusual:
225     if ((tag == 0) || ((tag & 7) == 4)) {
226       CHK_(ptr);
227       ctx->SetLastTag(tag);
228       goto message_done;
229     }
230     ptr = UnknownFieldParse(
231         tag,
232         _internal_metadata_.mutable_unknown_fields<std::string>(),
233         ptr, ctx);
234     CHK_(ptr != nullptr);
235   }  // while
236 message_done:
237   _impl_._has_bits_.Or(has_bits);
238   return ptr;
239 failure:
240   ptr = nullptr;
241   goto message_done;
242 #undef CHK_
243 }
244 
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const245 uint8_t* IsolationInfo::_InternalSerialize(
246     uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
247   // @@protoc_insertion_point(serialize_to_array_start:net.proto.IsolationInfo)
248   uint32_t cached_has_bits = 0;
249   (void) cached_has_bits;
250 
251   cached_has_bits = _impl_._has_bits_[0];
252   // optional int32 request_type = 1;
253   if (cached_has_bits & 0x00000008u) {
254     target = stream->EnsureSpace(target);
255     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_request_type(), target);
256   }
257 
258   // optional string top_frame_origin = 2;
259   if (cached_has_bits & 0x00000001u) {
260     target = stream->WriteStringMaybeAliased(
261         2, this->_internal_top_frame_origin(), target);
262   }
263 
264   // optional string frame_origin = 3;
265   if (cached_has_bits & 0x00000002u) {
266     target = stream->WriteStringMaybeAliased(
267         3, this->_internal_frame_origin(), target);
268   }
269 
270   // optional string site_for_cookies = 4;
271   if (cached_has_bits & 0x00000004u) {
272     target = stream->WriteStringMaybeAliased(
273         4, this->_internal_site_for_cookies(), target);
274   }
275 
276   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
277     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
278         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
279   }
280   // @@protoc_insertion_point(serialize_to_array_end:net.proto.IsolationInfo)
281   return target;
282 }
283 
ByteSizeLong() const284 size_t IsolationInfo::ByteSizeLong() const {
285 // @@protoc_insertion_point(message_byte_size_start:net.proto.IsolationInfo)
286   size_t total_size = 0;
287 
288   uint32_t cached_has_bits = 0;
289   // Prevent compiler warnings about cached_has_bits being unused
290   (void) cached_has_bits;
291 
292   cached_has_bits = _impl_._has_bits_[0];
293   if (cached_has_bits & 0x0000000fu) {
294     // optional string top_frame_origin = 2;
295     if (cached_has_bits & 0x00000001u) {
296       total_size += 1 +
297         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
298           this->_internal_top_frame_origin());
299     }
300 
301     // optional string frame_origin = 3;
302     if (cached_has_bits & 0x00000002u) {
303       total_size += 1 +
304         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
305           this->_internal_frame_origin());
306     }
307 
308     // optional string site_for_cookies = 4;
309     if (cached_has_bits & 0x00000004u) {
310       total_size += 1 +
311         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
312           this->_internal_site_for_cookies());
313     }
314 
315     // optional int32 request_type = 1;
316     if (cached_has_bits & 0x00000008u) {
317       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_request_type());
318     }
319 
320   }
321   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
322     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
323   }
324   int cached_size = ::_pbi::ToCachedSize(total_size);
325   SetCachedSize(cached_size);
326   return total_size;
327 }
328 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)329 void IsolationInfo::CheckTypeAndMergeFrom(
330     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
331   MergeFrom(*::_pbi::DownCast<const IsolationInfo*>(
332       &from));
333 }
334 
MergeFrom(const IsolationInfo & from)335 void IsolationInfo::MergeFrom(const IsolationInfo& from) {
336   IsolationInfo* const _this = this;
337   // @@protoc_insertion_point(class_specific_merge_from_start:net.proto.IsolationInfo)
338   GOOGLE_DCHECK_NE(&from, _this);
339   uint32_t cached_has_bits = 0;
340   (void) cached_has_bits;
341 
342   cached_has_bits = from._impl_._has_bits_[0];
343   if (cached_has_bits & 0x0000000fu) {
344     if (cached_has_bits & 0x00000001u) {
345       _this->_internal_set_top_frame_origin(from._internal_top_frame_origin());
346     }
347     if (cached_has_bits & 0x00000002u) {
348       _this->_internal_set_frame_origin(from._internal_frame_origin());
349     }
350     if (cached_has_bits & 0x00000004u) {
351       _this->_internal_set_site_for_cookies(from._internal_site_for_cookies());
352     }
353     if (cached_has_bits & 0x00000008u) {
354       _this->_impl_.request_type_ = from._impl_.request_type_;
355     }
356     _this->_impl_._has_bits_[0] |= cached_has_bits;
357   }
358   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
359 }
360 
CopyFrom(const IsolationInfo & from)361 void IsolationInfo::CopyFrom(const IsolationInfo& from) {
362 // @@protoc_insertion_point(class_specific_copy_from_start:net.proto.IsolationInfo)
363   if (&from == this) return;
364   Clear();
365   MergeFrom(from);
366 }
367 
IsInitialized() const368 bool IsolationInfo::IsInitialized() const {
369   return true;
370 }
371 
InternalSwap(IsolationInfo * other)372 void IsolationInfo::InternalSwap(IsolationInfo* other) {
373   using std::swap;
374   auto* lhs_arena = GetArenaForAllocation();
375   auto* rhs_arena = other->GetArenaForAllocation();
376   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
377   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
378   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
379       &_impl_.top_frame_origin_, lhs_arena,
380       &other->_impl_.top_frame_origin_, rhs_arena
381   );
382   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
383       &_impl_.frame_origin_, lhs_arena,
384       &other->_impl_.frame_origin_, rhs_arena
385   );
386   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
387       &_impl_.site_for_cookies_, lhs_arena,
388       &other->_impl_.site_for_cookies_, rhs_arena
389   );
390   swap(_impl_.request_type_, other->_impl_.request_type_);
391 }
392 
GetTypeName() const393 std::string IsolationInfo::GetTypeName() const {
394   return "net.proto.IsolationInfo";
395 }
396 
397 
398 // @@protoc_insertion_point(namespace_scope)
399 }  // namespace proto
400 }  // namespace net
401 PROTOBUF_NAMESPACE_OPEN
402 template<> PROTOBUF_NOINLINE ::net::proto::IsolationInfo*
CreateMaybeMessage(Arena * arena)403 Arena::CreateMaybeMessage< ::net::proto::IsolationInfo >(Arena* arena) {
404   return Arena::CreateMessageInternal< ::net::proto::IsolationInfo >(arena);
405 }
406 PROTOBUF_NAMESPACE_CLOSE
407 
408 // @@protoc_insertion_point(global_scope)
409 #include <google/protobuf/port_undef.inc>
410