1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: icing/proto/logging.proto
3 
4 #include "icing/proto/logging.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 icing {
22 namespace lib {
InitializeStatsProto(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR InitializeStatsProto::InitializeStatsProto(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.latency_ms_)*/0
28   , /*decltype(_impl_.document_store_recovery_cause_)*/0
29   , /*decltype(_impl_.index_restoration_cause_)*/0
30   , /*decltype(_impl_.schema_store_recovery_cause_)*/0
31   , /*decltype(_impl_.document_store_recovery_latency_ms_)*/0
32   , /*decltype(_impl_.index_restoration_latency_ms_)*/0
33   , /*decltype(_impl_.schema_store_recovery_latency_ms_)*/0
34   , /*decltype(_impl_.document_store_data_status_)*/0
35   , /*decltype(_impl_.num_documents_)*/0
36   , /*decltype(_impl_.num_schema_types_)*/0
37   , /*decltype(_impl_.num_previous_init_failures_)*/0
38   , /*decltype(_impl_.integer_index_restoration_cause_)*/0
39   , /*decltype(_impl_.qualified_id_join_index_restoration_cause_)*/0
40   , /*decltype(_impl_.embedding_index_restoration_cause_)*/0} {}
41 struct InitializeStatsProtoDefaultTypeInternal {
InitializeStatsProtoDefaultTypeInternalicing::lib::InitializeStatsProtoDefaultTypeInternal42   PROTOBUF_CONSTEXPR InitializeStatsProtoDefaultTypeInternal()
43       : _instance(::_pbi::ConstantInitialized{}) {}
~InitializeStatsProtoDefaultTypeInternalicing::lib::InitializeStatsProtoDefaultTypeInternal44   ~InitializeStatsProtoDefaultTypeInternal() {}
45   union {  // NOLINT(misc-non-private-member-variables-in-classes)
46     InitializeStatsProto _instance;
47   };
48 };
49 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 InitializeStatsProtoDefaultTypeInternal _InitializeStatsProto_default_instance_;
PutDocumentStatsProto_TokenizationStats(::_pbi::ConstantInitialized)50 PROTOBUF_CONSTEXPR PutDocumentStatsProto_TokenizationStats::PutDocumentStatsProto_TokenizationStats(
51     ::_pbi::ConstantInitialized): _impl_{
52     /*decltype(_impl_._has_bits_)*/{}
53   , /*decltype(_impl_._cached_size_)*/{}
54   , /*decltype(_impl_.num_tokens_indexed_)*/0
55   , /*decltype(_impl_.num_metadata_tokens_indexed_)*/0} {}
56 struct PutDocumentStatsProto_TokenizationStatsDefaultTypeInternal {
PutDocumentStatsProto_TokenizationStatsDefaultTypeInternalicing::lib::PutDocumentStatsProto_TokenizationStatsDefaultTypeInternal57   PROTOBUF_CONSTEXPR PutDocumentStatsProto_TokenizationStatsDefaultTypeInternal()
58       : _instance(::_pbi::ConstantInitialized{}) {}
~PutDocumentStatsProto_TokenizationStatsDefaultTypeInternalicing::lib::PutDocumentStatsProto_TokenizationStatsDefaultTypeInternal59   ~PutDocumentStatsProto_TokenizationStatsDefaultTypeInternal() {}
60   union {  // NOLINT(misc-non-private-member-variables-in-classes)
61     PutDocumentStatsProto_TokenizationStats _instance;
62   };
63 };
64 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutDocumentStatsProto_TokenizationStatsDefaultTypeInternal _PutDocumentStatsProto_TokenizationStats_default_instance_;
PutDocumentStatsProto(::_pbi::ConstantInitialized)65 PROTOBUF_CONSTEXPR PutDocumentStatsProto::PutDocumentStatsProto(
66     ::_pbi::ConstantInitialized): _impl_{
67     /*decltype(_impl_._has_bits_)*/{}
68   , /*decltype(_impl_._cached_size_)*/{}
69   , /*decltype(_impl_.tokenization_stats_)*/nullptr
70   , /*decltype(_impl_.latency_ms_)*/0
71   , /*decltype(_impl_.document_store_latency_ms_)*/0
72   , /*decltype(_impl_.index_latency_ms_)*/0
73   , /*decltype(_impl_.index_merge_latency_ms_)*/0
74   , /*decltype(_impl_.document_size_)*/0
75   , /*decltype(_impl_.term_index_latency_ms_)*/0
76   , /*decltype(_impl_.integer_index_latency_ms_)*/0
77   , /*decltype(_impl_.qualified_id_join_index_latency_ms_)*/0
78   , /*decltype(_impl_.lite_index_sort_latency_ms_)*/0
79   , /*decltype(_impl_.metadata_term_index_latency_ms_)*/0
80   , /*decltype(_impl_.embedding_index_latency_ms_)*/0} {}
81 struct PutDocumentStatsProtoDefaultTypeInternal {
PutDocumentStatsProtoDefaultTypeInternalicing::lib::PutDocumentStatsProtoDefaultTypeInternal82   PROTOBUF_CONSTEXPR PutDocumentStatsProtoDefaultTypeInternal()
83       : _instance(::_pbi::ConstantInitialized{}) {}
~PutDocumentStatsProtoDefaultTypeInternalicing::lib::PutDocumentStatsProtoDefaultTypeInternal84   ~PutDocumentStatsProtoDefaultTypeInternal() {}
85   union {  // NOLINT(misc-non-private-member-variables-in-classes)
86     PutDocumentStatsProto _instance;
87   };
88 };
89 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 PutDocumentStatsProtoDefaultTypeInternal _PutDocumentStatsProto_default_instance_;
QueryStatsProto_SearchStats(::_pbi::ConstantInitialized)90 PROTOBUF_CONSTEXPR QueryStatsProto_SearchStats::QueryStatsProto_SearchStats(
91     ::_pbi::ConstantInitialized): _impl_{
92     /*decltype(_impl_._has_bits_)*/{}
93   , /*decltype(_impl_._cached_size_)*/{}
94   , /*decltype(_impl_.query_length_)*/0
95   , /*decltype(_impl_.num_terms_)*/0
96   , /*decltype(_impl_.num_namespaces_filtered_)*/0
97   , /*decltype(_impl_.num_schema_types_filtered_)*/0
98   , /*decltype(_impl_.ranking_strategy_)*/0
99   , /*decltype(_impl_.num_documents_scored_)*/0
100   , /*decltype(_impl_.parse_query_latency_ms_)*/0
101   , /*decltype(_impl_.scoring_latency_ms_)*/0
102   , /*decltype(_impl_.is_numeric_query_)*/false
103   , /*decltype(_impl_.num_fetched_hits_lite_index_)*/0
104   , /*decltype(_impl_.num_fetched_hits_main_index_)*/0
105   , /*decltype(_impl_.num_fetched_hits_integer_index_)*/0
106   , /*decltype(_impl_.query_processor_lexer_extract_token_latency_ms_)*/0
107   , /*decltype(_impl_.query_processor_parser_consume_query_latency_ms_)*/0
108   , /*decltype(_impl_.query_processor_query_visitor_latency_ms_)*/0} {}
109 struct QueryStatsProto_SearchStatsDefaultTypeInternal {
QueryStatsProto_SearchStatsDefaultTypeInternalicing::lib::QueryStatsProto_SearchStatsDefaultTypeInternal110   PROTOBUF_CONSTEXPR QueryStatsProto_SearchStatsDefaultTypeInternal()
111       : _instance(::_pbi::ConstantInitialized{}) {}
~QueryStatsProto_SearchStatsDefaultTypeInternalicing::lib::QueryStatsProto_SearchStatsDefaultTypeInternal112   ~QueryStatsProto_SearchStatsDefaultTypeInternal() {}
113   union {  // NOLINT(misc-non-private-member-variables-in-classes)
114     QueryStatsProto_SearchStats _instance;
115   };
116 };
117 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 QueryStatsProto_SearchStatsDefaultTypeInternal _QueryStatsProto_SearchStats_default_instance_;
QueryStatsProto(::_pbi::ConstantInitialized)118 PROTOBUF_CONSTEXPR QueryStatsProto::QueryStatsProto(
119     ::_pbi::ConstantInitialized): _impl_{
120     /*decltype(_impl_._has_bits_)*/{}
121   , /*decltype(_impl_._cached_size_)*/{}
122   , /*decltype(_impl_.parent_search_stats_)*/nullptr
123   , /*decltype(_impl_.child_search_stats_)*/nullptr
124   , /*decltype(_impl_.num_terms_)*/0
125   , /*decltype(_impl_.num_namespaces_filtered_)*/0
126   , /*decltype(_impl_.num_schema_types_filtered_)*/0
127   , /*decltype(_impl_.ranking_strategy_)*/0
128   , /*decltype(_impl_.requested_page_size_)*/0
129   , /*decltype(_impl_.num_results_returned_current_page_)*/0
130   , /*decltype(_impl_.num_documents_scored_)*/0
131   , /*decltype(_impl_.latency_ms_)*/0
132   , /*decltype(_impl_.parse_query_latency_ms_)*/0
133   , /*decltype(_impl_.scoring_latency_ms_)*/0
134   , /*decltype(_impl_.ranking_latency_ms_)*/0
135   , /*decltype(_impl_.document_retrieval_latency_ms_)*/0
136   , /*decltype(_impl_.is_first_page_)*/false
137   , /*decltype(_impl_.is_join_query_)*/false
138   , /*decltype(_impl_.num_results_with_snippets_)*/0
139   , /*decltype(_impl_.query_length_)*/0
140   , /*decltype(_impl_.lock_acquisition_latency_ms_)*/0
141   , /*decltype(_impl_.native_to_java_start_timestamp_ms_)*/::int64_t{0}
142   , /*decltype(_impl_.java_to_native_jni_latency_ms_)*/0
143   , /*decltype(_impl_.native_to_java_jni_latency_ms_)*/0
144   , /*decltype(_impl_.join_latency_ms_)*/0
145   , /*decltype(_impl_.num_joined_results_returned_current_page_)*/0
146   , /*decltype(_impl_.lite_index_hit_buffer_byte_size_)*/::int64_t{0}
147   , /*decltype(_impl_.lite_index_hit_buffer_unsorted_byte_size_)*/::int64_t{0}} {}
148 struct QueryStatsProtoDefaultTypeInternal {
QueryStatsProtoDefaultTypeInternalicing::lib::QueryStatsProtoDefaultTypeInternal149   PROTOBUF_CONSTEXPR QueryStatsProtoDefaultTypeInternal()
150       : _instance(::_pbi::ConstantInitialized{}) {}
~QueryStatsProtoDefaultTypeInternalicing::lib::QueryStatsProtoDefaultTypeInternal151   ~QueryStatsProtoDefaultTypeInternal() {}
152   union {  // NOLINT(misc-non-private-member-variables-in-classes)
153     QueryStatsProto _instance;
154   };
155 };
156 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 QueryStatsProtoDefaultTypeInternal _QueryStatsProto_default_instance_;
DeleteStatsProto_DeleteType(::_pbi::ConstantInitialized)157 PROTOBUF_CONSTEXPR DeleteStatsProto_DeleteType::DeleteStatsProto_DeleteType(
158     ::_pbi::ConstantInitialized): _impl_{
159     /*decltype(_impl_._cached_size_)*/{}} {}
160 struct DeleteStatsProto_DeleteTypeDefaultTypeInternal {
DeleteStatsProto_DeleteTypeDefaultTypeInternalicing::lib::DeleteStatsProto_DeleteTypeDefaultTypeInternal161   PROTOBUF_CONSTEXPR DeleteStatsProto_DeleteTypeDefaultTypeInternal()
162       : _instance(::_pbi::ConstantInitialized{}) {}
~DeleteStatsProto_DeleteTypeDefaultTypeInternalicing::lib::DeleteStatsProto_DeleteTypeDefaultTypeInternal163   ~DeleteStatsProto_DeleteTypeDefaultTypeInternal() {}
164   union {  // NOLINT(misc-non-private-member-variables-in-classes)
165     DeleteStatsProto_DeleteType _instance;
166   };
167 };
168 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteStatsProto_DeleteTypeDefaultTypeInternal _DeleteStatsProto_DeleteType_default_instance_;
DeleteStatsProto(::_pbi::ConstantInitialized)169 PROTOBUF_CONSTEXPR DeleteStatsProto::DeleteStatsProto(
170     ::_pbi::ConstantInitialized): _impl_{
171     /*decltype(_impl_._has_bits_)*/{}
172   , /*decltype(_impl_._cached_size_)*/{}
173   , /*decltype(_impl_.latency_ms_)*/0
174   , /*decltype(_impl_.delete_type_)*/0
175   , /*decltype(_impl_.num_documents_deleted_)*/0} {}
176 struct DeleteStatsProtoDefaultTypeInternal {
DeleteStatsProtoDefaultTypeInternalicing::lib::DeleteStatsProtoDefaultTypeInternal177   PROTOBUF_CONSTEXPR DeleteStatsProtoDefaultTypeInternal()
178       : _instance(::_pbi::ConstantInitialized{}) {}
~DeleteStatsProtoDefaultTypeInternalicing::lib::DeleteStatsProtoDefaultTypeInternal179   ~DeleteStatsProtoDefaultTypeInternal() {}
180   union {  // NOLINT(misc-non-private-member-variables-in-classes)
181     DeleteStatsProto _instance;
182   };
183 };
184 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteStatsProtoDefaultTypeInternal _DeleteStatsProto_default_instance_;
DeleteByQueryStatsProto(::_pbi::ConstantInitialized)185 PROTOBUF_CONSTEXPR DeleteByQueryStatsProto::DeleteByQueryStatsProto(
186     ::_pbi::ConstantInitialized): _impl_{
187     /*decltype(_impl_._has_bits_)*/{}
188   , /*decltype(_impl_._cached_size_)*/{}
189   , /*decltype(_impl_.latency_ms_)*/0
190   , /*decltype(_impl_.num_documents_deleted_)*/0
191   , /*decltype(_impl_.query_length_)*/0
192   , /*decltype(_impl_.num_terms_)*/0
193   , /*decltype(_impl_.num_namespaces_filtered_)*/0
194   , /*decltype(_impl_.num_schema_types_filtered_)*/0
195   , /*decltype(_impl_.parse_query_latency_ms_)*/0
196   , /*decltype(_impl_.document_removal_latency_ms_)*/0} {}
197 struct DeleteByQueryStatsProtoDefaultTypeInternal {
DeleteByQueryStatsProtoDefaultTypeInternalicing::lib::DeleteByQueryStatsProtoDefaultTypeInternal198   PROTOBUF_CONSTEXPR DeleteByQueryStatsProtoDefaultTypeInternal()
199       : _instance(::_pbi::ConstantInitialized{}) {}
~DeleteByQueryStatsProtoDefaultTypeInternalicing::lib::DeleteByQueryStatsProtoDefaultTypeInternal200   ~DeleteByQueryStatsProtoDefaultTypeInternal() {}
201   union {  // NOLINT(misc-non-private-member-variables-in-classes)
202     DeleteByQueryStatsProto _instance;
203   };
204 };
205 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 DeleteByQueryStatsProtoDefaultTypeInternal _DeleteByQueryStatsProto_default_instance_;
206 }  // namespace lib
207 }  // namespace icing
208 namespace icing {
209 namespace lib {
InitializeStatsProto_RecoveryCause_IsValid(int value)210 bool InitializeStatsProto_RecoveryCause_IsValid(int value) {
211   switch (value) {
212     case 0:
213     case 1:
214     case 2:
215     case 3:
216     case 4:
217     case 5:
218     case 6:
219     case 7:
220     case 8:
221       return true;
222     default:
223       return false;
224   }
225 }
226 
227 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> InitializeStatsProto_RecoveryCause_strings[9] = {};
228 
229 static const char InitializeStatsProto_RecoveryCause_names[] =
230   "DATA_LOSS"
231   "DEPENDENCIES_CHANGED"
232   "FEATURE_FLAG_CHANGED"
233   "INCONSISTENT_WITH_GROUND_TRUTH"
234   "IO_ERROR"
235   "LEGACY_DOCUMENT_LOG_FORMAT"
236   "NONE"
237   "SCHEMA_CHANGES_OUT_OF_SYNC"
238   "VERSION_CHANGED";
239 
240 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry InitializeStatsProto_RecoveryCause_entries[] = {
241   { {InitializeStatsProto_RecoveryCause_names + 0, 9}, 1 },
242   { {InitializeStatsProto_RecoveryCause_names + 9, 20}, 7 },
243   { {InitializeStatsProto_RecoveryCause_names + 29, 20}, 8 },
244   { {InitializeStatsProto_RecoveryCause_names + 49, 30}, 2 },
245   { {InitializeStatsProto_RecoveryCause_names + 79, 8}, 4 },
246   { {InitializeStatsProto_RecoveryCause_names + 87, 26}, 5 },
247   { {InitializeStatsProto_RecoveryCause_names + 113, 4}, 0 },
248   { {InitializeStatsProto_RecoveryCause_names + 117, 26}, 3 },
249   { {InitializeStatsProto_RecoveryCause_names + 143, 15}, 6 },
250 };
251 
252 static const int InitializeStatsProto_RecoveryCause_entries_by_number[] = {
253   6, // 0 -> NONE
254   0, // 1 -> DATA_LOSS
255   3, // 2 -> INCONSISTENT_WITH_GROUND_TRUTH
256   7, // 3 -> SCHEMA_CHANGES_OUT_OF_SYNC
257   4, // 4 -> IO_ERROR
258   5, // 5 -> LEGACY_DOCUMENT_LOG_FORMAT
259   8, // 6 -> VERSION_CHANGED
260   1, // 7 -> DEPENDENCIES_CHANGED
261   2, // 8 -> FEATURE_FLAG_CHANGED
262 };
263 
InitializeStatsProto_RecoveryCause_Name(InitializeStatsProto_RecoveryCause value)264 const std::string& InitializeStatsProto_RecoveryCause_Name(
265     InitializeStatsProto_RecoveryCause value) {
266   static const bool dummy =
267       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
268           InitializeStatsProto_RecoveryCause_entries,
269           InitializeStatsProto_RecoveryCause_entries_by_number,
270           9, InitializeStatsProto_RecoveryCause_strings);
271   (void) dummy;
272   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
273       InitializeStatsProto_RecoveryCause_entries,
274       InitializeStatsProto_RecoveryCause_entries_by_number,
275       9, value);
276   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
277                      InitializeStatsProto_RecoveryCause_strings[idx].get();
278 }
InitializeStatsProto_RecoveryCause_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,InitializeStatsProto_RecoveryCause * value)279 bool InitializeStatsProto_RecoveryCause_Parse(
280     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, InitializeStatsProto_RecoveryCause* value) {
281   int int_value;
282   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
283       InitializeStatsProto_RecoveryCause_entries, 9, name, &int_value);
284   if (success) {
285     *value = static_cast<InitializeStatsProto_RecoveryCause>(int_value);
286   }
287   return success;
288 }
289 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
290 constexpr InitializeStatsProto_RecoveryCause InitializeStatsProto::NONE;
291 constexpr InitializeStatsProto_RecoveryCause InitializeStatsProto::DATA_LOSS;
292 constexpr InitializeStatsProto_RecoveryCause InitializeStatsProto::INCONSISTENT_WITH_GROUND_TRUTH;
293 constexpr InitializeStatsProto_RecoveryCause InitializeStatsProto::SCHEMA_CHANGES_OUT_OF_SYNC;
294 constexpr InitializeStatsProto_RecoveryCause InitializeStatsProto::IO_ERROR;
295 constexpr InitializeStatsProto_RecoveryCause InitializeStatsProto::LEGACY_DOCUMENT_LOG_FORMAT;
296 constexpr InitializeStatsProto_RecoveryCause InitializeStatsProto::VERSION_CHANGED;
297 constexpr InitializeStatsProto_RecoveryCause InitializeStatsProto::DEPENDENCIES_CHANGED;
298 constexpr InitializeStatsProto_RecoveryCause InitializeStatsProto::FEATURE_FLAG_CHANGED;
299 constexpr InitializeStatsProto_RecoveryCause InitializeStatsProto::RecoveryCause_MIN;
300 constexpr InitializeStatsProto_RecoveryCause InitializeStatsProto::RecoveryCause_MAX;
301 constexpr int InitializeStatsProto::RecoveryCause_ARRAYSIZE;
302 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
InitializeStatsProto_DocumentStoreDataStatus_IsValid(int value)303 bool InitializeStatsProto_DocumentStoreDataStatus_IsValid(int value) {
304   switch (value) {
305     case 0:
306     case 1:
307     case 2:
308       return true;
309     default:
310       return false;
311   }
312 }
313 
314 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> InitializeStatsProto_DocumentStoreDataStatus_strings[3] = {};
315 
316 static const char InitializeStatsProto_DocumentStoreDataStatus_names[] =
317   "COMPLETE_LOSS"
318   "NO_DATA_LOSS"
319   "PARTIAL_LOSS";
320 
321 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry InitializeStatsProto_DocumentStoreDataStatus_entries[] = {
322   { {InitializeStatsProto_DocumentStoreDataStatus_names + 0, 13}, 2 },
323   { {InitializeStatsProto_DocumentStoreDataStatus_names + 13, 12}, 0 },
324   { {InitializeStatsProto_DocumentStoreDataStatus_names + 25, 12}, 1 },
325 };
326 
327 static const int InitializeStatsProto_DocumentStoreDataStatus_entries_by_number[] = {
328   1, // 0 -> NO_DATA_LOSS
329   2, // 1 -> PARTIAL_LOSS
330   0, // 2 -> COMPLETE_LOSS
331 };
332 
InitializeStatsProto_DocumentStoreDataStatus_Name(InitializeStatsProto_DocumentStoreDataStatus value)333 const std::string& InitializeStatsProto_DocumentStoreDataStatus_Name(
334     InitializeStatsProto_DocumentStoreDataStatus value) {
335   static const bool dummy =
336       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
337           InitializeStatsProto_DocumentStoreDataStatus_entries,
338           InitializeStatsProto_DocumentStoreDataStatus_entries_by_number,
339           3, InitializeStatsProto_DocumentStoreDataStatus_strings);
340   (void) dummy;
341   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
342       InitializeStatsProto_DocumentStoreDataStatus_entries,
343       InitializeStatsProto_DocumentStoreDataStatus_entries_by_number,
344       3, value);
345   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
346                      InitializeStatsProto_DocumentStoreDataStatus_strings[idx].get();
347 }
InitializeStatsProto_DocumentStoreDataStatus_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,InitializeStatsProto_DocumentStoreDataStatus * value)348 bool InitializeStatsProto_DocumentStoreDataStatus_Parse(
349     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, InitializeStatsProto_DocumentStoreDataStatus* value) {
350   int int_value;
351   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
352       InitializeStatsProto_DocumentStoreDataStatus_entries, 3, name, &int_value);
353   if (success) {
354     *value = static_cast<InitializeStatsProto_DocumentStoreDataStatus>(int_value);
355   }
356   return success;
357 }
358 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
359 constexpr InitializeStatsProto_DocumentStoreDataStatus InitializeStatsProto::NO_DATA_LOSS;
360 constexpr InitializeStatsProto_DocumentStoreDataStatus InitializeStatsProto::PARTIAL_LOSS;
361 constexpr InitializeStatsProto_DocumentStoreDataStatus InitializeStatsProto::COMPLETE_LOSS;
362 constexpr InitializeStatsProto_DocumentStoreDataStatus InitializeStatsProto::DocumentStoreDataStatus_MIN;
363 constexpr InitializeStatsProto_DocumentStoreDataStatus InitializeStatsProto::DocumentStoreDataStatus_MAX;
364 constexpr int InitializeStatsProto::DocumentStoreDataStatus_ARRAYSIZE;
365 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
DeleteStatsProto_DeleteType_Code_IsValid(int value)366 bool DeleteStatsProto_DeleteType_Code_IsValid(int value) {
367   switch (value) {
368     case 0:
369     case 1:
370     case 2:
371     case 3:
372     case 4:
373       return true;
374     default:
375       return false;
376   }
377 }
378 
379 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> DeleteStatsProto_DeleteType_Code_strings[5] = {};
380 
381 static const char DeleteStatsProto_DeleteType_Code_names[] =
382   "DEPRECATED_QUERY"
383   "NAMESPACE"
384   "SCHEMA_TYPE"
385   "SINGLE"
386   "UNKNOWN";
387 
388 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry DeleteStatsProto_DeleteType_Code_entries[] = {
389   { {DeleteStatsProto_DeleteType_Code_names + 0, 16}, 2 },
390   { {DeleteStatsProto_DeleteType_Code_names + 16, 9}, 3 },
391   { {DeleteStatsProto_DeleteType_Code_names + 25, 11}, 4 },
392   { {DeleteStatsProto_DeleteType_Code_names + 36, 6}, 1 },
393   { {DeleteStatsProto_DeleteType_Code_names + 42, 7}, 0 },
394 };
395 
396 static const int DeleteStatsProto_DeleteType_Code_entries_by_number[] = {
397   4, // 0 -> UNKNOWN
398   3, // 1 -> SINGLE
399   0, // 2 -> DEPRECATED_QUERY
400   1, // 3 -> NAMESPACE
401   2, // 4 -> SCHEMA_TYPE
402 };
403 
DeleteStatsProto_DeleteType_Code_Name(DeleteStatsProto_DeleteType_Code value)404 const std::string& DeleteStatsProto_DeleteType_Code_Name(
405     DeleteStatsProto_DeleteType_Code value) {
406   static const bool dummy =
407       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
408           DeleteStatsProto_DeleteType_Code_entries,
409           DeleteStatsProto_DeleteType_Code_entries_by_number,
410           5, DeleteStatsProto_DeleteType_Code_strings);
411   (void) dummy;
412   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
413       DeleteStatsProto_DeleteType_Code_entries,
414       DeleteStatsProto_DeleteType_Code_entries_by_number,
415       5, value);
416   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
417                      DeleteStatsProto_DeleteType_Code_strings[idx].get();
418 }
DeleteStatsProto_DeleteType_Code_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,DeleteStatsProto_DeleteType_Code * value)419 bool DeleteStatsProto_DeleteType_Code_Parse(
420     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, DeleteStatsProto_DeleteType_Code* value) {
421   int int_value;
422   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
423       DeleteStatsProto_DeleteType_Code_entries, 5, name, &int_value);
424   if (success) {
425     *value = static_cast<DeleteStatsProto_DeleteType_Code>(int_value);
426   }
427   return success;
428 }
429 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
430 constexpr DeleteStatsProto_DeleteType_Code DeleteStatsProto_DeleteType::UNKNOWN;
431 constexpr DeleteStatsProto_DeleteType_Code DeleteStatsProto_DeleteType::SINGLE;
432 constexpr DeleteStatsProto_DeleteType_Code DeleteStatsProto_DeleteType::DEPRECATED_QUERY;
433 constexpr DeleteStatsProto_DeleteType_Code DeleteStatsProto_DeleteType::NAMESPACE;
434 constexpr DeleteStatsProto_DeleteType_Code DeleteStatsProto_DeleteType::SCHEMA_TYPE;
435 constexpr DeleteStatsProto_DeleteType_Code DeleteStatsProto_DeleteType::Code_MIN;
436 constexpr DeleteStatsProto_DeleteType_Code DeleteStatsProto_DeleteType::Code_MAX;
437 constexpr int DeleteStatsProto_DeleteType::Code_ARRAYSIZE;
438 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
439 
440 // ===================================================================
441 
442 class InitializeStatsProto::_Internal {
443  public:
444   using HasBits = decltype(std::declval<InitializeStatsProto>()._impl_._has_bits_);
set_has_latency_ms(HasBits * has_bits)445   static void set_has_latency_ms(HasBits* has_bits) {
446     (*has_bits)[0] |= 1u;
447   }
set_has_document_store_recovery_cause(HasBits * has_bits)448   static void set_has_document_store_recovery_cause(HasBits* has_bits) {
449     (*has_bits)[0] |= 2u;
450   }
set_has_index_restoration_cause(HasBits * has_bits)451   static void set_has_index_restoration_cause(HasBits* has_bits) {
452     (*has_bits)[0] |= 4u;
453   }
set_has_schema_store_recovery_cause(HasBits * has_bits)454   static void set_has_schema_store_recovery_cause(HasBits* has_bits) {
455     (*has_bits)[0] |= 8u;
456   }
set_has_document_store_recovery_latency_ms(HasBits * has_bits)457   static void set_has_document_store_recovery_latency_ms(HasBits* has_bits) {
458     (*has_bits)[0] |= 16u;
459   }
set_has_index_restoration_latency_ms(HasBits * has_bits)460   static void set_has_index_restoration_latency_ms(HasBits* has_bits) {
461     (*has_bits)[0] |= 32u;
462   }
set_has_schema_store_recovery_latency_ms(HasBits * has_bits)463   static void set_has_schema_store_recovery_latency_ms(HasBits* has_bits) {
464     (*has_bits)[0] |= 64u;
465   }
set_has_document_store_data_status(HasBits * has_bits)466   static void set_has_document_store_data_status(HasBits* has_bits) {
467     (*has_bits)[0] |= 128u;
468   }
set_has_num_documents(HasBits * has_bits)469   static void set_has_num_documents(HasBits* has_bits) {
470     (*has_bits)[0] |= 256u;
471   }
set_has_num_schema_types(HasBits * has_bits)472   static void set_has_num_schema_types(HasBits* has_bits) {
473     (*has_bits)[0] |= 512u;
474   }
set_has_num_previous_init_failures(HasBits * has_bits)475   static void set_has_num_previous_init_failures(HasBits* has_bits) {
476     (*has_bits)[0] |= 1024u;
477   }
set_has_integer_index_restoration_cause(HasBits * has_bits)478   static void set_has_integer_index_restoration_cause(HasBits* has_bits) {
479     (*has_bits)[0] |= 2048u;
480   }
set_has_qualified_id_join_index_restoration_cause(HasBits * has_bits)481   static void set_has_qualified_id_join_index_restoration_cause(HasBits* has_bits) {
482     (*has_bits)[0] |= 4096u;
483   }
set_has_embedding_index_restoration_cause(HasBits * has_bits)484   static void set_has_embedding_index_restoration_cause(HasBits* has_bits) {
485     (*has_bits)[0] |= 8192u;
486   }
487 };
488 
InitializeStatsProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)489 InitializeStatsProto::InitializeStatsProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
490                          bool is_message_owned)
491   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
492   SharedCtor(arena, is_message_owned);
493   // @@protoc_insertion_point(arena_constructor:icing.lib.InitializeStatsProto)
494 }
InitializeStatsProto(const InitializeStatsProto & from)495 InitializeStatsProto::InitializeStatsProto(const InitializeStatsProto& from)
496   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
497   InitializeStatsProto* const _this = this; (void)_this;
498   new (&_impl_) Impl_{
499       decltype(_impl_._has_bits_){from._impl_._has_bits_}
500     , /*decltype(_impl_._cached_size_)*/{}
501     , decltype(_impl_.latency_ms_){}
502     , decltype(_impl_.document_store_recovery_cause_){}
503     , decltype(_impl_.index_restoration_cause_){}
504     , decltype(_impl_.schema_store_recovery_cause_){}
505     , decltype(_impl_.document_store_recovery_latency_ms_){}
506     , decltype(_impl_.index_restoration_latency_ms_){}
507     , decltype(_impl_.schema_store_recovery_latency_ms_){}
508     , decltype(_impl_.document_store_data_status_){}
509     , decltype(_impl_.num_documents_){}
510     , decltype(_impl_.num_schema_types_){}
511     , decltype(_impl_.num_previous_init_failures_){}
512     , decltype(_impl_.integer_index_restoration_cause_){}
513     , decltype(_impl_.qualified_id_join_index_restoration_cause_){}
514     , decltype(_impl_.embedding_index_restoration_cause_){}};
515 
516   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
517   ::memcpy(&_impl_.latency_ms_, &from._impl_.latency_ms_,
518     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.embedding_index_restoration_cause_) -
519     reinterpret_cast<char*>(&_impl_.latency_ms_)) + sizeof(_impl_.embedding_index_restoration_cause_));
520   // @@protoc_insertion_point(copy_constructor:icing.lib.InitializeStatsProto)
521 }
522 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)523 inline void InitializeStatsProto::SharedCtor(
524     ::_pb::Arena* arena, bool is_message_owned) {
525   (void)arena;
526   (void)is_message_owned;
527   new (&_impl_) Impl_{
528       decltype(_impl_._has_bits_){}
529     , /*decltype(_impl_._cached_size_)*/{}
530     , decltype(_impl_.latency_ms_){0}
531     , decltype(_impl_.document_store_recovery_cause_){0}
532     , decltype(_impl_.index_restoration_cause_){0}
533     , decltype(_impl_.schema_store_recovery_cause_){0}
534     , decltype(_impl_.document_store_recovery_latency_ms_){0}
535     , decltype(_impl_.index_restoration_latency_ms_){0}
536     , decltype(_impl_.schema_store_recovery_latency_ms_){0}
537     , decltype(_impl_.document_store_data_status_){0}
538     , decltype(_impl_.num_documents_){0}
539     , decltype(_impl_.num_schema_types_){0}
540     , decltype(_impl_.num_previous_init_failures_){0}
541     , decltype(_impl_.integer_index_restoration_cause_){0}
542     , decltype(_impl_.qualified_id_join_index_restoration_cause_){0}
543     , decltype(_impl_.embedding_index_restoration_cause_){0}
544   };
545 }
546 
~InitializeStatsProto()547 InitializeStatsProto::~InitializeStatsProto() {
548   // @@protoc_insertion_point(destructor:icing.lib.InitializeStatsProto)
549   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
550   (void)arena;
551     return;
552   }
553   SharedDtor();
554 }
555 
SharedDtor()556 inline void InitializeStatsProto::SharedDtor() {
557   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
558 }
559 
SetCachedSize(int size) const560 void InitializeStatsProto::SetCachedSize(int size) const {
561   _impl_._cached_size_.Set(size);
562 }
563 
Clear()564 void InitializeStatsProto::Clear() {
565 // @@protoc_insertion_point(message_clear_start:icing.lib.InitializeStatsProto)
566   ::uint32_t cached_has_bits = 0;
567   // Prevent compiler warnings about cached_has_bits being unused
568   (void) cached_has_bits;
569 
570   cached_has_bits = _impl_._has_bits_[0];
571   if (cached_has_bits & 0x000000ffu) {
572     ::memset(&_impl_.latency_ms_, 0, static_cast<size_t>(
573         reinterpret_cast<char*>(&_impl_.document_store_data_status_) -
574         reinterpret_cast<char*>(&_impl_.latency_ms_)) + sizeof(_impl_.document_store_data_status_));
575   }
576   if (cached_has_bits & 0x00003f00u) {
577     ::memset(&_impl_.num_documents_, 0, static_cast<size_t>(
578         reinterpret_cast<char*>(&_impl_.embedding_index_restoration_cause_) -
579         reinterpret_cast<char*>(&_impl_.num_documents_)) + sizeof(_impl_.embedding_index_restoration_cause_));
580   }
581   _impl_._has_bits_.Clear();
582   _internal_metadata_.Clear<std::string>();
583 }
584 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)585 const char* InitializeStatsProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
586 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
587   _Internal::HasBits has_bits{};
588   while (!ctx->Done(&ptr)) {
589     ::uint32_t tag;
590     ptr = ::_pbi::ReadTag(ptr, &tag);
591     switch (tag >> 3) {
592       // optional int32 latency_ms = 1;
593       case 1:
594         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
595           _Internal::set_has_latency_ms(&has_bits);
596           _impl_.latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
597           CHK_(ptr);
598         } else {
599           goto handle_unusual;
600         }
601         continue;
602       // optional .icing.lib.InitializeStatsProto.RecoveryCause document_store_recovery_cause = 2;
603       case 2:
604         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
605           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
606           CHK_(ptr);
607           if (PROTOBUF_PREDICT_TRUE(::icing::lib::InitializeStatsProto_RecoveryCause_IsValid(val))) {
608             _internal_set_document_store_recovery_cause(static_cast<::icing::lib::InitializeStatsProto_RecoveryCause>(val));
609           } else {
610             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
611           }
612         } else {
613           goto handle_unusual;
614         }
615         continue;
616       // optional .icing.lib.InitializeStatsProto.RecoveryCause index_restoration_cause = 3;
617       case 3:
618         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
619           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
620           CHK_(ptr);
621           if (PROTOBUF_PREDICT_TRUE(::icing::lib::InitializeStatsProto_RecoveryCause_IsValid(val))) {
622             _internal_set_index_restoration_cause(static_cast<::icing::lib::InitializeStatsProto_RecoveryCause>(val));
623           } else {
624             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields());
625           }
626         } else {
627           goto handle_unusual;
628         }
629         continue;
630       // optional .icing.lib.InitializeStatsProto.RecoveryCause schema_store_recovery_cause = 4;
631       case 4:
632         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
633           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
634           CHK_(ptr);
635           if (PROTOBUF_PREDICT_TRUE(::icing::lib::InitializeStatsProto_RecoveryCause_IsValid(val))) {
636             _internal_set_schema_store_recovery_cause(static_cast<::icing::lib::InitializeStatsProto_RecoveryCause>(val));
637           } else {
638             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields());
639           }
640         } else {
641           goto handle_unusual;
642         }
643         continue;
644       // optional int32 document_store_recovery_latency_ms = 5;
645       case 5:
646         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
647           _Internal::set_has_document_store_recovery_latency_ms(&has_bits);
648           _impl_.document_store_recovery_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
649           CHK_(ptr);
650         } else {
651           goto handle_unusual;
652         }
653         continue;
654       // optional int32 index_restoration_latency_ms = 6;
655       case 6:
656         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
657           _Internal::set_has_index_restoration_latency_ms(&has_bits);
658           _impl_.index_restoration_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
659           CHK_(ptr);
660         } else {
661           goto handle_unusual;
662         }
663         continue;
664       // optional int32 schema_store_recovery_latency_ms = 7;
665       case 7:
666         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
667           _Internal::set_has_schema_store_recovery_latency_ms(&has_bits);
668           _impl_.schema_store_recovery_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
669           CHK_(ptr);
670         } else {
671           goto handle_unusual;
672         }
673         continue;
674       // optional .icing.lib.InitializeStatsProto.DocumentStoreDataStatus document_store_data_status = 8;
675       case 8:
676         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
677           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
678           CHK_(ptr);
679           if (PROTOBUF_PREDICT_TRUE(::icing::lib::InitializeStatsProto_DocumentStoreDataStatus_IsValid(val))) {
680             _internal_set_document_store_data_status(static_cast<::icing::lib::InitializeStatsProto_DocumentStoreDataStatus>(val));
681           } else {
682             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(8, val, mutable_unknown_fields());
683           }
684         } else {
685           goto handle_unusual;
686         }
687         continue;
688       // optional int32 num_documents = 9;
689       case 9:
690         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
691           _Internal::set_has_num_documents(&has_bits);
692           _impl_.num_documents_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
693           CHK_(ptr);
694         } else {
695           goto handle_unusual;
696         }
697         continue;
698       // optional int32 num_schema_types = 10;
699       case 10:
700         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
701           _Internal::set_has_num_schema_types(&has_bits);
702           _impl_.num_schema_types_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
703           CHK_(ptr);
704         } else {
705           goto handle_unusual;
706         }
707         continue;
708       // optional int32 num_previous_init_failures = 11;
709       case 11:
710         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
711           _Internal::set_has_num_previous_init_failures(&has_bits);
712           _impl_.num_previous_init_failures_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
713           CHK_(ptr);
714         } else {
715           goto handle_unusual;
716         }
717         continue;
718       // optional .icing.lib.InitializeStatsProto.RecoveryCause integer_index_restoration_cause = 12;
719       case 12:
720         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
721           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
722           CHK_(ptr);
723           if (PROTOBUF_PREDICT_TRUE(::icing::lib::InitializeStatsProto_RecoveryCause_IsValid(val))) {
724             _internal_set_integer_index_restoration_cause(static_cast<::icing::lib::InitializeStatsProto_RecoveryCause>(val));
725           } else {
726             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(12, val, mutable_unknown_fields());
727           }
728         } else {
729           goto handle_unusual;
730         }
731         continue;
732       // optional .icing.lib.InitializeStatsProto.RecoveryCause qualified_id_join_index_restoration_cause = 13;
733       case 13:
734         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
735           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
736           CHK_(ptr);
737           if (PROTOBUF_PREDICT_TRUE(::icing::lib::InitializeStatsProto_RecoveryCause_IsValid(val))) {
738             _internal_set_qualified_id_join_index_restoration_cause(static_cast<::icing::lib::InitializeStatsProto_RecoveryCause>(val));
739           } else {
740             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(13, val, mutable_unknown_fields());
741           }
742         } else {
743           goto handle_unusual;
744         }
745         continue;
746       // optional .icing.lib.InitializeStatsProto.RecoveryCause embedding_index_restoration_cause = 14;
747       case 14:
748         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 112)) {
749           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
750           CHK_(ptr);
751           if (PROTOBUF_PREDICT_TRUE(::icing::lib::InitializeStatsProto_RecoveryCause_IsValid(val))) {
752             _internal_set_embedding_index_restoration_cause(static_cast<::icing::lib::InitializeStatsProto_RecoveryCause>(val));
753           } else {
754             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(14, val, mutable_unknown_fields());
755           }
756         } else {
757           goto handle_unusual;
758         }
759         continue;
760       default:
761         goto handle_unusual;
762     }  // switch
763   handle_unusual:
764     if ((tag == 0) || ((tag & 7) == 4)) {
765       CHK_(ptr);
766       ctx->SetLastTag(tag);
767       goto message_done;
768     }
769     ptr = UnknownFieldParse(
770         tag,
771         _internal_metadata_.mutable_unknown_fields<std::string>(),
772         ptr, ctx);
773     CHK_(ptr != nullptr);
774   }  // while
775 message_done:
776   _impl_._has_bits_.Or(has_bits);
777   return ptr;
778 failure:
779   ptr = nullptr;
780   goto message_done;
781 #undef CHK_
782 }
783 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const784 ::uint8_t* InitializeStatsProto::_InternalSerialize(
785     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
786   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.InitializeStatsProto)
787   ::uint32_t cached_has_bits = 0;
788   (void) cached_has_bits;
789 
790   cached_has_bits = _impl_._has_bits_[0];
791   // optional int32 latency_ms = 1;
792   if (cached_has_bits & 0x00000001u) {
793     target = stream->EnsureSpace(target);
794     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_latency_ms(), target);
795   }
796 
797   // optional .icing.lib.InitializeStatsProto.RecoveryCause document_store_recovery_cause = 2;
798   if (cached_has_bits & 0x00000002u) {
799     target = stream->EnsureSpace(target);
800     target = ::_pbi::WireFormatLite::WriteEnumToArray(
801       2, this->_internal_document_store_recovery_cause(), target);
802   }
803 
804   // optional .icing.lib.InitializeStatsProto.RecoveryCause index_restoration_cause = 3;
805   if (cached_has_bits & 0x00000004u) {
806     target = stream->EnsureSpace(target);
807     target = ::_pbi::WireFormatLite::WriteEnumToArray(
808       3, this->_internal_index_restoration_cause(), target);
809   }
810 
811   // optional .icing.lib.InitializeStatsProto.RecoveryCause schema_store_recovery_cause = 4;
812   if (cached_has_bits & 0x00000008u) {
813     target = stream->EnsureSpace(target);
814     target = ::_pbi::WireFormatLite::WriteEnumToArray(
815       4, this->_internal_schema_store_recovery_cause(), target);
816   }
817 
818   // optional int32 document_store_recovery_latency_ms = 5;
819   if (cached_has_bits & 0x00000010u) {
820     target = stream->EnsureSpace(target);
821     target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_document_store_recovery_latency_ms(), target);
822   }
823 
824   // optional int32 index_restoration_latency_ms = 6;
825   if (cached_has_bits & 0x00000020u) {
826     target = stream->EnsureSpace(target);
827     target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_index_restoration_latency_ms(), target);
828   }
829 
830   // optional int32 schema_store_recovery_latency_ms = 7;
831   if (cached_has_bits & 0x00000040u) {
832     target = stream->EnsureSpace(target);
833     target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_schema_store_recovery_latency_ms(), target);
834   }
835 
836   // optional .icing.lib.InitializeStatsProto.DocumentStoreDataStatus document_store_data_status = 8;
837   if (cached_has_bits & 0x00000080u) {
838     target = stream->EnsureSpace(target);
839     target = ::_pbi::WireFormatLite::WriteEnumToArray(
840       8, this->_internal_document_store_data_status(), target);
841   }
842 
843   // optional int32 num_documents = 9;
844   if (cached_has_bits & 0x00000100u) {
845     target = stream->EnsureSpace(target);
846     target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_num_documents(), target);
847   }
848 
849   // optional int32 num_schema_types = 10;
850   if (cached_has_bits & 0x00000200u) {
851     target = stream->EnsureSpace(target);
852     target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_num_schema_types(), target);
853   }
854 
855   // optional int32 num_previous_init_failures = 11;
856   if (cached_has_bits & 0x00000400u) {
857     target = stream->EnsureSpace(target);
858     target = ::_pbi::WireFormatLite::WriteInt32ToArray(11, this->_internal_num_previous_init_failures(), target);
859   }
860 
861   // optional .icing.lib.InitializeStatsProto.RecoveryCause integer_index_restoration_cause = 12;
862   if (cached_has_bits & 0x00000800u) {
863     target = stream->EnsureSpace(target);
864     target = ::_pbi::WireFormatLite::WriteEnumToArray(
865       12, this->_internal_integer_index_restoration_cause(), target);
866   }
867 
868   // optional .icing.lib.InitializeStatsProto.RecoveryCause qualified_id_join_index_restoration_cause = 13;
869   if (cached_has_bits & 0x00001000u) {
870     target = stream->EnsureSpace(target);
871     target = ::_pbi::WireFormatLite::WriteEnumToArray(
872       13, this->_internal_qualified_id_join_index_restoration_cause(), target);
873   }
874 
875   // optional .icing.lib.InitializeStatsProto.RecoveryCause embedding_index_restoration_cause = 14;
876   if (cached_has_bits & 0x00002000u) {
877     target = stream->EnsureSpace(target);
878     target = ::_pbi::WireFormatLite::WriteEnumToArray(
879       14, this->_internal_embedding_index_restoration_cause(), target);
880   }
881 
882   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
883     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
884         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
885   }
886   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.InitializeStatsProto)
887   return target;
888 }
889 
ByteSizeLong() const890 size_t InitializeStatsProto::ByteSizeLong() const {
891 // @@protoc_insertion_point(message_byte_size_start:icing.lib.InitializeStatsProto)
892   size_t total_size = 0;
893 
894   ::uint32_t cached_has_bits = 0;
895   // Prevent compiler warnings about cached_has_bits being unused
896   (void) cached_has_bits;
897 
898   cached_has_bits = _impl_._has_bits_[0];
899   if (cached_has_bits & 0x000000ffu) {
900     // optional int32 latency_ms = 1;
901     if (cached_has_bits & 0x00000001u) {
902       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_latency_ms());
903     }
904 
905     // optional .icing.lib.InitializeStatsProto.RecoveryCause document_store_recovery_cause = 2;
906     if (cached_has_bits & 0x00000002u) {
907       total_size += 1 +
908         ::_pbi::WireFormatLite::EnumSize(this->_internal_document_store_recovery_cause());
909     }
910 
911     // optional .icing.lib.InitializeStatsProto.RecoveryCause index_restoration_cause = 3;
912     if (cached_has_bits & 0x00000004u) {
913       total_size += 1 +
914         ::_pbi::WireFormatLite::EnumSize(this->_internal_index_restoration_cause());
915     }
916 
917     // optional .icing.lib.InitializeStatsProto.RecoveryCause schema_store_recovery_cause = 4;
918     if (cached_has_bits & 0x00000008u) {
919       total_size += 1 +
920         ::_pbi::WireFormatLite::EnumSize(this->_internal_schema_store_recovery_cause());
921     }
922 
923     // optional int32 document_store_recovery_latency_ms = 5;
924     if (cached_has_bits & 0x00000010u) {
925       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_document_store_recovery_latency_ms());
926     }
927 
928     // optional int32 index_restoration_latency_ms = 6;
929     if (cached_has_bits & 0x00000020u) {
930       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_index_restoration_latency_ms());
931     }
932 
933     // optional int32 schema_store_recovery_latency_ms = 7;
934     if (cached_has_bits & 0x00000040u) {
935       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_schema_store_recovery_latency_ms());
936     }
937 
938     // optional .icing.lib.InitializeStatsProto.DocumentStoreDataStatus document_store_data_status = 8;
939     if (cached_has_bits & 0x00000080u) {
940       total_size += 1 +
941         ::_pbi::WireFormatLite::EnumSize(this->_internal_document_store_data_status());
942     }
943 
944   }
945   if (cached_has_bits & 0x00003f00u) {
946     // optional int32 num_documents = 9;
947     if (cached_has_bits & 0x00000100u) {
948       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_documents());
949     }
950 
951     // optional int32 num_schema_types = 10;
952     if (cached_has_bits & 0x00000200u) {
953       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_schema_types());
954     }
955 
956     // optional int32 num_previous_init_failures = 11;
957     if (cached_has_bits & 0x00000400u) {
958       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_previous_init_failures());
959     }
960 
961     // optional .icing.lib.InitializeStatsProto.RecoveryCause integer_index_restoration_cause = 12;
962     if (cached_has_bits & 0x00000800u) {
963       total_size += 1 +
964         ::_pbi::WireFormatLite::EnumSize(this->_internal_integer_index_restoration_cause());
965     }
966 
967     // optional .icing.lib.InitializeStatsProto.RecoveryCause qualified_id_join_index_restoration_cause = 13;
968     if (cached_has_bits & 0x00001000u) {
969       total_size += 1 +
970         ::_pbi::WireFormatLite::EnumSize(this->_internal_qualified_id_join_index_restoration_cause());
971     }
972 
973     // optional .icing.lib.InitializeStatsProto.RecoveryCause embedding_index_restoration_cause = 14;
974     if (cached_has_bits & 0x00002000u) {
975       total_size += 1 +
976         ::_pbi::WireFormatLite::EnumSize(this->_internal_embedding_index_restoration_cause());
977     }
978 
979   }
980   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
981     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
982   }
983   int cached_size = ::_pbi::ToCachedSize(total_size);
984   SetCachedSize(cached_size);
985   return total_size;
986 }
987 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)988 void InitializeStatsProto::CheckTypeAndMergeFrom(
989     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
990   MergeFrom(*::_pbi::DownCast<const InitializeStatsProto*>(
991       &from));
992 }
993 
MergeFrom(const InitializeStatsProto & from)994 void InitializeStatsProto::MergeFrom(const InitializeStatsProto& from) {
995   InitializeStatsProto* const _this = this;
996   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.InitializeStatsProto)
997   GOOGLE_DCHECK_NE(&from, _this);
998   ::uint32_t cached_has_bits = 0;
999   (void) cached_has_bits;
1000 
1001   cached_has_bits = from._impl_._has_bits_[0];
1002   if (cached_has_bits & 0x000000ffu) {
1003     if (cached_has_bits & 0x00000001u) {
1004       _this->_impl_.latency_ms_ = from._impl_.latency_ms_;
1005     }
1006     if (cached_has_bits & 0x00000002u) {
1007       _this->_impl_.document_store_recovery_cause_ = from._impl_.document_store_recovery_cause_;
1008     }
1009     if (cached_has_bits & 0x00000004u) {
1010       _this->_impl_.index_restoration_cause_ = from._impl_.index_restoration_cause_;
1011     }
1012     if (cached_has_bits & 0x00000008u) {
1013       _this->_impl_.schema_store_recovery_cause_ = from._impl_.schema_store_recovery_cause_;
1014     }
1015     if (cached_has_bits & 0x00000010u) {
1016       _this->_impl_.document_store_recovery_latency_ms_ = from._impl_.document_store_recovery_latency_ms_;
1017     }
1018     if (cached_has_bits & 0x00000020u) {
1019       _this->_impl_.index_restoration_latency_ms_ = from._impl_.index_restoration_latency_ms_;
1020     }
1021     if (cached_has_bits & 0x00000040u) {
1022       _this->_impl_.schema_store_recovery_latency_ms_ = from._impl_.schema_store_recovery_latency_ms_;
1023     }
1024     if (cached_has_bits & 0x00000080u) {
1025       _this->_impl_.document_store_data_status_ = from._impl_.document_store_data_status_;
1026     }
1027     _this->_impl_._has_bits_[0] |= cached_has_bits;
1028   }
1029   if (cached_has_bits & 0x00003f00u) {
1030     if (cached_has_bits & 0x00000100u) {
1031       _this->_impl_.num_documents_ = from._impl_.num_documents_;
1032     }
1033     if (cached_has_bits & 0x00000200u) {
1034       _this->_impl_.num_schema_types_ = from._impl_.num_schema_types_;
1035     }
1036     if (cached_has_bits & 0x00000400u) {
1037       _this->_impl_.num_previous_init_failures_ = from._impl_.num_previous_init_failures_;
1038     }
1039     if (cached_has_bits & 0x00000800u) {
1040       _this->_impl_.integer_index_restoration_cause_ = from._impl_.integer_index_restoration_cause_;
1041     }
1042     if (cached_has_bits & 0x00001000u) {
1043       _this->_impl_.qualified_id_join_index_restoration_cause_ = from._impl_.qualified_id_join_index_restoration_cause_;
1044     }
1045     if (cached_has_bits & 0x00002000u) {
1046       _this->_impl_.embedding_index_restoration_cause_ = from._impl_.embedding_index_restoration_cause_;
1047     }
1048     _this->_impl_._has_bits_[0] |= cached_has_bits;
1049   }
1050   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1051 }
1052 
CopyFrom(const InitializeStatsProto & from)1053 void InitializeStatsProto::CopyFrom(const InitializeStatsProto& from) {
1054 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.InitializeStatsProto)
1055   if (&from == this) return;
1056   Clear();
1057   MergeFrom(from);
1058 }
1059 
IsInitialized() const1060 bool InitializeStatsProto::IsInitialized() const {
1061   return true;
1062 }
1063 
InternalSwap(InitializeStatsProto * other)1064 void InitializeStatsProto::InternalSwap(InitializeStatsProto* other) {
1065   using std::swap;
1066   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1067   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1068   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1069       PROTOBUF_FIELD_OFFSET(InitializeStatsProto, _impl_.embedding_index_restoration_cause_)
1070       + sizeof(InitializeStatsProto::_impl_.embedding_index_restoration_cause_)  // NOLINT
1071       - PROTOBUF_FIELD_OFFSET(InitializeStatsProto, _impl_.latency_ms_)>(
1072           reinterpret_cast<char*>(&_impl_.latency_ms_),
1073           reinterpret_cast<char*>(&other->_impl_.latency_ms_));
1074 }
1075 
GetTypeName() const1076 std::string InitializeStatsProto::GetTypeName() const {
1077   return "icing.lib.InitializeStatsProto";
1078 }
1079 
1080 
1081 // ===================================================================
1082 
1083 class PutDocumentStatsProto_TokenizationStats::_Internal {
1084  public:
1085   using HasBits = decltype(std::declval<PutDocumentStatsProto_TokenizationStats>()._impl_._has_bits_);
set_has_num_tokens_indexed(HasBits * has_bits)1086   static void set_has_num_tokens_indexed(HasBits* has_bits) {
1087     (*has_bits)[0] |= 1u;
1088   }
set_has_num_metadata_tokens_indexed(HasBits * has_bits)1089   static void set_has_num_metadata_tokens_indexed(HasBits* has_bits) {
1090     (*has_bits)[0] |= 2u;
1091   }
1092 };
1093 
PutDocumentStatsProto_TokenizationStats(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1094 PutDocumentStatsProto_TokenizationStats::PutDocumentStatsProto_TokenizationStats(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1095                          bool is_message_owned)
1096   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1097   SharedCtor(arena, is_message_owned);
1098   // @@protoc_insertion_point(arena_constructor:icing.lib.PutDocumentStatsProto.TokenizationStats)
1099 }
PutDocumentStatsProto_TokenizationStats(const PutDocumentStatsProto_TokenizationStats & from)1100 PutDocumentStatsProto_TokenizationStats::PutDocumentStatsProto_TokenizationStats(const PutDocumentStatsProto_TokenizationStats& from)
1101   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1102   PutDocumentStatsProto_TokenizationStats* const _this = this; (void)_this;
1103   new (&_impl_) Impl_{
1104       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1105     , /*decltype(_impl_._cached_size_)*/{}
1106     , decltype(_impl_.num_tokens_indexed_){}
1107     , decltype(_impl_.num_metadata_tokens_indexed_){}};
1108 
1109   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1110   ::memcpy(&_impl_.num_tokens_indexed_, &from._impl_.num_tokens_indexed_,
1111     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.num_metadata_tokens_indexed_) -
1112     reinterpret_cast<char*>(&_impl_.num_tokens_indexed_)) + sizeof(_impl_.num_metadata_tokens_indexed_));
1113   // @@protoc_insertion_point(copy_constructor:icing.lib.PutDocumentStatsProto.TokenizationStats)
1114 }
1115 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1116 inline void PutDocumentStatsProto_TokenizationStats::SharedCtor(
1117     ::_pb::Arena* arena, bool is_message_owned) {
1118   (void)arena;
1119   (void)is_message_owned;
1120   new (&_impl_) Impl_{
1121       decltype(_impl_._has_bits_){}
1122     , /*decltype(_impl_._cached_size_)*/{}
1123     , decltype(_impl_.num_tokens_indexed_){0}
1124     , decltype(_impl_.num_metadata_tokens_indexed_){0}
1125   };
1126 }
1127 
~PutDocumentStatsProto_TokenizationStats()1128 PutDocumentStatsProto_TokenizationStats::~PutDocumentStatsProto_TokenizationStats() {
1129   // @@protoc_insertion_point(destructor:icing.lib.PutDocumentStatsProto.TokenizationStats)
1130   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1131   (void)arena;
1132     return;
1133   }
1134   SharedDtor();
1135 }
1136 
SharedDtor()1137 inline void PutDocumentStatsProto_TokenizationStats::SharedDtor() {
1138   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1139 }
1140 
SetCachedSize(int size) const1141 void PutDocumentStatsProto_TokenizationStats::SetCachedSize(int size) const {
1142   _impl_._cached_size_.Set(size);
1143 }
1144 
Clear()1145 void PutDocumentStatsProto_TokenizationStats::Clear() {
1146 // @@protoc_insertion_point(message_clear_start:icing.lib.PutDocumentStatsProto.TokenizationStats)
1147   ::uint32_t cached_has_bits = 0;
1148   // Prevent compiler warnings about cached_has_bits being unused
1149   (void) cached_has_bits;
1150 
1151   cached_has_bits = _impl_._has_bits_[0];
1152   if (cached_has_bits & 0x00000003u) {
1153     ::memset(&_impl_.num_tokens_indexed_, 0, static_cast<size_t>(
1154         reinterpret_cast<char*>(&_impl_.num_metadata_tokens_indexed_) -
1155         reinterpret_cast<char*>(&_impl_.num_tokens_indexed_)) + sizeof(_impl_.num_metadata_tokens_indexed_));
1156   }
1157   _impl_._has_bits_.Clear();
1158   _internal_metadata_.Clear<std::string>();
1159 }
1160 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1161 const char* PutDocumentStatsProto_TokenizationStats::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1162 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1163   _Internal::HasBits has_bits{};
1164   while (!ctx->Done(&ptr)) {
1165     ::uint32_t tag;
1166     ptr = ::_pbi::ReadTag(ptr, &tag);
1167     switch (tag >> 3) {
1168       // optional int32 num_tokens_indexed = 1;
1169       case 1:
1170         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1171           _Internal::set_has_num_tokens_indexed(&has_bits);
1172           _impl_.num_tokens_indexed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1173           CHK_(ptr);
1174         } else {
1175           goto handle_unusual;
1176         }
1177         continue;
1178       // optional int32 num_metadata_tokens_indexed = 3;
1179       case 3:
1180         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1181           _Internal::set_has_num_metadata_tokens_indexed(&has_bits);
1182           _impl_.num_metadata_tokens_indexed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1183           CHK_(ptr);
1184         } else {
1185           goto handle_unusual;
1186         }
1187         continue;
1188       default:
1189         goto handle_unusual;
1190     }  // switch
1191   handle_unusual:
1192     if ((tag == 0) || ((tag & 7) == 4)) {
1193       CHK_(ptr);
1194       ctx->SetLastTag(tag);
1195       goto message_done;
1196     }
1197     ptr = UnknownFieldParse(
1198         tag,
1199         _internal_metadata_.mutable_unknown_fields<std::string>(),
1200         ptr, ctx);
1201     CHK_(ptr != nullptr);
1202   }  // while
1203 message_done:
1204   _impl_._has_bits_.Or(has_bits);
1205   return ptr;
1206 failure:
1207   ptr = nullptr;
1208   goto message_done;
1209 #undef CHK_
1210 }
1211 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1212 ::uint8_t* PutDocumentStatsProto_TokenizationStats::_InternalSerialize(
1213     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1214   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.PutDocumentStatsProto.TokenizationStats)
1215   ::uint32_t cached_has_bits = 0;
1216   (void) cached_has_bits;
1217 
1218   cached_has_bits = _impl_._has_bits_[0];
1219   // optional int32 num_tokens_indexed = 1;
1220   if (cached_has_bits & 0x00000001u) {
1221     target = stream->EnsureSpace(target);
1222     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_num_tokens_indexed(), target);
1223   }
1224 
1225   // optional int32 num_metadata_tokens_indexed = 3;
1226   if (cached_has_bits & 0x00000002u) {
1227     target = stream->EnsureSpace(target);
1228     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_metadata_tokens_indexed(), target);
1229   }
1230 
1231   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1232     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1233         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1234   }
1235   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.PutDocumentStatsProto.TokenizationStats)
1236   return target;
1237 }
1238 
ByteSizeLong() const1239 size_t PutDocumentStatsProto_TokenizationStats::ByteSizeLong() const {
1240 // @@protoc_insertion_point(message_byte_size_start:icing.lib.PutDocumentStatsProto.TokenizationStats)
1241   size_t total_size = 0;
1242 
1243   ::uint32_t cached_has_bits = 0;
1244   // Prevent compiler warnings about cached_has_bits being unused
1245   (void) cached_has_bits;
1246 
1247   cached_has_bits = _impl_._has_bits_[0];
1248   if (cached_has_bits & 0x00000003u) {
1249     // optional int32 num_tokens_indexed = 1;
1250     if (cached_has_bits & 0x00000001u) {
1251       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_tokens_indexed());
1252     }
1253 
1254     // optional int32 num_metadata_tokens_indexed = 3;
1255     if (cached_has_bits & 0x00000002u) {
1256       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_metadata_tokens_indexed());
1257     }
1258 
1259   }
1260   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1261     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1262   }
1263   int cached_size = ::_pbi::ToCachedSize(total_size);
1264   SetCachedSize(cached_size);
1265   return total_size;
1266 }
1267 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1268 void PutDocumentStatsProto_TokenizationStats::CheckTypeAndMergeFrom(
1269     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1270   MergeFrom(*::_pbi::DownCast<const PutDocumentStatsProto_TokenizationStats*>(
1271       &from));
1272 }
1273 
MergeFrom(const PutDocumentStatsProto_TokenizationStats & from)1274 void PutDocumentStatsProto_TokenizationStats::MergeFrom(const PutDocumentStatsProto_TokenizationStats& from) {
1275   PutDocumentStatsProto_TokenizationStats* const _this = this;
1276   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.PutDocumentStatsProto.TokenizationStats)
1277   GOOGLE_DCHECK_NE(&from, _this);
1278   ::uint32_t cached_has_bits = 0;
1279   (void) cached_has_bits;
1280 
1281   cached_has_bits = from._impl_._has_bits_[0];
1282   if (cached_has_bits & 0x00000003u) {
1283     if (cached_has_bits & 0x00000001u) {
1284       _this->_impl_.num_tokens_indexed_ = from._impl_.num_tokens_indexed_;
1285     }
1286     if (cached_has_bits & 0x00000002u) {
1287       _this->_impl_.num_metadata_tokens_indexed_ = from._impl_.num_metadata_tokens_indexed_;
1288     }
1289     _this->_impl_._has_bits_[0] |= cached_has_bits;
1290   }
1291   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1292 }
1293 
CopyFrom(const PutDocumentStatsProto_TokenizationStats & from)1294 void PutDocumentStatsProto_TokenizationStats::CopyFrom(const PutDocumentStatsProto_TokenizationStats& from) {
1295 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.PutDocumentStatsProto.TokenizationStats)
1296   if (&from == this) return;
1297   Clear();
1298   MergeFrom(from);
1299 }
1300 
IsInitialized() const1301 bool PutDocumentStatsProto_TokenizationStats::IsInitialized() const {
1302   return true;
1303 }
1304 
InternalSwap(PutDocumentStatsProto_TokenizationStats * other)1305 void PutDocumentStatsProto_TokenizationStats::InternalSwap(PutDocumentStatsProto_TokenizationStats* other) {
1306   using std::swap;
1307   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1308   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1309   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1310       PROTOBUF_FIELD_OFFSET(PutDocumentStatsProto_TokenizationStats, _impl_.num_metadata_tokens_indexed_)
1311       + sizeof(PutDocumentStatsProto_TokenizationStats::_impl_.num_metadata_tokens_indexed_)  // NOLINT
1312       - PROTOBUF_FIELD_OFFSET(PutDocumentStatsProto_TokenizationStats, _impl_.num_tokens_indexed_)>(
1313           reinterpret_cast<char*>(&_impl_.num_tokens_indexed_),
1314           reinterpret_cast<char*>(&other->_impl_.num_tokens_indexed_));
1315 }
1316 
GetTypeName() const1317 std::string PutDocumentStatsProto_TokenizationStats::GetTypeName() const {
1318   return "icing.lib.PutDocumentStatsProto.TokenizationStats";
1319 }
1320 
1321 
1322 // ===================================================================
1323 
1324 class PutDocumentStatsProto::_Internal {
1325  public:
1326   using HasBits = decltype(std::declval<PutDocumentStatsProto>()._impl_._has_bits_);
set_has_latency_ms(HasBits * has_bits)1327   static void set_has_latency_ms(HasBits* has_bits) {
1328     (*has_bits)[0] |= 2u;
1329   }
set_has_document_store_latency_ms(HasBits * has_bits)1330   static void set_has_document_store_latency_ms(HasBits* has_bits) {
1331     (*has_bits)[0] |= 4u;
1332   }
set_has_index_latency_ms(HasBits * has_bits)1333   static void set_has_index_latency_ms(HasBits* has_bits) {
1334     (*has_bits)[0] |= 8u;
1335   }
set_has_index_merge_latency_ms(HasBits * has_bits)1336   static void set_has_index_merge_latency_ms(HasBits* has_bits) {
1337     (*has_bits)[0] |= 16u;
1338   }
set_has_document_size(HasBits * has_bits)1339   static void set_has_document_size(HasBits* has_bits) {
1340     (*has_bits)[0] |= 32u;
1341   }
1342   static const ::icing::lib::PutDocumentStatsProto_TokenizationStats& tokenization_stats(const PutDocumentStatsProto* msg);
set_has_tokenization_stats(HasBits * has_bits)1343   static void set_has_tokenization_stats(HasBits* has_bits) {
1344     (*has_bits)[0] |= 1u;
1345   }
set_has_term_index_latency_ms(HasBits * has_bits)1346   static void set_has_term_index_latency_ms(HasBits* has_bits) {
1347     (*has_bits)[0] |= 64u;
1348   }
set_has_integer_index_latency_ms(HasBits * has_bits)1349   static void set_has_integer_index_latency_ms(HasBits* has_bits) {
1350     (*has_bits)[0] |= 128u;
1351   }
set_has_qualified_id_join_index_latency_ms(HasBits * has_bits)1352   static void set_has_qualified_id_join_index_latency_ms(HasBits* has_bits) {
1353     (*has_bits)[0] |= 256u;
1354   }
set_has_lite_index_sort_latency_ms(HasBits * has_bits)1355   static void set_has_lite_index_sort_latency_ms(HasBits* has_bits) {
1356     (*has_bits)[0] |= 512u;
1357   }
set_has_metadata_term_index_latency_ms(HasBits * has_bits)1358   static void set_has_metadata_term_index_latency_ms(HasBits* has_bits) {
1359     (*has_bits)[0] |= 1024u;
1360   }
set_has_embedding_index_latency_ms(HasBits * has_bits)1361   static void set_has_embedding_index_latency_ms(HasBits* has_bits) {
1362     (*has_bits)[0] |= 2048u;
1363   }
1364 };
1365 
1366 const ::icing::lib::PutDocumentStatsProto_TokenizationStats&
tokenization_stats(const PutDocumentStatsProto * msg)1367 PutDocumentStatsProto::_Internal::tokenization_stats(const PutDocumentStatsProto* msg) {
1368   return *msg->_impl_.tokenization_stats_;
1369 }
PutDocumentStatsProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1370 PutDocumentStatsProto::PutDocumentStatsProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1371                          bool is_message_owned)
1372   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1373   SharedCtor(arena, is_message_owned);
1374   // @@protoc_insertion_point(arena_constructor:icing.lib.PutDocumentStatsProto)
1375 }
PutDocumentStatsProto(const PutDocumentStatsProto & from)1376 PutDocumentStatsProto::PutDocumentStatsProto(const PutDocumentStatsProto& from)
1377   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1378   PutDocumentStatsProto* const _this = this; (void)_this;
1379   new (&_impl_) Impl_{
1380       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1381     , /*decltype(_impl_._cached_size_)*/{}
1382     , decltype(_impl_.tokenization_stats_){nullptr}
1383     , decltype(_impl_.latency_ms_){}
1384     , decltype(_impl_.document_store_latency_ms_){}
1385     , decltype(_impl_.index_latency_ms_){}
1386     , decltype(_impl_.index_merge_latency_ms_){}
1387     , decltype(_impl_.document_size_){}
1388     , decltype(_impl_.term_index_latency_ms_){}
1389     , decltype(_impl_.integer_index_latency_ms_){}
1390     , decltype(_impl_.qualified_id_join_index_latency_ms_){}
1391     , decltype(_impl_.lite_index_sort_latency_ms_){}
1392     , decltype(_impl_.metadata_term_index_latency_ms_){}
1393     , decltype(_impl_.embedding_index_latency_ms_){}};
1394 
1395   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1396   if (from._internal_has_tokenization_stats()) {
1397     _this->_impl_.tokenization_stats_ = new ::icing::lib::PutDocumentStatsProto_TokenizationStats(*from._impl_.tokenization_stats_);
1398   }
1399   ::memcpy(&_impl_.latency_ms_, &from._impl_.latency_ms_,
1400     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.embedding_index_latency_ms_) -
1401     reinterpret_cast<char*>(&_impl_.latency_ms_)) + sizeof(_impl_.embedding_index_latency_ms_));
1402   // @@protoc_insertion_point(copy_constructor:icing.lib.PutDocumentStatsProto)
1403 }
1404 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1405 inline void PutDocumentStatsProto::SharedCtor(
1406     ::_pb::Arena* arena, bool is_message_owned) {
1407   (void)arena;
1408   (void)is_message_owned;
1409   new (&_impl_) Impl_{
1410       decltype(_impl_._has_bits_){}
1411     , /*decltype(_impl_._cached_size_)*/{}
1412     , decltype(_impl_.tokenization_stats_){nullptr}
1413     , decltype(_impl_.latency_ms_){0}
1414     , decltype(_impl_.document_store_latency_ms_){0}
1415     , decltype(_impl_.index_latency_ms_){0}
1416     , decltype(_impl_.index_merge_latency_ms_){0}
1417     , decltype(_impl_.document_size_){0}
1418     , decltype(_impl_.term_index_latency_ms_){0}
1419     , decltype(_impl_.integer_index_latency_ms_){0}
1420     , decltype(_impl_.qualified_id_join_index_latency_ms_){0}
1421     , decltype(_impl_.lite_index_sort_latency_ms_){0}
1422     , decltype(_impl_.metadata_term_index_latency_ms_){0}
1423     , decltype(_impl_.embedding_index_latency_ms_){0}
1424   };
1425 }
1426 
~PutDocumentStatsProto()1427 PutDocumentStatsProto::~PutDocumentStatsProto() {
1428   // @@protoc_insertion_point(destructor:icing.lib.PutDocumentStatsProto)
1429   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1430   (void)arena;
1431     return;
1432   }
1433   SharedDtor();
1434 }
1435 
SharedDtor()1436 inline void PutDocumentStatsProto::SharedDtor() {
1437   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1438   if (this != internal_default_instance()) delete _impl_.tokenization_stats_;
1439 }
1440 
SetCachedSize(int size) const1441 void PutDocumentStatsProto::SetCachedSize(int size) const {
1442   _impl_._cached_size_.Set(size);
1443 }
1444 
Clear()1445 void PutDocumentStatsProto::Clear() {
1446 // @@protoc_insertion_point(message_clear_start:icing.lib.PutDocumentStatsProto)
1447   ::uint32_t cached_has_bits = 0;
1448   // Prevent compiler warnings about cached_has_bits being unused
1449   (void) cached_has_bits;
1450 
1451   cached_has_bits = _impl_._has_bits_[0];
1452   if (cached_has_bits & 0x00000001u) {
1453     GOOGLE_DCHECK(_impl_.tokenization_stats_ != nullptr);
1454     _impl_.tokenization_stats_->Clear();
1455   }
1456   if (cached_has_bits & 0x000000feu) {
1457     ::memset(&_impl_.latency_ms_, 0, static_cast<size_t>(
1458         reinterpret_cast<char*>(&_impl_.integer_index_latency_ms_) -
1459         reinterpret_cast<char*>(&_impl_.latency_ms_)) + sizeof(_impl_.integer_index_latency_ms_));
1460   }
1461   if (cached_has_bits & 0x00000f00u) {
1462     ::memset(&_impl_.qualified_id_join_index_latency_ms_, 0, static_cast<size_t>(
1463         reinterpret_cast<char*>(&_impl_.embedding_index_latency_ms_) -
1464         reinterpret_cast<char*>(&_impl_.qualified_id_join_index_latency_ms_)) + sizeof(_impl_.embedding_index_latency_ms_));
1465   }
1466   _impl_._has_bits_.Clear();
1467   _internal_metadata_.Clear<std::string>();
1468 }
1469 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1470 const char* PutDocumentStatsProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1471 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1472   _Internal::HasBits has_bits{};
1473   while (!ctx->Done(&ptr)) {
1474     ::uint32_t tag;
1475     ptr = ::_pbi::ReadTag(ptr, &tag);
1476     switch (tag >> 3) {
1477       // optional int32 latency_ms = 1;
1478       case 1:
1479         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1480           _Internal::set_has_latency_ms(&has_bits);
1481           _impl_.latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1482           CHK_(ptr);
1483         } else {
1484           goto handle_unusual;
1485         }
1486         continue;
1487       // optional int32 document_store_latency_ms = 2;
1488       case 2:
1489         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1490           _Internal::set_has_document_store_latency_ms(&has_bits);
1491           _impl_.document_store_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1492           CHK_(ptr);
1493         } else {
1494           goto handle_unusual;
1495         }
1496         continue;
1497       // optional int32 index_latency_ms = 3;
1498       case 3:
1499         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1500           _Internal::set_has_index_latency_ms(&has_bits);
1501           _impl_.index_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1502           CHK_(ptr);
1503         } else {
1504           goto handle_unusual;
1505         }
1506         continue;
1507       // optional int32 index_merge_latency_ms = 4;
1508       case 4:
1509         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
1510           _Internal::set_has_index_merge_latency_ms(&has_bits);
1511           _impl_.index_merge_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1512           CHK_(ptr);
1513         } else {
1514           goto handle_unusual;
1515         }
1516         continue;
1517       // optional int32 document_size = 5;
1518       case 5:
1519         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
1520           _Internal::set_has_document_size(&has_bits);
1521           _impl_.document_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1522           CHK_(ptr);
1523         } else {
1524           goto handle_unusual;
1525         }
1526         continue;
1527       // optional .icing.lib.PutDocumentStatsProto.TokenizationStats tokenization_stats = 6;
1528       case 6:
1529         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
1530           ptr = ctx->ParseMessage(_internal_mutable_tokenization_stats(), ptr);
1531           CHK_(ptr);
1532         } else {
1533           goto handle_unusual;
1534         }
1535         continue;
1536       // optional int32 term_index_latency_ms = 7;
1537       case 7:
1538         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
1539           _Internal::set_has_term_index_latency_ms(&has_bits);
1540           _impl_.term_index_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1541           CHK_(ptr);
1542         } else {
1543           goto handle_unusual;
1544         }
1545         continue;
1546       // optional int32 integer_index_latency_ms = 8;
1547       case 8:
1548         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
1549           _Internal::set_has_integer_index_latency_ms(&has_bits);
1550           _impl_.integer_index_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1551           CHK_(ptr);
1552         } else {
1553           goto handle_unusual;
1554         }
1555         continue;
1556       // optional int32 qualified_id_join_index_latency_ms = 9;
1557       case 9:
1558         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
1559           _Internal::set_has_qualified_id_join_index_latency_ms(&has_bits);
1560           _impl_.qualified_id_join_index_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1561           CHK_(ptr);
1562         } else {
1563           goto handle_unusual;
1564         }
1565         continue;
1566       // optional int32 lite_index_sort_latency_ms = 10;
1567       case 10:
1568         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
1569           _Internal::set_has_lite_index_sort_latency_ms(&has_bits);
1570           _impl_.lite_index_sort_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1571           CHK_(ptr);
1572         } else {
1573           goto handle_unusual;
1574         }
1575         continue;
1576       // optional int32 metadata_term_index_latency_ms = 11;
1577       case 11:
1578         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
1579           _Internal::set_has_metadata_term_index_latency_ms(&has_bits);
1580           _impl_.metadata_term_index_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1581           CHK_(ptr);
1582         } else {
1583           goto handle_unusual;
1584         }
1585         continue;
1586       // optional int32 embedding_index_latency_ms = 12;
1587       case 12:
1588         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
1589           _Internal::set_has_embedding_index_latency_ms(&has_bits);
1590           _impl_.embedding_index_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1591           CHK_(ptr);
1592         } else {
1593           goto handle_unusual;
1594         }
1595         continue;
1596       default:
1597         goto handle_unusual;
1598     }  // switch
1599   handle_unusual:
1600     if ((tag == 0) || ((tag & 7) == 4)) {
1601       CHK_(ptr);
1602       ctx->SetLastTag(tag);
1603       goto message_done;
1604     }
1605     ptr = UnknownFieldParse(
1606         tag,
1607         _internal_metadata_.mutable_unknown_fields<std::string>(),
1608         ptr, ctx);
1609     CHK_(ptr != nullptr);
1610   }  // while
1611 message_done:
1612   _impl_._has_bits_.Or(has_bits);
1613   return ptr;
1614 failure:
1615   ptr = nullptr;
1616   goto message_done;
1617 #undef CHK_
1618 }
1619 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1620 ::uint8_t* PutDocumentStatsProto::_InternalSerialize(
1621     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1622   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.PutDocumentStatsProto)
1623   ::uint32_t cached_has_bits = 0;
1624   (void) cached_has_bits;
1625 
1626   cached_has_bits = _impl_._has_bits_[0];
1627   // optional int32 latency_ms = 1;
1628   if (cached_has_bits & 0x00000002u) {
1629     target = stream->EnsureSpace(target);
1630     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_latency_ms(), target);
1631   }
1632 
1633   // optional int32 document_store_latency_ms = 2;
1634   if (cached_has_bits & 0x00000004u) {
1635     target = stream->EnsureSpace(target);
1636     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_document_store_latency_ms(), target);
1637   }
1638 
1639   // optional int32 index_latency_ms = 3;
1640   if (cached_has_bits & 0x00000008u) {
1641     target = stream->EnsureSpace(target);
1642     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_index_latency_ms(), target);
1643   }
1644 
1645   // optional int32 index_merge_latency_ms = 4;
1646   if (cached_has_bits & 0x00000010u) {
1647     target = stream->EnsureSpace(target);
1648     target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_index_merge_latency_ms(), target);
1649   }
1650 
1651   // optional int32 document_size = 5;
1652   if (cached_has_bits & 0x00000020u) {
1653     target = stream->EnsureSpace(target);
1654     target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_document_size(), target);
1655   }
1656 
1657   // optional .icing.lib.PutDocumentStatsProto.TokenizationStats tokenization_stats = 6;
1658   if (cached_has_bits & 0x00000001u) {
1659     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1660       InternalWriteMessage(6, _Internal::tokenization_stats(this),
1661         _Internal::tokenization_stats(this).GetCachedSize(), target, stream);
1662   }
1663 
1664   // optional int32 term_index_latency_ms = 7;
1665   if (cached_has_bits & 0x00000040u) {
1666     target = stream->EnsureSpace(target);
1667     target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_term_index_latency_ms(), target);
1668   }
1669 
1670   // optional int32 integer_index_latency_ms = 8;
1671   if (cached_has_bits & 0x00000080u) {
1672     target = stream->EnsureSpace(target);
1673     target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_integer_index_latency_ms(), target);
1674   }
1675 
1676   // optional int32 qualified_id_join_index_latency_ms = 9;
1677   if (cached_has_bits & 0x00000100u) {
1678     target = stream->EnsureSpace(target);
1679     target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_qualified_id_join_index_latency_ms(), target);
1680   }
1681 
1682   // optional int32 lite_index_sort_latency_ms = 10;
1683   if (cached_has_bits & 0x00000200u) {
1684     target = stream->EnsureSpace(target);
1685     target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_lite_index_sort_latency_ms(), target);
1686   }
1687 
1688   // optional int32 metadata_term_index_latency_ms = 11;
1689   if (cached_has_bits & 0x00000400u) {
1690     target = stream->EnsureSpace(target);
1691     target = ::_pbi::WireFormatLite::WriteInt32ToArray(11, this->_internal_metadata_term_index_latency_ms(), target);
1692   }
1693 
1694   // optional int32 embedding_index_latency_ms = 12;
1695   if (cached_has_bits & 0x00000800u) {
1696     target = stream->EnsureSpace(target);
1697     target = ::_pbi::WireFormatLite::WriteInt32ToArray(12, this->_internal_embedding_index_latency_ms(), target);
1698   }
1699 
1700   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1701     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1702         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1703   }
1704   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.PutDocumentStatsProto)
1705   return target;
1706 }
1707 
ByteSizeLong() const1708 size_t PutDocumentStatsProto::ByteSizeLong() const {
1709 // @@protoc_insertion_point(message_byte_size_start:icing.lib.PutDocumentStatsProto)
1710   size_t total_size = 0;
1711 
1712   ::uint32_t cached_has_bits = 0;
1713   // Prevent compiler warnings about cached_has_bits being unused
1714   (void) cached_has_bits;
1715 
1716   cached_has_bits = _impl_._has_bits_[0];
1717   if (cached_has_bits & 0x000000ffu) {
1718     // optional .icing.lib.PutDocumentStatsProto.TokenizationStats tokenization_stats = 6;
1719     if (cached_has_bits & 0x00000001u) {
1720       total_size += 1 +
1721         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1722           *_impl_.tokenization_stats_);
1723     }
1724 
1725     // optional int32 latency_ms = 1;
1726     if (cached_has_bits & 0x00000002u) {
1727       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_latency_ms());
1728     }
1729 
1730     // optional int32 document_store_latency_ms = 2;
1731     if (cached_has_bits & 0x00000004u) {
1732       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_document_store_latency_ms());
1733     }
1734 
1735     // optional int32 index_latency_ms = 3;
1736     if (cached_has_bits & 0x00000008u) {
1737       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_index_latency_ms());
1738     }
1739 
1740     // optional int32 index_merge_latency_ms = 4;
1741     if (cached_has_bits & 0x00000010u) {
1742       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_index_merge_latency_ms());
1743     }
1744 
1745     // optional int32 document_size = 5;
1746     if (cached_has_bits & 0x00000020u) {
1747       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_document_size());
1748     }
1749 
1750     // optional int32 term_index_latency_ms = 7;
1751     if (cached_has_bits & 0x00000040u) {
1752       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_term_index_latency_ms());
1753     }
1754 
1755     // optional int32 integer_index_latency_ms = 8;
1756     if (cached_has_bits & 0x00000080u) {
1757       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_integer_index_latency_ms());
1758     }
1759 
1760   }
1761   if (cached_has_bits & 0x00000f00u) {
1762     // optional int32 qualified_id_join_index_latency_ms = 9;
1763     if (cached_has_bits & 0x00000100u) {
1764       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_qualified_id_join_index_latency_ms());
1765     }
1766 
1767     // optional int32 lite_index_sort_latency_ms = 10;
1768     if (cached_has_bits & 0x00000200u) {
1769       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_lite_index_sort_latency_ms());
1770     }
1771 
1772     // optional int32 metadata_term_index_latency_ms = 11;
1773     if (cached_has_bits & 0x00000400u) {
1774       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_metadata_term_index_latency_ms());
1775     }
1776 
1777     // optional int32 embedding_index_latency_ms = 12;
1778     if (cached_has_bits & 0x00000800u) {
1779       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_embedding_index_latency_ms());
1780     }
1781 
1782   }
1783   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1784     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1785   }
1786   int cached_size = ::_pbi::ToCachedSize(total_size);
1787   SetCachedSize(cached_size);
1788   return total_size;
1789 }
1790 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1791 void PutDocumentStatsProto::CheckTypeAndMergeFrom(
1792     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1793   MergeFrom(*::_pbi::DownCast<const PutDocumentStatsProto*>(
1794       &from));
1795 }
1796 
MergeFrom(const PutDocumentStatsProto & from)1797 void PutDocumentStatsProto::MergeFrom(const PutDocumentStatsProto& from) {
1798   PutDocumentStatsProto* const _this = this;
1799   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.PutDocumentStatsProto)
1800   GOOGLE_DCHECK_NE(&from, _this);
1801   ::uint32_t cached_has_bits = 0;
1802   (void) cached_has_bits;
1803 
1804   cached_has_bits = from._impl_._has_bits_[0];
1805   if (cached_has_bits & 0x000000ffu) {
1806     if (cached_has_bits & 0x00000001u) {
1807       _this->_internal_mutable_tokenization_stats()->::icing::lib::PutDocumentStatsProto_TokenizationStats::MergeFrom(
1808           from._internal_tokenization_stats());
1809     }
1810     if (cached_has_bits & 0x00000002u) {
1811       _this->_impl_.latency_ms_ = from._impl_.latency_ms_;
1812     }
1813     if (cached_has_bits & 0x00000004u) {
1814       _this->_impl_.document_store_latency_ms_ = from._impl_.document_store_latency_ms_;
1815     }
1816     if (cached_has_bits & 0x00000008u) {
1817       _this->_impl_.index_latency_ms_ = from._impl_.index_latency_ms_;
1818     }
1819     if (cached_has_bits & 0x00000010u) {
1820       _this->_impl_.index_merge_latency_ms_ = from._impl_.index_merge_latency_ms_;
1821     }
1822     if (cached_has_bits & 0x00000020u) {
1823       _this->_impl_.document_size_ = from._impl_.document_size_;
1824     }
1825     if (cached_has_bits & 0x00000040u) {
1826       _this->_impl_.term_index_latency_ms_ = from._impl_.term_index_latency_ms_;
1827     }
1828     if (cached_has_bits & 0x00000080u) {
1829       _this->_impl_.integer_index_latency_ms_ = from._impl_.integer_index_latency_ms_;
1830     }
1831     _this->_impl_._has_bits_[0] |= cached_has_bits;
1832   }
1833   if (cached_has_bits & 0x00000f00u) {
1834     if (cached_has_bits & 0x00000100u) {
1835       _this->_impl_.qualified_id_join_index_latency_ms_ = from._impl_.qualified_id_join_index_latency_ms_;
1836     }
1837     if (cached_has_bits & 0x00000200u) {
1838       _this->_impl_.lite_index_sort_latency_ms_ = from._impl_.lite_index_sort_latency_ms_;
1839     }
1840     if (cached_has_bits & 0x00000400u) {
1841       _this->_impl_.metadata_term_index_latency_ms_ = from._impl_.metadata_term_index_latency_ms_;
1842     }
1843     if (cached_has_bits & 0x00000800u) {
1844       _this->_impl_.embedding_index_latency_ms_ = from._impl_.embedding_index_latency_ms_;
1845     }
1846     _this->_impl_._has_bits_[0] |= cached_has_bits;
1847   }
1848   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1849 }
1850 
CopyFrom(const PutDocumentStatsProto & from)1851 void PutDocumentStatsProto::CopyFrom(const PutDocumentStatsProto& from) {
1852 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.PutDocumentStatsProto)
1853   if (&from == this) return;
1854   Clear();
1855   MergeFrom(from);
1856 }
1857 
IsInitialized() const1858 bool PutDocumentStatsProto::IsInitialized() const {
1859   return true;
1860 }
1861 
InternalSwap(PutDocumentStatsProto * other)1862 void PutDocumentStatsProto::InternalSwap(PutDocumentStatsProto* other) {
1863   using std::swap;
1864   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1865   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1866   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1867       PROTOBUF_FIELD_OFFSET(PutDocumentStatsProto, _impl_.embedding_index_latency_ms_)
1868       + sizeof(PutDocumentStatsProto::_impl_.embedding_index_latency_ms_)  // NOLINT
1869       - PROTOBUF_FIELD_OFFSET(PutDocumentStatsProto, _impl_.tokenization_stats_)>(
1870           reinterpret_cast<char*>(&_impl_.tokenization_stats_),
1871           reinterpret_cast<char*>(&other->_impl_.tokenization_stats_));
1872 }
1873 
GetTypeName() const1874 std::string PutDocumentStatsProto::GetTypeName() const {
1875   return "icing.lib.PutDocumentStatsProto";
1876 }
1877 
1878 
1879 // ===================================================================
1880 
1881 class QueryStatsProto_SearchStats::_Internal {
1882  public:
1883   using HasBits = decltype(std::declval<QueryStatsProto_SearchStats>()._impl_._has_bits_);
set_has_query_length(HasBits * has_bits)1884   static void set_has_query_length(HasBits* has_bits) {
1885     (*has_bits)[0] |= 1u;
1886   }
set_has_num_terms(HasBits * has_bits)1887   static void set_has_num_terms(HasBits* has_bits) {
1888     (*has_bits)[0] |= 2u;
1889   }
set_has_num_namespaces_filtered(HasBits * has_bits)1890   static void set_has_num_namespaces_filtered(HasBits* has_bits) {
1891     (*has_bits)[0] |= 4u;
1892   }
set_has_num_schema_types_filtered(HasBits * has_bits)1893   static void set_has_num_schema_types_filtered(HasBits* has_bits) {
1894     (*has_bits)[0] |= 8u;
1895   }
set_has_ranking_strategy(HasBits * has_bits)1896   static void set_has_ranking_strategy(HasBits* has_bits) {
1897     (*has_bits)[0] |= 16u;
1898   }
set_has_num_documents_scored(HasBits * has_bits)1899   static void set_has_num_documents_scored(HasBits* has_bits) {
1900     (*has_bits)[0] |= 32u;
1901   }
set_has_parse_query_latency_ms(HasBits * has_bits)1902   static void set_has_parse_query_latency_ms(HasBits* has_bits) {
1903     (*has_bits)[0] |= 64u;
1904   }
set_has_scoring_latency_ms(HasBits * has_bits)1905   static void set_has_scoring_latency_ms(HasBits* has_bits) {
1906     (*has_bits)[0] |= 128u;
1907   }
set_has_is_numeric_query(HasBits * has_bits)1908   static void set_has_is_numeric_query(HasBits* has_bits) {
1909     (*has_bits)[0] |= 256u;
1910   }
set_has_num_fetched_hits_lite_index(HasBits * has_bits)1911   static void set_has_num_fetched_hits_lite_index(HasBits* has_bits) {
1912     (*has_bits)[0] |= 512u;
1913   }
set_has_num_fetched_hits_main_index(HasBits * has_bits)1914   static void set_has_num_fetched_hits_main_index(HasBits* has_bits) {
1915     (*has_bits)[0] |= 1024u;
1916   }
set_has_num_fetched_hits_integer_index(HasBits * has_bits)1917   static void set_has_num_fetched_hits_integer_index(HasBits* has_bits) {
1918     (*has_bits)[0] |= 2048u;
1919   }
set_has_query_processor_lexer_extract_token_latency_ms(HasBits * has_bits)1920   static void set_has_query_processor_lexer_extract_token_latency_ms(HasBits* has_bits) {
1921     (*has_bits)[0] |= 4096u;
1922   }
set_has_query_processor_parser_consume_query_latency_ms(HasBits * has_bits)1923   static void set_has_query_processor_parser_consume_query_latency_ms(HasBits* has_bits) {
1924     (*has_bits)[0] |= 8192u;
1925   }
set_has_query_processor_query_visitor_latency_ms(HasBits * has_bits)1926   static void set_has_query_processor_query_visitor_latency_ms(HasBits* has_bits) {
1927     (*has_bits)[0] |= 16384u;
1928   }
1929 };
1930 
QueryStatsProto_SearchStats(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1931 QueryStatsProto_SearchStats::QueryStatsProto_SearchStats(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1932                          bool is_message_owned)
1933   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1934   SharedCtor(arena, is_message_owned);
1935   // @@protoc_insertion_point(arena_constructor:icing.lib.QueryStatsProto.SearchStats)
1936 }
QueryStatsProto_SearchStats(const QueryStatsProto_SearchStats & from)1937 QueryStatsProto_SearchStats::QueryStatsProto_SearchStats(const QueryStatsProto_SearchStats& from)
1938   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1939   QueryStatsProto_SearchStats* const _this = this; (void)_this;
1940   new (&_impl_) Impl_{
1941       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1942     , /*decltype(_impl_._cached_size_)*/{}
1943     , decltype(_impl_.query_length_){}
1944     , decltype(_impl_.num_terms_){}
1945     , decltype(_impl_.num_namespaces_filtered_){}
1946     , decltype(_impl_.num_schema_types_filtered_){}
1947     , decltype(_impl_.ranking_strategy_){}
1948     , decltype(_impl_.num_documents_scored_){}
1949     , decltype(_impl_.parse_query_latency_ms_){}
1950     , decltype(_impl_.scoring_latency_ms_){}
1951     , decltype(_impl_.is_numeric_query_){}
1952     , decltype(_impl_.num_fetched_hits_lite_index_){}
1953     , decltype(_impl_.num_fetched_hits_main_index_){}
1954     , decltype(_impl_.num_fetched_hits_integer_index_){}
1955     , decltype(_impl_.query_processor_lexer_extract_token_latency_ms_){}
1956     , decltype(_impl_.query_processor_parser_consume_query_latency_ms_){}
1957     , decltype(_impl_.query_processor_query_visitor_latency_ms_){}};
1958 
1959   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1960   ::memcpy(&_impl_.query_length_, &from._impl_.query_length_,
1961     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.query_processor_query_visitor_latency_ms_) -
1962     reinterpret_cast<char*>(&_impl_.query_length_)) + sizeof(_impl_.query_processor_query_visitor_latency_ms_));
1963   // @@protoc_insertion_point(copy_constructor:icing.lib.QueryStatsProto.SearchStats)
1964 }
1965 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1966 inline void QueryStatsProto_SearchStats::SharedCtor(
1967     ::_pb::Arena* arena, bool is_message_owned) {
1968   (void)arena;
1969   (void)is_message_owned;
1970   new (&_impl_) Impl_{
1971       decltype(_impl_._has_bits_){}
1972     , /*decltype(_impl_._cached_size_)*/{}
1973     , decltype(_impl_.query_length_){0}
1974     , decltype(_impl_.num_terms_){0}
1975     , decltype(_impl_.num_namespaces_filtered_){0}
1976     , decltype(_impl_.num_schema_types_filtered_){0}
1977     , decltype(_impl_.ranking_strategy_){0}
1978     , decltype(_impl_.num_documents_scored_){0}
1979     , decltype(_impl_.parse_query_latency_ms_){0}
1980     , decltype(_impl_.scoring_latency_ms_){0}
1981     , decltype(_impl_.is_numeric_query_){false}
1982     , decltype(_impl_.num_fetched_hits_lite_index_){0}
1983     , decltype(_impl_.num_fetched_hits_main_index_){0}
1984     , decltype(_impl_.num_fetched_hits_integer_index_){0}
1985     , decltype(_impl_.query_processor_lexer_extract_token_latency_ms_){0}
1986     , decltype(_impl_.query_processor_parser_consume_query_latency_ms_){0}
1987     , decltype(_impl_.query_processor_query_visitor_latency_ms_){0}
1988   };
1989 }
1990 
~QueryStatsProto_SearchStats()1991 QueryStatsProto_SearchStats::~QueryStatsProto_SearchStats() {
1992   // @@protoc_insertion_point(destructor:icing.lib.QueryStatsProto.SearchStats)
1993   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1994   (void)arena;
1995     return;
1996   }
1997   SharedDtor();
1998 }
1999 
SharedDtor()2000 inline void QueryStatsProto_SearchStats::SharedDtor() {
2001   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2002 }
2003 
SetCachedSize(int size) const2004 void QueryStatsProto_SearchStats::SetCachedSize(int size) const {
2005   _impl_._cached_size_.Set(size);
2006 }
2007 
Clear()2008 void QueryStatsProto_SearchStats::Clear() {
2009 // @@protoc_insertion_point(message_clear_start:icing.lib.QueryStatsProto.SearchStats)
2010   ::uint32_t cached_has_bits = 0;
2011   // Prevent compiler warnings about cached_has_bits being unused
2012   (void) cached_has_bits;
2013 
2014   cached_has_bits = _impl_._has_bits_[0];
2015   if (cached_has_bits & 0x000000ffu) {
2016     ::memset(&_impl_.query_length_, 0, static_cast<size_t>(
2017         reinterpret_cast<char*>(&_impl_.scoring_latency_ms_) -
2018         reinterpret_cast<char*>(&_impl_.query_length_)) + sizeof(_impl_.scoring_latency_ms_));
2019   }
2020   if (cached_has_bits & 0x00007f00u) {
2021     ::memset(&_impl_.is_numeric_query_, 0, static_cast<size_t>(
2022         reinterpret_cast<char*>(&_impl_.query_processor_query_visitor_latency_ms_) -
2023         reinterpret_cast<char*>(&_impl_.is_numeric_query_)) + sizeof(_impl_.query_processor_query_visitor_latency_ms_));
2024   }
2025   _impl_._has_bits_.Clear();
2026   _internal_metadata_.Clear<std::string>();
2027 }
2028 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2029 const char* QueryStatsProto_SearchStats::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2030 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2031   _Internal::HasBits has_bits{};
2032   while (!ctx->Done(&ptr)) {
2033     ::uint32_t tag;
2034     ptr = ::_pbi::ReadTag(ptr, &tag);
2035     switch (tag >> 3) {
2036       // optional int32 query_length = 1;
2037       case 1:
2038         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2039           _Internal::set_has_query_length(&has_bits);
2040           _impl_.query_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2041           CHK_(ptr);
2042         } else {
2043           goto handle_unusual;
2044         }
2045         continue;
2046       // optional int32 num_terms = 2;
2047       case 2:
2048         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2049           _Internal::set_has_num_terms(&has_bits);
2050           _impl_.num_terms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2051           CHK_(ptr);
2052         } else {
2053           goto handle_unusual;
2054         }
2055         continue;
2056       // optional int32 num_namespaces_filtered = 3;
2057       case 3:
2058         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2059           _Internal::set_has_num_namespaces_filtered(&has_bits);
2060           _impl_.num_namespaces_filtered_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2061           CHK_(ptr);
2062         } else {
2063           goto handle_unusual;
2064         }
2065         continue;
2066       // optional int32 num_schema_types_filtered = 4;
2067       case 4:
2068         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
2069           _Internal::set_has_num_schema_types_filtered(&has_bits);
2070           _impl_.num_schema_types_filtered_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2071           CHK_(ptr);
2072         } else {
2073           goto handle_unusual;
2074         }
2075         continue;
2076       // optional .icing.lib.ScoringSpecProto.RankingStrategy.Code ranking_strategy = 5;
2077       case 5:
2078         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
2079           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2080           CHK_(ptr);
2081           if (PROTOBUF_PREDICT_TRUE(::icing::lib::ScoringSpecProto_RankingStrategy_Code_IsValid(val))) {
2082             _internal_set_ranking_strategy(static_cast<::icing::lib::ScoringSpecProto_RankingStrategy_Code>(val));
2083           } else {
2084             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields());
2085           }
2086         } else {
2087           goto handle_unusual;
2088         }
2089         continue;
2090       // optional int32 num_documents_scored = 6;
2091       case 6:
2092         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
2093           _Internal::set_has_num_documents_scored(&has_bits);
2094           _impl_.num_documents_scored_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2095           CHK_(ptr);
2096         } else {
2097           goto handle_unusual;
2098         }
2099         continue;
2100       // optional int32 parse_query_latency_ms = 7;
2101       case 7:
2102         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
2103           _Internal::set_has_parse_query_latency_ms(&has_bits);
2104           _impl_.parse_query_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2105           CHK_(ptr);
2106         } else {
2107           goto handle_unusual;
2108         }
2109         continue;
2110       // optional int32 scoring_latency_ms = 8;
2111       case 8:
2112         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
2113           _Internal::set_has_scoring_latency_ms(&has_bits);
2114           _impl_.scoring_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2115           CHK_(ptr);
2116         } else {
2117           goto handle_unusual;
2118         }
2119         continue;
2120       // optional bool is_numeric_query = 9;
2121       case 9:
2122         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
2123           _Internal::set_has_is_numeric_query(&has_bits);
2124           _impl_.is_numeric_query_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2125           CHK_(ptr);
2126         } else {
2127           goto handle_unusual;
2128         }
2129         continue;
2130       // optional int32 num_fetched_hits_lite_index = 10;
2131       case 10:
2132         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
2133           _Internal::set_has_num_fetched_hits_lite_index(&has_bits);
2134           _impl_.num_fetched_hits_lite_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2135           CHK_(ptr);
2136         } else {
2137           goto handle_unusual;
2138         }
2139         continue;
2140       // optional int32 num_fetched_hits_main_index = 11;
2141       case 11:
2142         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
2143           _Internal::set_has_num_fetched_hits_main_index(&has_bits);
2144           _impl_.num_fetched_hits_main_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2145           CHK_(ptr);
2146         } else {
2147           goto handle_unusual;
2148         }
2149         continue;
2150       // optional int32 num_fetched_hits_integer_index = 12;
2151       case 12:
2152         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
2153           _Internal::set_has_num_fetched_hits_integer_index(&has_bits);
2154           _impl_.num_fetched_hits_integer_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2155           CHK_(ptr);
2156         } else {
2157           goto handle_unusual;
2158         }
2159         continue;
2160       // optional int32 query_processor_lexer_extract_token_latency_ms = 13;
2161       case 13:
2162         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
2163           _Internal::set_has_query_processor_lexer_extract_token_latency_ms(&has_bits);
2164           _impl_.query_processor_lexer_extract_token_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2165           CHK_(ptr);
2166         } else {
2167           goto handle_unusual;
2168         }
2169         continue;
2170       // optional int32 query_processor_parser_consume_query_latency_ms = 14;
2171       case 14:
2172         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 112)) {
2173           _Internal::set_has_query_processor_parser_consume_query_latency_ms(&has_bits);
2174           _impl_.query_processor_parser_consume_query_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2175           CHK_(ptr);
2176         } else {
2177           goto handle_unusual;
2178         }
2179         continue;
2180       // optional int32 query_processor_query_visitor_latency_ms = 15;
2181       case 15:
2182         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 120)) {
2183           _Internal::set_has_query_processor_query_visitor_latency_ms(&has_bits);
2184           _impl_.query_processor_query_visitor_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2185           CHK_(ptr);
2186         } else {
2187           goto handle_unusual;
2188         }
2189         continue;
2190       default:
2191         goto handle_unusual;
2192     }  // switch
2193   handle_unusual:
2194     if ((tag == 0) || ((tag & 7) == 4)) {
2195       CHK_(ptr);
2196       ctx->SetLastTag(tag);
2197       goto message_done;
2198     }
2199     ptr = UnknownFieldParse(
2200         tag,
2201         _internal_metadata_.mutable_unknown_fields<std::string>(),
2202         ptr, ctx);
2203     CHK_(ptr != nullptr);
2204   }  // while
2205 message_done:
2206   _impl_._has_bits_.Or(has_bits);
2207   return ptr;
2208 failure:
2209   ptr = nullptr;
2210   goto message_done;
2211 #undef CHK_
2212 }
2213 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2214 ::uint8_t* QueryStatsProto_SearchStats::_InternalSerialize(
2215     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2216   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.QueryStatsProto.SearchStats)
2217   ::uint32_t cached_has_bits = 0;
2218   (void) cached_has_bits;
2219 
2220   cached_has_bits = _impl_._has_bits_[0];
2221   // optional int32 query_length = 1;
2222   if (cached_has_bits & 0x00000001u) {
2223     target = stream->EnsureSpace(target);
2224     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_query_length(), target);
2225   }
2226 
2227   // optional int32 num_terms = 2;
2228   if (cached_has_bits & 0x00000002u) {
2229     target = stream->EnsureSpace(target);
2230     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_terms(), target);
2231   }
2232 
2233   // optional int32 num_namespaces_filtered = 3;
2234   if (cached_has_bits & 0x00000004u) {
2235     target = stream->EnsureSpace(target);
2236     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_namespaces_filtered(), target);
2237   }
2238 
2239   // optional int32 num_schema_types_filtered = 4;
2240   if (cached_has_bits & 0x00000008u) {
2241     target = stream->EnsureSpace(target);
2242     target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_num_schema_types_filtered(), target);
2243   }
2244 
2245   // optional .icing.lib.ScoringSpecProto.RankingStrategy.Code ranking_strategy = 5;
2246   if (cached_has_bits & 0x00000010u) {
2247     target = stream->EnsureSpace(target);
2248     target = ::_pbi::WireFormatLite::WriteEnumToArray(
2249       5, this->_internal_ranking_strategy(), target);
2250   }
2251 
2252   // optional int32 num_documents_scored = 6;
2253   if (cached_has_bits & 0x00000020u) {
2254     target = stream->EnsureSpace(target);
2255     target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_num_documents_scored(), target);
2256   }
2257 
2258   // optional int32 parse_query_latency_ms = 7;
2259   if (cached_has_bits & 0x00000040u) {
2260     target = stream->EnsureSpace(target);
2261     target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_parse_query_latency_ms(), target);
2262   }
2263 
2264   // optional int32 scoring_latency_ms = 8;
2265   if (cached_has_bits & 0x00000080u) {
2266     target = stream->EnsureSpace(target);
2267     target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_scoring_latency_ms(), target);
2268   }
2269 
2270   // optional bool is_numeric_query = 9;
2271   if (cached_has_bits & 0x00000100u) {
2272     target = stream->EnsureSpace(target);
2273     target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_is_numeric_query(), target);
2274   }
2275 
2276   // optional int32 num_fetched_hits_lite_index = 10;
2277   if (cached_has_bits & 0x00000200u) {
2278     target = stream->EnsureSpace(target);
2279     target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_num_fetched_hits_lite_index(), target);
2280   }
2281 
2282   // optional int32 num_fetched_hits_main_index = 11;
2283   if (cached_has_bits & 0x00000400u) {
2284     target = stream->EnsureSpace(target);
2285     target = ::_pbi::WireFormatLite::WriteInt32ToArray(11, this->_internal_num_fetched_hits_main_index(), target);
2286   }
2287 
2288   // optional int32 num_fetched_hits_integer_index = 12;
2289   if (cached_has_bits & 0x00000800u) {
2290     target = stream->EnsureSpace(target);
2291     target = ::_pbi::WireFormatLite::WriteInt32ToArray(12, this->_internal_num_fetched_hits_integer_index(), target);
2292   }
2293 
2294   // optional int32 query_processor_lexer_extract_token_latency_ms = 13;
2295   if (cached_has_bits & 0x00001000u) {
2296     target = stream->EnsureSpace(target);
2297     target = ::_pbi::WireFormatLite::WriteInt32ToArray(13, this->_internal_query_processor_lexer_extract_token_latency_ms(), target);
2298   }
2299 
2300   // optional int32 query_processor_parser_consume_query_latency_ms = 14;
2301   if (cached_has_bits & 0x00002000u) {
2302     target = stream->EnsureSpace(target);
2303     target = ::_pbi::WireFormatLite::WriteInt32ToArray(14, this->_internal_query_processor_parser_consume_query_latency_ms(), target);
2304   }
2305 
2306   // optional int32 query_processor_query_visitor_latency_ms = 15;
2307   if (cached_has_bits & 0x00004000u) {
2308     target = stream->EnsureSpace(target);
2309     target = ::_pbi::WireFormatLite::WriteInt32ToArray(15, this->_internal_query_processor_query_visitor_latency_ms(), target);
2310   }
2311 
2312   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2313     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2314         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2315   }
2316   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.QueryStatsProto.SearchStats)
2317   return target;
2318 }
2319 
ByteSizeLong() const2320 size_t QueryStatsProto_SearchStats::ByteSizeLong() const {
2321 // @@protoc_insertion_point(message_byte_size_start:icing.lib.QueryStatsProto.SearchStats)
2322   size_t total_size = 0;
2323 
2324   ::uint32_t cached_has_bits = 0;
2325   // Prevent compiler warnings about cached_has_bits being unused
2326   (void) cached_has_bits;
2327 
2328   cached_has_bits = _impl_._has_bits_[0];
2329   if (cached_has_bits & 0x000000ffu) {
2330     // optional int32 query_length = 1;
2331     if (cached_has_bits & 0x00000001u) {
2332       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_query_length());
2333     }
2334 
2335     // optional int32 num_terms = 2;
2336     if (cached_has_bits & 0x00000002u) {
2337       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_terms());
2338     }
2339 
2340     // optional int32 num_namespaces_filtered = 3;
2341     if (cached_has_bits & 0x00000004u) {
2342       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_namespaces_filtered());
2343     }
2344 
2345     // optional int32 num_schema_types_filtered = 4;
2346     if (cached_has_bits & 0x00000008u) {
2347       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_schema_types_filtered());
2348     }
2349 
2350     // optional .icing.lib.ScoringSpecProto.RankingStrategy.Code ranking_strategy = 5;
2351     if (cached_has_bits & 0x00000010u) {
2352       total_size += 1 +
2353         ::_pbi::WireFormatLite::EnumSize(this->_internal_ranking_strategy());
2354     }
2355 
2356     // optional int32 num_documents_scored = 6;
2357     if (cached_has_bits & 0x00000020u) {
2358       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_documents_scored());
2359     }
2360 
2361     // optional int32 parse_query_latency_ms = 7;
2362     if (cached_has_bits & 0x00000040u) {
2363       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_parse_query_latency_ms());
2364     }
2365 
2366     // optional int32 scoring_latency_ms = 8;
2367     if (cached_has_bits & 0x00000080u) {
2368       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_scoring_latency_ms());
2369     }
2370 
2371   }
2372   if (cached_has_bits & 0x00007f00u) {
2373     // optional bool is_numeric_query = 9;
2374     if (cached_has_bits & 0x00000100u) {
2375       total_size += 1 + 1;
2376     }
2377 
2378     // optional int32 num_fetched_hits_lite_index = 10;
2379     if (cached_has_bits & 0x00000200u) {
2380       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_fetched_hits_lite_index());
2381     }
2382 
2383     // optional int32 num_fetched_hits_main_index = 11;
2384     if (cached_has_bits & 0x00000400u) {
2385       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_fetched_hits_main_index());
2386     }
2387 
2388     // optional int32 num_fetched_hits_integer_index = 12;
2389     if (cached_has_bits & 0x00000800u) {
2390       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_fetched_hits_integer_index());
2391     }
2392 
2393     // optional int32 query_processor_lexer_extract_token_latency_ms = 13;
2394     if (cached_has_bits & 0x00001000u) {
2395       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_query_processor_lexer_extract_token_latency_ms());
2396     }
2397 
2398     // optional int32 query_processor_parser_consume_query_latency_ms = 14;
2399     if (cached_has_bits & 0x00002000u) {
2400       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_query_processor_parser_consume_query_latency_ms());
2401     }
2402 
2403     // optional int32 query_processor_query_visitor_latency_ms = 15;
2404     if (cached_has_bits & 0x00004000u) {
2405       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_query_processor_query_visitor_latency_ms());
2406     }
2407 
2408   }
2409   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2410     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2411   }
2412   int cached_size = ::_pbi::ToCachedSize(total_size);
2413   SetCachedSize(cached_size);
2414   return total_size;
2415 }
2416 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2417 void QueryStatsProto_SearchStats::CheckTypeAndMergeFrom(
2418     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2419   MergeFrom(*::_pbi::DownCast<const QueryStatsProto_SearchStats*>(
2420       &from));
2421 }
2422 
MergeFrom(const QueryStatsProto_SearchStats & from)2423 void QueryStatsProto_SearchStats::MergeFrom(const QueryStatsProto_SearchStats& from) {
2424   QueryStatsProto_SearchStats* const _this = this;
2425   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.QueryStatsProto.SearchStats)
2426   GOOGLE_DCHECK_NE(&from, _this);
2427   ::uint32_t cached_has_bits = 0;
2428   (void) cached_has_bits;
2429 
2430   cached_has_bits = from._impl_._has_bits_[0];
2431   if (cached_has_bits & 0x000000ffu) {
2432     if (cached_has_bits & 0x00000001u) {
2433       _this->_impl_.query_length_ = from._impl_.query_length_;
2434     }
2435     if (cached_has_bits & 0x00000002u) {
2436       _this->_impl_.num_terms_ = from._impl_.num_terms_;
2437     }
2438     if (cached_has_bits & 0x00000004u) {
2439       _this->_impl_.num_namespaces_filtered_ = from._impl_.num_namespaces_filtered_;
2440     }
2441     if (cached_has_bits & 0x00000008u) {
2442       _this->_impl_.num_schema_types_filtered_ = from._impl_.num_schema_types_filtered_;
2443     }
2444     if (cached_has_bits & 0x00000010u) {
2445       _this->_impl_.ranking_strategy_ = from._impl_.ranking_strategy_;
2446     }
2447     if (cached_has_bits & 0x00000020u) {
2448       _this->_impl_.num_documents_scored_ = from._impl_.num_documents_scored_;
2449     }
2450     if (cached_has_bits & 0x00000040u) {
2451       _this->_impl_.parse_query_latency_ms_ = from._impl_.parse_query_latency_ms_;
2452     }
2453     if (cached_has_bits & 0x00000080u) {
2454       _this->_impl_.scoring_latency_ms_ = from._impl_.scoring_latency_ms_;
2455     }
2456     _this->_impl_._has_bits_[0] |= cached_has_bits;
2457   }
2458   if (cached_has_bits & 0x00007f00u) {
2459     if (cached_has_bits & 0x00000100u) {
2460       _this->_impl_.is_numeric_query_ = from._impl_.is_numeric_query_;
2461     }
2462     if (cached_has_bits & 0x00000200u) {
2463       _this->_impl_.num_fetched_hits_lite_index_ = from._impl_.num_fetched_hits_lite_index_;
2464     }
2465     if (cached_has_bits & 0x00000400u) {
2466       _this->_impl_.num_fetched_hits_main_index_ = from._impl_.num_fetched_hits_main_index_;
2467     }
2468     if (cached_has_bits & 0x00000800u) {
2469       _this->_impl_.num_fetched_hits_integer_index_ = from._impl_.num_fetched_hits_integer_index_;
2470     }
2471     if (cached_has_bits & 0x00001000u) {
2472       _this->_impl_.query_processor_lexer_extract_token_latency_ms_ = from._impl_.query_processor_lexer_extract_token_latency_ms_;
2473     }
2474     if (cached_has_bits & 0x00002000u) {
2475       _this->_impl_.query_processor_parser_consume_query_latency_ms_ = from._impl_.query_processor_parser_consume_query_latency_ms_;
2476     }
2477     if (cached_has_bits & 0x00004000u) {
2478       _this->_impl_.query_processor_query_visitor_latency_ms_ = from._impl_.query_processor_query_visitor_latency_ms_;
2479     }
2480     _this->_impl_._has_bits_[0] |= cached_has_bits;
2481   }
2482   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2483 }
2484 
CopyFrom(const QueryStatsProto_SearchStats & from)2485 void QueryStatsProto_SearchStats::CopyFrom(const QueryStatsProto_SearchStats& from) {
2486 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.QueryStatsProto.SearchStats)
2487   if (&from == this) return;
2488   Clear();
2489   MergeFrom(from);
2490 }
2491 
IsInitialized() const2492 bool QueryStatsProto_SearchStats::IsInitialized() const {
2493   return true;
2494 }
2495 
InternalSwap(QueryStatsProto_SearchStats * other)2496 void QueryStatsProto_SearchStats::InternalSwap(QueryStatsProto_SearchStats* other) {
2497   using std::swap;
2498   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2499   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2500   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2501       PROTOBUF_FIELD_OFFSET(QueryStatsProto_SearchStats, _impl_.query_processor_query_visitor_latency_ms_)
2502       + sizeof(QueryStatsProto_SearchStats::_impl_.query_processor_query_visitor_latency_ms_)  // NOLINT
2503       - PROTOBUF_FIELD_OFFSET(QueryStatsProto_SearchStats, _impl_.query_length_)>(
2504           reinterpret_cast<char*>(&_impl_.query_length_),
2505           reinterpret_cast<char*>(&other->_impl_.query_length_));
2506 }
2507 
GetTypeName() const2508 std::string QueryStatsProto_SearchStats::GetTypeName() const {
2509   return "icing.lib.QueryStatsProto.SearchStats";
2510 }
2511 
2512 
2513 // ===================================================================
2514 
2515 class QueryStatsProto::_Internal {
2516  public:
2517   using HasBits = decltype(std::declval<QueryStatsProto>()._impl_._has_bits_);
set_has_query_length(HasBits * has_bits)2518   static void set_has_query_length(HasBits* has_bits) {
2519     (*has_bits)[0] |= 131072u;
2520   }
set_has_num_terms(HasBits * has_bits)2521   static void set_has_num_terms(HasBits* has_bits) {
2522     (*has_bits)[0] |= 4u;
2523   }
set_has_num_namespaces_filtered(HasBits * has_bits)2524   static void set_has_num_namespaces_filtered(HasBits* has_bits) {
2525     (*has_bits)[0] |= 8u;
2526   }
set_has_num_schema_types_filtered(HasBits * has_bits)2527   static void set_has_num_schema_types_filtered(HasBits* has_bits) {
2528     (*has_bits)[0] |= 16u;
2529   }
set_has_ranking_strategy(HasBits * has_bits)2530   static void set_has_ranking_strategy(HasBits* has_bits) {
2531     (*has_bits)[0] |= 32u;
2532   }
set_has_is_first_page(HasBits * has_bits)2533   static void set_has_is_first_page(HasBits* has_bits) {
2534     (*has_bits)[0] |= 16384u;
2535   }
set_has_requested_page_size(HasBits * has_bits)2536   static void set_has_requested_page_size(HasBits* has_bits) {
2537     (*has_bits)[0] |= 64u;
2538   }
set_has_num_results_returned_current_page(HasBits * has_bits)2539   static void set_has_num_results_returned_current_page(HasBits* has_bits) {
2540     (*has_bits)[0] |= 128u;
2541   }
set_has_num_documents_scored(HasBits * has_bits)2542   static void set_has_num_documents_scored(HasBits* has_bits) {
2543     (*has_bits)[0] |= 256u;
2544   }
set_has_num_results_with_snippets(HasBits * has_bits)2545   static void set_has_num_results_with_snippets(HasBits* has_bits) {
2546     (*has_bits)[0] |= 65536u;
2547   }
set_has_latency_ms(HasBits * has_bits)2548   static void set_has_latency_ms(HasBits* has_bits) {
2549     (*has_bits)[0] |= 512u;
2550   }
set_has_parse_query_latency_ms(HasBits * has_bits)2551   static void set_has_parse_query_latency_ms(HasBits* has_bits) {
2552     (*has_bits)[0] |= 1024u;
2553   }
set_has_scoring_latency_ms(HasBits * has_bits)2554   static void set_has_scoring_latency_ms(HasBits* has_bits) {
2555     (*has_bits)[0] |= 2048u;
2556   }
set_has_ranking_latency_ms(HasBits * has_bits)2557   static void set_has_ranking_latency_ms(HasBits* has_bits) {
2558     (*has_bits)[0] |= 4096u;
2559   }
set_has_document_retrieval_latency_ms(HasBits * has_bits)2560   static void set_has_document_retrieval_latency_ms(HasBits* has_bits) {
2561     (*has_bits)[0] |= 8192u;
2562   }
set_has_lock_acquisition_latency_ms(HasBits * has_bits)2563   static void set_has_lock_acquisition_latency_ms(HasBits* has_bits) {
2564     (*has_bits)[0] |= 262144u;
2565   }
set_has_native_to_java_start_timestamp_ms(HasBits * has_bits)2566   static void set_has_native_to_java_start_timestamp_ms(HasBits* has_bits) {
2567     (*has_bits)[0] |= 524288u;
2568   }
set_has_java_to_native_jni_latency_ms(HasBits * has_bits)2569   static void set_has_java_to_native_jni_latency_ms(HasBits* has_bits) {
2570     (*has_bits)[0] |= 1048576u;
2571   }
set_has_native_to_java_jni_latency_ms(HasBits * has_bits)2572   static void set_has_native_to_java_jni_latency_ms(HasBits* has_bits) {
2573     (*has_bits)[0] |= 2097152u;
2574   }
set_has_join_latency_ms(HasBits * has_bits)2575   static void set_has_join_latency_ms(HasBits* has_bits) {
2576     (*has_bits)[0] |= 4194304u;
2577   }
set_has_num_joined_results_returned_current_page(HasBits * has_bits)2578   static void set_has_num_joined_results_returned_current_page(HasBits* has_bits) {
2579     (*has_bits)[0] |= 8388608u;
2580   }
set_has_is_join_query(HasBits * has_bits)2581   static void set_has_is_join_query(HasBits* has_bits) {
2582     (*has_bits)[0] |= 32768u;
2583   }
2584   static const ::icing::lib::QueryStatsProto_SearchStats& parent_search_stats(const QueryStatsProto* msg);
set_has_parent_search_stats(HasBits * has_bits)2585   static void set_has_parent_search_stats(HasBits* has_bits) {
2586     (*has_bits)[0] |= 1u;
2587   }
2588   static const ::icing::lib::QueryStatsProto_SearchStats& child_search_stats(const QueryStatsProto* msg);
set_has_child_search_stats(HasBits * has_bits)2589   static void set_has_child_search_stats(HasBits* has_bits) {
2590     (*has_bits)[0] |= 2u;
2591   }
set_has_lite_index_hit_buffer_byte_size(HasBits * has_bits)2592   static void set_has_lite_index_hit_buffer_byte_size(HasBits* has_bits) {
2593     (*has_bits)[0] |= 16777216u;
2594   }
set_has_lite_index_hit_buffer_unsorted_byte_size(HasBits * has_bits)2595   static void set_has_lite_index_hit_buffer_unsorted_byte_size(HasBits* has_bits) {
2596     (*has_bits)[0] |= 33554432u;
2597   }
2598 };
2599 
2600 const ::icing::lib::QueryStatsProto_SearchStats&
parent_search_stats(const QueryStatsProto * msg)2601 QueryStatsProto::_Internal::parent_search_stats(const QueryStatsProto* msg) {
2602   return *msg->_impl_.parent_search_stats_;
2603 }
2604 const ::icing::lib::QueryStatsProto_SearchStats&
child_search_stats(const QueryStatsProto * msg)2605 QueryStatsProto::_Internal::child_search_stats(const QueryStatsProto* msg) {
2606   return *msg->_impl_.child_search_stats_;
2607 }
QueryStatsProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2608 QueryStatsProto::QueryStatsProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2609                          bool is_message_owned)
2610   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2611   SharedCtor(arena, is_message_owned);
2612   // @@protoc_insertion_point(arena_constructor:icing.lib.QueryStatsProto)
2613 }
QueryStatsProto(const QueryStatsProto & from)2614 QueryStatsProto::QueryStatsProto(const QueryStatsProto& from)
2615   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2616   QueryStatsProto* const _this = this; (void)_this;
2617   new (&_impl_) Impl_{
2618       decltype(_impl_._has_bits_){from._impl_._has_bits_}
2619     , /*decltype(_impl_._cached_size_)*/{}
2620     , decltype(_impl_.parent_search_stats_){nullptr}
2621     , decltype(_impl_.child_search_stats_){nullptr}
2622     , decltype(_impl_.num_terms_){}
2623     , decltype(_impl_.num_namespaces_filtered_){}
2624     , decltype(_impl_.num_schema_types_filtered_){}
2625     , decltype(_impl_.ranking_strategy_){}
2626     , decltype(_impl_.requested_page_size_){}
2627     , decltype(_impl_.num_results_returned_current_page_){}
2628     , decltype(_impl_.num_documents_scored_){}
2629     , decltype(_impl_.latency_ms_){}
2630     , decltype(_impl_.parse_query_latency_ms_){}
2631     , decltype(_impl_.scoring_latency_ms_){}
2632     , decltype(_impl_.ranking_latency_ms_){}
2633     , decltype(_impl_.document_retrieval_latency_ms_){}
2634     , decltype(_impl_.is_first_page_){}
2635     , decltype(_impl_.is_join_query_){}
2636     , decltype(_impl_.num_results_with_snippets_){}
2637     , decltype(_impl_.query_length_){}
2638     , decltype(_impl_.lock_acquisition_latency_ms_){}
2639     , decltype(_impl_.native_to_java_start_timestamp_ms_){}
2640     , decltype(_impl_.java_to_native_jni_latency_ms_){}
2641     , decltype(_impl_.native_to_java_jni_latency_ms_){}
2642     , decltype(_impl_.join_latency_ms_){}
2643     , decltype(_impl_.num_joined_results_returned_current_page_){}
2644     , decltype(_impl_.lite_index_hit_buffer_byte_size_){}
2645     , decltype(_impl_.lite_index_hit_buffer_unsorted_byte_size_){}};
2646 
2647   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2648   if (from._internal_has_parent_search_stats()) {
2649     _this->_impl_.parent_search_stats_ = new ::icing::lib::QueryStatsProto_SearchStats(*from._impl_.parent_search_stats_);
2650   }
2651   if (from._internal_has_child_search_stats()) {
2652     _this->_impl_.child_search_stats_ = new ::icing::lib::QueryStatsProto_SearchStats(*from._impl_.child_search_stats_);
2653   }
2654   ::memcpy(&_impl_.num_terms_, &from._impl_.num_terms_,
2655     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.lite_index_hit_buffer_unsorted_byte_size_) -
2656     reinterpret_cast<char*>(&_impl_.num_terms_)) + sizeof(_impl_.lite_index_hit_buffer_unsorted_byte_size_));
2657   // @@protoc_insertion_point(copy_constructor:icing.lib.QueryStatsProto)
2658 }
2659 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2660 inline void QueryStatsProto::SharedCtor(
2661     ::_pb::Arena* arena, bool is_message_owned) {
2662   (void)arena;
2663   (void)is_message_owned;
2664   new (&_impl_) Impl_{
2665       decltype(_impl_._has_bits_){}
2666     , /*decltype(_impl_._cached_size_)*/{}
2667     , decltype(_impl_.parent_search_stats_){nullptr}
2668     , decltype(_impl_.child_search_stats_){nullptr}
2669     , decltype(_impl_.num_terms_){0}
2670     , decltype(_impl_.num_namespaces_filtered_){0}
2671     , decltype(_impl_.num_schema_types_filtered_){0}
2672     , decltype(_impl_.ranking_strategy_){0}
2673     , decltype(_impl_.requested_page_size_){0}
2674     , decltype(_impl_.num_results_returned_current_page_){0}
2675     , decltype(_impl_.num_documents_scored_){0}
2676     , decltype(_impl_.latency_ms_){0}
2677     , decltype(_impl_.parse_query_latency_ms_){0}
2678     , decltype(_impl_.scoring_latency_ms_){0}
2679     , decltype(_impl_.ranking_latency_ms_){0}
2680     , decltype(_impl_.document_retrieval_latency_ms_){0}
2681     , decltype(_impl_.is_first_page_){false}
2682     , decltype(_impl_.is_join_query_){false}
2683     , decltype(_impl_.num_results_with_snippets_){0}
2684     , decltype(_impl_.query_length_){0}
2685     , decltype(_impl_.lock_acquisition_latency_ms_){0}
2686     , decltype(_impl_.native_to_java_start_timestamp_ms_){::int64_t{0}}
2687     , decltype(_impl_.java_to_native_jni_latency_ms_){0}
2688     , decltype(_impl_.native_to_java_jni_latency_ms_){0}
2689     , decltype(_impl_.join_latency_ms_){0}
2690     , decltype(_impl_.num_joined_results_returned_current_page_){0}
2691     , decltype(_impl_.lite_index_hit_buffer_byte_size_){::int64_t{0}}
2692     , decltype(_impl_.lite_index_hit_buffer_unsorted_byte_size_){::int64_t{0}}
2693   };
2694 }
2695 
~QueryStatsProto()2696 QueryStatsProto::~QueryStatsProto() {
2697   // @@protoc_insertion_point(destructor:icing.lib.QueryStatsProto)
2698   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2699   (void)arena;
2700     return;
2701   }
2702   SharedDtor();
2703 }
2704 
SharedDtor()2705 inline void QueryStatsProto::SharedDtor() {
2706   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2707   if (this != internal_default_instance()) delete _impl_.parent_search_stats_;
2708   if (this != internal_default_instance()) delete _impl_.child_search_stats_;
2709 }
2710 
SetCachedSize(int size) const2711 void QueryStatsProto::SetCachedSize(int size) const {
2712   _impl_._cached_size_.Set(size);
2713 }
2714 
Clear()2715 void QueryStatsProto::Clear() {
2716 // @@protoc_insertion_point(message_clear_start:icing.lib.QueryStatsProto)
2717   ::uint32_t cached_has_bits = 0;
2718   // Prevent compiler warnings about cached_has_bits being unused
2719   (void) cached_has_bits;
2720 
2721   cached_has_bits = _impl_._has_bits_[0];
2722   if (cached_has_bits & 0x00000003u) {
2723     if (cached_has_bits & 0x00000001u) {
2724       GOOGLE_DCHECK(_impl_.parent_search_stats_ != nullptr);
2725       _impl_.parent_search_stats_->Clear();
2726     }
2727     if (cached_has_bits & 0x00000002u) {
2728       GOOGLE_DCHECK(_impl_.child_search_stats_ != nullptr);
2729       _impl_.child_search_stats_->Clear();
2730     }
2731   }
2732   if (cached_has_bits & 0x000000fcu) {
2733     ::memset(&_impl_.num_terms_, 0, static_cast<size_t>(
2734         reinterpret_cast<char*>(&_impl_.num_results_returned_current_page_) -
2735         reinterpret_cast<char*>(&_impl_.num_terms_)) + sizeof(_impl_.num_results_returned_current_page_));
2736   }
2737   if (cached_has_bits & 0x0000ff00u) {
2738     ::memset(&_impl_.num_documents_scored_, 0, static_cast<size_t>(
2739         reinterpret_cast<char*>(&_impl_.is_join_query_) -
2740         reinterpret_cast<char*>(&_impl_.num_documents_scored_)) + sizeof(_impl_.is_join_query_));
2741   }
2742   if (cached_has_bits & 0x00ff0000u) {
2743     ::memset(&_impl_.num_results_with_snippets_, 0, static_cast<size_t>(
2744         reinterpret_cast<char*>(&_impl_.num_joined_results_returned_current_page_) -
2745         reinterpret_cast<char*>(&_impl_.num_results_with_snippets_)) + sizeof(_impl_.num_joined_results_returned_current_page_));
2746   }
2747   if (cached_has_bits & 0x03000000u) {
2748     ::memset(&_impl_.lite_index_hit_buffer_byte_size_, 0, static_cast<size_t>(
2749         reinterpret_cast<char*>(&_impl_.lite_index_hit_buffer_unsorted_byte_size_) -
2750         reinterpret_cast<char*>(&_impl_.lite_index_hit_buffer_byte_size_)) + sizeof(_impl_.lite_index_hit_buffer_unsorted_byte_size_));
2751   }
2752   _impl_._has_bits_.Clear();
2753   _internal_metadata_.Clear<std::string>();
2754 }
2755 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2756 const char* QueryStatsProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2757 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2758   _Internal::HasBits has_bits{};
2759   while (!ctx->Done(&ptr)) {
2760     ::uint32_t tag;
2761     ptr = ::_pbi::ReadTag(ptr, &tag);
2762     switch (tag >> 3) {
2763       // optional int32 num_terms = 1;
2764       case 1:
2765         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2766           _Internal::set_has_num_terms(&has_bits);
2767           _impl_.num_terms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2768           CHK_(ptr);
2769         } else {
2770           goto handle_unusual;
2771         }
2772         continue;
2773       // optional int32 num_namespaces_filtered = 2;
2774       case 2:
2775         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2776           _Internal::set_has_num_namespaces_filtered(&has_bits);
2777           _impl_.num_namespaces_filtered_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2778           CHK_(ptr);
2779         } else {
2780           goto handle_unusual;
2781         }
2782         continue;
2783       // optional int32 num_schema_types_filtered = 3;
2784       case 3:
2785         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2786           _Internal::set_has_num_schema_types_filtered(&has_bits);
2787           _impl_.num_schema_types_filtered_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2788           CHK_(ptr);
2789         } else {
2790           goto handle_unusual;
2791         }
2792         continue;
2793       // optional .icing.lib.ScoringSpecProto.RankingStrategy.Code ranking_strategy = 4;
2794       case 4:
2795         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
2796           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2797           CHK_(ptr);
2798           if (PROTOBUF_PREDICT_TRUE(::icing::lib::ScoringSpecProto_RankingStrategy_Code_IsValid(val))) {
2799             _internal_set_ranking_strategy(static_cast<::icing::lib::ScoringSpecProto_RankingStrategy_Code>(val));
2800           } else {
2801             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields());
2802           }
2803         } else {
2804           goto handle_unusual;
2805         }
2806         continue;
2807       // optional bool is_first_page = 5;
2808       case 5:
2809         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
2810           _Internal::set_has_is_first_page(&has_bits);
2811           _impl_.is_first_page_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2812           CHK_(ptr);
2813         } else {
2814           goto handle_unusual;
2815         }
2816         continue;
2817       // optional int32 requested_page_size = 6;
2818       case 6:
2819         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
2820           _Internal::set_has_requested_page_size(&has_bits);
2821           _impl_.requested_page_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2822           CHK_(ptr);
2823         } else {
2824           goto handle_unusual;
2825         }
2826         continue;
2827       // optional int32 num_results_returned_current_page = 7;
2828       case 7:
2829         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
2830           _Internal::set_has_num_results_returned_current_page(&has_bits);
2831           _impl_.num_results_returned_current_page_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2832           CHK_(ptr);
2833         } else {
2834           goto handle_unusual;
2835         }
2836         continue;
2837       // optional int32 num_documents_scored = 8;
2838       case 8:
2839         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
2840           _Internal::set_has_num_documents_scored(&has_bits);
2841           _impl_.num_documents_scored_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2842           CHK_(ptr);
2843         } else {
2844           goto handle_unusual;
2845         }
2846         continue;
2847       // optional int32 latency_ms = 10;
2848       case 10:
2849         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
2850           _Internal::set_has_latency_ms(&has_bits);
2851           _impl_.latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2852           CHK_(ptr);
2853         } else {
2854           goto handle_unusual;
2855         }
2856         continue;
2857       // optional int32 parse_query_latency_ms = 11;
2858       case 11:
2859         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
2860           _Internal::set_has_parse_query_latency_ms(&has_bits);
2861           _impl_.parse_query_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2862           CHK_(ptr);
2863         } else {
2864           goto handle_unusual;
2865         }
2866         continue;
2867       // optional int32 scoring_latency_ms = 12;
2868       case 12:
2869         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
2870           _Internal::set_has_scoring_latency_ms(&has_bits);
2871           _impl_.scoring_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2872           CHK_(ptr);
2873         } else {
2874           goto handle_unusual;
2875         }
2876         continue;
2877       // optional int32 ranking_latency_ms = 13;
2878       case 13:
2879         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 104)) {
2880           _Internal::set_has_ranking_latency_ms(&has_bits);
2881           _impl_.ranking_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2882           CHK_(ptr);
2883         } else {
2884           goto handle_unusual;
2885         }
2886         continue;
2887       // optional int32 document_retrieval_latency_ms = 14;
2888       case 14:
2889         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 112)) {
2890           _Internal::set_has_document_retrieval_latency_ms(&has_bits);
2891           _impl_.document_retrieval_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2892           CHK_(ptr);
2893         } else {
2894           goto handle_unusual;
2895         }
2896         continue;
2897       // optional int32 num_results_with_snippets = 15;
2898       case 15:
2899         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 120)) {
2900           _Internal::set_has_num_results_with_snippets(&has_bits);
2901           _impl_.num_results_with_snippets_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2902           CHK_(ptr);
2903         } else {
2904           goto handle_unusual;
2905         }
2906         continue;
2907       // optional int32 query_length = 16;
2908       case 16:
2909         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 128)) {
2910           _Internal::set_has_query_length(&has_bits);
2911           _impl_.query_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2912           CHK_(ptr);
2913         } else {
2914           goto handle_unusual;
2915         }
2916         continue;
2917       // optional int32 lock_acquisition_latency_ms = 17;
2918       case 17:
2919         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 136)) {
2920           _Internal::set_has_lock_acquisition_latency_ms(&has_bits);
2921           _impl_.lock_acquisition_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2922           CHK_(ptr);
2923         } else {
2924           goto handle_unusual;
2925         }
2926         continue;
2927       // optional int64 native_to_java_start_timestamp_ms = 18;
2928       case 18:
2929         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 144)) {
2930           _Internal::set_has_native_to_java_start_timestamp_ms(&has_bits);
2931           _impl_.native_to_java_start_timestamp_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2932           CHK_(ptr);
2933         } else {
2934           goto handle_unusual;
2935         }
2936         continue;
2937       // optional int32 java_to_native_jni_latency_ms = 19;
2938       case 19:
2939         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 152)) {
2940           _Internal::set_has_java_to_native_jni_latency_ms(&has_bits);
2941           _impl_.java_to_native_jni_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2942           CHK_(ptr);
2943         } else {
2944           goto handle_unusual;
2945         }
2946         continue;
2947       // optional int32 native_to_java_jni_latency_ms = 20;
2948       case 20:
2949         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 160)) {
2950           _Internal::set_has_native_to_java_jni_latency_ms(&has_bits);
2951           _impl_.native_to_java_jni_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2952           CHK_(ptr);
2953         } else {
2954           goto handle_unusual;
2955         }
2956         continue;
2957       // optional int32 join_latency_ms = 21;
2958       case 21:
2959         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 168)) {
2960           _Internal::set_has_join_latency_ms(&has_bits);
2961           _impl_.join_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2962           CHK_(ptr);
2963         } else {
2964           goto handle_unusual;
2965         }
2966         continue;
2967       // optional int32 num_joined_results_returned_current_page = 22;
2968       case 22:
2969         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 176)) {
2970           _Internal::set_has_num_joined_results_returned_current_page(&has_bits);
2971           _impl_.num_joined_results_returned_current_page_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2972           CHK_(ptr);
2973         } else {
2974           goto handle_unusual;
2975         }
2976         continue;
2977       // optional bool is_join_query = 23;
2978       case 23:
2979         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 184)) {
2980           _Internal::set_has_is_join_query(&has_bits);
2981           _impl_.is_join_query_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2982           CHK_(ptr);
2983         } else {
2984           goto handle_unusual;
2985         }
2986         continue;
2987       // optional .icing.lib.QueryStatsProto.SearchStats parent_search_stats = 24;
2988       case 24:
2989         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 194)) {
2990           ptr = ctx->ParseMessage(_internal_mutable_parent_search_stats(), ptr);
2991           CHK_(ptr);
2992         } else {
2993           goto handle_unusual;
2994         }
2995         continue;
2996       // optional .icing.lib.QueryStatsProto.SearchStats child_search_stats = 25;
2997       case 25:
2998         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 202)) {
2999           ptr = ctx->ParseMessage(_internal_mutable_child_search_stats(), ptr);
3000           CHK_(ptr);
3001         } else {
3002           goto handle_unusual;
3003         }
3004         continue;
3005       // optional int64 lite_index_hit_buffer_byte_size = 26;
3006       case 26:
3007         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 208)) {
3008           _Internal::set_has_lite_index_hit_buffer_byte_size(&has_bits);
3009           _impl_.lite_index_hit_buffer_byte_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3010           CHK_(ptr);
3011         } else {
3012           goto handle_unusual;
3013         }
3014         continue;
3015       // optional int64 lite_index_hit_buffer_unsorted_byte_size = 27;
3016       case 27:
3017         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 216)) {
3018           _Internal::set_has_lite_index_hit_buffer_unsorted_byte_size(&has_bits);
3019           _impl_.lite_index_hit_buffer_unsorted_byte_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3020           CHK_(ptr);
3021         } else {
3022           goto handle_unusual;
3023         }
3024         continue;
3025       default:
3026         goto handle_unusual;
3027     }  // switch
3028   handle_unusual:
3029     if ((tag == 0) || ((tag & 7) == 4)) {
3030       CHK_(ptr);
3031       ctx->SetLastTag(tag);
3032       goto message_done;
3033     }
3034     ptr = UnknownFieldParse(
3035         tag,
3036         _internal_metadata_.mutable_unknown_fields<std::string>(),
3037         ptr, ctx);
3038     CHK_(ptr != nullptr);
3039   }  // while
3040 message_done:
3041   _impl_._has_bits_.Or(has_bits);
3042   return ptr;
3043 failure:
3044   ptr = nullptr;
3045   goto message_done;
3046 #undef CHK_
3047 }
3048 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3049 ::uint8_t* QueryStatsProto::_InternalSerialize(
3050     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3051   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.QueryStatsProto)
3052   ::uint32_t cached_has_bits = 0;
3053   (void) cached_has_bits;
3054 
3055   cached_has_bits = _impl_._has_bits_[0];
3056   // optional int32 num_terms = 1;
3057   if (cached_has_bits & 0x00000004u) {
3058     target = stream->EnsureSpace(target);
3059     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_num_terms(), target);
3060   }
3061 
3062   // optional int32 num_namespaces_filtered = 2;
3063   if (cached_has_bits & 0x00000008u) {
3064     target = stream->EnsureSpace(target);
3065     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_namespaces_filtered(), target);
3066   }
3067 
3068   // optional int32 num_schema_types_filtered = 3;
3069   if (cached_has_bits & 0x00000010u) {
3070     target = stream->EnsureSpace(target);
3071     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_schema_types_filtered(), target);
3072   }
3073 
3074   // optional .icing.lib.ScoringSpecProto.RankingStrategy.Code ranking_strategy = 4;
3075   if (cached_has_bits & 0x00000020u) {
3076     target = stream->EnsureSpace(target);
3077     target = ::_pbi::WireFormatLite::WriteEnumToArray(
3078       4, this->_internal_ranking_strategy(), target);
3079   }
3080 
3081   // optional bool is_first_page = 5;
3082   if (cached_has_bits & 0x00004000u) {
3083     target = stream->EnsureSpace(target);
3084     target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_is_first_page(), target);
3085   }
3086 
3087   // optional int32 requested_page_size = 6;
3088   if (cached_has_bits & 0x00000040u) {
3089     target = stream->EnsureSpace(target);
3090     target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_requested_page_size(), target);
3091   }
3092 
3093   // optional int32 num_results_returned_current_page = 7;
3094   if (cached_has_bits & 0x00000080u) {
3095     target = stream->EnsureSpace(target);
3096     target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_num_results_returned_current_page(), target);
3097   }
3098 
3099   // optional int32 num_documents_scored = 8;
3100   if (cached_has_bits & 0x00000100u) {
3101     target = stream->EnsureSpace(target);
3102     target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_num_documents_scored(), target);
3103   }
3104 
3105   // optional int32 latency_ms = 10;
3106   if (cached_has_bits & 0x00000200u) {
3107     target = stream->EnsureSpace(target);
3108     target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_latency_ms(), target);
3109   }
3110 
3111   // optional int32 parse_query_latency_ms = 11;
3112   if (cached_has_bits & 0x00000400u) {
3113     target = stream->EnsureSpace(target);
3114     target = ::_pbi::WireFormatLite::WriteInt32ToArray(11, this->_internal_parse_query_latency_ms(), target);
3115   }
3116 
3117   // optional int32 scoring_latency_ms = 12;
3118   if (cached_has_bits & 0x00000800u) {
3119     target = stream->EnsureSpace(target);
3120     target = ::_pbi::WireFormatLite::WriteInt32ToArray(12, this->_internal_scoring_latency_ms(), target);
3121   }
3122 
3123   // optional int32 ranking_latency_ms = 13;
3124   if (cached_has_bits & 0x00001000u) {
3125     target = stream->EnsureSpace(target);
3126     target = ::_pbi::WireFormatLite::WriteInt32ToArray(13, this->_internal_ranking_latency_ms(), target);
3127   }
3128 
3129   // optional int32 document_retrieval_latency_ms = 14;
3130   if (cached_has_bits & 0x00002000u) {
3131     target = stream->EnsureSpace(target);
3132     target = ::_pbi::WireFormatLite::WriteInt32ToArray(14, this->_internal_document_retrieval_latency_ms(), target);
3133   }
3134 
3135   // optional int32 num_results_with_snippets = 15;
3136   if (cached_has_bits & 0x00010000u) {
3137     target = stream->EnsureSpace(target);
3138     target = ::_pbi::WireFormatLite::WriteInt32ToArray(15, this->_internal_num_results_with_snippets(), target);
3139   }
3140 
3141   // optional int32 query_length = 16;
3142   if (cached_has_bits & 0x00020000u) {
3143     target = stream->EnsureSpace(target);
3144     target = ::_pbi::WireFormatLite::WriteInt32ToArray(16, this->_internal_query_length(), target);
3145   }
3146 
3147   // optional int32 lock_acquisition_latency_ms = 17;
3148   if (cached_has_bits & 0x00040000u) {
3149     target = stream->EnsureSpace(target);
3150     target = ::_pbi::WireFormatLite::WriteInt32ToArray(17, this->_internal_lock_acquisition_latency_ms(), target);
3151   }
3152 
3153   // optional int64 native_to_java_start_timestamp_ms = 18;
3154   if (cached_has_bits & 0x00080000u) {
3155     target = stream->EnsureSpace(target);
3156     target = ::_pbi::WireFormatLite::WriteInt64ToArray(18, this->_internal_native_to_java_start_timestamp_ms(), target);
3157   }
3158 
3159   // optional int32 java_to_native_jni_latency_ms = 19;
3160   if (cached_has_bits & 0x00100000u) {
3161     target = stream->EnsureSpace(target);
3162     target = ::_pbi::WireFormatLite::WriteInt32ToArray(19, this->_internal_java_to_native_jni_latency_ms(), target);
3163   }
3164 
3165   // optional int32 native_to_java_jni_latency_ms = 20;
3166   if (cached_has_bits & 0x00200000u) {
3167     target = stream->EnsureSpace(target);
3168     target = ::_pbi::WireFormatLite::WriteInt32ToArray(20, this->_internal_native_to_java_jni_latency_ms(), target);
3169   }
3170 
3171   // optional int32 join_latency_ms = 21;
3172   if (cached_has_bits & 0x00400000u) {
3173     target = stream->EnsureSpace(target);
3174     target = ::_pbi::WireFormatLite::WriteInt32ToArray(21, this->_internal_join_latency_ms(), target);
3175   }
3176 
3177   // optional int32 num_joined_results_returned_current_page = 22;
3178   if (cached_has_bits & 0x00800000u) {
3179     target = stream->EnsureSpace(target);
3180     target = ::_pbi::WireFormatLite::WriteInt32ToArray(22, this->_internal_num_joined_results_returned_current_page(), target);
3181   }
3182 
3183   // optional bool is_join_query = 23;
3184   if (cached_has_bits & 0x00008000u) {
3185     target = stream->EnsureSpace(target);
3186     target = ::_pbi::WireFormatLite::WriteBoolToArray(23, this->_internal_is_join_query(), target);
3187   }
3188 
3189   // optional .icing.lib.QueryStatsProto.SearchStats parent_search_stats = 24;
3190   if (cached_has_bits & 0x00000001u) {
3191     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3192       InternalWriteMessage(24, _Internal::parent_search_stats(this),
3193         _Internal::parent_search_stats(this).GetCachedSize(), target, stream);
3194   }
3195 
3196   // optional .icing.lib.QueryStatsProto.SearchStats child_search_stats = 25;
3197   if (cached_has_bits & 0x00000002u) {
3198     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3199       InternalWriteMessage(25, _Internal::child_search_stats(this),
3200         _Internal::child_search_stats(this).GetCachedSize(), target, stream);
3201   }
3202 
3203   // optional int64 lite_index_hit_buffer_byte_size = 26;
3204   if (cached_has_bits & 0x01000000u) {
3205     target = stream->EnsureSpace(target);
3206     target = ::_pbi::WireFormatLite::WriteInt64ToArray(26, this->_internal_lite_index_hit_buffer_byte_size(), target);
3207   }
3208 
3209   // optional int64 lite_index_hit_buffer_unsorted_byte_size = 27;
3210   if (cached_has_bits & 0x02000000u) {
3211     target = stream->EnsureSpace(target);
3212     target = ::_pbi::WireFormatLite::WriteInt64ToArray(27, this->_internal_lite_index_hit_buffer_unsorted_byte_size(), target);
3213   }
3214 
3215   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3216     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3217         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3218   }
3219   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.QueryStatsProto)
3220   return target;
3221 }
3222 
ByteSizeLong() const3223 size_t QueryStatsProto::ByteSizeLong() const {
3224 // @@protoc_insertion_point(message_byte_size_start:icing.lib.QueryStatsProto)
3225   size_t total_size = 0;
3226 
3227   ::uint32_t cached_has_bits = 0;
3228   // Prevent compiler warnings about cached_has_bits being unused
3229   (void) cached_has_bits;
3230 
3231   cached_has_bits = _impl_._has_bits_[0];
3232   if (cached_has_bits & 0x000000ffu) {
3233     // optional .icing.lib.QueryStatsProto.SearchStats parent_search_stats = 24;
3234     if (cached_has_bits & 0x00000001u) {
3235       total_size += 2 +
3236         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3237           *_impl_.parent_search_stats_);
3238     }
3239 
3240     // optional .icing.lib.QueryStatsProto.SearchStats child_search_stats = 25;
3241     if (cached_has_bits & 0x00000002u) {
3242       total_size += 2 +
3243         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3244           *_impl_.child_search_stats_);
3245     }
3246 
3247     // optional int32 num_terms = 1;
3248     if (cached_has_bits & 0x00000004u) {
3249       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_terms());
3250     }
3251 
3252     // optional int32 num_namespaces_filtered = 2;
3253     if (cached_has_bits & 0x00000008u) {
3254       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_namespaces_filtered());
3255     }
3256 
3257     // optional int32 num_schema_types_filtered = 3;
3258     if (cached_has_bits & 0x00000010u) {
3259       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_schema_types_filtered());
3260     }
3261 
3262     // optional .icing.lib.ScoringSpecProto.RankingStrategy.Code ranking_strategy = 4;
3263     if (cached_has_bits & 0x00000020u) {
3264       total_size += 1 +
3265         ::_pbi::WireFormatLite::EnumSize(this->_internal_ranking_strategy());
3266     }
3267 
3268     // optional int32 requested_page_size = 6;
3269     if (cached_has_bits & 0x00000040u) {
3270       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_requested_page_size());
3271     }
3272 
3273     // optional int32 num_results_returned_current_page = 7;
3274     if (cached_has_bits & 0x00000080u) {
3275       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_results_returned_current_page());
3276     }
3277 
3278   }
3279   if (cached_has_bits & 0x0000ff00u) {
3280     // optional int32 num_documents_scored = 8;
3281     if (cached_has_bits & 0x00000100u) {
3282       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_documents_scored());
3283     }
3284 
3285     // optional int32 latency_ms = 10;
3286     if (cached_has_bits & 0x00000200u) {
3287       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_latency_ms());
3288     }
3289 
3290     // optional int32 parse_query_latency_ms = 11;
3291     if (cached_has_bits & 0x00000400u) {
3292       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_parse_query_latency_ms());
3293     }
3294 
3295     // optional int32 scoring_latency_ms = 12;
3296     if (cached_has_bits & 0x00000800u) {
3297       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_scoring_latency_ms());
3298     }
3299 
3300     // optional int32 ranking_latency_ms = 13;
3301     if (cached_has_bits & 0x00001000u) {
3302       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_ranking_latency_ms());
3303     }
3304 
3305     // optional int32 document_retrieval_latency_ms = 14;
3306     if (cached_has_bits & 0x00002000u) {
3307       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_document_retrieval_latency_ms());
3308     }
3309 
3310     // optional bool is_first_page = 5;
3311     if (cached_has_bits & 0x00004000u) {
3312       total_size += 1 + 1;
3313     }
3314 
3315     // optional bool is_join_query = 23;
3316     if (cached_has_bits & 0x00008000u) {
3317       total_size += 2 + 1;
3318     }
3319 
3320   }
3321   if (cached_has_bits & 0x00ff0000u) {
3322     // optional int32 num_results_with_snippets = 15;
3323     if (cached_has_bits & 0x00010000u) {
3324       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_results_with_snippets());
3325     }
3326 
3327     // optional int32 query_length = 16;
3328     if (cached_has_bits & 0x00020000u) {
3329       total_size += 2 +
3330         ::_pbi::WireFormatLite::Int32Size(
3331           this->_internal_query_length());
3332     }
3333 
3334     // optional int32 lock_acquisition_latency_ms = 17;
3335     if (cached_has_bits & 0x00040000u) {
3336       total_size += 2 +
3337         ::_pbi::WireFormatLite::Int32Size(
3338           this->_internal_lock_acquisition_latency_ms());
3339     }
3340 
3341     // optional int64 native_to_java_start_timestamp_ms = 18;
3342     if (cached_has_bits & 0x00080000u) {
3343       total_size += 2 +
3344         ::_pbi::WireFormatLite::Int64Size(
3345           this->_internal_native_to_java_start_timestamp_ms());
3346     }
3347 
3348     // optional int32 java_to_native_jni_latency_ms = 19;
3349     if (cached_has_bits & 0x00100000u) {
3350       total_size += 2 +
3351         ::_pbi::WireFormatLite::Int32Size(
3352           this->_internal_java_to_native_jni_latency_ms());
3353     }
3354 
3355     // optional int32 native_to_java_jni_latency_ms = 20;
3356     if (cached_has_bits & 0x00200000u) {
3357       total_size += 2 +
3358         ::_pbi::WireFormatLite::Int32Size(
3359           this->_internal_native_to_java_jni_latency_ms());
3360     }
3361 
3362     // optional int32 join_latency_ms = 21;
3363     if (cached_has_bits & 0x00400000u) {
3364       total_size += 2 +
3365         ::_pbi::WireFormatLite::Int32Size(
3366           this->_internal_join_latency_ms());
3367     }
3368 
3369     // optional int32 num_joined_results_returned_current_page = 22;
3370     if (cached_has_bits & 0x00800000u) {
3371       total_size += 2 +
3372         ::_pbi::WireFormatLite::Int32Size(
3373           this->_internal_num_joined_results_returned_current_page());
3374     }
3375 
3376   }
3377   if (cached_has_bits & 0x03000000u) {
3378     // optional int64 lite_index_hit_buffer_byte_size = 26;
3379     if (cached_has_bits & 0x01000000u) {
3380       total_size += 2 +
3381         ::_pbi::WireFormatLite::Int64Size(
3382           this->_internal_lite_index_hit_buffer_byte_size());
3383     }
3384 
3385     // optional int64 lite_index_hit_buffer_unsorted_byte_size = 27;
3386     if (cached_has_bits & 0x02000000u) {
3387       total_size += 2 +
3388         ::_pbi::WireFormatLite::Int64Size(
3389           this->_internal_lite_index_hit_buffer_unsorted_byte_size());
3390     }
3391 
3392   }
3393   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3394     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3395   }
3396   int cached_size = ::_pbi::ToCachedSize(total_size);
3397   SetCachedSize(cached_size);
3398   return total_size;
3399 }
3400 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3401 void QueryStatsProto::CheckTypeAndMergeFrom(
3402     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3403   MergeFrom(*::_pbi::DownCast<const QueryStatsProto*>(
3404       &from));
3405 }
3406 
MergeFrom(const QueryStatsProto & from)3407 void QueryStatsProto::MergeFrom(const QueryStatsProto& from) {
3408   QueryStatsProto* const _this = this;
3409   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.QueryStatsProto)
3410   GOOGLE_DCHECK_NE(&from, _this);
3411   ::uint32_t cached_has_bits = 0;
3412   (void) cached_has_bits;
3413 
3414   cached_has_bits = from._impl_._has_bits_[0];
3415   if (cached_has_bits & 0x000000ffu) {
3416     if (cached_has_bits & 0x00000001u) {
3417       _this->_internal_mutable_parent_search_stats()->::icing::lib::QueryStatsProto_SearchStats::MergeFrom(
3418           from._internal_parent_search_stats());
3419     }
3420     if (cached_has_bits & 0x00000002u) {
3421       _this->_internal_mutable_child_search_stats()->::icing::lib::QueryStatsProto_SearchStats::MergeFrom(
3422           from._internal_child_search_stats());
3423     }
3424     if (cached_has_bits & 0x00000004u) {
3425       _this->_impl_.num_terms_ = from._impl_.num_terms_;
3426     }
3427     if (cached_has_bits & 0x00000008u) {
3428       _this->_impl_.num_namespaces_filtered_ = from._impl_.num_namespaces_filtered_;
3429     }
3430     if (cached_has_bits & 0x00000010u) {
3431       _this->_impl_.num_schema_types_filtered_ = from._impl_.num_schema_types_filtered_;
3432     }
3433     if (cached_has_bits & 0x00000020u) {
3434       _this->_impl_.ranking_strategy_ = from._impl_.ranking_strategy_;
3435     }
3436     if (cached_has_bits & 0x00000040u) {
3437       _this->_impl_.requested_page_size_ = from._impl_.requested_page_size_;
3438     }
3439     if (cached_has_bits & 0x00000080u) {
3440       _this->_impl_.num_results_returned_current_page_ = from._impl_.num_results_returned_current_page_;
3441     }
3442     _this->_impl_._has_bits_[0] |= cached_has_bits;
3443   }
3444   if (cached_has_bits & 0x0000ff00u) {
3445     if (cached_has_bits & 0x00000100u) {
3446       _this->_impl_.num_documents_scored_ = from._impl_.num_documents_scored_;
3447     }
3448     if (cached_has_bits & 0x00000200u) {
3449       _this->_impl_.latency_ms_ = from._impl_.latency_ms_;
3450     }
3451     if (cached_has_bits & 0x00000400u) {
3452       _this->_impl_.parse_query_latency_ms_ = from._impl_.parse_query_latency_ms_;
3453     }
3454     if (cached_has_bits & 0x00000800u) {
3455       _this->_impl_.scoring_latency_ms_ = from._impl_.scoring_latency_ms_;
3456     }
3457     if (cached_has_bits & 0x00001000u) {
3458       _this->_impl_.ranking_latency_ms_ = from._impl_.ranking_latency_ms_;
3459     }
3460     if (cached_has_bits & 0x00002000u) {
3461       _this->_impl_.document_retrieval_latency_ms_ = from._impl_.document_retrieval_latency_ms_;
3462     }
3463     if (cached_has_bits & 0x00004000u) {
3464       _this->_impl_.is_first_page_ = from._impl_.is_first_page_;
3465     }
3466     if (cached_has_bits & 0x00008000u) {
3467       _this->_impl_.is_join_query_ = from._impl_.is_join_query_;
3468     }
3469     _this->_impl_._has_bits_[0] |= cached_has_bits;
3470   }
3471   if (cached_has_bits & 0x00ff0000u) {
3472     if (cached_has_bits & 0x00010000u) {
3473       _this->_impl_.num_results_with_snippets_ = from._impl_.num_results_with_snippets_;
3474     }
3475     if (cached_has_bits & 0x00020000u) {
3476       _this->_impl_.query_length_ = from._impl_.query_length_;
3477     }
3478     if (cached_has_bits & 0x00040000u) {
3479       _this->_impl_.lock_acquisition_latency_ms_ = from._impl_.lock_acquisition_latency_ms_;
3480     }
3481     if (cached_has_bits & 0x00080000u) {
3482       _this->_impl_.native_to_java_start_timestamp_ms_ = from._impl_.native_to_java_start_timestamp_ms_;
3483     }
3484     if (cached_has_bits & 0x00100000u) {
3485       _this->_impl_.java_to_native_jni_latency_ms_ = from._impl_.java_to_native_jni_latency_ms_;
3486     }
3487     if (cached_has_bits & 0x00200000u) {
3488       _this->_impl_.native_to_java_jni_latency_ms_ = from._impl_.native_to_java_jni_latency_ms_;
3489     }
3490     if (cached_has_bits & 0x00400000u) {
3491       _this->_impl_.join_latency_ms_ = from._impl_.join_latency_ms_;
3492     }
3493     if (cached_has_bits & 0x00800000u) {
3494       _this->_impl_.num_joined_results_returned_current_page_ = from._impl_.num_joined_results_returned_current_page_;
3495     }
3496     _this->_impl_._has_bits_[0] |= cached_has_bits;
3497   }
3498   if (cached_has_bits & 0x03000000u) {
3499     if (cached_has_bits & 0x01000000u) {
3500       _this->_impl_.lite_index_hit_buffer_byte_size_ = from._impl_.lite_index_hit_buffer_byte_size_;
3501     }
3502     if (cached_has_bits & 0x02000000u) {
3503       _this->_impl_.lite_index_hit_buffer_unsorted_byte_size_ = from._impl_.lite_index_hit_buffer_unsorted_byte_size_;
3504     }
3505     _this->_impl_._has_bits_[0] |= cached_has_bits;
3506   }
3507   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3508 }
3509 
CopyFrom(const QueryStatsProto & from)3510 void QueryStatsProto::CopyFrom(const QueryStatsProto& from) {
3511 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.QueryStatsProto)
3512   if (&from == this) return;
3513   Clear();
3514   MergeFrom(from);
3515 }
3516 
IsInitialized() const3517 bool QueryStatsProto::IsInitialized() const {
3518   return true;
3519 }
3520 
InternalSwap(QueryStatsProto * other)3521 void QueryStatsProto::InternalSwap(QueryStatsProto* other) {
3522   using std::swap;
3523   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3524   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3525   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3526       PROTOBUF_FIELD_OFFSET(QueryStatsProto, _impl_.lite_index_hit_buffer_unsorted_byte_size_)
3527       + sizeof(QueryStatsProto::_impl_.lite_index_hit_buffer_unsorted_byte_size_)  // NOLINT
3528       - PROTOBUF_FIELD_OFFSET(QueryStatsProto, _impl_.parent_search_stats_)>(
3529           reinterpret_cast<char*>(&_impl_.parent_search_stats_),
3530           reinterpret_cast<char*>(&other->_impl_.parent_search_stats_));
3531 }
3532 
GetTypeName() const3533 std::string QueryStatsProto::GetTypeName() const {
3534   return "icing.lib.QueryStatsProto";
3535 }
3536 
3537 
3538 // ===================================================================
3539 
3540 class DeleteStatsProto_DeleteType::_Internal {
3541  public:
3542 };
3543 
DeleteStatsProto_DeleteType(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3544 DeleteStatsProto_DeleteType::DeleteStatsProto_DeleteType(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3545                          bool is_message_owned)
3546   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3547   SharedCtor(arena, is_message_owned);
3548   // @@protoc_insertion_point(arena_constructor:icing.lib.DeleteStatsProto.DeleteType)
3549 }
DeleteStatsProto_DeleteType(const DeleteStatsProto_DeleteType & from)3550 DeleteStatsProto_DeleteType::DeleteStatsProto_DeleteType(const DeleteStatsProto_DeleteType& from)
3551   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3552   DeleteStatsProto_DeleteType* const _this = this; (void)_this;
3553   new (&_impl_) Impl_{
3554       /*decltype(_impl_._cached_size_)*/{}};
3555 
3556   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3557   // @@protoc_insertion_point(copy_constructor:icing.lib.DeleteStatsProto.DeleteType)
3558 }
3559 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3560 inline void DeleteStatsProto_DeleteType::SharedCtor(
3561     ::_pb::Arena* arena, bool is_message_owned) {
3562   (void)arena;
3563   (void)is_message_owned;
3564   new (&_impl_) Impl_{
3565       /*decltype(_impl_._cached_size_)*/{}
3566   };
3567 }
3568 
~DeleteStatsProto_DeleteType()3569 DeleteStatsProto_DeleteType::~DeleteStatsProto_DeleteType() {
3570   // @@protoc_insertion_point(destructor:icing.lib.DeleteStatsProto.DeleteType)
3571   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3572   (void)arena;
3573     return;
3574   }
3575   SharedDtor();
3576 }
3577 
SharedDtor()3578 inline void DeleteStatsProto_DeleteType::SharedDtor() {
3579   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3580 }
3581 
SetCachedSize(int size) const3582 void DeleteStatsProto_DeleteType::SetCachedSize(int size) const {
3583   _impl_._cached_size_.Set(size);
3584 }
3585 
Clear()3586 void DeleteStatsProto_DeleteType::Clear() {
3587 // @@protoc_insertion_point(message_clear_start:icing.lib.DeleteStatsProto.DeleteType)
3588   ::uint32_t cached_has_bits = 0;
3589   // Prevent compiler warnings about cached_has_bits being unused
3590   (void) cached_has_bits;
3591 
3592   _internal_metadata_.Clear<std::string>();
3593 }
3594 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3595 const char* DeleteStatsProto_DeleteType::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3596 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3597   while (!ctx->Done(&ptr)) {
3598     ::uint32_t tag;
3599     ptr = ::_pbi::ReadTag(ptr, &tag);
3600     if ((tag == 0) || ((tag & 7) == 4)) {
3601       CHK_(ptr);
3602       ctx->SetLastTag(tag);
3603       goto message_done;
3604     }
3605     ptr = UnknownFieldParse(
3606         tag,
3607         _internal_metadata_.mutable_unknown_fields<std::string>(),
3608         ptr, ctx);
3609     CHK_(ptr != nullptr);
3610   }  // while
3611 message_done:
3612   return ptr;
3613 failure:
3614   ptr = nullptr;
3615   goto message_done;
3616 #undef CHK_
3617 }
3618 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3619 ::uint8_t* DeleteStatsProto_DeleteType::_InternalSerialize(
3620     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3621   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.DeleteStatsProto.DeleteType)
3622   ::uint32_t cached_has_bits = 0;
3623   (void) cached_has_bits;
3624 
3625   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3626     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3627         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3628   }
3629   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.DeleteStatsProto.DeleteType)
3630   return target;
3631 }
3632 
ByteSizeLong() const3633 size_t DeleteStatsProto_DeleteType::ByteSizeLong() const {
3634 // @@protoc_insertion_point(message_byte_size_start:icing.lib.DeleteStatsProto.DeleteType)
3635   size_t total_size = 0;
3636 
3637   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3638     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3639   }
3640   int cached_size = ::_pbi::ToCachedSize(total_size);
3641   SetCachedSize(cached_size);
3642   return total_size;
3643 }
3644 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3645 void DeleteStatsProto_DeleteType::CheckTypeAndMergeFrom(
3646     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3647   MergeFrom(*::_pbi::DownCast<const DeleteStatsProto_DeleteType*>(
3648       &from));
3649 }
3650 
MergeFrom(const DeleteStatsProto_DeleteType & from)3651 void DeleteStatsProto_DeleteType::MergeFrom(const DeleteStatsProto_DeleteType& from) {
3652   DeleteStatsProto_DeleteType* const _this = this;
3653   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.DeleteStatsProto.DeleteType)
3654   GOOGLE_DCHECK_NE(&from, _this);
3655   ::uint32_t cached_has_bits = 0;
3656   (void) cached_has_bits;
3657 
3658   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3659 }
3660 
CopyFrom(const DeleteStatsProto_DeleteType & from)3661 void DeleteStatsProto_DeleteType::CopyFrom(const DeleteStatsProto_DeleteType& from) {
3662 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.DeleteStatsProto.DeleteType)
3663   if (&from == this) return;
3664   Clear();
3665   MergeFrom(from);
3666 }
3667 
IsInitialized() const3668 bool DeleteStatsProto_DeleteType::IsInitialized() const {
3669   return true;
3670 }
3671 
InternalSwap(DeleteStatsProto_DeleteType * other)3672 void DeleteStatsProto_DeleteType::InternalSwap(DeleteStatsProto_DeleteType* other) {
3673   using std::swap;
3674   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3675 }
3676 
GetTypeName() const3677 std::string DeleteStatsProto_DeleteType::GetTypeName() const {
3678   return "icing.lib.DeleteStatsProto.DeleteType";
3679 }
3680 
3681 
3682 // ===================================================================
3683 
3684 class DeleteStatsProto::_Internal {
3685  public:
3686   using HasBits = decltype(std::declval<DeleteStatsProto>()._impl_._has_bits_);
set_has_latency_ms(HasBits * has_bits)3687   static void set_has_latency_ms(HasBits* has_bits) {
3688     (*has_bits)[0] |= 1u;
3689   }
set_has_delete_type(HasBits * has_bits)3690   static void set_has_delete_type(HasBits* has_bits) {
3691     (*has_bits)[0] |= 2u;
3692   }
set_has_num_documents_deleted(HasBits * has_bits)3693   static void set_has_num_documents_deleted(HasBits* has_bits) {
3694     (*has_bits)[0] |= 4u;
3695   }
3696 };
3697 
DeleteStatsProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3698 DeleteStatsProto::DeleteStatsProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3699                          bool is_message_owned)
3700   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3701   SharedCtor(arena, is_message_owned);
3702   // @@protoc_insertion_point(arena_constructor:icing.lib.DeleteStatsProto)
3703 }
DeleteStatsProto(const DeleteStatsProto & from)3704 DeleteStatsProto::DeleteStatsProto(const DeleteStatsProto& from)
3705   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3706   DeleteStatsProto* const _this = this; (void)_this;
3707   new (&_impl_) Impl_{
3708       decltype(_impl_._has_bits_){from._impl_._has_bits_}
3709     , /*decltype(_impl_._cached_size_)*/{}
3710     , decltype(_impl_.latency_ms_){}
3711     , decltype(_impl_.delete_type_){}
3712     , decltype(_impl_.num_documents_deleted_){}};
3713 
3714   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3715   ::memcpy(&_impl_.latency_ms_, &from._impl_.latency_ms_,
3716     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.num_documents_deleted_) -
3717     reinterpret_cast<char*>(&_impl_.latency_ms_)) + sizeof(_impl_.num_documents_deleted_));
3718   // @@protoc_insertion_point(copy_constructor:icing.lib.DeleteStatsProto)
3719 }
3720 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3721 inline void DeleteStatsProto::SharedCtor(
3722     ::_pb::Arena* arena, bool is_message_owned) {
3723   (void)arena;
3724   (void)is_message_owned;
3725   new (&_impl_) Impl_{
3726       decltype(_impl_._has_bits_){}
3727     , /*decltype(_impl_._cached_size_)*/{}
3728     , decltype(_impl_.latency_ms_){0}
3729     , decltype(_impl_.delete_type_){0}
3730     , decltype(_impl_.num_documents_deleted_){0}
3731   };
3732 }
3733 
~DeleteStatsProto()3734 DeleteStatsProto::~DeleteStatsProto() {
3735   // @@protoc_insertion_point(destructor:icing.lib.DeleteStatsProto)
3736   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3737   (void)arena;
3738     return;
3739   }
3740   SharedDtor();
3741 }
3742 
SharedDtor()3743 inline void DeleteStatsProto::SharedDtor() {
3744   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3745 }
3746 
SetCachedSize(int size) const3747 void DeleteStatsProto::SetCachedSize(int size) const {
3748   _impl_._cached_size_.Set(size);
3749 }
3750 
Clear()3751 void DeleteStatsProto::Clear() {
3752 // @@protoc_insertion_point(message_clear_start:icing.lib.DeleteStatsProto)
3753   ::uint32_t cached_has_bits = 0;
3754   // Prevent compiler warnings about cached_has_bits being unused
3755   (void) cached_has_bits;
3756 
3757   cached_has_bits = _impl_._has_bits_[0];
3758   if (cached_has_bits & 0x00000007u) {
3759     ::memset(&_impl_.latency_ms_, 0, static_cast<size_t>(
3760         reinterpret_cast<char*>(&_impl_.num_documents_deleted_) -
3761         reinterpret_cast<char*>(&_impl_.latency_ms_)) + sizeof(_impl_.num_documents_deleted_));
3762   }
3763   _impl_._has_bits_.Clear();
3764   _internal_metadata_.Clear<std::string>();
3765 }
3766 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3767 const char* DeleteStatsProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3768 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3769   _Internal::HasBits has_bits{};
3770   while (!ctx->Done(&ptr)) {
3771     ::uint32_t tag;
3772     ptr = ::_pbi::ReadTag(ptr, &tag);
3773     switch (tag >> 3) {
3774       // optional int32 latency_ms = 1;
3775       case 1:
3776         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
3777           _Internal::set_has_latency_ms(&has_bits);
3778           _impl_.latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3779           CHK_(ptr);
3780         } else {
3781           goto handle_unusual;
3782         }
3783         continue;
3784       // optional .icing.lib.DeleteStatsProto.DeleteType.Code delete_type = 2;
3785       case 2:
3786         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
3787           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3788           CHK_(ptr);
3789           if (PROTOBUF_PREDICT_TRUE(::icing::lib::DeleteStatsProto_DeleteType_Code_IsValid(val))) {
3790             _internal_set_delete_type(static_cast<::icing::lib::DeleteStatsProto_DeleteType_Code>(val));
3791           } else {
3792             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
3793           }
3794         } else {
3795           goto handle_unusual;
3796         }
3797         continue;
3798       // optional int32 num_documents_deleted = 3;
3799       case 3:
3800         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
3801           _Internal::set_has_num_documents_deleted(&has_bits);
3802           _impl_.num_documents_deleted_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3803           CHK_(ptr);
3804         } else {
3805           goto handle_unusual;
3806         }
3807         continue;
3808       default:
3809         goto handle_unusual;
3810     }  // switch
3811   handle_unusual:
3812     if ((tag == 0) || ((tag & 7) == 4)) {
3813       CHK_(ptr);
3814       ctx->SetLastTag(tag);
3815       goto message_done;
3816     }
3817     ptr = UnknownFieldParse(
3818         tag,
3819         _internal_metadata_.mutable_unknown_fields<std::string>(),
3820         ptr, ctx);
3821     CHK_(ptr != nullptr);
3822   }  // while
3823 message_done:
3824   _impl_._has_bits_.Or(has_bits);
3825   return ptr;
3826 failure:
3827   ptr = nullptr;
3828   goto message_done;
3829 #undef CHK_
3830 }
3831 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3832 ::uint8_t* DeleteStatsProto::_InternalSerialize(
3833     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3834   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.DeleteStatsProto)
3835   ::uint32_t cached_has_bits = 0;
3836   (void) cached_has_bits;
3837 
3838   cached_has_bits = _impl_._has_bits_[0];
3839   // optional int32 latency_ms = 1;
3840   if (cached_has_bits & 0x00000001u) {
3841     target = stream->EnsureSpace(target);
3842     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_latency_ms(), target);
3843   }
3844 
3845   // optional .icing.lib.DeleteStatsProto.DeleteType.Code delete_type = 2;
3846   if (cached_has_bits & 0x00000002u) {
3847     target = stream->EnsureSpace(target);
3848     target = ::_pbi::WireFormatLite::WriteEnumToArray(
3849       2, this->_internal_delete_type(), target);
3850   }
3851 
3852   // optional int32 num_documents_deleted = 3;
3853   if (cached_has_bits & 0x00000004u) {
3854     target = stream->EnsureSpace(target);
3855     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_documents_deleted(), target);
3856   }
3857 
3858   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3859     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3860         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3861   }
3862   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.DeleteStatsProto)
3863   return target;
3864 }
3865 
ByteSizeLong() const3866 size_t DeleteStatsProto::ByteSizeLong() const {
3867 // @@protoc_insertion_point(message_byte_size_start:icing.lib.DeleteStatsProto)
3868   size_t total_size = 0;
3869 
3870   ::uint32_t cached_has_bits = 0;
3871   // Prevent compiler warnings about cached_has_bits being unused
3872   (void) cached_has_bits;
3873 
3874   cached_has_bits = _impl_._has_bits_[0];
3875   if (cached_has_bits & 0x00000007u) {
3876     // optional int32 latency_ms = 1;
3877     if (cached_has_bits & 0x00000001u) {
3878       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_latency_ms());
3879     }
3880 
3881     // optional .icing.lib.DeleteStatsProto.DeleteType.Code delete_type = 2;
3882     if (cached_has_bits & 0x00000002u) {
3883       total_size += 1 +
3884         ::_pbi::WireFormatLite::EnumSize(this->_internal_delete_type());
3885     }
3886 
3887     // optional int32 num_documents_deleted = 3;
3888     if (cached_has_bits & 0x00000004u) {
3889       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_documents_deleted());
3890     }
3891 
3892   }
3893   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3894     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3895   }
3896   int cached_size = ::_pbi::ToCachedSize(total_size);
3897   SetCachedSize(cached_size);
3898   return total_size;
3899 }
3900 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3901 void DeleteStatsProto::CheckTypeAndMergeFrom(
3902     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3903   MergeFrom(*::_pbi::DownCast<const DeleteStatsProto*>(
3904       &from));
3905 }
3906 
MergeFrom(const DeleteStatsProto & from)3907 void DeleteStatsProto::MergeFrom(const DeleteStatsProto& from) {
3908   DeleteStatsProto* const _this = this;
3909   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.DeleteStatsProto)
3910   GOOGLE_DCHECK_NE(&from, _this);
3911   ::uint32_t cached_has_bits = 0;
3912   (void) cached_has_bits;
3913 
3914   cached_has_bits = from._impl_._has_bits_[0];
3915   if (cached_has_bits & 0x00000007u) {
3916     if (cached_has_bits & 0x00000001u) {
3917       _this->_impl_.latency_ms_ = from._impl_.latency_ms_;
3918     }
3919     if (cached_has_bits & 0x00000002u) {
3920       _this->_impl_.delete_type_ = from._impl_.delete_type_;
3921     }
3922     if (cached_has_bits & 0x00000004u) {
3923       _this->_impl_.num_documents_deleted_ = from._impl_.num_documents_deleted_;
3924     }
3925     _this->_impl_._has_bits_[0] |= cached_has_bits;
3926   }
3927   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3928 }
3929 
CopyFrom(const DeleteStatsProto & from)3930 void DeleteStatsProto::CopyFrom(const DeleteStatsProto& from) {
3931 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.DeleteStatsProto)
3932   if (&from == this) return;
3933   Clear();
3934   MergeFrom(from);
3935 }
3936 
IsInitialized() const3937 bool DeleteStatsProto::IsInitialized() const {
3938   return true;
3939 }
3940 
InternalSwap(DeleteStatsProto * other)3941 void DeleteStatsProto::InternalSwap(DeleteStatsProto* other) {
3942   using std::swap;
3943   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3944   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3945   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3946       PROTOBUF_FIELD_OFFSET(DeleteStatsProto, _impl_.num_documents_deleted_)
3947       + sizeof(DeleteStatsProto::_impl_.num_documents_deleted_)  // NOLINT
3948       - PROTOBUF_FIELD_OFFSET(DeleteStatsProto, _impl_.latency_ms_)>(
3949           reinterpret_cast<char*>(&_impl_.latency_ms_),
3950           reinterpret_cast<char*>(&other->_impl_.latency_ms_));
3951 }
3952 
GetTypeName() const3953 std::string DeleteStatsProto::GetTypeName() const {
3954   return "icing.lib.DeleteStatsProto";
3955 }
3956 
3957 
3958 // ===================================================================
3959 
3960 class DeleteByQueryStatsProto::_Internal {
3961  public:
3962   using HasBits = decltype(std::declval<DeleteByQueryStatsProto>()._impl_._has_bits_);
set_has_latency_ms(HasBits * has_bits)3963   static void set_has_latency_ms(HasBits* has_bits) {
3964     (*has_bits)[0] |= 1u;
3965   }
set_has_num_documents_deleted(HasBits * has_bits)3966   static void set_has_num_documents_deleted(HasBits* has_bits) {
3967     (*has_bits)[0] |= 2u;
3968   }
set_has_query_length(HasBits * has_bits)3969   static void set_has_query_length(HasBits* has_bits) {
3970     (*has_bits)[0] |= 4u;
3971   }
set_has_num_terms(HasBits * has_bits)3972   static void set_has_num_terms(HasBits* has_bits) {
3973     (*has_bits)[0] |= 8u;
3974   }
set_has_num_namespaces_filtered(HasBits * has_bits)3975   static void set_has_num_namespaces_filtered(HasBits* has_bits) {
3976     (*has_bits)[0] |= 16u;
3977   }
set_has_num_schema_types_filtered(HasBits * has_bits)3978   static void set_has_num_schema_types_filtered(HasBits* has_bits) {
3979     (*has_bits)[0] |= 32u;
3980   }
set_has_parse_query_latency_ms(HasBits * has_bits)3981   static void set_has_parse_query_latency_ms(HasBits* has_bits) {
3982     (*has_bits)[0] |= 64u;
3983   }
set_has_document_removal_latency_ms(HasBits * has_bits)3984   static void set_has_document_removal_latency_ms(HasBits* has_bits) {
3985     (*has_bits)[0] |= 128u;
3986   }
3987 };
3988 
DeleteByQueryStatsProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3989 DeleteByQueryStatsProto::DeleteByQueryStatsProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3990                          bool is_message_owned)
3991   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3992   SharedCtor(arena, is_message_owned);
3993   // @@protoc_insertion_point(arena_constructor:icing.lib.DeleteByQueryStatsProto)
3994 }
DeleteByQueryStatsProto(const DeleteByQueryStatsProto & from)3995 DeleteByQueryStatsProto::DeleteByQueryStatsProto(const DeleteByQueryStatsProto& from)
3996   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3997   DeleteByQueryStatsProto* const _this = this; (void)_this;
3998   new (&_impl_) Impl_{
3999       decltype(_impl_._has_bits_){from._impl_._has_bits_}
4000     , /*decltype(_impl_._cached_size_)*/{}
4001     , decltype(_impl_.latency_ms_){}
4002     , decltype(_impl_.num_documents_deleted_){}
4003     , decltype(_impl_.query_length_){}
4004     , decltype(_impl_.num_terms_){}
4005     , decltype(_impl_.num_namespaces_filtered_){}
4006     , decltype(_impl_.num_schema_types_filtered_){}
4007     , decltype(_impl_.parse_query_latency_ms_){}
4008     , decltype(_impl_.document_removal_latency_ms_){}};
4009 
4010   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4011   ::memcpy(&_impl_.latency_ms_, &from._impl_.latency_ms_,
4012     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.document_removal_latency_ms_) -
4013     reinterpret_cast<char*>(&_impl_.latency_ms_)) + sizeof(_impl_.document_removal_latency_ms_));
4014   // @@protoc_insertion_point(copy_constructor:icing.lib.DeleteByQueryStatsProto)
4015 }
4016 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)4017 inline void DeleteByQueryStatsProto::SharedCtor(
4018     ::_pb::Arena* arena, bool is_message_owned) {
4019   (void)arena;
4020   (void)is_message_owned;
4021   new (&_impl_) Impl_{
4022       decltype(_impl_._has_bits_){}
4023     , /*decltype(_impl_._cached_size_)*/{}
4024     , decltype(_impl_.latency_ms_){0}
4025     , decltype(_impl_.num_documents_deleted_){0}
4026     , decltype(_impl_.query_length_){0}
4027     , decltype(_impl_.num_terms_){0}
4028     , decltype(_impl_.num_namespaces_filtered_){0}
4029     , decltype(_impl_.num_schema_types_filtered_){0}
4030     , decltype(_impl_.parse_query_latency_ms_){0}
4031     , decltype(_impl_.document_removal_latency_ms_){0}
4032   };
4033 }
4034 
~DeleteByQueryStatsProto()4035 DeleteByQueryStatsProto::~DeleteByQueryStatsProto() {
4036   // @@protoc_insertion_point(destructor:icing.lib.DeleteByQueryStatsProto)
4037   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
4038   (void)arena;
4039     return;
4040   }
4041   SharedDtor();
4042 }
4043 
SharedDtor()4044 inline void DeleteByQueryStatsProto::SharedDtor() {
4045   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4046 }
4047 
SetCachedSize(int size) const4048 void DeleteByQueryStatsProto::SetCachedSize(int size) const {
4049   _impl_._cached_size_.Set(size);
4050 }
4051 
Clear()4052 void DeleteByQueryStatsProto::Clear() {
4053 // @@protoc_insertion_point(message_clear_start:icing.lib.DeleteByQueryStatsProto)
4054   ::uint32_t cached_has_bits = 0;
4055   // Prevent compiler warnings about cached_has_bits being unused
4056   (void) cached_has_bits;
4057 
4058   cached_has_bits = _impl_._has_bits_[0];
4059   if (cached_has_bits & 0x000000ffu) {
4060     ::memset(&_impl_.latency_ms_, 0, static_cast<size_t>(
4061         reinterpret_cast<char*>(&_impl_.document_removal_latency_ms_) -
4062         reinterpret_cast<char*>(&_impl_.latency_ms_)) + sizeof(_impl_.document_removal_latency_ms_));
4063   }
4064   _impl_._has_bits_.Clear();
4065   _internal_metadata_.Clear<std::string>();
4066 }
4067 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)4068 const char* DeleteByQueryStatsProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
4069 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
4070   _Internal::HasBits has_bits{};
4071   while (!ctx->Done(&ptr)) {
4072     ::uint32_t tag;
4073     ptr = ::_pbi::ReadTag(ptr, &tag);
4074     switch (tag >> 3) {
4075       // optional int32 latency_ms = 1;
4076       case 1:
4077         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
4078           _Internal::set_has_latency_ms(&has_bits);
4079           _impl_.latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
4080           CHK_(ptr);
4081         } else {
4082           goto handle_unusual;
4083         }
4084         continue;
4085       // optional int32 num_documents_deleted = 2;
4086       case 2:
4087         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
4088           _Internal::set_has_num_documents_deleted(&has_bits);
4089           _impl_.num_documents_deleted_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
4090           CHK_(ptr);
4091         } else {
4092           goto handle_unusual;
4093         }
4094         continue;
4095       // optional int32 query_length = 3;
4096       case 3:
4097         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
4098           _Internal::set_has_query_length(&has_bits);
4099           _impl_.query_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
4100           CHK_(ptr);
4101         } else {
4102           goto handle_unusual;
4103         }
4104         continue;
4105       // optional int32 num_terms = 4;
4106       case 4:
4107         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
4108           _Internal::set_has_num_terms(&has_bits);
4109           _impl_.num_terms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
4110           CHK_(ptr);
4111         } else {
4112           goto handle_unusual;
4113         }
4114         continue;
4115       // optional int32 num_namespaces_filtered = 5;
4116       case 5:
4117         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
4118           _Internal::set_has_num_namespaces_filtered(&has_bits);
4119           _impl_.num_namespaces_filtered_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
4120           CHK_(ptr);
4121         } else {
4122           goto handle_unusual;
4123         }
4124         continue;
4125       // optional int32 num_schema_types_filtered = 6;
4126       case 6:
4127         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
4128           _Internal::set_has_num_schema_types_filtered(&has_bits);
4129           _impl_.num_schema_types_filtered_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
4130           CHK_(ptr);
4131         } else {
4132           goto handle_unusual;
4133         }
4134         continue;
4135       // optional int32 parse_query_latency_ms = 7;
4136       case 7:
4137         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
4138           _Internal::set_has_parse_query_latency_ms(&has_bits);
4139           _impl_.parse_query_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
4140           CHK_(ptr);
4141         } else {
4142           goto handle_unusual;
4143         }
4144         continue;
4145       // optional int32 document_removal_latency_ms = 8;
4146       case 8:
4147         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
4148           _Internal::set_has_document_removal_latency_ms(&has_bits);
4149           _impl_.document_removal_latency_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
4150           CHK_(ptr);
4151         } else {
4152           goto handle_unusual;
4153         }
4154         continue;
4155       default:
4156         goto handle_unusual;
4157     }  // switch
4158   handle_unusual:
4159     if ((tag == 0) || ((tag & 7) == 4)) {
4160       CHK_(ptr);
4161       ctx->SetLastTag(tag);
4162       goto message_done;
4163     }
4164     ptr = UnknownFieldParse(
4165         tag,
4166         _internal_metadata_.mutable_unknown_fields<std::string>(),
4167         ptr, ctx);
4168     CHK_(ptr != nullptr);
4169   }  // while
4170 message_done:
4171   _impl_._has_bits_.Or(has_bits);
4172   return ptr;
4173 failure:
4174   ptr = nullptr;
4175   goto message_done;
4176 #undef CHK_
4177 }
4178 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4179 ::uint8_t* DeleteByQueryStatsProto::_InternalSerialize(
4180     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4181   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.DeleteByQueryStatsProto)
4182   ::uint32_t cached_has_bits = 0;
4183   (void) cached_has_bits;
4184 
4185   cached_has_bits = _impl_._has_bits_[0];
4186   // optional int32 latency_ms = 1;
4187   if (cached_has_bits & 0x00000001u) {
4188     target = stream->EnsureSpace(target);
4189     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_latency_ms(), target);
4190   }
4191 
4192   // optional int32 num_documents_deleted = 2;
4193   if (cached_has_bits & 0x00000002u) {
4194     target = stream->EnsureSpace(target);
4195     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_documents_deleted(), target);
4196   }
4197 
4198   // optional int32 query_length = 3;
4199   if (cached_has_bits & 0x00000004u) {
4200     target = stream->EnsureSpace(target);
4201     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_query_length(), target);
4202   }
4203 
4204   // optional int32 num_terms = 4;
4205   if (cached_has_bits & 0x00000008u) {
4206     target = stream->EnsureSpace(target);
4207     target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_num_terms(), target);
4208   }
4209 
4210   // optional int32 num_namespaces_filtered = 5;
4211   if (cached_has_bits & 0x00000010u) {
4212     target = stream->EnsureSpace(target);
4213     target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_num_namespaces_filtered(), target);
4214   }
4215 
4216   // optional int32 num_schema_types_filtered = 6;
4217   if (cached_has_bits & 0x00000020u) {
4218     target = stream->EnsureSpace(target);
4219     target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_num_schema_types_filtered(), target);
4220   }
4221 
4222   // optional int32 parse_query_latency_ms = 7;
4223   if (cached_has_bits & 0x00000040u) {
4224     target = stream->EnsureSpace(target);
4225     target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_parse_query_latency_ms(), target);
4226   }
4227 
4228   // optional int32 document_removal_latency_ms = 8;
4229   if (cached_has_bits & 0x00000080u) {
4230     target = stream->EnsureSpace(target);
4231     target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_document_removal_latency_ms(), target);
4232   }
4233 
4234   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4235     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4236         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4237   }
4238   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.DeleteByQueryStatsProto)
4239   return target;
4240 }
4241 
ByteSizeLong() const4242 size_t DeleteByQueryStatsProto::ByteSizeLong() const {
4243 // @@protoc_insertion_point(message_byte_size_start:icing.lib.DeleteByQueryStatsProto)
4244   size_t total_size = 0;
4245 
4246   ::uint32_t cached_has_bits = 0;
4247   // Prevent compiler warnings about cached_has_bits being unused
4248   (void) cached_has_bits;
4249 
4250   cached_has_bits = _impl_._has_bits_[0];
4251   if (cached_has_bits & 0x000000ffu) {
4252     // optional int32 latency_ms = 1;
4253     if (cached_has_bits & 0x00000001u) {
4254       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_latency_ms());
4255     }
4256 
4257     // optional int32 num_documents_deleted = 2;
4258     if (cached_has_bits & 0x00000002u) {
4259       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_documents_deleted());
4260     }
4261 
4262     // optional int32 query_length = 3;
4263     if (cached_has_bits & 0x00000004u) {
4264       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_query_length());
4265     }
4266 
4267     // optional int32 num_terms = 4;
4268     if (cached_has_bits & 0x00000008u) {
4269       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_terms());
4270     }
4271 
4272     // optional int32 num_namespaces_filtered = 5;
4273     if (cached_has_bits & 0x00000010u) {
4274       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_namespaces_filtered());
4275     }
4276 
4277     // optional int32 num_schema_types_filtered = 6;
4278     if (cached_has_bits & 0x00000020u) {
4279       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_schema_types_filtered());
4280     }
4281 
4282     // optional int32 parse_query_latency_ms = 7;
4283     if (cached_has_bits & 0x00000040u) {
4284       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_parse_query_latency_ms());
4285     }
4286 
4287     // optional int32 document_removal_latency_ms = 8;
4288     if (cached_has_bits & 0x00000080u) {
4289       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_document_removal_latency_ms());
4290     }
4291 
4292   }
4293   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4294     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4295   }
4296   int cached_size = ::_pbi::ToCachedSize(total_size);
4297   SetCachedSize(cached_size);
4298   return total_size;
4299 }
4300 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4301 void DeleteByQueryStatsProto::CheckTypeAndMergeFrom(
4302     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4303   MergeFrom(*::_pbi::DownCast<const DeleteByQueryStatsProto*>(
4304       &from));
4305 }
4306 
MergeFrom(const DeleteByQueryStatsProto & from)4307 void DeleteByQueryStatsProto::MergeFrom(const DeleteByQueryStatsProto& from) {
4308   DeleteByQueryStatsProto* const _this = this;
4309   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.DeleteByQueryStatsProto)
4310   GOOGLE_DCHECK_NE(&from, _this);
4311   ::uint32_t cached_has_bits = 0;
4312   (void) cached_has_bits;
4313 
4314   cached_has_bits = from._impl_._has_bits_[0];
4315   if (cached_has_bits & 0x000000ffu) {
4316     if (cached_has_bits & 0x00000001u) {
4317       _this->_impl_.latency_ms_ = from._impl_.latency_ms_;
4318     }
4319     if (cached_has_bits & 0x00000002u) {
4320       _this->_impl_.num_documents_deleted_ = from._impl_.num_documents_deleted_;
4321     }
4322     if (cached_has_bits & 0x00000004u) {
4323       _this->_impl_.query_length_ = from._impl_.query_length_;
4324     }
4325     if (cached_has_bits & 0x00000008u) {
4326       _this->_impl_.num_terms_ = from._impl_.num_terms_;
4327     }
4328     if (cached_has_bits & 0x00000010u) {
4329       _this->_impl_.num_namespaces_filtered_ = from._impl_.num_namespaces_filtered_;
4330     }
4331     if (cached_has_bits & 0x00000020u) {
4332       _this->_impl_.num_schema_types_filtered_ = from._impl_.num_schema_types_filtered_;
4333     }
4334     if (cached_has_bits & 0x00000040u) {
4335       _this->_impl_.parse_query_latency_ms_ = from._impl_.parse_query_latency_ms_;
4336     }
4337     if (cached_has_bits & 0x00000080u) {
4338       _this->_impl_.document_removal_latency_ms_ = from._impl_.document_removal_latency_ms_;
4339     }
4340     _this->_impl_._has_bits_[0] |= cached_has_bits;
4341   }
4342   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4343 }
4344 
CopyFrom(const DeleteByQueryStatsProto & from)4345 void DeleteByQueryStatsProto::CopyFrom(const DeleteByQueryStatsProto& from) {
4346 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.DeleteByQueryStatsProto)
4347   if (&from == this) return;
4348   Clear();
4349   MergeFrom(from);
4350 }
4351 
IsInitialized() const4352 bool DeleteByQueryStatsProto::IsInitialized() const {
4353   return true;
4354 }
4355 
InternalSwap(DeleteByQueryStatsProto * other)4356 void DeleteByQueryStatsProto::InternalSwap(DeleteByQueryStatsProto* other) {
4357   using std::swap;
4358   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4359   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
4360   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
4361       PROTOBUF_FIELD_OFFSET(DeleteByQueryStatsProto, _impl_.document_removal_latency_ms_)
4362       + sizeof(DeleteByQueryStatsProto::_impl_.document_removal_latency_ms_)  // NOLINT
4363       - PROTOBUF_FIELD_OFFSET(DeleteByQueryStatsProto, _impl_.latency_ms_)>(
4364           reinterpret_cast<char*>(&_impl_.latency_ms_),
4365           reinterpret_cast<char*>(&other->_impl_.latency_ms_));
4366 }
4367 
GetTypeName() const4368 std::string DeleteByQueryStatsProto::GetTypeName() const {
4369   return "icing.lib.DeleteByQueryStatsProto";
4370 }
4371 
4372 
4373 // @@protoc_insertion_point(namespace_scope)
4374 }  // namespace lib
4375 }  // namespace icing
4376 PROTOBUF_NAMESPACE_OPEN
4377 template<> PROTOBUF_NOINLINE ::icing::lib::InitializeStatsProto*
CreateMaybeMessage(Arena * arena)4378 Arena::CreateMaybeMessage< ::icing::lib::InitializeStatsProto >(Arena* arena) {
4379   return Arena::CreateMessageInternal< ::icing::lib::InitializeStatsProto >(arena);
4380 }
4381 template<> PROTOBUF_NOINLINE ::icing::lib::PutDocumentStatsProto_TokenizationStats*
CreateMaybeMessage(Arena * arena)4382 Arena::CreateMaybeMessage< ::icing::lib::PutDocumentStatsProto_TokenizationStats >(Arena* arena) {
4383   return Arena::CreateMessageInternal< ::icing::lib::PutDocumentStatsProto_TokenizationStats >(arena);
4384 }
4385 template<> PROTOBUF_NOINLINE ::icing::lib::PutDocumentStatsProto*
CreateMaybeMessage(Arena * arena)4386 Arena::CreateMaybeMessage< ::icing::lib::PutDocumentStatsProto >(Arena* arena) {
4387   return Arena::CreateMessageInternal< ::icing::lib::PutDocumentStatsProto >(arena);
4388 }
4389 template<> PROTOBUF_NOINLINE ::icing::lib::QueryStatsProto_SearchStats*
CreateMaybeMessage(Arena * arena)4390 Arena::CreateMaybeMessage< ::icing::lib::QueryStatsProto_SearchStats >(Arena* arena) {
4391   return Arena::CreateMessageInternal< ::icing::lib::QueryStatsProto_SearchStats >(arena);
4392 }
4393 template<> PROTOBUF_NOINLINE ::icing::lib::QueryStatsProto*
CreateMaybeMessage(Arena * arena)4394 Arena::CreateMaybeMessage< ::icing::lib::QueryStatsProto >(Arena* arena) {
4395   return Arena::CreateMessageInternal< ::icing::lib::QueryStatsProto >(arena);
4396 }
4397 template<> PROTOBUF_NOINLINE ::icing::lib::DeleteStatsProto_DeleteType*
CreateMaybeMessage(Arena * arena)4398 Arena::CreateMaybeMessage< ::icing::lib::DeleteStatsProto_DeleteType >(Arena* arena) {
4399   return Arena::CreateMessageInternal< ::icing::lib::DeleteStatsProto_DeleteType >(arena);
4400 }
4401 template<> PROTOBUF_NOINLINE ::icing::lib::DeleteStatsProto*
CreateMaybeMessage(Arena * arena)4402 Arena::CreateMaybeMessage< ::icing::lib::DeleteStatsProto >(Arena* arena) {
4403   return Arena::CreateMessageInternal< ::icing::lib::DeleteStatsProto >(arena);
4404 }
4405 template<> PROTOBUF_NOINLINE ::icing::lib::DeleteByQueryStatsProto*
CreateMaybeMessage(Arena * arena)4406 Arena::CreateMaybeMessage< ::icing::lib::DeleteByQueryStatsProto >(Arena* arena) {
4407   return Arena::CreateMessageInternal< ::icing::lib::DeleteByQueryStatsProto >(arena);
4408 }
4409 PROTOBUF_NAMESPACE_CLOSE
4410 
4411 // @@protoc_insertion_point(global_scope)
4412 #include <google/protobuf/port_undef.inc>
4413