1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: ota_metadata.proto
3
4 #include "ota_metadata.pb.h"
5
6 #include <algorithm>
7 #include <cstdint>
8
9 #include <google/protobuf/io/coded_stream.h>
10 #include <google/protobuf/extension_set.h>
11 #include <google/protobuf/wire_format_lite.h>
12 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
13 // @@protoc_insertion_point(includes)
14 #include <google/protobuf/port_def.inc>
15
16 PROTOBUF_PRAGMA_INIT_SEG
17
18 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
19 namespace _pbi = _pb::internal;
20
21 namespace build {
22 namespace tools {
23 namespace releasetools {
PartitionState(::_pbi::ConstantInitialized)24 PROTOBUF_CONSTEXPR PartitionState::PartitionState(
25 ::_pbi::ConstantInitialized): _impl_{
26 /*decltype(_impl_.device_)*/{}
27 , /*decltype(_impl_.build_)*/{}
28 , /*decltype(_impl_.partition_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
29 , /*decltype(_impl_.version_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
30 , /*decltype(_impl_._cached_size_)*/{}} {}
31 struct PartitionStateDefaultTypeInternal {
PartitionStateDefaultTypeInternalbuild::tools::releasetools::PartitionStateDefaultTypeInternal32 PROTOBUF_CONSTEXPR PartitionStateDefaultTypeInternal()
33 : _instance(::_pbi::ConstantInitialized{}) {}
~PartitionStateDefaultTypeInternalbuild::tools::releasetools::PartitionStateDefaultTypeInternal34 ~PartitionStateDefaultTypeInternal() {}
35 union { // NOLINT(misc-non-private-member-variables-in-classes)
36 PartitionState _instance;
37 };
38 };
39 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PartitionStateDefaultTypeInternal _PartitionState_default_instance_;
DeviceState(::_pbi::ConstantInitialized)40 PROTOBUF_CONSTEXPR DeviceState::DeviceState(
41 ::_pbi::ConstantInitialized): _impl_{
42 /*decltype(_impl_.device_)*/{}
43 , /*decltype(_impl_.build_)*/{}
44 , /*decltype(_impl_.partition_state_)*/{}
45 , /*decltype(_impl_.build_incremental_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
46 , /*decltype(_impl_.sdk_level_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
47 , /*decltype(_impl_.security_patch_level_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
48 , /*decltype(_impl_.timestamp_)*/::int64_t{0}
49 , /*decltype(_impl_._cached_size_)*/{}} {}
50 struct DeviceStateDefaultTypeInternal {
DeviceStateDefaultTypeInternalbuild::tools::releasetools::DeviceStateDefaultTypeInternal51 PROTOBUF_CONSTEXPR DeviceStateDefaultTypeInternal()
52 : _instance(::_pbi::ConstantInitialized{}) {}
~DeviceStateDefaultTypeInternalbuild::tools::releasetools::DeviceStateDefaultTypeInternal53 ~DeviceStateDefaultTypeInternal() {}
54 union { // NOLINT(misc-non-private-member-variables-in-classes)
55 DeviceState _instance;
56 };
57 };
58 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeviceStateDefaultTypeInternal _DeviceState_default_instance_;
ApexInfo(::_pbi::ConstantInitialized)59 PROTOBUF_CONSTEXPR ApexInfo::ApexInfo(
60 ::_pbi::ConstantInitialized): _impl_{
61 /*decltype(_impl_.package_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
62 , /*decltype(_impl_.version_)*/::int64_t{0}
63 , /*decltype(_impl_.decompressed_size_)*/::int64_t{0}
64 , /*decltype(_impl_.source_version_)*/::int64_t{0}
65 , /*decltype(_impl_.is_compressed_)*/false
66 , /*decltype(_impl_._cached_size_)*/{}} {}
67 struct ApexInfoDefaultTypeInternal {
ApexInfoDefaultTypeInternalbuild::tools::releasetools::ApexInfoDefaultTypeInternal68 PROTOBUF_CONSTEXPR ApexInfoDefaultTypeInternal()
69 : _instance(::_pbi::ConstantInitialized{}) {}
~ApexInfoDefaultTypeInternalbuild::tools::releasetools::ApexInfoDefaultTypeInternal70 ~ApexInfoDefaultTypeInternal() {}
71 union { // NOLINT(misc-non-private-member-variables-in-classes)
72 ApexInfo _instance;
73 };
74 };
75 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ApexInfoDefaultTypeInternal _ApexInfo_default_instance_;
ApexMetadata(::_pbi::ConstantInitialized)76 PROTOBUF_CONSTEXPR ApexMetadata::ApexMetadata(
77 ::_pbi::ConstantInitialized): _impl_{
78 /*decltype(_impl_.apex_info_)*/{}
79 , /*decltype(_impl_._cached_size_)*/{}} {}
80 struct ApexMetadataDefaultTypeInternal {
ApexMetadataDefaultTypeInternalbuild::tools::releasetools::ApexMetadataDefaultTypeInternal81 PROTOBUF_CONSTEXPR ApexMetadataDefaultTypeInternal()
82 : _instance(::_pbi::ConstantInitialized{}) {}
~ApexMetadataDefaultTypeInternalbuild::tools::releasetools::ApexMetadataDefaultTypeInternal83 ~ApexMetadataDefaultTypeInternal() {}
84 union { // NOLINT(misc-non-private-member-variables-in-classes)
85 ApexMetadata _instance;
86 };
87 };
88 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ApexMetadataDefaultTypeInternal _ApexMetadata_default_instance_;
OtaMetadata_PropertyFilesEntry_DoNotUse(::_pbi::ConstantInitialized)89 PROTOBUF_CONSTEXPR OtaMetadata_PropertyFilesEntry_DoNotUse::OtaMetadata_PropertyFilesEntry_DoNotUse(
90 ::_pbi::ConstantInitialized) {}
91 struct OtaMetadata_PropertyFilesEntry_DoNotUseDefaultTypeInternal {
OtaMetadata_PropertyFilesEntry_DoNotUseDefaultTypeInternalbuild::tools::releasetools::OtaMetadata_PropertyFilesEntry_DoNotUseDefaultTypeInternal92 PROTOBUF_CONSTEXPR OtaMetadata_PropertyFilesEntry_DoNotUseDefaultTypeInternal()
93 : _instance(::_pbi::ConstantInitialized{}) {}
~OtaMetadata_PropertyFilesEntry_DoNotUseDefaultTypeInternalbuild::tools::releasetools::OtaMetadata_PropertyFilesEntry_DoNotUseDefaultTypeInternal94 ~OtaMetadata_PropertyFilesEntry_DoNotUseDefaultTypeInternal() {}
95 union { // NOLINT(misc-non-private-member-variables-in-classes)
96 OtaMetadata_PropertyFilesEntry_DoNotUse _instance;
97 };
98 };
99 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OtaMetadata_PropertyFilesEntry_DoNotUseDefaultTypeInternal _OtaMetadata_PropertyFilesEntry_DoNotUse_default_instance_;
OtaMetadata(::_pbi::ConstantInitialized)100 PROTOBUF_CONSTEXPR OtaMetadata::OtaMetadata(
101 ::_pbi::ConstantInitialized): _impl_{
102 /*decltype(_impl_.property_files_)*/{}
103 , /*decltype(_impl_.precondition_)*/nullptr
104 , /*decltype(_impl_.postcondition_)*/nullptr
105 , /*decltype(_impl_.type_)*/0
106 , /*decltype(_impl_.wipe_)*/false
107 , /*decltype(_impl_.downgrade_)*/false
108 , /*decltype(_impl_.retrofit_dynamic_partitions_)*/false
109 , /*decltype(_impl_.spl_downgrade_)*/false
110 , /*decltype(_impl_.required_cache_)*/::int64_t{0}
111 , /*decltype(_impl_._cached_size_)*/{}} {}
112 struct OtaMetadataDefaultTypeInternal {
OtaMetadataDefaultTypeInternalbuild::tools::releasetools::OtaMetadataDefaultTypeInternal113 PROTOBUF_CONSTEXPR OtaMetadataDefaultTypeInternal()
114 : _instance(::_pbi::ConstantInitialized{}) {}
~OtaMetadataDefaultTypeInternalbuild::tools::releasetools::OtaMetadataDefaultTypeInternal115 ~OtaMetadataDefaultTypeInternal() {}
116 union { // NOLINT(misc-non-private-member-variables-in-classes)
117 OtaMetadata _instance;
118 };
119 };
120 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OtaMetadataDefaultTypeInternal _OtaMetadata_default_instance_;
121 } // namespace releasetools
122 } // namespace tools
123 } // namespace build
124 namespace build {
125 namespace tools {
126 namespace releasetools {
OtaMetadata_OtaType_IsValid(int value)127 bool OtaMetadata_OtaType_IsValid(int value) {
128 switch (value) {
129 case 0:
130 case 1:
131 case 2:
132 case 3:
133 return true;
134 default:
135 return false;
136 }
137 }
138
139 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> OtaMetadata_OtaType_strings[4] = {};
140
141 static const char OtaMetadata_OtaType_names[] =
142 "AB"
143 "BLOCK"
144 "BRICK"
145 "UNKNOWN";
146
147 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry OtaMetadata_OtaType_entries[] = {
148 { {OtaMetadata_OtaType_names + 0, 2}, 1 },
149 { {OtaMetadata_OtaType_names + 2, 5}, 2 },
150 { {OtaMetadata_OtaType_names + 7, 5}, 3 },
151 { {OtaMetadata_OtaType_names + 12, 7}, 0 },
152 };
153
154 static const int OtaMetadata_OtaType_entries_by_number[] = {
155 3, // 0 -> UNKNOWN
156 0, // 1 -> AB
157 1, // 2 -> BLOCK
158 2, // 3 -> BRICK
159 };
160
OtaMetadata_OtaType_Name(OtaMetadata_OtaType value)161 const std::string& OtaMetadata_OtaType_Name(
162 OtaMetadata_OtaType value) {
163 static const bool dummy =
164 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
165 OtaMetadata_OtaType_entries,
166 OtaMetadata_OtaType_entries_by_number,
167 4, OtaMetadata_OtaType_strings);
168 (void) dummy;
169 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
170 OtaMetadata_OtaType_entries,
171 OtaMetadata_OtaType_entries_by_number,
172 4, value);
173 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
174 OtaMetadata_OtaType_strings[idx].get();
175 }
OtaMetadata_OtaType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,OtaMetadata_OtaType * value)176 bool OtaMetadata_OtaType_Parse(
177 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OtaMetadata_OtaType* value) {
178 int int_value;
179 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
180 OtaMetadata_OtaType_entries, 4, name, &int_value);
181 if (success) {
182 *value = static_cast<OtaMetadata_OtaType>(int_value);
183 }
184 return success;
185 }
186 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
187 constexpr OtaMetadata_OtaType OtaMetadata::UNKNOWN;
188 constexpr OtaMetadata_OtaType OtaMetadata::AB;
189 constexpr OtaMetadata_OtaType OtaMetadata::BLOCK;
190 constexpr OtaMetadata_OtaType OtaMetadata::BRICK;
191 constexpr OtaMetadata_OtaType OtaMetadata::OtaType_MIN;
192 constexpr OtaMetadata_OtaType OtaMetadata::OtaType_MAX;
193 constexpr int OtaMetadata::OtaType_ARRAYSIZE;
194 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
195
196 // ===================================================================
197
198 class PartitionState::_Internal {
199 public:
200 };
201
PartitionState(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)202 PartitionState::PartitionState(::PROTOBUF_NAMESPACE_ID::Arena* arena,
203 bool is_message_owned)
204 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
205 SharedCtor(arena, is_message_owned);
206 // @@protoc_insertion_point(arena_constructor:build.tools.releasetools.PartitionState)
207 }
PartitionState(const PartitionState & from)208 PartitionState::PartitionState(const PartitionState& from)
209 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
210 PartitionState* const _this = this; (void)_this;
211 new (&_impl_) Impl_{
212 decltype(_impl_.device_){from._impl_.device_}
213 , decltype(_impl_.build_){from._impl_.build_}
214 , decltype(_impl_.partition_name_){}
215 , decltype(_impl_.version_){}
216 , /*decltype(_impl_._cached_size_)*/{}};
217
218 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
219 _impl_.partition_name_.InitDefault();
220 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
221 _impl_.partition_name_.Set("", GetArenaForAllocation());
222 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
223 if (!from._internal_partition_name().empty()) {
224 _this->_impl_.partition_name_.Set(from._internal_partition_name(),
225 _this->GetArenaForAllocation());
226 }
227 _impl_.version_.InitDefault();
228 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
229 _impl_.version_.Set("", GetArenaForAllocation());
230 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
231 if (!from._internal_version().empty()) {
232 _this->_impl_.version_.Set(from._internal_version(),
233 _this->GetArenaForAllocation());
234 }
235 // @@protoc_insertion_point(copy_constructor:build.tools.releasetools.PartitionState)
236 }
237
SharedCtor(::_pb::Arena * arena,bool is_message_owned)238 inline void PartitionState::SharedCtor(
239 ::_pb::Arena* arena, bool is_message_owned) {
240 (void)arena;
241 (void)is_message_owned;
242 new (&_impl_) Impl_{
243 decltype(_impl_.device_){arena}
244 , decltype(_impl_.build_){arena}
245 , decltype(_impl_.partition_name_){}
246 , decltype(_impl_.version_){}
247 , /*decltype(_impl_._cached_size_)*/{}
248 };
249 _impl_.partition_name_.InitDefault();
250 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
251 _impl_.partition_name_.Set("", GetArenaForAllocation());
252 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
253 _impl_.version_.InitDefault();
254 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
255 _impl_.version_.Set("", GetArenaForAllocation());
256 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
257 }
258
~PartitionState()259 PartitionState::~PartitionState() {
260 // @@protoc_insertion_point(destructor:build.tools.releasetools.PartitionState)
261 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
262 (void)arena;
263 return;
264 }
265 SharedDtor();
266 }
267
SharedDtor()268 inline void PartitionState::SharedDtor() {
269 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
270 _impl_.device_.~RepeatedPtrField();
271 _impl_.build_.~RepeatedPtrField();
272 _impl_.partition_name_.Destroy();
273 _impl_.version_.Destroy();
274 }
275
SetCachedSize(int size) const276 void PartitionState::SetCachedSize(int size) const {
277 _impl_._cached_size_.Set(size);
278 }
279
Clear()280 void PartitionState::Clear() {
281 // @@protoc_insertion_point(message_clear_start:build.tools.releasetools.PartitionState)
282 ::uint32_t cached_has_bits = 0;
283 // Prevent compiler warnings about cached_has_bits being unused
284 (void) cached_has_bits;
285
286 _impl_.device_.Clear();
287 _impl_.build_.Clear();
288 _impl_.partition_name_.ClearToEmpty();
289 _impl_.version_.ClearToEmpty();
290 _internal_metadata_.Clear<std::string>();
291 }
292
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)293 const char* PartitionState::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
294 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
295 while (!ctx->Done(&ptr)) {
296 ::uint32_t tag;
297 ptr = ::_pbi::ReadTag(ptr, &tag);
298 switch (tag >> 3) {
299 // string partition_name = 1;
300 case 1:
301 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
302 auto str = _internal_mutable_partition_name();
303 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
304 CHK_(ptr);
305 CHK_(::_pbi::VerifyUTF8(str, nullptr));
306 } else {
307 goto handle_unusual;
308 }
309 continue;
310 // repeated string device = 2;
311 case 2:
312 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
313 ptr -= 1;
314 do {
315 ptr += 1;
316 auto str = _internal_add_device();
317 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
318 CHK_(ptr);
319 CHK_(::_pbi::VerifyUTF8(str, nullptr));
320 if (!ctx->DataAvailable(ptr)) break;
321 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
322 } else {
323 goto handle_unusual;
324 }
325 continue;
326 // repeated string build = 3;
327 case 3:
328 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
329 ptr -= 1;
330 do {
331 ptr += 1;
332 auto str = _internal_add_build();
333 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
334 CHK_(ptr);
335 CHK_(::_pbi::VerifyUTF8(str, nullptr));
336 if (!ctx->DataAvailable(ptr)) break;
337 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
338 } else {
339 goto handle_unusual;
340 }
341 continue;
342 // string version = 4;
343 case 4:
344 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
345 auto str = _internal_mutable_version();
346 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
347 CHK_(ptr);
348 CHK_(::_pbi::VerifyUTF8(str, nullptr));
349 } else {
350 goto handle_unusual;
351 }
352 continue;
353 default:
354 goto handle_unusual;
355 } // switch
356 handle_unusual:
357 if ((tag == 0) || ((tag & 7) == 4)) {
358 CHK_(ptr);
359 ctx->SetLastTag(tag);
360 goto message_done;
361 }
362 ptr = UnknownFieldParse(
363 tag,
364 _internal_metadata_.mutable_unknown_fields<std::string>(),
365 ptr, ctx);
366 CHK_(ptr != nullptr);
367 } // while
368 message_done:
369 return ptr;
370 failure:
371 ptr = nullptr;
372 goto message_done;
373 #undef CHK_
374 }
375
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const376 ::uint8_t* PartitionState::_InternalSerialize(
377 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
378 // @@protoc_insertion_point(serialize_to_array_start:build.tools.releasetools.PartitionState)
379 ::uint32_t cached_has_bits = 0;
380 (void) cached_has_bits;
381
382 // string partition_name = 1;
383 if (!this->_internal_partition_name().empty()) {
384 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
385 this->_internal_partition_name().data(), static_cast<int>(this->_internal_partition_name().length()),
386 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
387 "build.tools.releasetools.PartitionState.partition_name");
388 target = stream->WriteStringMaybeAliased(
389 1, this->_internal_partition_name(), target);
390 }
391
392 // repeated string device = 2;
393 for (int i = 0, n = this->_internal_device_size(); i < n; i++) {
394 const auto& s = this->_internal_device(i);
395 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
396 s.data(), static_cast<int>(s.length()),
397 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
398 "build.tools.releasetools.PartitionState.device");
399 target = stream->WriteString(2, s, target);
400 }
401
402 // repeated string build = 3;
403 for (int i = 0, n = this->_internal_build_size(); i < n; i++) {
404 const auto& s = this->_internal_build(i);
405 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
406 s.data(), static_cast<int>(s.length()),
407 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
408 "build.tools.releasetools.PartitionState.build");
409 target = stream->WriteString(3, s, target);
410 }
411
412 // string version = 4;
413 if (!this->_internal_version().empty()) {
414 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
415 this->_internal_version().data(), static_cast<int>(this->_internal_version().length()),
416 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
417 "build.tools.releasetools.PartitionState.version");
418 target = stream->WriteStringMaybeAliased(
419 4, this->_internal_version(), target);
420 }
421
422 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
423 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
424 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
425 }
426 // @@protoc_insertion_point(serialize_to_array_end:build.tools.releasetools.PartitionState)
427 return target;
428 }
429
ByteSizeLong() const430 size_t PartitionState::ByteSizeLong() const {
431 // @@protoc_insertion_point(message_byte_size_start:build.tools.releasetools.PartitionState)
432 size_t total_size = 0;
433
434 ::uint32_t cached_has_bits = 0;
435 // Prevent compiler warnings about cached_has_bits being unused
436 (void) cached_has_bits;
437
438 // repeated string device = 2;
439 total_size += 1 *
440 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.device_.size());
441 for (int i = 0, n = _impl_.device_.size(); i < n; i++) {
442 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
443 _impl_.device_.Get(i));
444 }
445
446 // repeated string build = 3;
447 total_size += 1 *
448 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.build_.size());
449 for (int i = 0, n = _impl_.build_.size(); i < n; i++) {
450 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
451 _impl_.build_.Get(i));
452 }
453
454 // string partition_name = 1;
455 if (!this->_internal_partition_name().empty()) {
456 total_size += 1 +
457 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
458 this->_internal_partition_name());
459 }
460
461 // string version = 4;
462 if (!this->_internal_version().empty()) {
463 total_size += 1 +
464 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
465 this->_internal_version());
466 }
467
468 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
469 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
470 }
471 int cached_size = ::_pbi::ToCachedSize(total_size);
472 SetCachedSize(cached_size);
473 return total_size;
474 }
475
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)476 void PartitionState::CheckTypeAndMergeFrom(
477 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
478 MergeFrom(*::_pbi::DownCast<const PartitionState*>(
479 &from));
480 }
481
MergeFrom(const PartitionState & from)482 void PartitionState::MergeFrom(const PartitionState& from) {
483 PartitionState* const _this = this;
484 // @@protoc_insertion_point(class_specific_merge_from_start:build.tools.releasetools.PartitionState)
485 GOOGLE_DCHECK_NE(&from, _this);
486 ::uint32_t cached_has_bits = 0;
487 (void) cached_has_bits;
488
489 _this->_impl_.device_.MergeFrom(from._impl_.device_);
490 _this->_impl_.build_.MergeFrom(from._impl_.build_);
491 if (!from._internal_partition_name().empty()) {
492 _this->_internal_set_partition_name(from._internal_partition_name());
493 }
494 if (!from._internal_version().empty()) {
495 _this->_internal_set_version(from._internal_version());
496 }
497 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
498 }
499
CopyFrom(const PartitionState & from)500 void PartitionState::CopyFrom(const PartitionState& from) {
501 // @@protoc_insertion_point(class_specific_copy_from_start:build.tools.releasetools.PartitionState)
502 if (&from == this) return;
503 Clear();
504 MergeFrom(from);
505 }
506
IsInitialized() const507 bool PartitionState::IsInitialized() const {
508 return true;
509 }
510
InternalSwap(PartitionState * other)511 void PartitionState::InternalSwap(PartitionState* other) {
512 using std::swap;
513 auto* lhs_arena = GetArenaForAllocation();
514 auto* rhs_arena = other->GetArenaForAllocation();
515 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
516 _impl_.device_.InternalSwap(&other->_impl_.device_);
517 _impl_.build_.InternalSwap(&other->_impl_.build_);
518 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
519 &_impl_.partition_name_, lhs_arena,
520 &other->_impl_.partition_name_, rhs_arena
521 );
522 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
523 &_impl_.version_, lhs_arena,
524 &other->_impl_.version_, rhs_arena
525 );
526 }
527
GetTypeName() const528 std::string PartitionState::GetTypeName() const {
529 return "build.tools.releasetools.PartitionState";
530 }
531
532
533 // ===================================================================
534
535 class DeviceState::_Internal {
536 public:
537 };
538
DeviceState(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)539 DeviceState::DeviceState(::PROTOBUF_NAMESPACE_ID::Arena* arena,
540 bool is_message_owned)
541 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
542 SharedCtor(arena, is_message_owned);
543 // @@protoc_insertion_point(arena_constructor:build.tools.releasetools.DeviceState)
544 }
DeviceState(const DeviceState & from)545 DeviceState::DeviceState(const DeviceState& from)
546 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
547 DeviceState* const _this = this; (void)_this;
548 new (&_impl_) Impl_{
549 decltype(_impl_.device_){from._impl_.device_}
550 , decltype(_impl_.build_){from._impl_.build_}
551 , decltype(_impl_.partition_state_){from._impl_.partition_state_}
552 , decltype(_impl_.build_incremental_){}
553 , decltype(_impl_.sdk_level_){}
554 , decltype(_impl_.security_patch_level_){}
555 , decltype(_impl_.timestamp_){}
556 , /*decltype(_impl_._cached_size_)*/{}};
557
558 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
559 _impl_.build_incremental_.InitDefault();
560 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
561 _impl_.build_incremental_.Set("", GetArenaForAllocation());
562 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
563 if (!from._internal_build_incremental().empty()) {
564 _this->_impl_.build_incremental_.Set(from._internal_build_incremental(),
565 _this->GetArenaForAllocation());
566 }
567 _impl_.sdk_level_.InitDefault();
568 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
569 _impl_.sdk_level_.Set("", GetArenaForAllocation());
570 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
571 if (!from._internal_sdk_level().empty()) {
572 _this->_impl_.sdk_level_.Set(from._internal_sdk_level(),
573 _this->GetArenaForAllocation());
574 }
575 _impl_.security_patch_level_.InitDefault();
576 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
577 _impl_.security_patch_level_.Set("", GetArenaForAllocation());
578 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
579 if (!from._internal_security_patch_level().empty()) {
580 _this->_impl_.security_patch_level_.Set(from._internal_security_patch_level(),
581 _this->GetArenaForAllocation());
582 }
583 _this->_impl_.timestamp_ = from._impl_.timestamp_;
584 // @@protoc_insertion_point(copy_constructor:build.tools.releasetools.DeviceState)
585 }
586
SharedCtor(::_pb::Arena * arena,bool is_message_owned)587 inline void DeviceState::SharedCtor(
588 ::_pb::Arena* arena, bool is_message_owned) {
589 (void)arena;
590 (void)is_message_owned;
591 new (&_impl_) Impl_{
592 decltype(_impl_.device_){arena}
593 , decltype(_impl_.build_){arena}
594 , decltype(_impl_.partition_state_){arena}
595 , decltype(_impl_.build_incremental_){}
596 , decltype(_impl_.sdk_level_){}
597 , decltype(_impl_.security_patch_level_){}
598 , decltype(_impl_.timestamp_){::int64_t{0}}
599 , /*decltype(_impl_._cached_size_)*/{}
600 };
601 _impl_.build_incremental_.InitDefault();
602 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
603 _impl_.build_incremental_.Set("", GetArenaForAllocation());
604 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
605 _impl_.sdk_level_.InitDefault();
606 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
607 _impl_.sdk_level_.Set("", GetArenaForAllocation());
608 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
609 _impl_.security_patch_level_.InitDefault();
610 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
611 _impl_.security_patch_level_.Set("", GetArenaForAllocation());
612 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
613 }
614
~DeviceState()615 DeviceState::~DeviceState() {
616 // @@protoc_insertion_point(destructor:build.tools.releasetools.DeviceState)
617 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
618 (void)arena;
619 return;
620 }
621 SharedDtor();
622 }
623
SharedDtor()624 inline void DeviceState::SharedDtor() {
625 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
626 _impl_.device_.~RepeatedPtrField();
627 _impl_.build_.~RepeatedPtrField();
628 _impl_.partition_state_.~RepeatedPtrField();
629 _impl_.build_incremental_.Destroy();
630 _impl_.sdk_level_.Destroy();
631 _impl_.security_patch_level_.Destroy();
632 }
633
SetCachedSize(int size) const634 void DeviceState::SetCachedSize(int size) const {
635 _impl_._cached_size_.Set(size);
636 }
637
Clear()638 void DeviceState::Clear() {
639 // @@protoc_insertion_point(message_clear_start:build.tools.releasetools.DeviceState)
640 ::uint32_t cached_has_bits = 0;
641 // Prevent compiler warnings about cached_has_bits being unused
642 (void) cached_has_bits;
643
644 _impl_.device_.Clear();
645 _impl_.build_.Clear();
646 _impl_.partition_state_.Clear();
647 _impl_.build_incremental_.ClearToEmpty();
648 _impl_.sdk_level_.ClearToEmpty();
649 _impl_.security_patch_level_.ClearToEmpty();
650 _impl_.timestamp_ = ::int64_t{0};
651 _internal_metadata_.Clear<std::string>();
652 }
653
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)654 const char* DeviceState::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
655 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
656 while (!ctx->Done(&ptr)) {
657 ::uint32_t tag;
658 ptr = ::_pbi::ReadTag(ptr, &tag);
659 switch (tag >> 3) {
660 // repeated string device = 1;
661 case 1:
662 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
663 ptr -= 1;
664 do {
665 ptr += 1;
666 auto str = _internal_add_device();
667 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
668 CHK_(ptr);
669 CHK_(::_pbi::VerifyUTF8(str, nullptr));
670 if (!ctx->DataAvailable(ptr)) break;
671 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
672 } else {
673 goto handle_unusual;
674 }
675 continue;
676 // repeated string build = 2;
677 case 2:
678 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
679 ptr -= 1;
680 do {
681 ptr += 1;
682 auto str = _internal_add_build();
683 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
684 CHK_(ptr);
685 CHK_(::_pbi::VerifyUTF8(str, nullptr));
686 if (!ctx->DataAvailable(ptr)) break;
687 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
688 } else {
689 goto handle_unusual;
690 }
691 continue;
692 // string build_incremental = 3;
693 case 3:
694 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
695 auto str = _internal_mutable_build_incremental();
696 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
697 CHK_(ptr);
698 CHK_(::_pbi::VerifyUTF8(str, nullptr));
699 } else {
700 goto handle_unusual;
701 }
702 continue;
703 // int64 timestamp = 4;
704 case 4:
705 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
706 _impl_.timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
707 CHK_(ptr);
708 } else {
709 goto handle_unusual;
710 }
711 continue;
712 // string sdk_level = 5;
713 case 5:
714 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
715 auto str = _internal_mutable_sdk_level();
716 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
717 CHK_(ptr);
718 CHK_(::_pbi::VerifyUTF8(str, nullptr));
719 } else {
720 goto handle_unusual;
721 }
722 continue;
723 // string security_patch_level = 6;
724 case 6:
725 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
726 auto str = _internal_mutable_security_patch_level();
727 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
728 CHK_(ptr);
729 CHK_(::_pbi::VerifyUTF8(str, nullptr));
730 } else {
731 goto handle_unusual;
732 }
733 continue;
734 // repeated .build.tools.releasetools.PartitionState partition_state = 7;
735 case 7:
736 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
737 ptr -= 1;
738 do {
739 ptr += 1;
740 ptr = ctx->ParseMessage(_internal_add_partition_state(), ptr);
741 CHK_(ptr);
742 if (!ctx->DataAvailable(ptr)) break;
743 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
744 } else {
745 goto handle_unusual;
746 }
747 continue;
748 default:
749 goto handle_unusual;
750 } // switch
751 handle_unusual:
752 if ((tag == 0) || ((tag & 7) == 4)) {
753 CHK_(ptr);
754 ctx->SetLastTag(tag);
755 goto message_done;
756 }
757 ptr = UnknownFieldParse(
758 tag,
759 _internal_metadata_.mutable_unknown_fields<std::string>(),
760 ptr, ctx);
761 CHK_(ptr != nullptr);
762 } // while
763 message_done:
764 return ptr;
765 failure:
766 ptr = nullptr;
767 goto message_done;
768 #undef CHK_
769 }
770
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const771 ::uint8_t* DeviceState::_InternalSerialize(
772 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
773 // @@protoc_insertion_point(serialize_to_array_start:build.tools.releasetools.DeviceState)
774 ::uint32_t cached_has_bits = 0;
775 (void) cached_has_bits;
776
777 // repeated string device = 1;
778 for (int i = 0, n = this->_internal_device_size(); i < n; i++) {
779 const auto& s = this->_internal_device(i);
780 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
781 s.data(), static_cast<int>(s.length()),
782 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
783 "build.tools.releasetools.DeviceState.device");
784 target = stream->WriteString(1, s, target);
785 }
786
787 // repeated string build = 2;
788 for (int i = 0, n = this->_internal_build_size(); i < n; i++) {
789 const auto& s = this->_internal_build(i);
790 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
791 s.data(), static_cast<int>(s.length()),
792 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
793 "build.tools.releasetools.DeviceState.build");
794 target = stream->WriteString(2, s, target);
795 }
796
797 // string build_incremental = 3;
798 if (!this->_internal_build_incremental().empty()) {
799 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
800 this->_internal_build_incremental().data(), static_cast<int>(this->_internal_build_incremental().length()),
801 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
802 "build.tools.releasetools.DeviceState.build_incremental");
803 target = stream->WriteStringMaybeAliased(
804 3, this->_internal_build_incremental(), target);
805 }
806
807 // int64 timestamp = 4;
808 if (this->_internal_timestamp() != 0) {
809 target = stream->EnsureSpace(target);
810 target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_timestamp(), target);
811 }
812
813 // string sdk_level = 5;
814 if (!this->_internal_sdk_level().empty()) {
815 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
816 this->_internal_sdk_level().data(), static_cast<int>(this->_internal_sdk_level().length()),
817 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
818 "build.tools.releasetools.DeviceState.sdk_level");
819 target = stream->WriteStringMaybeAliased(
820 5, this->_internal_sdk_level(), target);
821 }
822
823 // string security_patch_level = 6;
824 if (!this->_internal_security_patch_level().empty()) {
825 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
826 this->_internal_security_patch_level().data(), static_cast<int>(this->_internal_security_patch_level().length()),
827 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
828 "build.tools.releasetools.DeviceState.security_patch_level");
829 target = stream->WriteStringMaybeAliased(
830 6, this->_internal_security_patch_level(), target);
831 }
832
833 // repeated .build.tools.releasetools.PartitionState partition_state = 7;
834 for (unsigned i = 0,
835 n = static_cast<unsigned>(this->_internal_partition_state_size()); i < n; i++) {
836 const auto& repfield = this->_internal_partition_state(i);
837 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
838 InternalWriteMessage(7, repfield, repfield.GetCachedSize(), target, stream);
839 }
840
841 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
842 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
843 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
844 }
845 // @@protoc_insertion_point(serialize_to_array_end:build.tools.releasetools.DeviceState)
846 return target;
847 }
848
ByteSizeLong() const849 size_t DeviceState::ByteSizeLong() const {
850 // @@protoc_insertion_point(message_byte_size_start:build.tools.releasetools.DeviceState)
851 size_t total_size = 0;
852
853 ::uint32_t cached_has_bits = 0;
854 // Prevent compiler warnings about cached_has_bits being unused
855 (void) cached_has_bits;
856
857 // repeated string device = 1;
858 total_size += 1 *
859 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.device_.size());
860 for (int i = 0, n = _impl_.device_.size(); i < n; i++) {
861 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
862 _impl_.device_.Get(i));
863 }
864
865 // repeated string build = 2;
866 total_size += 1 *
867 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.build_.size());
868 for (int i = 0, n = _impl_.build_.size(); i < n; i++) {
869 total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
870 _impl_.build_.Get(i));
871 }
872
873 // repeated .build.tools.releasetools.PartitionState partition_state = 7;
874 total_size += 1UL * this->_internal_partition_state_size();
875 for (const auto& msg : this->_impl_.partition_state_) {
876 total_size +=
877 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
878 }
879
880 // string build_incremental = 3;
881 if (!this->_internal_build_incremental().empty()) {
882 total_size += 1 +
883 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
884 this->_internal_build_incremental());
885 }
886
887 // string sdk_level = 5;
888 if (!this->_internal_sdk_level().empty()) {
889 total_size += 1 +
890 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
891 this->_internal_sdk_level());
892 }
893
894 // string security_patch_level = 6;
895 if (!this->_internal_security_patch_level().empty()) {
896 total_size += 1 +
897 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
898 this->_internal_security_patch_level());
899 }
900
901 // int64 timestamp = 4;
902 if (this->_internal_timestamp() != 0) {
903 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_timestamp());
904 }
905
906 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
907 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
908 }
909 int cached_size = ::_pbi::ToCachedSize(total_size);
910 SetCachedSize(cached_size);
911 return total_size;
912 }
913
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)914 void DeviceState::CheckTypeAndMergeFrom(
915 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
916 MergeFrom(*::_pbi::DownCast<const DeviceState*>(
917 &from));
918 }
919
MergeFrom(const DeviceState & from)920 void DeviceState::MergeFrom(const DeviceState& from) {
921 DeviceState* const _this = this;
922 // @@protoc_insertion_point(class_specific_merge_from_start:build.tools.releasetools.DeviceState)
923 GOOGLE_DCHECK_NE(&from, _this);
924 ::uint32_t cached_has_bits = 0;
925 (void) cached_has_bits;
926
927 _this->_impl_.device_.MergeFrom(from._impl_.device_);
928 _this->_impl_.build_.MergeFrom(from._impl_.build_);
929 _this->_impl_.partition_state_.MergeFrom(from._impl_.partition_state_);
930 if (!from._internal_build_incremental().empty()) {
931 _this->_internal_set_build_incremental(from._internal_build_incremental());
932 }
933 if (!from._internal_sdk_level().empty()) {
934 _this->_internal_set_sdk_level(from._internal_sdk_level());
935 }
936 if (!from._internal_security_patch_level().empty()) {
937 _this->_internal_set_security_patch_level(from._internal_security_patch_level());
938 }
939 if (from._internal_timestamp() != 0) {
940 _this->_internal_set_timestamp(from._internal_timestamp());
941 }
942 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
943 }
944
CopyFrom(const DeviceState & from)945 void DeviceState::CopyFrom(const DeviceState& from) {
946 // @@protoc_insertion_point(class_specific_copy_from_start:build.tools.releasetools.DeviceState)
947 if (&from == this) return;
948 Clear();
949 MergeFrom(from);
950 }
951
IsInitialized() const952 bool DeviceState::IsInitialized() const {
953 return true;
954 }
955
InternalSwap(DeviceState * other)956 void DeviceState::InternalSwap(DeviceState* other) {
957 using std::swap;
958 auto* lhs_arena = GetArenaForAllocation();
959 auto* rhs_arena = other->GetArenaForAllocation();
960 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
961 _impl_.device_.InternalSwap(&other->_impl_.device_);
962 _impl_.build_.InternalSwap(&other->_impl_.build_);
963 _impl_.partition_state_.InternalSwap(&other->_impl_.partition_state_);
964 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
965 &_impl_.build_incremental_, lhs_arena,
966 &other->_impl_.build_incremental_, rhs_arena
967 );
968 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
969 &_impl_.sdk_level_, lhs_arena,
970 &other->_impl_.sdk_level_, rhs_arena
971 );
972 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
973 &_impl_.security_patch_level_, lhs_arena,
974 &other->_impl_.security_patch_level_, rhs_arena
975 );
976 swap(_impl_.timestamp_, other->_impl_.timestamp_);
977 }
978
GetTypeName() const979 std::string DeviceState::GetTypeName() const {
980 return "build.tools.releasetools.DeviceState";
981 }
982
983
984 // ===================================================================
985
986 class ApexInfo::_Internal {
987 public:
988 };
989
ApexInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)990 ApexInfo::ApexInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
991 bool is_message_owned)
992 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
993 SharedCtor(arena, is_message_owned);
994 // @@protoc_insertion_point(arena_constructor:build.tools.releasetools.ApexInfo)
995 }
ApexInfo(const ApexInfo & from)996 ApexInfo::ApexInfo(const ApexInfo& from)
997 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
998 ApexInfo* const _this = this; (void)_this;
999 new (&_impl_) Impl_{
1000 decltype(_impl_.package_name_){}
1001 , decltype(_impl_.version_){}
1002 , decltype(_impl_.decompressed_size_){}
1003 , decltype(_impl_.source_version_){}
1004 , decltype(_impl_.is_compressed_){}
1005 , /*decltype(_impl_._cached_size_)*/{}};
1006
1007 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1008 _impl_.package_name_.InitDefault();
1009 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1010 _impl_.package_name_.Set("", GetArenaForAllocation());
1011 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1012 if (!from._internal_package_name().empty()) {
1013 _this->_impl_.package_name_.Set(from._internal_package_name(),
1014 _this->GetArenaForAllocation());
1015 }
1016 ::memcpy(&_impl_.version_, &from._impl_.version_,
1017 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.is_compressed_) -
1018 reinterpret_cast<char*>(&_impl_.version_)) + sizeof(_impl_.is_compressed_));
1019 // @@protoc_insertion_point(copy_constructor:build.tools.releasetools.ApexInfo)
1020 }
1021
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1022 inline void ApexInfo::SharedCtor(
1023 ::_pb::Arena* arena, bool is_message_owned) {
1024 (void)arena;
1025 (void)is_message_owned;
1026 new (&_impl_) Impl_{
1027 decltype(_impl_.package_name_){}
1028 , decltype(_impl_.version_){::int64_t{0}}
1029 , decltype(_impl_.decompressed_size_){::int64_t{0}}
1030 , decltype(_impl_.source_version_){::int64_t{0}}
1031 , decltype(_impl_.is_compressed_){false}
1032 , /*decltype(_impl_._cached_size_)*/{}
1033 };
1034 _impl_.package_name_.InitDefault();
1035 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1036 _impl_.package_name_.Set("", GetArenaForAllocation());
1037 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1038 }
1039
~ApexInfo()1040 ApexInfo::~ApexInfo() {
1041 // @@protoc_insertion_point(destructor:build.tools.releasetools.ApexInfo)
1042 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1043 (void)arena;
1044 return;
1045 }
1046 SharedDtor();
1047 }
1048
SharedDtor()1049 inline void ApexInfo::SharedDtor() {
1050 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1051 _impl_.package_name_.Destroy();
1052 }
1053
SetCachedSize(int size) const1054 void ApexInfo::SetCachedSize(int size) const {
1055 _impl_._cached_size_.Set(size);
1056 }
1057
Clear()1058 void ApexInfo::Clear() {
1059 // @@protoc_insertion_point(message_clear_start:build.tools.releasetools.ApexInfo)
1060 ::uint32_t cached_has_bits = 0;
1061 // Prevent compiler warnings about cached_has_bits being unused
1062 (void) cached_has_bits;
1063
1064 _impl_.package_name_.ClearToEmpty();
1065 ::memset(&_impl_.version_, 0, static_cast<size_t>(
1066 reinterpret_cast<char*>(&_impl_.is_compressed_) -
1067 reinterpret_cast<char*>(&_impl_.version_)) + sizeof(_impl_.is_compressed_));
1068 _internal_metadata_.Clear<std::string>();
1069 }
1070
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1071 const char* ApexInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1072 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1073 while (!ctx->Done(&ptr)) {
1074 ::uint32_t tag;
1075 ptr = ::_pbi::ReadTag(ptr, &tag);
1076 switch (tag >> 3) {
1077 // string package_name = 1;
1078 case 1:
1079 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1080 auto str = _internal_mutable_package_name();
1081 ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1082 CHK_(ptr);
1083 CHK_(::_pbi::VerifyUTF8(str, nullptr));
1084 } else {
1085 goto handle_unusual;
1086 }
1087 continue;
1088 // int64 version = 2;
1089 case 2:
1090 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1091 _impl_.version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1092 CHK_(ptr);
1093 } else {
1094 goto handle_unusual;
1095 }
1096 continue;
1097 // bool is_compressed = 3;
1098 case 3:
1099 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1100 _impl_.is_compressed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1101 CHK_(ptr);
1102 } else {
1103 goto handle_unusual;
1104 }
1105 continue;
1106 // int64 decompressed_size = 4;
1107 case 4:
1108 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1109 _impl_.decompressed_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1110 CHK_(ptr);
1111 } else {
1112 goto handle_unusual;
1113 }
1114 continue;
1115 // int64 source_version = 5;
1116 case 5:
1117 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1118 _impl_.source_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1119 CHK_(ptr);
1120 } else {
1121 goto handle_unusual;
1122 }
1123 continue;
1124 default:
1125 goto handle_unusual;
1126 } // switch
1127 handle_unusual:
1128 if ((tag == 0) || ((tag & 7) == 4)) {
1129 CHK_(ptr);
1130 ctx->SetLastTag(tag);
1131 goto message_done;
1132 }
1133 ptr = UnknownFieldParse(
1134 tag,
1135 _internal_metadata_.mutable_unknown_fields<std::string>(),
1136 ptr, ctx);
1137 CHK_(ptr != nullptr);
1138 } // while
1139 message_done:
1140 return ptr;
1141 failure:
1142 ptr = nullptr;
1143 goto message_done;
1144 #undef CHK_
1145 }
1146
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1147 ::uint8_t* ApexInfo::_InternalSerialize(
1148 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1149 // @@protoc_insertion_point(serialize_to_array_start:build.tools.releasetools.ApexInfo)
1150 ::uint32_t cached_has_bits = 0;
1151 (void) cached_has_bits;
1152
1153 // string package_name = 1;
1154 if (!this->_internal_package_name().empty()) {
1155 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1156 this->_internal_package_name().data(), static_cast<int>(this->_internal_package_name().length()),
1157 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1158 "build.tools.releasetools.ApexInfo.package_name");
1159 target = stream->WriteStringMaybeAliased(
1160 1, this->_internal_package_name(), target);
1161 }
1162
1163 // int64 version = 2;
1164 if (this->_internal_version() != 0) {
1165 target = stream->EnsureSpace(target);
1166 target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_version(), target);
1167 }
1168
1169 // bool is_compressed = 3;
1170 if (this->_internal_is_compressed() != 0) {
1171 target = stream->EnsureSpace(target);
1172 target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_is_compressed(), target);
1173 }
1174
1175 // int64 decompressed_size = 4;
1176 if (this->_internal_decompressed_size() != 0) {
1177 target = stream->EnsureSpace(target);
1178 target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_decompressed_size(), target);
1179 }
1180
1181 // int64 source_version = 5;
1182 if (this->_internal_source_version() != 0) {
1183 target = stream->EnsureSpace(target);
1184 target = ::_pbi::WireFormatLite::WriteInt64ToArray(5, this->_internal_source_version(), target);
1185 }
1186
1187 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1188 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1189 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1190 }
1191 // @@protoc_insertion_point(serialize_to_array_end:build.tools.releasetools.ApexInfo)
1192 return target;
1193 }
1194
ByteSizeLong() const1195 size_t ApexInfo::ByteSizeLong() const {
1196 // @@protoc_insertion_point(message_byte_size_start:build.tools.releasetools.ApexInfo)
1197 size_t total_size = 0;
1198
1199 ::uint32_t cached_has_bits = 0;
1200 // Prevent compiler warnings about cached_has_bits being unused
1201 (void) cached_has_bits;
1202
1203 // string package_name = 1;
1204 if (!this->_internal_package_name().empty()) {
1205 total_size += 1 +
1206 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1207 this->_internal_package_name());
1208 }
1209
1210 // int64 version = 2;
1211 if (this->_internal_version() != 0) {
1212 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_version());
1213 }
1214
1215 // int64 decompressed_size = 4;
1216 if (this->_internal_decompressed_size() != 0) {
1217 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_decompressed_size());
1218 }
1219
1220 // int64 source_version = 5;
1221 if (this->_internal_source_version() != 0) {
1222 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_source_version());
1223 }
1224
1225 // bool is_compressed = 3;
1226 if (this->_internal_is_compressed() != 0) {
1227 total_size += 1 + 1;
1228 }
1229
1230 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1231 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1232 }
1233 int cached_size = ::_pbi::ToCachedSize(total_size);
1234 SetCachedSize(cached_size);
1235 return total_size;
1236 }
1237
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1238 void ApexInfo::CheckTypeAndMergeFrom(
1239 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1240 MergeFrom(*::_pbi::DownCast<const ApexInfo*>(
1241 &from));
1242 }
1243
MergeFrom(const ApexInfo & from)1244 void ApexInfo::MergeFrom(const ApexInfo& from) {
1245 ApexInfo* const _this = this;
1246 // @@protoc_insertion_point(class_specific_merge_from_start:build.tools.releasetools.ApexInfo)
1247 GOOGLE_DCHECK_NE(&from, _this);
1248 ::uint32_t cached_has_bits = 0;
1249 (void) cached_has_bits;
1250
1251 if (!from._internal_package_name().empty()) {
1252 _this->_internal_set_package_name(from._internal_package_name());
1253 }
1254 if (from._internal_version() != 0) {
1255 _this->_internal_set_version(from._internal_version());
1256 }
1257 if (from._internal_decompressed_size() != 0) {
1258 _this->_internal_set_decompressed_size(from._internal_decompressed_size());
1259 }
1260 if (from._internal_source_version() != 0) {
1261 _this->_internal_set_source_version(from._internal_source_version());
1262 }
1263 if (from._internal_is_compressed() != 0) {
1264 _this->_internal_set_is_compressed(from._internal_is_compressed());
1265 }
1266 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1267 }
1268
CopyFrom(const ApexInfo & from)1269 void ApexInfo::CopyFrom(const ApexInfo& from) {
1270 // @@protoc_insertion_point(class_specific_copy_from_start:build.tools.releasetools.ApexInfo)
1271 if (&from == this) return;
1272 Clear();
1273 MergeFrom(from);
1274 }
1275
IsInitialized() const1276 bool ApexInfo::IsInitialized() const {
1277 return true;
1278 }
1279
InternalSwap(ApexInfo * other)1280 void ApexInfo::InternalSwap(ApexInfo* other) {
1281 using std::swap;
1282 auto* lhs_arena = GetArenaForAllocation();
1283 auto* rhs_arena = other->GetArenaForAllocation();
1284 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1285 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1286 &_impl_.package_name_, lhs_arena,
1287 &other->_impl_.package_name_, rhs_arena
1288 );
1289 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1290 PROTOBUF_FIELD_OFFSET(ApexInfo, _impl_.is_compressed_)
1291 + sizeof(ApexInfo::_impl_.is_compressed_) // NOLINT
1292 - PROTOBUF_FIELD_OFFSET(ApexInfo, _impl_.version_)>(
1293 reinterpret_cast<char*>(&_impl_.version_),
1294 reinterpret_cast<char*>(&other->_impl_.version_));
1295 }
1296
GetTypeName() const1297 std::string ApexInfo::GetTypeName() const {
1298 return "build.tools.releasetools.ApexInfo";
1299 }
1300
1301
1302 // ===================================================================
1303
1304 class ApexMetadata::_Internal {
1305 public:
1306 };
1307
ApexMetadata(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1308 ApexMetadata::ApexMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1309 bool is_message_owned)
1310 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1311 SharedCtor(arena, is_message_owned);
1312 // @@protoc_insertion_point(arena_constructor:build.tools.releasetools.ApexMetadata)
1313 }
ApexMetadata(const ApexMetadata & from)1314 ApexMetadata::ApexMetadata(const ApexMetadata& from)
1315 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1316 ApexMetadata* const _this = this; (void)_this;
1317 new (&_impl_) Impl_{
1318 decltype(_impl_.apex_info_){from._impl_.apex_info_}
1319 , /*decltype(_impl_._cached_size_)*/{}};
1320
1321 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1322 // @@protoc_insertion_point(copy_constructor:build.tools.releasetools.ApexMetadata)
1323 }
1324
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1325 inline void ApexMetadata::SharedCtor(
1326 ::_pb::Arena* arena, bool is_message_owned) {
1327 (void)arena;
1328 (void)is_message_owned;
1329 new (&_impl_) Impl_{
1330 decltype(_impl_.apex_info_){arena}
1331 , /*decltype(_impl_._cached_size_)*/{}
1332 };
1333 }
1334
~ApexMetadata()1335 ApexMetadata::~ApexMetadata() {
1336 // @@protoc_insertion_point(destructor:build.tools.releasetools.ApexMetadata)
1337 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1338 (void)arena;
1339 return;
1340 }
1341 SharedDtor();
1342 }
1343
SharedDtor()1344 inline void ApexMetadata::SharedDtor() {
1345 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1346 _impl_.apex_info_.~RepeatedPtrField();
1347 }
1348
SetCachedSize(int size) const1349 void ApexMetadata::SetCachedSize(int size) const {
1350 _impl_._cached_size_.Set(size);
1351 }
1352
Clear()1353 void ApexMetadata::Clear() {
1354 // @@protoc_insertion_point(message_clear_start:build.tools.releasetools.ApexMetadata)
1355 ::uint32_t cached_has_bits = 0;
1356 // Prevent compiler warnings about cached_has_bits being unused
1357 (void) cached_has_bits;
1358
1359 _impl_.apex_info_.Clear();
1360 _internal_metadata_.Clear<std::string>();
1361 }
1362
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1363 const char* ApexMetadata::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1364 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1365 while (!ctx->Done(&ptr)) {
1366 ::uint32_t tag;
1367 ptr = ::_pbi::ReadTag(ptr, &tag);
1368 switch (tag >> 3) {
1369 // repeated .build.tools.releasetools.ApexInfo apex_info = 1;
1370 case 1:
1371 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1372 ptr -= 1;
1373 do {
1374 ptr += 1;
1375 ptr = ctx->ParseMessage(_internal_add_apex_info(), ptr);
1376 CHK_(ptr);
1377 if (!ctx->DataAvailable(ptr)) break;
1378 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
1379 } else {
1380 goto handle_unusual;
1381 }
1382 continue;
1383 default:
1384 goto handle_unusual;
1385 } // switch
1386 handle_unusual:
1387 if ((tag == 0) || ((tag & 7) == 4)) {
1388 CHK_(ptr);
1389 ctx->SetLastTag(tag);
1390 goto message_done;
1391 }
1392 ptr = UnknownFieldParse(
1393 tag,
1394 _internal_metadata_.mutable_unknown_fields<std::string>(),
1395 ptr, ctx);
1396 CHK_(ptr != nullptr);
1397 } // while
1398 message_done:
1399 return ptr;
1400 failure:
1401 ptr = nullptr;
1402 goto message_done;
1403 #undef CHK_
1404 }
1405
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1406 ::uint8_t* ApexMetadata::_InternalSerialize(
1407 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1408 // @@protoc_insertion_point(serialize_to_array_start:build.tools.releasetools.ApexMetadata)
1409 ::uint32_t cached_has_bits = 0;
1410 (void) cached_has_bits;
1411
1412 // repeated .build.tools.releasetools.ApexInfo apex_info = 1;
1413 for (unsigned i = 0,
1414 n = static_cast<unsigned>(this->_internal_apex_info_size()); i < n; i++) {
1415 const auto& repfield = this->_internal_apex_info(i);
1416 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1417 InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
1418 }
1419
1420 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1421 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1422 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1423 }
1424 // @@protoc_insertion_point(serialize_to_array_end:build.tools.releasetools.ApexMetadata)
1425 return target;
1426 }
1427
ByteSizeLong() const1428 size_t ApexMetadata::ByteSizeLong() const {
1429 // @@protoc_insertion_point(message_byte_size_start:build.tools.releasetools.ApexMetadata)
1430 size_t total_size = 0;
1431
1432 ::uint32_t cached_has_bits = 0;
1433 // Prevent compiler warnings about cached_has_bits being unused
1434 (void) cached_has_bits;
1435
1436 // repeated .build.tools.releasetools.ApexInfo apex_info = 1;
1437 total_size += 1UL * this->_internal_apex_info_size();
1438 for (const auto& msg : this->_impl_.apex_info_) {
1439 total_size +=
1440 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1441 }
1442
1443 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1444 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1445 }
1446 int cached_size = ::_pbi::ToCachedSize(total_size);
1447 SetCachedSize(cached_size);
1448 return total_size;
1449 }
1450
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1451 void ApexMetadata::CheckTypeAndMergeFrom(
1452 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1453 MergeFrom(*::_pbi::DownCast<const ApexMetadata*>(
1454 &from));
1455 }
1456
MergeFrom(const ApexMetadata & from)1457 void ApexMetadata::MergeFrom(const ApexMetadata& from) {
1458 ApexMetadata* const _this = this;
1459 // @@protoc_insertion_point(class_specific_merge_from_start:build.tools.releasetools.ApexMetadata)
1460 GOOGLE_DCHECK_NE(&from, _this);
1461 ::uint32_t cached_has_bits = 0;
1462 (void) cached_has_bits;
1463
1464 _this->_impl_.apex_info_.MergeFrom(from._impl_.apex_info_);
1465 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1466 }
1467
CopyFrom(const ApexMetadata & from)1468 void ApexMetadata::CopyFrom(const ApexMetadata& from) {
1469 // @@protoc_insertion_point(class_specific_copy_from_start:build.tools.releasetools.ApexMetadata)
1470 if (&from == this) return;
1471 Clear();
1472 MergeFrom(from);
1473 }
1474
IsInitialized() const1475 bool ApexMetadata::IsInitialized() const {
1476 return true;
1477 }
1478
InternalSwap(ApexMetadata * other)1479 void ApexMetadata::InternalSwap(ApexMetadata* other) {
1480 using std::swap;
1481 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1482 _impl_.apex_info_.InternalSwap(&other->_impl_.apex_info_);
1483 }
1484
GetTypeName() const1485 std::string ApexMetadata::GetTypeName() const {
1486 return "build.tools.releasetools.ApexMetadata";
1487 }
1488
1489
1490 // ===================================================================
1491
OtaMetadata_PropertyFilesEntry_DoNotUse()1492 OtaMetadata_PropertyFilesEntry_DoNotUse::OtaMetadata_PropertyFilesEntry_DoNotUse() {}
OtaMetadata_PropertyFilesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena * arena)1493 OtaMetadata_PropertyFilesEntry_DoNotUse::OtaMetadata_PropertyFilesEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
1494 : SuperType(arena) {}
MergeFrom(const OtaMetadata_PropertyFilesEntry_DoNotUse & other)1495 void OtaMetadata_PropertyFilesEntry_DoNotUse::MergeFrom(const OtaMetadata_PropertyFilesEntry_DoNotUse& other) {
1496 MergeFromInternal(other);
1497 }
1498
1499 // ===================================================================
1500
1501 class OtaMetadata::_Internal {
1502 public:
1503 static const ::build::tools::releasetools::DeviceState& precondition(const OtaMetadata* msg);
1504 static const ::build::tools::releasetools::DeviceState& postcondition(const OtaMetadata* msg);
1505 };
1506
1507 const ::build::tools::releasetools::DeviceState&
precondition(const OtaMetadata * msg)1508 OtaMetadata::_Internal::precondition(const OtaMetadata* msg) {
1509 return *msg->_impl_.precondition_;
1510 }
1511 const ::build::tools::releasetools::DeviceState&
postcondition(const OtaMetadata * msg)1512 OtaMetadata::_Internal::postcondition(const OtaMetadata* msg) {
1513 return *msg->_impl_.postcondition_;
1514 }
OtaMetadata(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1515 OtaMetadata::OtaMetadata(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1516 bool is_message_owned)
1517 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1518 SharedCtor(arena, is_message_owned);
1519 // @@protoc_insertion_point(arena_constructor:build.tools.releasetools.OtaMetadata)
1520 }
OtaMetadata(const OtaMetadata & from)1521 OtaMetadata::OtaMetadata(const OtaMetadata& from)
1522 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1523 OtaMetadata* const _this = this; (void)_this;
1524 new (&_impl_) Impl_{
1525 /*decltype(_impl_.property_files_)*/{}
1526 , decltype(_impl_.precondition_){nullptr}
1527 , decltype(_impl_.postcondition_){nullptr}
1528 , decltype(_impl_.type_){}
1529 , decltype(_impl_.wipe_){}
1530 , decltype(_impl_.downgrade_){}
1531 , decltype(_impl_.retrofit_dynamic_partitions_){}
1532 , decltype(_impl_.spl_downgrade_){}
1533 , decltype(_impl_.required_cache_){}
1534 , /*decltype(_impl_._cached_size_)*/{}};
1535
1536 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1537 _this->_impl_.property_files_.MergeFrom(from._impl_.property_files_);
1538 if (from._internal_has_precondition()) {
1539 _this->_impl_.precondition_ = new ::build::tools::releasetools::DeviceState(*from._impl_.precondition_);
1540 }
1541 if (from._internal_has_postcondition()) {
1542 _this->_impl_.postcondition_ = new ::build::tools::releasetools::DeviceState(*from._impl_.postcondition_);
1543 }
1544 ::memcpy(&_impl_.type_, &from._impl_.type_,
1545 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.required_cache_) -
1546 reinterpret_cast<char*>(&_impl_.type_)) + sizeof(_impl_.required_cache_));
1547 // @@protoc_insertion_point(copy_constructor:build.tools.releasetools.OtaMetadata)
1548 }
1549
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1550 inline void OtaMetadata::SharedCtor(
1551 ::_pb::Arena* arena, bool is_message_owned) {
1552 (void)arena;
1553 (void)is_message_owned;
1554 new (&_impl_) Impl_{
1555 /*decltype(_impl_.property_files_)*/{::_pbi::ArenaInitialized(), arena}
1556 , decltype(_impl_.precondition_){nullptr}
1557 , decltype(_impl_.postcondition_){nullptr}
1558 , decltype(_impl_.type_){0}
1559 , decltype(_impl_.wipe_){false}
1560 , decltype(_impl_.downgrade_){false}
1561 , decltype(_impl_.retrofit_dynamic_partitions_){false}
1562 , decltype(_impl_.spl_downgrade_){false}
1563 , decltype(_impl_.required_cache_){::int64_t{0}}
1564 , /*decltype(_impl_._cached_size_)*/{}
1565 };
1566 }
1567
~OtaMetadata()1568 OtaMetadata::~OtaMetadata() {
1569 // @@protoc_insertion_point(destructor:build.tools.releasetools.OtaMetadata)
1570 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1571 (void)arena;
1572 return;
1573 }
1574 SharedDtor();
1575 }
1576
SharedDtor()1577 inline void OtaMetadata::SharedDtor() {
1578 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1579 _impl_.property_files_.Destruct();
1580 _impl_.property_files_.~MapFieldLite();
1581 if (this != internal_default_instance()) delete _impl_.precondition_;
1582 if (this != internal_default_instance()) delete _impl_.postcondition_;
1583 }
1584
SetCachedSize(int size) const1585 void OtaMetadata::SetCachedSize(int size) const {
1586 _impl_._cached_size_.Set(size);
1587 }
1588
Clear()1589 void OtaMetadata::Clear() {
1590 // @@protoc_insertion_point(message_clear_start:build.tools.releasetools.OtaMetadata)
1591 ::uint32_t cached_has_bits = 0;
1592 // Prevent compiler warnings about cached_has_bits being unused
1593 (void) cached_has_bits;
1594
1595 _impl_.property_files_.Clear();
1596 if (GetArenaForAllocation() == nullptr && _impl_.precondition_ != nullptr) {
1597 delete _impl_.precondition_;
1598 }
1599 _impl_.precondition_ = nullptr;
1600 if (GetArenaForAllocation() == nullptr && _impl_.postcondition_ != nullptr) {
1601 delete _impl_.postcondition_;
1602 }
1603 _impl_.postcondition_ = nullptr;
1604 ::memset(&_impl_.type_, 0, static_cast<size_t>(
1605 reinterpret_cast<char*>(&_impl_.required_cache_) -
1606 reinterpret_cast<char*>(&_impl_.type_)) + sizeof(_impl_.required_cache_));
1607 _internal_metadata_.Clear<std::string>();
1608 }
1609
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1610 const char* OtaMetadata::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1611 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1612 while (!ctx->Done(&ptr)) {
1613 ::uint32_t tag;
1614 ptr = ::_pbi::ReadTag(ptr, &tag);
1615 switch (tag >> 3) {
1616 // .build.tools.releasetools.OtaMetadata.OtaType type = 1;
1617 case 1:
1618 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1619 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1620 CHK_(ptr);
1621 _internal_set_type(static_cast<::build::tools::releasetools::OtaMetadata_OtaType>(val));
1622 } else {
1623 goto handle_unusual;
1624 }
1625 continue;
1626 // bool wipe = 2;
1627 case 2:
1628 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1629 _impl_.wipe_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1630 CHK_(ptr);
1631 } else {
1632 goto handle_unusual;
1633 }
1634 continue;
1635 // bool downgrade = 3;
1636 case 3:
1637 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1638 _impl_.downgrade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1639 CHK_(ptr);
1640 } else {
1641 goto handle_unusual;
1642 }
1643 continue;
1644 // map<string, string> property_files = 4;
1645 case 4:
1646 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
1647 ptr -= 1;
1648 do {
1649 ptr += 1;
1650 ptr = ctx->ParseMessage(&_impl_.property_files_, ptr);
1651 CHK_(ptr);
1652 if (!ctx->DataAvailable(ptr)) break;
1653 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
1654 } else {
1655 goto handle_unusual;
1656 }
1657 continue;
1658 // .build.tools.releasetools.DeviceState precondition = 5;
1659 case 5:
1660 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
1661 ptr = ctx->ParseMessage(_internal_mutable_precondition(), ptr);
1662 CHK_(ptr);
1663 } else {
1664 goto handle_unusual;
1665 }
1666 continue;
1667 // .build.tools.releasetools.DeviceState postcondition = 6;
1668 case 6:
1669 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
1670 ptr = ctx->ParseMessage(_internal_mutable_postcondition(), ptr);
1671 CHK_(ptr);
1672 } else {
1673 goto handle_unusual;
1674 }
1675 continue;
1676 // bool retrofit_dynamic_partitions = 7;
1677 case 7:
1678 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
1679 _impl_.retrofit_dynamic_partitions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1680 CHK_(ptr);
1681 } else {
1682 goto handle_unusual;
1683 }
1684 continue;
1685 // int64 required_cache = 8;
1686 case 8:
1687 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
1688 _impl_.required_cache_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1689 CHK_(ptr);
1690 } else {
1691 goto handle_unusual;
1692 }
1693 continue;
1694 // bool spl_downgrade = 9;
1695 case 9:
1696 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
1697 _impl_.spl_downgrade_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1698 CHK_(ptr);
1699 } else {
1700 goto handle_unusual;
1701 }
1702 continue;
1703 default:
1704 goto handle_unusual;
1705 } // switch
1706 handle_unusual:
1707 if ((tag == 0) || ((tag & 7) == 4)) {
1708 CHK_(ptr);
1709 ctx->SetLastTag(tag);
1710 goto message_done;
1711 }
1712 ptr = UnknownFieldParse(
1713 tag,
1714 _internal_metadata_.mutable_unknown_fields<std::string>(),
1715 ptr, ctx);
1716 CHK_(ptr != nullptr);
1717 } // while
1718 message_done:
1719 return ptr;
1720 failure:
1721 ptr = nullptr;
1722 goto message_done;
1723 #undef CHK_
1724 }
1725
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1726 ::uint8_t* OtaMetadata::_InternalSerialize(
1727 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1728 // @@protoc_insertion_point(serialize_to_array_start:build.tools.releasetools.OtaMetadata)
1729 ::uint32_t cached_has_bits = 0;
1730 (void) cached_has_bits;
1731
1732 // .build.tools.releasetools.OtaMetadata.OtaType type = 1;
1733 if (this->_internal_type() != 0) {
1734 target = stream->EnsureSpace(target);
1735 target = ::_pbi::WireFormatLite::WriteEnumToArray(
1736 1, this->_internal_type(), target);
1737 }
1738
1739 // bool wipe = 2;
1740 if (this->_internal_wipe() != 0) {
1741 target = stream->EnsureSpace(target);
1742 target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_wipe(), target);
1743 }
1744
1745 // bool downgrade = 3;
1746 if (this->_internal_downgrade() != 0) {
1747 target = stream->EnsureSpace(target);
1748 target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_downgrade(), target);
1749 }
1750
1751 // map<string, string> property_files = 4;
1752 if (!this->_internal_property_files().empty()) {
1753 using MapType = ::_pb::Map<std::string, std::string>;
1754 using WireHelper = OtaMetadata_PropertyFilesEntry_DoNotUse::Funcs;
1755 const auto& map_field = this->_internal_property_files();
1756 auto check_utf8 = [](const MapType::value_type& entry) {
1757 (void)entry;
1758 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1759 entry.first.data(), static_cast<int>(entry.first.length()),
1760 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1761 "build.tools.releasetools.OtaMetadata.PropertyFilesEntry.key");
1762 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
1763 entry.second.data(), static_cast<int>(entry.second.length()),
1764 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
1765 "build.tools.releasetools.OtaMetadata.PropertyFilesEntry.value");
1766 };
1767
1768 if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
1769 for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
1770 target = WireHelper::InternalSerialize(4, entry.first, entry.second, target, stream);
1771 check_utf8(entry);
1772 }
1773 } else {
1774 for (const auto& entry : map_field) {
1775 target = WireHelper::InternalSerialize(4, entry.first, entry.second, target, stream);
1776 check_utf8(entry);
1777 }
1778 }
1779 }
1780
1781 // .build.tools.releasetools.DeviceState precondition = 5;
1782 if (this->_internal_has_precondition()) {
1783 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1784 InternalWriteMessage(5, _Internal::precondition(this),
1785 _Internal::precondition(this).GetCachedSize(), target, stream);
1786 }
1787
1788 // .build.tools.releasetools.DeviceState postcondition = 6;
1789 if (this->_internal_has_postcondition()) {
1790 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1791 InternalWriteMessage(6, _Internal::postcondition(this),
1792 _Internal::postcondition(this).GetCachedSize(), target, stream);
1793 }
1794
1795 // bool retrofit_dynamic_partitions = 7;
1796 if (this->_internal_retrofit_dynamic_partitions() != 0) {
1797 target = stream->EnsureSpace(target);
1798 target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_retrofit_dynamic_partitions(), target);
1799 }
1800
1801 // int64 required_cache = 8;
1802 if (this->_internal_required_cache() != 0) {
1803 target = stream->EnsureSpace(target);
1804 target = ::_pbi::WireFormatLite::WriteInt64ToArray(8, this->_internal_required_cache(), target);
1805 }
1806
1807 // bool spl_downgrade = 9;
1808 if (this->_internal_spl_downgrade() != 0) {
1809 target = stream->EnsureSpace(target);
1810 target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_spl_downgrade(), target);
1811 }
1812
1813 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1814 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1815 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1816 }
1817 // @@protoc_insertion_point(serialize_to_array_end:build.tools.releasetools.OtaMetadata)
1818 return target;
1819 }
1820
ByteSizeLong() const1821 size_t OtaMetadata::ByteSizeLong() const {
1822 // @@protoc_insertion_point(message_byte_size_start:build.tools.releasetools.OtaMetadata)
1823 size_t total_size = 0;
1824
1825 ::uint32_t cached_has_bits = 0;
1826 // Prevent compiler warnings about cached_has_bits being unused
1827 (void) cached_has_bits;
1828
1829 // map<string, string> property_files = 4;
1830 total_size += 1 *
1831 ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_property_files_size());
1832 for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
1833 it = this->_internal_property_files().begin();
1834 it != this->_internal_property_files().end(); ++it) {
1835 total_size += OtaMetadata_PropertyFilesEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
1836 }
1837
1838 // .build.tools.releasetools.DeviceState precondition = 5;
1839 if (this->_internal_has_precondition()) {
1840 total_size += 1 +
1841 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1842 *_impl_.precondition_);
1843 }
1844
1845 // .build.tools.releasetools.DeviceState postcondition = 6;
1846 if (this->_internal_has_postcondition()) {
1847 total_size += 1 +
1848 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1849 *_impl_.postcondition_);
1850 }
1851
1852 // .build.tools.releasetools.OtaMetadata.OtaType type = 1;
1853 if (this->_internal_type() != 0) {
1854 total_size += 1 +
1855 ::_pbi::WireFormatLite::EnumSize(this->_internal_type());
1856 }
1857
1858 // bool wipe = 2;
1859 if (this->_internal_wipe() != 0) {
1860 total_size += 1 + 1;
1861 }
1862
1863 // bool downgrade = 3;
1864 if (this->_internal_downgrade() != 0) {
1865 total_size += 1 + 1;
1866 }
1867
1868 // bool retrofit_dynamic_partitions = 7;
1869 if (this->_internal_retrofit_dynamic_partitions() != 0) {
1870 total_size += 1 + 1;
1871 }
1872
1873 // bool spl_downgrade = 9;
1874 if (this->_internal_spl_downgrade() != 0) {
1875 total_size += 1 + 1;
1876 }
1877
1878 // int64 required_cache = 8;
1879 if (this->_internal_required_cache() != 0) {
1880 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_required_cache());
1881 }
1882
1883 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1884 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1885 }
1886 int cached_size = ::_pbi::ToCachedSize(total_size);
1887 SetCachedSize(cached_size);
1888 return total_size;
1889 }
1890
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1891 void OtaMetadata::CheckTypeAndMergeFrom(
1892 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1893 MergeFrom(*::_pbi::DownCast<const OtaMetadata*>(
1894 &from));
1895 }
1896
MergeFrom(const OtaMetadata & from)1897 void OtaMetadata::MergeFrom(const OtaMetadata& from) {
1898 OtaMetadata* const _this = this;
1899 // @@protoc_insertion_point(class_specific_merge_from_start:build.tools.releasetools.OtaMetadata)
1900 GOOGLE_DCHECK_NE(&from, _this);
1901 ::uint32_t cached_has_bits = 0;
1902 (void) cached_has_bits;
1903
1904 _this->_impl_.property_files_.MergeFrom(from._impl_.property_files_);
1905 if (from._internal_has_precondition()) {
1906 _this->_internal_mutable_precondition()->::build::tools::releasetools::DeviceState::MergeFrom(
1907 from._internal_precondition());
1908 }
1909 if (from._internal_has_postcondition()) {
1910 _this->_internal_mutable_postcondition()->::build::tools::releasetools::DeviceState::MergeFrom(
1911 from._internal_postcondition());
1912 }
1913 if (from._internal_type() != 0) {
1914 _this->_internal_set_type(from._internal_type());
1915 }
1916 if (from._internal_wipe() != 0) {
1917 _this->_internal_set_wipe(from._internal_wipe());
1918 }
1919 if (from._internal_downgrade() != 0) {
1920 _this->_internal_set_downgrade(from._internal_downgrade());
1921 }
1922 if (from._internal_retrofit_dynamic_partitions() != 0) {
1923 _this->_internal_set_retrofit_dynamic_partitions(from._internal_retrofit_dynamic_partitions());
1924 }
1925 if (from._internal_spl_downgrade() != 0) {
1926 _this->_internal_set_spl_downgrade(from._internal_spl_downgrade());
1927 }
1928 if (from._internal_required_cache() != 0) {
1929 _this->_internal_set_required_cache(from._internal_required_cache());
1930 }
1931 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1932 }
1933
CopyFrom(const OtaMetadata & from)1934 void OtaMetadata::CopyFrom(const OtaMetadata& from) {
1935 // @@protoc_insertion_point(class_specific_copy_from_start:build.tools.releasetools.OtaMetadata)
1936 if (&from == this) return;
1937 Clear();
1938 MergeFrom(from);
1939 }
1940
IsInitialized() const1941 bool OtaMetadata::IsInitialized() const {
1942 return true;
1943 }
1944
InternalSwap(OtaMetadata * other)1945 void OtaMetadata::InternalSwap(OtaMetadata* other) {
1946 using std::swap;
1947 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1948 _impl_.property_files_.InternalSwap(&other->_impl_.property_files_);
1949 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1950 PROTOBUF_FIELD_OFFSET(OtaMetadata, _impl_.required_cache_)
1951 + sizeof(OtaMetadata::_impl_.required_cache_) // NOLINT
1952 - PROTOBUF_FIELD_OFFSET(OtaMetadata, _impl_.precondition_)>(
1953 reinterpret_cast<char*>(&_impl_.precondition_),
1954 reinterpret_cast<char*>(&other->_impl_.precondition_));
1955 }
1956
GetTypeName() const1957 std::string OtaMetadata::GetTypeName() const {
1958 return "build.tools.releasetools.OtaMetadata";
1959 }
1960
1961
1962 // @@protoc_insertion_point(namespace_scope)
1963 } // namespace releasetools
1964 } // namespace tools
1965 } // namespace build
1966 PROTOBUF_NAMESPACE_OPEN
1967 template<> PROTOBUF_NOINLINE ::build::tools::releasetools::PartitionState*
CreateMaybeMessage(Arena * arena)1968 Arena::CreateMaybeMessage< ::build::tools::releasetools::PartitionState >(Arena* arena) {
1969 return Arena::CreateMessageInternal< ::build::tools::releasetools::PartitionState >(arena);
1970 }
1971 template<> PROTOBUF_NOINLINE ::build::tools::releasetools::DeviceState*
CreateMaybeMessage(Arena * arena)1972 Arena::CreateMaybeMessage< ::build::tools::releasetools::DeviceState >(Arena* arena) {
1973 return Arena::CreateMessageInternal< ::build::tools::releasetools::DeviceState >(arena);
1974 }
1975 template<> PROTOBUF_NOINLINE ::build::tools::releasetools::ApexInfo*
CreateMaybeMessage(Arena * arena)1976 Arena::CreateMaybeMessage< ::build::tools::releasetools::ApexInfo >(Arena* arena) {
1977 return Arena::CreateMessageInternal< ::build::tools::releasetools::ApexInfo >(arena);
1978 }
1979 template<> PROTOBUF_NOINLINE ::build::tools::releasetools::ApexMetadata*
CreateMaybeMessage(Arena * arena)1980 Arena::CreateMaybeMessage< ::build::tools::releasetools::ApexMetadata >(Arena* arena) {
1981 return Arena::CreateMessageInternal< ::build::tools::releasetools::ApexMetadata >(arena);
1982 }
1983 template<> PROTOBUF_NOINLINE ::build::tools::releasetools::OtaMetadata_PropertyFilesEntry_DoNotUse*
CreateMaybeMessage(Arena * arena)1984 Arena::CreateMaybeMessage< ::build::tools::releasetools::OtaMetadata_PropertyFilesEntry_DoNotUse >(Arena* arena) {
1985 return Arena::CreateMessageInternal< ::build::tools::releasetools::OtaMetadata_PropertyFilesEntry_DoNotUse >(arena);
1986 }
1987 template<> PROTOBUF_NOINLINE ::build::tools::releasetools::OtaMetadata*
CreateMaybeMessage(Arena * arena)1988 Arena::CreateMaybeMessage< ::build::tools::releasetools::OtaMetadata >(Arena* arena) {
1989 return Arena::CreateMessageInternal< ::build::tools::releasetools::OtaMetadata >(arena);
1990 }
1991 PROTOBUF_NAMESPACE_CLOSE
1992
1993 // @@protoc_insertion_point(global_scope)
1994 #include <google/protobuf/port_undef.inc>
1995