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