1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: frameworks/proto_logging/stats/atoms/providers/mediaprovider/rollback_extension_atoms.proto
3
4 #include "frameworks/proto_logging/stats/atoms/providers/mediaprovider/rollback_extension_atoms.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/descriptor.h>
13 #include <google/protobuf/generated_message_reflection.h>
14 #include <google/protobuf/reflection_ops.h>
15 #include <google/protobuf/wire_format.h>
16 // @@protoc_insertion_point(includes)
17 #include <google/protobuf/port_def.inc>
18
19 PROTOBUF_PRAGMA_INIT_SEG
20
21 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
22 namespace _pbi = _pb::internal;
23
24 namespace android {
25 namespace os {
26 namespace statsd {
27 namespace providers {
28 namespace mediaprovider {
MediaProviderDatabaseRollbackReported(::_pbi::ConstantInitialized)29 PROTOBUF_CONSTEXPR MediaProviderDatabaseRollbackReported::MediaProviderDatabaseRollbackReported(
30 ::_pbi::ConstantInitialized): _impl_{
31 /*decltype(_impl_._has_bits_)*/{}
32 , /*decltype(_impl_._cached_size_)*/{}
33 , /*decltype(_impl_.database_name_)*/0} {}
34 struct MediaProviderDatabaseRollbackReportedDefaultTypeInternal {
MediaProviderDatabaseRollbackReportedDefaultTypeInternalandroid::os::statsd::providers::mediaprovider::MediaProviderDatabaseRollbackReportedDefaultTypeInternal35 PROTOBUF_CONSTEXPR MediaProviderDatabaseRollbackReportedDefaultTypeInternal()
36 : _instance(::_pbi::ConstantInitialized{}) {}
~MediaProviderDatabaseRollbackReportedDefaultTypeInternalandroid::os::statsd::providers::mediaprovider::MediaProviderDatabaseRollbackReportedDefaultTypeInternal37 ~MediaProviderDatabaseRollbackReportedDefaultTypeInternal() {}
38 union { // NOLINT(misc-non-private-member-variables-in-classes)
39 MediaProviderDatabaseRollbackReported _instance;
40 };
41 };
42 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MediaProviderDatabaseRollbackReportedDefaultTypeInternal _MediaProviderDatabaseRollbackReported_default_instance_;
BackupSetupStatusReported(::_pbi::ConstantInitialized)43 PROTOBUF_CONSTEXPR BackupSetupStatusReported::BackupSetupStatusReported(
44 ::_pbi::ConstantInitialized): _impl_{
45 /*decltype(_impl_._has_bits_)*/{}
46 , /*decltype(_impl_._cached_size_)*/{}
47 , /*decltype(_impl_.status_)*/0
48 , /*decltype(_impl_.volume_)*/0} {}
49 struct BackupSetupStatusReportedDefaultTypeInternal {
BackupSetupStatusReportedDefaultTypeInternalandroid::os::statsd::providers::mediaprovider::BackupSetupStatusReportedDefaultTypeInternal50 PROTOBUF_CONSTEXPR BackupSetupStatusReportedDefaultTypeInternal()
51 : _instance(::_pbi::ConstantInitialized{}) {}
~BackupSetupStatusReportedDefaultTypeInternalandroid::os::statsd::providers::mediaprovider::BackupSetupStatusReportedDefaultTypeInternal52 ~BackupSetupStatusReportedDefaultTypeInternal() {}
53 union { // NOLINT(misc-non-private-member-variables-in-classes)
54 BackupSetupStatusReported _instance;
55 };
56 };
57 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BackupSetupStatusReportedDefaultTypeInternal _BackupSetupStatusReported_default_instance_;
58 } // namespace mediaprovider
59 } // namespace providers
60 } // namespace statsd
61 } // namespace os
62 } // namespace android
63 static ::_pb::Metadata file_level_metadata_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto[2];
64 static const ::_pb::EnumDescriptor* file_level_enum_descriptors_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto[3];
65 static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto = nullptr;
66
67 const ::uint32_t TableStruct_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
68 PROTOBUF_FIELD_OFFSET(::android::os::statsd::providers::mediaprovider::MediaProviderDatabaseRollbackReported, _impl_._has_bits_),
69 PROTOBUF_FIELD_OFFSET(::android::os::statsd::providers::mediaprovider::MediaProviderDatabaseRollbackReported, _internal_metadata_),
70 ~0u, // no _extensions_
71 ~0u, // no _oneof_case_
72 ~0u, // no _weak_field_map_
73 ~0u, // no _inlined_string_donated_
74 PROTOBUF_FIELD_OFFSET(::android::os::statsd::providers::mediaprovider::MediaProviderDatabaseRollbackReported, _impl_.database_name_),
75 0,
76 PROTOBUF_FIELD_OFFSET(::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported, _impl_._has_bits_),
77 PROTOBUF_FIELD_OFFSET(::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported, _internal_metadata_),
78 ~0u, // no _extensions_
79 ~0u, // no _oneof_case_
80 ~0u, // no _weak_field_map_
81 ~0u, // no _inlined_string_donated_
82 PROTOBUF_FIELD_OFFSET(::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported, _impl_.status_),
83 PROTOBUF_FIELD_OFFSET(::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported, _impl_.volume_),
84 0,
85 1,
86 };
87 static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
88 { 0, 7, -1, sizeof(::android::os::statsd::providers::mediaprovider::MediaProviderDatabaseRollbackReported)},
89 { 8, 16, -1, sizeof(::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported)},
90 };
91
92 static const ::_pb::Message* const file_default_instances[] = {
93 &::android::os::statsd::providers::mediaprovider::_MediaProviderDatabaseRollbackReported_default_instance_._instance,
94 &::android::os::statsd::providers::mediaprovider::_BackupSetupStatusReported_default_instance_._instance,
95 };
96
97 const char descriptor_table_protodef_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
98 "\n[frameworks/proto_logging/stats/atoms/p"
99 "roviders/mediaprovider/rollback_extensio"
100 "n_atoms.proto\022)android.os.statsd.provide"
101 "rs.mediaprovider\032*frameworks/proto_loggi"
102 "ng/stats/atoms.proto\0327frameworks/proto_l"
103 "ogging/stats/atom_field_options.proto\"\316\001"
104 "\n%MediaProviderDatabaseRollbackReported\022"
105 "p\n\rdatabase_name\030\001 \001(\0162Y.android.os.stat"
106 "sd.providers.mediaprovider.MediaProvider"
107 "DatabaseRollbackReported.Database\"3\n\010Dat"
108 "abase\022\013\n\007UNKNOWN\020\000\022\014\n\010INTERNAL\020\001\022\014\n\010EXTE"
109 "RNAL\020\002\"\343\002\n\031BackupSetupStatusReported\022[\n\006"
110 "status\030\001 \001(\0162K.android.os.statsd.provide"
111 "rs.mediaprovider.BackupSetupStatusReport"
112 "ed.Status\022[\n\006volume\030\002 \001(\0162K.android.os.s"
113 "tatsd.providers.mediaprovider.BackupSetu"
114 "pStatusReported.Volume\">\n\006Status\022\013\n\007UNKN"
115 "OWN\020\000\022\r\n\tATTEMPTED\020\001\022\013\n\007SUCCESS\020\002\022\013\n\007FAI"
116 "LURE\020\003\"L\n\006Volume\022\022\n\016UNKNOWN_VOLUME\020\000\022\014\n\010"
117 "INTERNAL\020\001\022\024\n\020EXTERNAL_PRIMARY\020\002\022\n\n\006PUBL"
118 "IC\020\003:\260\001\n)media_provider_database_rollbac"
119 "k_reported\022\027.android.os.statsd.Atom\030\220\006 \001"
120 "(\0132P.android.os.statsd.providers.mediapr"
121 "ovider.MediaProviderDatabaseRollbackRepo"
122 "rtedB\021\242\265\030\rmediaprovider:\227\001\n\034backup_setup"
123 "_status_reported\022\027.android.os.statsd.Ato"
124 "m\030\221\006 \001(\0132D.android.os.statsd.providers.m"
125 "ediaprovider.BackupSetupStatusReportedB\021"
126 "\242\265\030\rmediaproviderB*\n&com.android.os.prov"
127 "iders.mediaproviderP\001"
128 ;
129 static const ::_pbi::DescriptorTable* const descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto_deps[2] = {
130 &::descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatom_5ffield_5foptions_2eproto,
131 &::descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2eproto,
132 };
133 static ::_pbi::once_flag descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto_once;
134 const ::_pbi::DescriptorTable descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto = {
135 false, false, 1181, descriptor_table_protodef_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto,
136 "frameworks/proto_logging/stats/atoms/providers/mediaprovider/rollback_extension_atoms.proto",
137 &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto_once, descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto_deps, 2, 2,
138 schemas, file_default_instances, TableStruct_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto::offsets,
139 file_level_metadata_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto, file_level_enum_descriptors_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto,
140 file_level_service_descriptors_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto,
141 };
descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto_getter()142 PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto_getter() {
143 return &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto;
144 }
145
146 // Force running AddDescriptors() at dynamic initialization time.
147 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto(&descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto);
148 namespace android {
149 namespace os {
150 namespace statsd {
151 namespace providers {
152 namespace mediaprovider {
MediaProviderDatabaseRollbackReported_Database_descriptor()153 const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* MediaProviderDatabaseRollbackReported_Database_descriptor() {
154 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto);
155 return file_level_enum_descriptors_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto[0];
156 }
MediaProviderDatabaseRollbackReported_Database_IsValid(int value)157 bool MediaProviderDatabaseRollbackReported_Database_IsValid(int value) {
158 switch (value) {
159 case 0:
160 case 1:
161 case 2:
162 return true;
163 default:
164 return false;
165 }
166 }
167
168 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
169 constexpr MediaProviderDatabaseRollbackReported_Database MediaProviderDatabaseRollbackReported::UNKNOWN;
170 constexpr MediaProviderDatabaseRollbackReported_Database MediaProviderDatabaseRollbackReported::INTERNAL;
171 constexpr MediaProviderDatabaseRollbackReported_Database MediaProviderDatabaseRollbackReported::EXTERNAL;
172 constexpr MediaProviderDatabaseRollbackReported_Database MediaProviderDatabaseRollbackReported::Database_MIN;
173 constexpr MediaProviderDatabaseRollbackReported_Database MediaProviderDatabaseRollbackReported::Database_MAX;
174 constexpr int MediaProviderDatabaseRollbackReported::Database_ARRAYSIZE;
175 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
BackupSetupStatusReported_Status_descriptor()176 const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BackupSetupStatusReported_Status_descriptor() {
177 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto);
178 return file_level_enum_descriptors_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto[1];
179 }
BackupSetupStatusReported_Status_IsValid(int value)180 bool BackupSetupStatusReported_Status_IsValid(int value) {
181 switch (value) {
182 case 0:
183 case 1:
184 case 2:
185 case 3:
186 return true;
187 default:
188 return false;
189 }
190 }
191
192 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
193 constexpr BackupSetupStatusReported_Status BackupSetupStatusReported::UNKNOWN;
194 constexpr BackupSetupStatusReported_Status BackupSetupStatusReported::ATTEMPTED;
195 constexpr BackupSetupStatusReported_Status BackupSetupStatusReported::SUCCESS;
196 constexpr BackupSetupStatusReported_Status BackupSetupStatusReported::FAILURE;
197 constexpr BackupSetupStatusReported_Status BackupSetupStatusReported::Status_MIN;
198 constexpr BackupSetupStatusReported_Status BackupSetupStatusReported::Status_MAX;
199 constexpr int BackupSetupStatusReported::Status_ARRAYSIZE;
200 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
BackupSetupStatusReported_Volume_descriptor()201 const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BackupSetupStatusReported_Volume_descriptor() {
202 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto);
203 return file_level_enum_descriptors_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto[2];
204 }
BackupSetupStatusReported_Volume_IsValid(int value)205 bool BackupSetupStatusReported_Volume_IsValid(int value) {
206 switch (value) {
207 case 0:
208 case 1:
209 case 2:
210 case 3:
211 return true;
212 default:
213 return false;
214 }
215 }
216
217 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
218 constexpr BackupSetupStatusReported_Volume BackupSetupStatusReported::UNKNOWN_VOLUME;
219 constexpr BackupSetupStatusReported_Volume BackupSetupStatusReported::INTERNAL;
220 constexpr BackupSetupStatusReported_Volume BackupSetupStatusReported::EXTERNAL_PRIMARY;
221 constexpr BackupSetupStatusReported_Volume BackupSetupStatusReported::PUBLIC;
222 constexpr BackupSetupStatusReported_Volume BackupSetupStatusReported::Volume_MIN;
223 constexpr BackupSetupStatusReported_Volume BackupSetupStatusReported::Volume_MAX;
224 constexpr int BackupSetupStatusReported::Volume_ARRAYSIZE;
225 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
226
227 // ===================================================================
228
229 class MediaProviderDatabaseRollbackReported::_Internal {
230 public:
231 using HasBits = decltype(std::declval<MediaProviderDatabaseRollbackReported>()._impl_._has_bits_);
set_has_database_name(HasBits * has_bits)232 static void set_has_database_name(HasBits* has_bits) {
233 (*has_bits)[0] |= 1u;
234 }
235 };
236
MediaProviderDatabaseRollbackReported(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)237 MediaProviderDatabaseRollbackReported::MediaProviderDatabaseRollbackReported(::PROTOBUF_NAMESPACE_ID::Arena* arena,
238 bool is_message_owned)
239 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
240 SharedCtor(arena, is_message_owned);
241 // @@protoc_insertion_point(arena_constructor:android.os.statsd.providers.mediaprovider.MediaProviderDatabaseRollbackReported)
242 }
MediaProviderDatabaseRollbackReported(const MediaProviderDatabaseRollbackReported & from)243 MediaProviderDatabaseRollbackReported::MediaProviderDatabaseRollbackReported(const MediaProviderDatabaseRollbackReported& from)
244 : ::PROTOBUF_NAMESPACE_ID::Message() {
245 MediaProviderDatabaseRollbackReported* const _this = this; (void)_this;
246 new (&_impl_) Impl_{
247 decltype(_impl_._has_bits_){from._impl_._has_bits_}
248 , /*decltype(_impl_._cached_size_)*/{}
249 , decltype(_impl_.database_name_){}};
250
251 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
252 _this->_impl_.database_name_ = from._impl_.database_name_;
253 // @@protoc_insertion_point(copy_constructor:android.os.statsd.providers.mediaprovider.MediaProviderDatabaseRollbackReported)
254 }
255
SharedCtor(::_pb::Arena * arena,bool is_message_owned)256 inline void MediaProviderDatabaseRollbackReported::SharedCtor(
257 ::_pb::Arena* arena, bool is_message_owned) {
258 (void)arena;
259 (void)is_message_owned;
260 new (&_impl_) Impl_{
261 decltype(_impl_._has_bits_){}
262 , /*decltype(_impl_._cached_size_)*/{}
263 , decltype(_impl_.database_name_){0}
264 };
265 }
266
~MediaProviderDatabaseRollbackReported()267 MediaProviderDatabaseRollbackReported::~MediaProviderDatabaseRollbackReported() {
268 // @@protoc_insertion_point(destructor:android.os.statsd.providers.mediaprovider.MediaProviderDatabaseRollbackReported)
269 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
270 (void)arena;
271 return;
272 }
273 SharedDtor();
274 }
275
SharedDtor()276 inline void MediaProviderDatabaseRollbackReported::SharedDtor() {
277 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
278 }
279
SetCachedSize(int size) const280 void MediaProviderDatabaseRollbackReported::SetCachedSize(int size) const {
281 _impl_._cached_size_.Set(size);
282 }
283
Clear()284 void MediaProviderDatabaseRollbackReported::Clear() {
285 // @@protoc_insertion_point(message_clear_start:android.os.statsd.providers.mediaprovider.MediaProviderDatabaseRollbackReported)
286 ::uint32_t cached_has_bits = 0;
287 // Prevent compiler warnings about cached_has_bits being unused
288 (void) cached_has_bits;
289
290 _impl_.database_name_ = 0;
291 _impl_._has_bits_.Clear();
292 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
293 }
294
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)295 const char* MediaProviderDatabaseRollbackReported::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
296 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
297 _Internal::HasBits has_bits{};
298 while (!ctx->Done(&ptr)) {
299 ::uint32_t tag;
300 ptr = ::_pbi::ReadTag(ptr, &tag);
301 switch (tag >> 3) {
302 // optional .android.os.statsd.providers.mediaprovider.MediaProviderDatabaseRollbackReported.Database database_name = 1;
303 case 1:
304 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
305 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
306 CHK_(ptr);
307 if (PROTOBUF_PREDICT_TRUE(::android::os::statsd::providers::mediaprovider::MediaProviderDatabaseRollbackReported_Database_IsValid(val))) {
308 _internal_set_database_name(static_cast<::android::os::statsd::providers::mediaprovider::MediaProviderDatabaseRollbackReported_Database>(val));
309 } else {
310 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
311 }
312 } else {
313 goto handle_unusual;
314 }
315 continue;
316 default:
317 goto handle_unusual;
318 } // switch
319 handle_unusual:
320 if ((tag == 0) || ((tag & 7) == 4)) {
321 CHK_(ptr);
322 ctx->SetLastTag(tag);
323 goto message_done;
324 }
325 ptr = UnknownFieldParse(
326 tag,
327 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
328 ptr, ctx);
329 CHK_(ptr != nullptr);
330 } // while
331 message_done:
332 _impl_._has_bits_.Or(has_bits);
333 return ptr;
334 failure:
335 ptr = nullptr;
336 goto message_done;
337 #undef CHK_
338 }
339
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const340 ::uint8_t* MediaProviderDatabaseRollbackReported::_InternalSerialize(
341 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
342 // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.providers.mediaprovider.MediaProviderDatabaseRollbackReported)
343 ::uint32_t cached_has_bits = 0;
344 (void) cached_has_bits;
345
346 cached_has_bits = _impl_._has_bits_[0];
347 // optional .android.os.statsd.providers.mediaprovider.MediaProviderDatabaseRollbackReported.Database database_name = 1;
348 if (cached_has_bits & 0x00000001u) {
349 target = stream->EnsureSpace(target);
350 target = ::_pbi::WireFormatLite::WriteEnumToArray(
351 1, this->_internal_database_name(), target);
352 }
353
354 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
355 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
356 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
357 }
358 // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.providers.mediaprovider.MediaProviderDatabaseRollbackReported)
359 return target;
360 }
361
ByteSizeLong() const362 size_t MediaProviderDatabaseRollbackReported::ByteSizeLong() const {
363 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.providers.mediaprovider.MediaProviderDatabaseRollbackReported)
364 size_t total_size = 0;
365
366 ::uint32_t cached_has_bits = 0;
367 // Prevent compiler warnings about cached_has_bits being unused
368 (void) cached_has_bits;
369
370 // optional .android.os.statsd.providers.mediaprovider.MediaProviderDatabaseRollbackReported.Database database_name = 1;
371 cached_has_bits = _impl_._has_bits_[0];
372 if (cached_has_bits & 0x00000001u) {
373 total_size += 1 +
374 ::_pbi::WireFormatLite::EnumSize(this->_internal_database_name());
375 }
376
377 return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
378 }
379
380 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MediaProviderDatabaseRollbackReported::_class_data_ = {
381 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
382 MediaProviderDatabaseRollbackReported::MergeImpl
383 };
GetClassData() const384 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*MediaProviderDatabaseRollbackReported::GetClassData() const { return &_class_data_; }
385
386
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message & to_msg,const::PROTOBUF_NAMESPACE_ID::Message & from_msg)387 void MediaProviderDatabaseRollbackReported::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
388 auto* const _this = static_cast<MediaProviderDatabaseRollbackReported*>(&to_msg);
389 auto& from = static_cast<const MediaProviderDatabaseRollbackReported&>(from_msg);
390 // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.providers.mediaprovider.MediaProviderDatabaseRollbackReported)
391 GOOGLE_DCHECK_NE(&from, _this);
392 ::uint32_t cached_has_bits = 0;
393 (void) cached_has_bits;
394
395 if (from._internal_has_database_name()) {
396 _this->_internal_set_database_name(from._internal_database_name());
397 }
398 _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
399 }
400
CopyFrom(const MediaProviderDatabaseRollbackReported & from)401 void MediaProviderDatabaseRollbackReported::CopyFrom(const MediaProviderDatabaseRollbackReported& from) {
402 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.providers.mediaprovider.MediaProviderDatabaseRollbackReported)
403 if (&from == this) return;
404 Clear();
405 MergeFrom(from);
406 }
407
IsInitialized() const408 bool MediaProviderDatabaseRollbackReported::IsInitialized() const {
409 return true;
410 }
411
InternalSwap(MediaProviderDatabaseRollbackReported * other)412 void MediaProviderDatabaseRollbackReported::InternalSwap(MediaProviderDatabaseRollbackReported* other) {
413 using std::swap;
414 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
415 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
416 swap(_impl_.database_name_, other->_impl_.database_name_);
417 }
418
GetMetadata() const419 ::PROTOBUF_NAMESPACE_ID::Metadata MediaProviderDatabaseRollbackReported::GetMetadata() const {
420 return ::_pbi::AssignDescriptors(
421 &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto_getter, &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto_once,
422 file_level_metadata_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto[0]);
423 }
424
425 // ===================================================================
426
427 class BackupSetupStatusReported::_Internal {
428 public:
429 using HasBits = decltype(std::declval<BackupSetupStatusReported>()._impl_._has_bits_);
set_has_status(HasBits * has_bits)430 static void set_has_status(HasBits* has_bits) {
431 (*has_bits)[0] |= 1u;
432 }
set_has_volume(HasBits * has_bits)433 static void set_has_volume(HasBits* has_bits) {
434 (*has_bits)[0] |= 2u;
435 }
436 };
437
BackupSetupStatusReported(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)438 BackupSetupStatusReported::BackupSetupStatusReported(::PROTOBUF_NAMESPACE_ID::Arena* arena,
439 bool is_message_owned)
440 : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
441 SharedCtor(arena, is_message_owned);
442 // @@protoc_insertion_point(arena_constructor:android.os.statsd.providers.mediaprovider.BackupSetupStatusReported)
443 }
BackupSetupStatusReported(const BackupSetupStatusReported & from)444 BackupSetupStatusReported::BackupSetupStatusReported(const BackupSetupStatusReported& from)
445 : ::PROTOBUF_NAMESPACE_ID::Message() {
446 BackupSetupStatusReported* const _this = this; (void)_this;
447 new (&_impl_) Impl_{
448 decltype(_impl_._has_bits_){from._impl_._has_bits_}
449 , /*decltype(_impl_._cached_size_)*/{}
450 , decltype(_impl_.status_){}
451 , decltype(_impl_.volume_){}};
452
453 _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
454 ::memcpy(&_impl_.status_, &from._impl_.status_,
455 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.volume_) -
456 reinterpret_cast<char*>(&_impl_.status_)) + sizeof(_impl_.volume_));
457 // @@protoc_insertion_point(copy_constructor:android.os.statsd.providers.mediaprovider.BackupSetupStatusReported)
458 }
459
SharedCtor(::_pb::Arena * arena,bool is_message_owned)460 inline void BackupSetupStatusReported::SharedCtor(
461 ::_pb::Arena* arena, bool is_message_owned) {
462 (void)arena;
463 (void)is_message_owned;
464 new (&_impl_) Impl_{
465 decltype(_impl_._has_bits_){}
466 , /*decltype(_impl_._cached_size_)*/{}
467 , decltype(_impl_.status_){0}
468 , decltype(_impl_.volume_){0}
469 };
470 }
471
~BackupSetupStatusReported()472 BackupSetupStatusReported::~BackupSetupStatusReported() {
473 // @@protoc_insertion_point(destructor:android.os.statsd.providers.mediaprovider.BackupSetupStatusReported)
474 if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
475 (void)arena;
476 return;
477 }
478 SharedDtor();
479 }
480
SharedDtor()481 inline void BackupSetupStatusReported::SharedDtor() {
482 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
483 }
484
SetCachedSize(int size) const485 void BackupSetupStatusReported::SetCachedSize(int size) const {
486 _impl_._cached_size_.Set(size);
487 }
488
Clear()489 void BackupSetupStatusReported::Clear() {
490 // @@protoc_insertion_point(message_clear_start:android.os.statsd.providers.mediaprovider.BackupSetupStatusReported)
491 ::uint32_t cached_has_bits = 0;
492 // Prevent compiler warnings about cached_has_bits being unused
493 (void) cached_has_bits;
494
495 cached_has_bits = _impl_._has_bits_[0];
496 if (cached_has_bits & 0x00000003u) {
497 ::memset(&_impl_.status_, 0, static_cast<size_t>(
498 reinterpret_cast<char*>(&_impl_.volume_) -
499 reinterpret_cast<char*>(&_impl_.status_)) + sizeof(_impl_.volume_));
500 }
501 _impl_._has_bits_.Clear();
502 _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
503 }
504
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)505 const char* BackupSetupStatusReported::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
506 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
507 _Internal::HasBits has_bits{};
508 while (!ctx->Done(&ptr)) {
509 ::uint32_t tag;
510 ptr = ::_pbi::ReadTag(ptr, &tag);
511 switch (tag >> 3) {
512 // optional .android.os.statsd.providers.mediaprovider.BackupSetupStatusReported.Status status = 1;
513 case 1:
514 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
515 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
516 CHK_(ptr);
517 if (PROTOBUF_PREDICT_TRUE(::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported_Status_IsValid(val))) {
518 _internal_set_status(static_cast<::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported_Status>(val));
519 } else {
520 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
521 }
522 } else {
523 goto handle_unusual;
524 }
525 continue;
526 // optional .android.os.statsd.providers.mediaprovider.BackupSetupStatusReported.Volume volume = 2;
527 case 2:
528 if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
529 ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
530 CHK_(ptr);
531 if (PROTOBUF_PREDICT_TRUE(::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported_Volume_IsValid(val))) {
532 _internal_set_volume(static_cast<::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported_Volume>(val));
533 } else {
534 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
535 }
536 } else {
537 goto handle_unusual;
538 }
539 continue;
540 default:
541 goto handle_unusual;
542 } // switch
543 handle_unusual:
544 if ((tag == 0) || ((tag & 7) == 4)) {
545 CHK_(ptr);
546 ctx->SetLastTag(tag);
547 goto message_done;
548 }
549 ptr = UnknownFieldParse(
550 tag,
551 _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
552 ptr, ctx);
553 CHK_(ptr != nullptr);
554 } // while
555 message_done:
556 _impl_._has_bits_.Or(has_bits);
557 return ptr;
558 failure:
559 ptr = nullptr;
560 goto message_done;
561 #undef CHK_
562 }
563
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const564 ::uint8_t* BackupSetupStatusReported::_InternalSerialize(
565 ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
566 // @@protoc_insertion_point(serialize_to_array_start:android.os.statsd.providers.mediaprovider.BackupSetupStatusReported)
567 ::uint32_t cached_has_bits = 0;
568 (void) cached_has_bits;
569
570 cached_has_bits = _impl_._has_bits_[0];
571 // optional .android.os.statsd.providers.mediaprovider.BackupSetupStatusReported.Status status = 1;
572 if (cached_has_bits & 0x00000001u) {
573 target = stream->EnsureSpace(target);
574 target = ::_pbi::WireFormatLite::WriteEnumToArray(
575 1, this->_internal_status(), target);
576 }
577
578 // optional .android.os.statsd.providers.mediaprovider.BackupSetupStatusReported.Volume volume = 2;
579 if (cached_has_bits & 0x00000002u) {
580 target = stream->EnsureSpace(target);
581 target = ::_pbi::WireFormatLite::WriteEnumToArray(
582 2, this->_internal_volume(), target);
583 }
584
585 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
586 target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
587 _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream);
588 }
589 // @@protoc_insertion_point(serialize_to_array_end:android.os.statsd.providers.mediaprovider.BackupSetupStatusReported)
590 return target;
591 }
592
ByteSizeLong() const593 size_t BackupSetupStatusReported::ByteSizeLong() const {
594 // @@protoc_insertion_point(message_byte_size_start:android.os.statsd.providers.mediaprovider.BackupSetupStatusReported)
595 size_t total_size = 0;
596
597 ::uint32_t cached_has_bits = 0;
598 // Prevent compiler warnings about cached_has_bits being unused
599 (void) cached_has_bits;
600
601 cached_has_bits = _impl_._has_bits_[0];
602 if (cached_has_bits & 0x00000003u) {
603 // optional .android.os.statsd.providers.mediaprovider.BackupSetupStatusReported.Status status = 1;
604 if (cached_has_bits & 0x00000001u) {
605 total_size += 1 +
606 ::_pbi::WireFormatLite::EnumSize(this->_internal_status());
607 }
608
609 // optional .android.os.statsd.providers.mediaprovider.BackupSetupStatusReported.Volume volume = 2;
610 if (cached_has_bits & 0x00000002u) {
611 total_size += 1 +
612 ::_pbi::WireFormatLite::EnumSize(this->_internal_volume());
613 }
614
615 }
616 return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
617 }
618
619 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BackupSetupStatusReported::_class_data_ = {
620 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
621 BackupSetupStatusReported::MergeImpl
622 };
GetClassData() const623 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BackupSetupStatusReported::GetClassData() const { return &_class_data_; }
624
625
MergeImpl(::PROTOBUF_NAMESPACE_ID::Message & to_msg,const::PROTOBUF_NAMESPACE_ID::Message & from_msg)626 void BackupSetupStatusReported::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
627 auto* const _this = static_cast<BackupSetupStatusReported*>(&to_msg);
628 auto& from = static_cast<const BackupSetupStatusReported&>(from_msg);
629 // @@protoc_insertion_point(class_specific_merge_from_start:android.os.statsd.providers.mediaprovider.BackupSetupStatusReported)
630 GOOGLE_DCHECK_NE(&from, _this);
631 ::uint32_t cached_has_bits = 0;
632 (void) cached_has_bits;
633
634 cached_has_bits = from._impl_._has_bits_[0];
635 if (cached_has_bits & 0x00000003u) {
636 if (cached_has_bits & 0x00000001u) {
637 _this->_impl_.status_ = from._impl_.status_;
638 }
639 if (cached_has_bits & 0x00000002u) {
640 _this->_impl_.volume_ = from._impl_.volume_;
641 }
642 _this->_impl_._has_bits_[0] |= cached_has_bits;
643 }
644 _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
645 }
646
CopyFrom(const BackupSetupStatusReported & from)647 void BackupSetupStatusReported::CopyFrom(const BackupSetupStatusReported& from) {
648 // @@protoc_insertion_point(class_specific_copy_from_start:android.os.statsd.providers.mediaprovider.BackupSetupStatusReported)
649 if (&from == this) return;
650 Clear();
651 MergeFrom(from);
652 }
653
IsInitialized() const654 bool BackupSetupStatusReported::IsInitialized() const {
655 return true;
656 }
657
InternalSwap(BackupSetupStatusReported * other)658 void BackupSetupStatusReported::InternalSwap(BackupSetupStatusReported* other) {
659 using std::swap;
660 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
661 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
662 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
663 PROTOBUF_FIELD_OFFSET(BackupSetupStatusReported, _impl_.volume_)
664 + sizeof(BackupSetupStatusReported::_impl_.volume_) // NOLINT
665 - PROTOBUF_FIELD_OFFSET(BackupSetupStatusReported, _impl_.status_)>(
666 reinterpret_cast<char*>(&_impl_.status_),
667 reinterpret_cast<char*>(&other->_impl_.status_));
668 }
669
GetMetadata() const670 ::PROTOBUF_NAMESPACE_ID::Metadata BackupSetupStatusReported::GetMetadata() const {
671 return ::_pbi::AssignDescriptors(
672 &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto_getter, &descriptor_table_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto_once,
673 file_level_metadata_frameworks_2fproto_5flogging_2fstats_2fatoms_2fproviders_2fmediaprovider_2frollback_5fextension_5fatoms_2eproto[1]);
674 }
675 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::android::os::statsd::Atom,
676 ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::android::os::statsd::providers::mediaprovider::MediaProviderDatabaseRollbackReported >, 11, false>
677 media_provider_database_rollback_reported(kMediaProviderDatabaseRollbackReportedFieldNumber, ::android::os::statsd::providers::mediaprovider::MediaProviderDatabaseRollbackReported::default_instance(), nullptr);
678 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::PROTOBUF_NAMESPACE_ID::internal::ExtensionIdentifier< ::android::os::statsd::Atom,
679 ::PROTOBUF_NAMESPACE_ID::internal::MessageTypeTraits< ::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported >, 11, false>
680 backup_setup_status_reported(kBackupSetupStatusReportedFieldNumber, ::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported::default_instance(), nullptr);
681
682 // @@protoc_insertion_point(namespace_scope)
683 } // namespace mediaprovider
684 } // namespace providers
685 } // namespace statsd
686 } // namespace os
687 } // namespace android
688 PROTOBUF_NAMESPACE_OPEN
689 template<> PROTOBUF_NOINLINE ::android::os::statsd::providers::mediaprovider::MediaProviderDatabaseRollbackReported*
CreateMaybeMessage(Arena * arena)690 Arena::CreateMaybeMessage< ::android::os::statsd::providers::mediaprovider::MediaProviderDatabaseRollbackReported >(Arena* arena) {
691 return Arena::CreateMessageInternal< ::android::os::statsd::providers::mediaprovider::MediaProviderDatabaseRollbackReported >(arena);
692 }
693 template<> PROTOBUF_NOINLINE ::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported*
CreateMaybeMessage(Arena * arena)694 Arena::CreateMaybeMessage< ::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported >(Arena* arena) {
695 return Arena::CreateMessageInternal< ::android::os::statsd::providers::mediaprovider::BackupSetupStatusReported >(arena);
696 }
697 PROTOBUF_NAMESPACE_CLOSE
698
699 // @@protoc_insertion_point(global_scope)
700 #include <google/protobuf/port_undef.inc>
701