1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: send_algorithm_test_result.proto
3
4 #include "send_algorithm_test_result.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 quic {
SendAlgorithmTestResult(::_pbi::ConstantInitialized)21 PROTOBUF_CONSTEXPR SendAlgorithmTestResult::SendAlgorithmTestResult(
22 ::_pbi::ConstantInitialized): _impl_{
23 /*decltype(_impl_._has_bits_)*/{}
24 , /*decltype(_impl_._cached_size_)*/{}
25 , /*decltype(_impl_.test_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
26 , /*decltype(_impl_.random_seed_)*/uint64_t{0u}
27 , /*decltype(_impl_.simulated_duration_micros_)*/int64_t{0}} {}
28 struct SendAlgorithmTestResultDefaultTypeInternal {
SendAlgorithmTestResultDefaultTypeInternalquic::SendAlgorithmTestResultDefaultTypeInternal29 PROTOBUF_CONSTEXPR SendAlgorithmTestResultDefaultTypeInternal()
30 : _instance(::_pbi::ConstantInitialized{}) {}
~SendAlgorithmTestResultDefaultTypeInternalquic::SendAlgorithmTestResultDefaultTypeInternal31 ~SendAlgorithmTestResultDefaultTypeInternal() {}
32 union {
33 SendAlgorithmTestResult _instance;
34 };
35 };
36 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SendAlgorithmTestResultDefaultTypeInternal _SendAlgorithmTestResult_default_instance_;
37 } // namespace quic
38 namespace quic {
39
40 // ===================================================================
41
42 class SendAlgorithmTestResult::_Internal {
43 public:
44 using HasBits = decltype(std::declval<SendAlgorithmTestResult>()._impl_._has_bits_);
set_has_test_name(HasBits * has_bits)45 static void set_has_test_name(HasBits* has_bits) {
46 (*has_bits)[0] |= 1u;
47 }
set_has_random_seed(HasBits * has_bits)48 static void set_has_random_seed(HasBits* has_bits) {
49 (*has_bits)[0] |= 2u;
50 }
set_has_simulated_duration_micros(HasBits * has_bits)51 static void set_has_simulated_duration_micros(HasBits* has_bits) {
52 (*has_bits)[0] |= 4u;
53 }
54 };
55
SendAlgorithmTestResult(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)56 SendAlgorithmTestResult::SendAlgorithmTestResult(::PROTOBUF_NAMESPACE_ID::Arena* arena,
57 bool is_message_owned)
58 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
59 SharedCtor(arena, is_message_owned);
60 // @@protoc_insertion_point(arena_constructor:quic.SendAlgorithmTestResult)
61 }
SendAlgorithmTestResult(const SendAlgorithmTestResult & from)62 SendAlgorithmTestResult::SendAlgorithmTestResult(const SendAlgorithmTestResult& from)
63 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
64 SendAlgorithmTestResult* const _this = this; (void)_this;
65 new (&_impl_) Impl_{
66 decltype(_impl_._has_bits_){from._impl_._has_bits_}
67 , /*decltype(_impl_._cached_size_)*/{}
68 , decltype(_impl_.test_name_){}
69 , decltype(_impl_.random_seed_){}
70 , decltype(_impl_.simulated_duration_micros_){}};
71
72 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
73 _impl_.test_name_.InitDefault();
74 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
75 _impl_.test_name_.Set("", GetArenaForAllocation());
76 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
77 if (from._internal_has_test_name()) {
78 _this->_impl_.test_name_.Set(from._internal_test_name(),
79 _this->GetArenaForAllocation());
80 }
81 ::memcpy(&_impl_.random_seed_, &from._impl_.random_seed_,
82 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.simulated_duration_micros_) -
83 reinterpret_cast<char*>(&_impl_.random_seed_)) + sizeof(_impl_.simulated_duration_micros_));
84 // @@protoc_insertion_point(copy_constructor:quic.SendAlgorithmTestResult)
85 }
86
SharedCtor(::_pb::Arena * arena,bool is_message_owned)87 inline void SendAlgorithmTestResult::SharedCtor(
88 ::_pb::Arena* arena, bool is_message_owned) {
89 (void)arena;
90 (void)is_message_owned;
91 new (&_impl_) Impl_{
92 decltype(_impl_._has_bits_){}
93 , /*decltype(_impl_._cached_size_)*/{}
94 , decltype(_impl_.test_name_){}
95 , decltype(_impl_.random_seed_){uint64_t{0u}}
96 , decltype(_impl_.simulated_duration_micros_){int64_t{0}}
97 };
98 _impl_.test_name_.InitDefault();
99 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
100 _impl_.test_name_.Set("", GetArenaForAllocation());
101 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
102 }
103
~SendAlgorithmTestResult()104 SendAlgorithmTestResult::~SendAlgorithmTestResult() {
105 // @@protoc_insertion_point(destructor:quic.SendAlgorithmTestResult)
106 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
107 (void)arena;
108 return;
109 }
110 SharedDtor();
111 }
112
SharedDtor()113 inline void SendAlgorithmTestResult::SharedDtor() {
114 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
115 _impl_.test_name_.Destroy();
116 }
117
SetCachedSize(int size) const118 void SendAlgorithmTestResult::SetCachedSize(int size) const {
119 _impl_._cached_size_.Set(size);
120 }
121
Clear()122 void SendAlgorithmTestResult::Clear() {
123 // @@protoc_insertion_point(message_clear_start:quic.SendAlgorithmTestResult)
124 uint32_t cached_has_bits = 0;
125 // Prevent compiler warnings about cached_has_bits being unused
126 (void) cached_has_bits;
127
128 cached_has_bits = _impl_._has_bits_[0];
129 if (cached_has_bits & 0x00000001u) {
130 _impl_.test_name_.ClearNonDefaultToEmpty();
131 }
132 if (cached_has_bits & 0x00000006u) {
133 ::memset(&_impl_.random_seed_, 0, static_cast<size_t>(
134 reinterpret_cast<char*>(&_impl_.simulated_duration_micros_) -
135 reinterpret_cast<char*>(&_impl_.random_seed_)) + sizeof(_impl_.simulated_duration_micros_));
136 }
137 _impl_._has_bits_.Clear();
138 _internal_metadata_.Clear<std::string>();
139 }
140
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)141 const char* SendAlgorithmTestResult::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
142 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
143 _Internal::HasBits has_bits{};
144 while (!ctx->Done(&ptr)) {
145 uint32_t tag;
146 ptr = ::_pbi::ReadTag(ptr, &tag);
147 switch (tag >> 3) {
148 // optional string test_name = 1;
149 case 1:
150 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
151 auto str = _internal_mutable_test_name();
152 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
153 CHK_(ptr);
154 } else
155 goto handle_unusual;
156 continue;
157 // optional uint64 random_seed = 2;
158 case 2:
159 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
160 _Internal::set_has_random_seed(&has_bits);
161 _impl_.random_seed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
162 CHK_(ptr);
163 } else
164 goto handle_unusual;
165 continue;
166 // optional int64 simulated_duration_micros = 3;
167 case 3:
168 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
169 _Internal::set_has_simulated_duration_micros(&has_bits);
170 _impl_.simulated_duration_micros_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
171 CHK_(ptr);
172 } else
173 goto handle_unusual;
174 continue;
175 default:
176 goto handle_unusual;
177 } // switch
178 handle_unusual:
179 if ((tag == 0) || ((tag & 7) == 4)) {
180 CHK_(ptr);
181 ctx->SetLastTag(tag);
182 goto message_done;
183 }
184 ptr = UnknownFieldParse(
185 tag,
186 _internal_metadata_.mutable_unknown_fields<std::string>(),
187 ptr, ctx);
188 CHK_(ptr != nullptr);
189 } // while
190 message_done:
191 _impl_._has_bits_.Or(has_bits);
192 return ptr;
193 failure:
194 ptr = nullptr;
195 goto message_done;
196 #undef CHK_
197 }
198
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const199 uint8_t* SendAlgorithmTestResult::_InternalSerialize(
200 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
201 // @@protoc_insertion_point(serialize_to_array_start:quic.SendAlgorithmTestResult)
202 uint32_t cached_has_bits = 0;
203 (void) cached_has_bits;
204
205 cached_has_bits = _impl_._has_bits_[0];
206 // optional string test_name = 1;
207 if (cached_has_bits & 0x00000001u) {
208 target = stream->WriteStringMaybeAliased(
209 1, this->_internal_test_name(), target);
210 }
211
212 // optional uint64 random_seed = 2;
213 if (cached_has_bits & 0x00000002u) {
214 target = stream->EnsureSpace(target);
215 target = ::_pbi::WireFormatLite::WriteUInt64ToArray(2, this->_internal_random_seed(), target);
216 }
217
218 // optional int64 simulated_duration_micros = 3;
219 if (cached_has_bits & 0x00000004u) {
220 target = stream->EnsureSpace(target);
221 target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_simulated_duration_micros(), target);
222 }
223
224 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
225 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
226 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
227 }
228 // @@protoc_insertion_point(serialize_to_array_end:quic.SendAlgorithmTestResult)
229 return target;
230 }
231
ByteSizeLong() const232 size_t SendAlgorithmTestResult::ByteSizeLong() const {
233 // @@protoc_insertion_point(message_byte_size_start:quic.SendAlgorithmTestResult)
234 size_t total_size = 0;
235
236 uint32_t cached_has_bits = 0;
237 // Prevent compiler warnings about cached_has_bits being unused
238 (void) cached_has_bits;
239
240 cached_has_bits = _impl_._has_bits_[0];
241 if (cached_has_bits & 0x00000007u) {
242 // optional string test_name = 1;
243 if (cached_has_bits & 0x00000001u) {
244 total_size += 1 +
245 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
246 this->_internal_test_name());
247 }
248
249 // optional uint64 random_seed = 2;
250 if (cached_has_bits & 0x00000002u) {
251 total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_random_seed());
252 }
253
254 // optional int64 simulated_duration_micros = 3;
255 if (cached_has_bits & 0x00000004u) {
256 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_simulated_duration_micros());
257 }
258
259 }
260 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
261 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
262 }
263 int cached_size = ::_pbi::ToCachedSize(total_size);
264 SetCachedSize(cached_size);
265 return total_size;
266 }
267
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)268 void SendAlgorithmTestResult::CheckTypeAndMergeFrom(
269 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
270 MergeFrom(*::_pbi::DownCast<const SendAlgorithmTestResult*>(
271 &from));
272 }
273
MergeFrom(const SendAlgorithmTestResult & from)274 void SendAlgorithmTestResult::MergeFrom(const SendAlgorithmTestResult& from) {
275 SendAlgorithmTestResult* const _this = this;
276 // @@protoc_insertion_point(class_specific_merge_from_start:quic.SendAlgorithmTestResult)
277 GOOGLE_DCHECK_NE(&from, _this);
278 uint32_t cached_has_bits = 0;
279 (void) cached_has_bits;
280
281 cached_has_bits = from._impl_._has_bits_[0];
282 if (cached_has_bits & 0x00000007u) {
283 if (cached_has_bits & 0x00000001u) {
284 _this->_internal_set_test_name(from._internal_test_name());
285 }
286 if (cached_has_bits & 0x00000002u) {
287 _this->_impl_.random_seed_ = from._impl_.random_seed_;
288 }
289 if (cached_has_bits & 0x00000004u) {
290 _this->_impl_.simulated_duration_micros_ = from._impl_.simulated_duration_micros_;
291 }
292 _this->_impl_._has_bits_[0] |= cached_has_bits;
293 }
294 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
295 }
296
CopyFrom(const SendAlgorithmTestResult & from)297 void SendAlgorithmTestResult::CopyFrom(const SendAlgorithmTestResult& from) {
298 // @@protoc_insertion_point(class_specific_copy_from_start:quic.SendAlgorithmTestResult)
299 if (&from == this) return;
300 Clear();
301 MergeFrom(from);
302 }
303
IsInitialized() const304 bool SendAlgorithmTestResult::IsInitialized() const {
305 return true;
306 }
307
InternalSwap(SendAlgorithmTestResult * other)308 void SendAlgorithmTestResult::InternalSwap(SendAlgorithmTestResult* other) {
309 using std::swap;
310 auto* lhs_arena = GetArenaForAllocation();
311 auto* rhs_arena = other->GetArenaForAllocation();
312 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
313 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
314 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
315 &_impl_.test_name_, lhs_arena,
316 &other->_impl_.test_name_, rhs_arena
317 );
318 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
319 PROTOBUF_FIELD_OFFSET(SendAlgorithmTestResult, _impl_.simulated_duration_micros_)
320 + sizeof(SendAlgorithmTestResult::_impl_.simulated_duration_micros_)
321 - PROTOBUF_FIELD_OFFSET(SendAlgorithmTestResult, _impl_.random_seed_)>(
322 reinterpret_cast<char*>(&_impl_.random_seed_),
323 reinterpret_cast<char*>(&other->_impl_.random_seed_));
324 }
325
GetTypeName() const326 std::string SendAlgorithmTestResult::GetTypeName() const {
327 return "quic.SendAlgorithmTestResult";
328 }
329
330
331 // @@protoc_insertion_point(namespace_scope)
332 } // namespace quic
333 PROTOBUF_NAMESPACE_OPEN
334 template<> PROTOBUF_NOINLINE ::quic::SendAlgorithmTestResult*
CreateMaybeMessage(Arena * arena)335 Arena::CreateMaybeMessage< ::quic::SendAlgorithmTestResult >(Arena* arena) {
336 return Arena::CreateMessageInternal< ::quic::SendAlgorithmTestResult >(arena);
337 }
338 PROTOBUF_NAMESPACE_CLOSE
339
340 // @@protoc_insertion_point(global_scope)
341 #include <google/protobuf/port_undef.inc>
342