1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: icing/proto/search.proto
3 
4 #include "icing/proto/search.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 {
SearchSpecProto_EmbeddingQueryMetricType(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR SearchSpecProto_EmbeddingQueryMetricType::SearchSpecProto_EmbeddingQueryMetricType(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._cached_size_)*/{}} {}
26 struct SearchSpecProto_EmbeddingQueryMetricTypeDefaultTypeInternal {
SearchSpecProto_EmbeddingQueryMetricTypeDefaultTypeInternalicing::lib::SearchSpecProto_EmbeddingQueryMetricTypeDefaultTypeInternal27   PROTOBUF_CONSTEXPR SearchSpecProto_EmbeddingQueryMetricTypeDefaultTypeInternal()
28       : _instance(::_pbi::ConstantInitialized{}) {}
~SearchSpecProto_EmbeddingQueryMetricTypeDefaultTypeInternalicing::lib::SearchSpecProto_EmbeddingQueryMetricTypeDefaultTypeInternal29   ~SearchSpecProto_EmbeddingQueryMetricTypeDefaultTypeInternal() {}
30   union {  // NOLINT(misc-non-private-member-variables-in-classes)
31     SearchSpecProto_EmbeddingQueryMetricType _instance;
32   };
33 };
34 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchSpecProto_EmbeddingQueryMetricTypeDefaultTypeInternal _SearchSpecProto_EmbeddingQueryMetricType_default_instance_;
SearchSpecProto(::_pbi::ConstantInitialized)35 PROTOBUF_CONSTEXPR SearchSpecProto::SearchSpecProto(
36     ::_pbi::ConstantInitialized): _impl_{
37     /*decltype(_impl_._has_bits_)*/{}
38   , /*decltype(_impl_._cached_size_)*/{}
39   , /*decltype(_impl_.namespace_filters_)*/{}
40   , /*decltype(_impl_.schema_type_filters_)*/{}
41   , /*decltype(_impl_.enabled_features_)*/{}
42   , /*decltype(_impl_.type_property_filters_)*/{}
43   , /*decltype(_impl_.embedding_query_vectors_)*/{}
44   , /*decltype(_impl_.query_parameter_strings_)*/{}
45   , /*decltype(_impl_.document_uri_filters_)*/{}
46   , /*decltype(_impl_.query_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
47   , /*decltype(_impl_.join_spec_)*/nullptr
48   , /*decltype(_impl_.java_to_native_start_timestamp_ms_)*/::int64_t{0}
49   , /*decltype(_impl_.term_match_type_)*/0
50   , /*decltype(_impl_.embedding_query_metric_type_)*/0
51   , /*decltype(_impl_.use_read_only_search_)*/true} {}
52 struct SearchSpecProtoDefaultTypeInternal {
SearchSpecProtoDefaultTypeInternalicing::lib::SearchSpecProtoDefaultTypeInternal53   PROTOBUF_CONSTEXPR SearchSpecProtoDefaultTypeInternal()
54       : _instance(::_pbi::ConstantInitialized{}) {}
~SearchSpecProtoDefaultTypeInternalicing::lib::SearchSpecProtoDefaultTypeInternal55   ~SearchSpecProtoDefaultTypeInternal() {}
56   union {  // NOLINT(misc-non-private-member-variables-in-classes)
57     SearchSpecProto _instance;
58   };
59 };
60 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchSpecProtoDefaultTypeInternal _SearchSpecProto_default_instance_;
ResultSpecProto_SnippetSpecProto(::_pbi::ConstantInitialized)61 PROTOBUF_CONSTEXPR ResultSpecProto_SnippetSpecProto::ResultSpecProto_SnippetSpecProto(
62     ::_pbi::ConstantInitialized): _impl_{
63     /*decltype(_impl_._has_bits_)*/{}
64   , /*decltype(_impl_._cached_size_)*/{}
65   , /*decltype(_impl_.num_to_snippet_)*/0
66   , /*decltype(_impl_.num_matches_per_property_)*/0
67   , /*decltype(_impl_.max_window_utf32_length_)*/0} {}
68 struct ResultSpecProto_SnippetSpecProtoDefaultTypeInternal {
ResultSpecProto_SnippetSpecProtoDefaultTypeInternalicing::lib::ResultSpecProto_SnippetSpecProtoDefaultTypeInternal69   PROTOBUF_CONSTEXPR ResultSpecProto_SnippetSpecProtoDefaultTypeInternal()
70       : _instance(::_pbi::ConstantInitialized{}) {}
~ResultSpecProto_SnippetSpecProtoDefaultTypeInternalicing::lib::ResultSpecProto_SnippetSpecProtoDefaultTypeInternal71   ~ResultSpecProto_SnippetSpecProtoDefaultTypeInternal() {}
72   union {  // NOLINT(misc-non-private-member-variables-in-classes)
73     ResultSpecProto_SnippetSpecProto _instance;
74   };
75 };
76 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResultSpecProto_SnippetSpecProtoDefaultTypeInternal _ResultSpecProto_SnippetSpecProto_default_instance_;
ResultSpecProto_ResultGrouping_Entry(::_pbi::ConstantInitialized)77 PROTOBUF_CONSTEXPR ResultSpecProto_ResultGrouping_Entry::ResultSpecProto_ResultGrouping_Entry(
78     ::_pbi::ConstantInitialized): _impl_{
79     /*decltype(_impl_._has_bits_)*/{}
80   , /*decltype(_impl_._cached_size_)*/{}
81   , /*decltype(_impl_.namespace__)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
82   , /*decltype(_impl_.schema_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
83 struct ResultSpecProto_ResultGrouping_EntryDefaultTypeInternal {
ResultSpecProto_ResultGrouping_EntryDefaultTypeInternalicing::lib::ResultSpecProto_ResultGrouping_EntryDefaultTypeInternal84   PROTOBUF_CONSTEXPR ResultSpecProto_ResultGrouping_EntryDefaultTypeInternal()
85       : _instance(::_pbi::ConstantInitialized{}) {}
~ResultSpecProto_ResultGrouping_EntryDefaultTypeInternalicing::lib::ResultSpecProto_ResultGrouping_EntryDefaultTypeInternal86   ~ResultSpecProto_ResultGrouping_EntryDefaultTypeInternal() {}
87   union {  // NOLINT(misc-non-private-member-variables-in-classes)
88     ResultSpecProto_ResultGrouping_Entry _instance;
89   };
90 };
91 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResultSpecProto_ResultGrouping_EntryDefaultTypeInternal _ResultSpecProto_ResultGrouping_Entry_default_instance_;
ResultSpecProto_ResultGrouping(::_pbi::ConstantInitialized)92 PROTOBUF_CONSTEXPR ResultSpecProto_ResultGrouping::ResultSpecProto_ResultGrouping(
93     ::_pbi::ConstantInitialized): _impl_{
94     /*decltype(_impl_._has_bits_)*/{}
95   , /*decltype(_impl_._cached_size_)*/{}
96   , /*decltype(_impl_.entry_groupings_)*/{}
97   , /*decltype(_impl_.max_results_)*/0} {}
98 struct ResultSpecProto_ResultGroupingDefaultTypeInternal {
ResultSpecProto_ResultGroupingDefaultTypeInternalicing::lib::ResultSpecProto_ResultGroupingDefaultTypeInternal99   PROTOBUF_CONSTEXPR ResultSpecProto_ResultGroupingDefaultTypeInternal()
100       : _instance(::_pbi::ConstantInitialized{}) {}
~ResultSpecProto_ResultGroupingDefaultTypeInternalicing::lib::ResultSpecProto_ResultGroupingDefaultTypeInternal101   ~ResultSpecProto_ResultGroupingDefaultTypeInternal() {}
102   union {  // NOLINT(misc-non-private-member-variables-in-classes)
103     ResultSpecProto_ResultGrouping _instance;
104   };
105 };
106 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResultSpecProto_ResultGroupingDefaultTypeInternal _ResultSpecProto_ResultGrouping_default_instance_;
ResultSpecProto(::_pbi::ConstantInitialized)107 PROTOBUF_CONSTEXPR ResultSpecProto::ResultSpecProto(
108     ::_pbi::ConstantInitialized): _impl_{
109     /*decltype(_impl_._has_bits_)*/{}
110   , /*decltype(_impl_._cached_size_)*/{}
111   , /*decltype(_impl_.type_property_masks_)*/{}
112   , /*decltype(_impl_.result_groupings_)*/{}
113   , /*decltype(_impl_.snippet_spec_)*/nullptr
114   , /*decltype(_impl_.debug_info_)*/false
115   , /*decltype(_impl_.result_group_type_)*/0
116   , /*decltype(_impl_.max_joined_children_per_parent_to_return_)*/0
117   , /*decltype(_impl_.num_to_score_)*/30000
118   , /*decltype(_impl_.num_per_page_)*/10
119   , /*decltype(_impl_.num_total_bytes_per_page_threshold_)*/2147483647} {}
120 struct ResultSpecProtoDefaultTypeInternal {
ResultSpecProtoDefaultTypeInternalicing::lib::ResultSpecProtoDefaultTypeInternal121   PROTOBUF_CONSTEXPR ResultSpecProtoDefaultTypeInternal()
122       : _instance(::_pbi::ConstantInitialized{}) {}
~ResultSpecProtoDefaultTypeInternalicing::lib::ResultSpecProtoDefaultTypeInternal123   ~ResultSpecProtoDefaultTypeInternal() {}
124   union {  // NOLINT(misc-non-private-member-variables-in-classes)
125     ResultSpecProto _instance;
126   };
127 };
128 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResultSpecProtoDefaultTypeInternal _ResultSpecProto_default_instance_;
SnippetMatchProto(::_pbi::ConstantInitialized)129 PROTOBUF_CONSTEXPR SnippetMatchProto::SnippetMatchProto(
130     ::_pbi::ConstantInitialized): _impl_{
131     /*decltype(_impl_._has_bits_)*/{}
132   , /*decltype(_impl_._cached_size_)*/{}
133   , /*decltype(_impl_.exact_match_byte_position_)*/0
134   , /*decltype(_impl_.exact_match_byte_length_)*/0
135   , /*decltype(_impl_.window_byte_position_)*/0
136   , /*decltype(_impl_.window_byte_length_)*/0
137   , /*decltype(_impl_.exact_match_utf16_position_)*/0
138   , /*decltype(_impl_.exact_match_utf16_length_)*/0
139   , /*decltype(_impl_.window_utf16_position_)*/0
140   , /*decltype(_impl_.window_utf16_length_)*/0
141   , /*decltype(_impl_.submatch_byte_length_)*/0
142   , /*decltype(_impl_.submatch_utf16_length_)*/0} {}
143 struct SnippetMatchProtoDefaultTypeInternal {
SnippetMatchProtoDefaultTypeInternalicing::lib::SnippetMatchProtoDefaultTypeInternal144   PROTOBUF_CONSTEXPR SnippetMatchProtoDefaultTypeInternal()
145       : _instance(::_pbi::ConstantInitialized{}) {}
~SnippetMatchProtoDefaultTypeInternalicing::lib::SnippetMatchProtoDefaultTypeInternal146   ~SnippetMatchProtoDefaultTypeInternal() {}
147   union {  // NOLINT(misc-non-private-member-variables-in-classes)
148     SnippetMatchProto _instance;
149   };
150 };
151 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SnippetMatchProtoDefaultTypeInternal _SnippetMatchProto_default_instance_;
SnippetProto_EntryProto(::_pbi::ConstantInitialized)152 PROTOBUF_CONSTEXPR SnippetProto_EntryProto::SnippetProto_EntryProto(
153     ::_pbi::ConstantInitialized): _impl_{
154     /*decltype(_impl_._has_bits_)*/{}
155   , /*decltype(_impl_._cached_size_)*/{}
156   , /*decltype(_impl_.snippet_matches_)*/{}
157   , /*decltype(_impl_.property_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
158 struct SnippetProto_EntryProtoDefaultTypeInternal {
SnippetProto_EntryProtoDefaultTypeInternalicing::lib::SnippetProto_EntryProtoDefaultTypeInternal159   PROTOBUF_CONSTEXPR SnippetProto_EntryProtoDefaultTypeInternal()
160       : _instance(::_pbi::ConstantInitialized{}) {}
~SnippetProto_EntryProtoDefaultTypeInternalicing::lib::SnippetProto_EntryProtoDefaultTypeInternal161   ~SnippetProto_EntryProtoDefaultTypeInternal() {}
162   union {  // NOLINT(misc-non-private-member-variables-in-classes)
163     SnippetProto_EntryProto _instance;
164   };
165 };
166 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SnippetProto_EntryProtoDefaultTypeInternal _SnippetProto_EntryProto_default_instance_;
SnippetProto(::_pbi::ConstantInitialized)167 PROTOBUF_CONSTEXPR SnippetProto::SnippetProto(
168     ::_pbi::ConstantInitialized): _impl_{
169     /*decltype(_impl_.entries_)*/{}
170   , /*decltype(_impl_._cached_size_)*/{}} {}
171 struct SnippetProtoDefaultTypeInternal {
SnippetProtoDefaultTypeInternalicing::lib::SnippetProtoDefaultTypeInternal172   PROTOBUF_CONSTEXPR SnippetProtoDefaultTypeInternal()
173       : _instance(::_pbi::ConstantInitialized{}) {}
~SnippetProtoDefaultTypeInternalicing::lib::SnippetProtoDefaultTypeInternal174   ~SnippetProtoDefaultTypeInternal() {}
175   union {  // NOLINT(misc-non-private-member-variables-in-classes)
176     SnippetProto _instance;
177   };
178 };
179 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SnippetProtoDefaultTypeInternal _SnippetProto_default_instance_;
SearchResultProto_ResultProto(::_pbi::ConstantInitialized)180 PROTOBUF_CONSTEXPR SearchResultProto_ResultProto::SearchResultProto_ResultProto(
181     ::_pbi::ConstantInitialized): _impl_{
182     /*decltype(_impl_._has_bits_)*/{}
183   , /*decltype(_impl_._cached_size_)*/{}
184   , /*decltype(_impl_.joined_results_)*/{}
185   , /*decltype(_impl_.additional_scores_)*/{}
186   , /*decltype(_impl_.document_)*/nullptr
187   , /*decltype(_impl_.snippet_)*/nullptr
188   , /*decltype(_impl_.score_)*/0} {}
189 struct SearchResultProto_ResultProtoDefaultTypeInternal {
SearchResultProto_ResultProtoDefaultTypeInternalicing::lib::SearchResultProto_ResultProtoDefaultTypeInternal190   PROTOBUF_CONSTEXPR SearchResultProto_ResultProtoDefaultTypeInternal()
191       : _instance(::_pbi::ConstantInitialized{}) {}
~SearchResultProto_ResultProtoDefaultTypeInternalicing::lib::SearchResultProto_ResultProtoDefaultTypeInternal192   ~SearchResultProto_ResultProtoDefaultTypeInternal() {}
193   union {  // NOLINT(misc-non-private-member-variables-in-classes)
194     SearchResultProto_ResultProto _instance;
195   };
196 };
197 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchResultProto_ResultProtoDefaultTypeInternal _SearchResultProto_ResultProto_default_instance_;
SearchResultProto_DebugInfoProto(::_pbi::ConstantInitialized)198 PROTOBUF_CONSTEXPR SearchResultProto_DebugInfoProto::SearchResultProto_DebugInfoProto(
199     ::_pbi::ConstantInitialized): _impl_{
200     /*decltype(_impl_._has_bits_)*/{}
201   , /*decltype(_impl_._cached_size_)*/{}
202   , /*decltype(_impl_.executed_query_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
203 struct SearchResultProto_DebugInfoProtoDefaultTypeInternal {
SearchResultProto_DebugInfoProtoDefaultTypeInternalicing::lib::SearchResultProto_DebugInfoProtoDefaultTypeInternal204   PROTOBUF_CONSTEXPR SearchResultProto_DebugInfoProtoDefaultTypeInternal()
205       : _instance(::_pbi::ConstantInitialized{}) {}
~SearchResultProto_DebugInfoProtoDefaultTypeInternalicing::lib::SearchResultProto_DebugInfoProtoDefaultTypeInternal206   ~SearchResultProto_DebugInfoProtoDefaultTypeInternal() {}
207   union {  // NOLINT(misc-non-private-member-variables-in-classes)
208     SearchResultProto_DebugInfoProto _instance;
209   };
210 };
211 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchResultProto_DebugInfoProtoDefaultTypeInternal _SearchResultProto_DebugInfoProto_default_instance_;
SearchResultProto(::_pbi::ConstantInitialized)212 PROTOBUF_CONSTEXPR SearchResultProto::SearchResultProto(
213     ::_pbi::ConstantInitialized): _impl_{
214     /*decltype(_impl_._has_bits_)*/{}
215   , /*decltype(_impl_._cached_size_)*/{}
216   , /*decltype(_impl_.results_)*/{}
217   , /*decltype(_impl_.status_)*/nullptr
218   , /*decltype(_impl_.debug_info_)*/nullptr
219   , /*decltype(_impl_.query_stats_)*/nullptr
220   , /*decltype(_impl_.next_page_token_)*/::uint64_t{0u}} {}
221 struct SearchResultProtoDefaultTypeInternal {
SearchResultProtoDefaultTypeInternalicing::lib::SearchResultProtoDefaultTypeInternal222   PROTOBUF_CONSTEXPR SearchResultProtoDefaultTypeInternal()
223       : _instance(::_pbi::ConstantInitialized{}) {}
~SearchResultProtoDefaultTypeInternalicing::lib::SearchResultProtoDefaultTypeInternal224   ~SearchResultProtoDefaultTypeInternal() {}
225   union {  // NOLINT(misc-non-private-member-variables-in-classes)
226     SearchResultProto _instance;
227   };
228 };
229 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SearchResultProtoDefaultTypeInternal _SearchResultProto_default_instance_;
TypePropertyMask(::_pbi::ConstantInitialized)230 PROTOBUF_CONSTEXPR TypePropertyMask::TypePropertyMask(
231     ::_pbi::ConstantInitialized): _impl_{
232     /*decltype(_impl_._has_bits_)*/{}
233   , /*decltype(_impl_._cached_size_)*/{}
234   , /*decltype(_impl_.paths_)*/{}
235   , /*decltype(_impl_.schema_type_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
236 struct TypePropertyMaskDefaultTypeInternal {
TypePropertyMaskDefaultTypeInternalicing::lib::TypePropertyMaskDefaultTypeInternal237   PROTOBUF_CONSTEXPR TypePropertyMaskDefaultTypeInternal()
238       : _instance(::_pbi::ConstantInitialized{}) {}
~TypePropertyMaskDefaultTypeInternalicing::lib::TypePropertyMaskDefaultTypeInternal239   ~TypePropertyMaskDefaultTypeInternal() {}
240   union {  // NOLINT(misc-non-private-member-variables-in-classes)
241     TypePropertyMask _instance;
242   };
243 };
244 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TypePropertyMaskDefaultTypeInternal _TypePropertyMask_default_instance_;
GetResultSpecProto(::_pbi::ConstantInitialized)245 PROTOBUF_CONSTEXPR GetResultSpecProto::GetResultSpecProto(
246     ::_pbi::ConstantInitialized): _impl_{
247     /*decltype(_impl_.type_property_masks_)*/{}
248   , /*decltype(_impl_._cached_size_)*/{}} {}
249 struct GetResultSpecProtoDefaultTypeInternal {
GetResultSpecProtoDefaultTypeInternalicing::lib::GetResultSpecProtoDefaultTypeInternal250   PROTOBUF_CONSTEXPR GetResultSpecProtoDefaultTypeInternal()
251       : _instance(::_pbi::ConstantInitialized{}) {}
~GetResultSpecProtoDefaultTypeInternalicing::lib::GetResultSpecProtoDefaultTypeInternal252   ~GetResultSpecProtoDefaultTypeInternal() {}
253   union {  // NOLINT(misc-non-private-member-variables-in-classes)
254     GetResultSpecProto _instance;
255   };
256 };
257 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GetResultSpecProtoDefaultTypeInternal _GetResultSpecProto_default_instance_;
SuggestionSpecProto(::_pbi::ConstantInitialized)258 PROTOBUF_CONSTEXPR SuggestionSpecProto::SuggestionSpecProto(
259     ::_pbi::ConstantInitialized): _impl_{
260     /*decltype(_impl_._has_bits_)*/{}
261   , /*decltype(_impl_._cached_size_)*/{}
262   , /*decltype(_impl_.namespace_filters_)*/{}
263   , /*decltype(_impl_.document_uri_filters_)*/{}
264   , /*decltype(_impl_.schema_type_filters_)*/{}
265   , /*decltype(_impl_.type_property_filters_)*/{}
266   , /*decltype(_impl_.embedding_query_vectors_)*/{}
267   , /*decltype(_impl_.query_parameter_strings_)*/{}
268   , /*decltype(_impl_.enabled_features_)*/{}
269   , /*decltype(_impl_.prefix_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
270   , /*decltype(_impl_.scoring_spec_)*/nullptr
271   , /*decltype(_impl_.num_to_return_)*/0
272   , /*decltype(_impl_.embedding_query_metric_type_)*/0} {}
273 struct SuggestionSpecProtoDefaultTypeInternal {
SuggestionSpecProtoDefaultTypeInternalicing::lib::SuggestionSpecProtoDefaultTypeInternal274   PROTOBUF_CONSTEXPR SuggestionSpecProtoDefaultTypeInternal()
275       : _instance(::_pbi::ConstantInitialized{}) {}
~SuggestionSpecProtoDefaultTypeInternalicing::lib::SuggestionSpecProtoDefaultTypeInternal276   ~SuggestionSpecProtoDefaultTypeInternal() {}
277   union {  // NOLINT(misc-non-private-member-variables-in-classes)
278     SuggestionSpecProto _instance;
279   };
280 };
281 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SuggestionSpecProtoDefaultTypeInternal _SuggestionSpecProto_default_instance_;
NamespaceDocumentUriGroup(::_pbi::ConstantInitialized)282 PROTOBUF_CONSTEXPR NamespaceDocumentUriGroup::NamespaceDocumentUriGroup(
283     ::_pbi::ConstantInitialized): _impl_{
284     /*decltype(_impl_._has_bits_)*/{}
285   , /*decltype(_impl_._cached_size_)*/{}
286   , /*decltype(_impl_.document_uris_)*/{}
287   , /*decltype(_impl_.namespace__)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
288 struct NamespaceDocumentUriGroupDefaultTypeInternal {
NamespaceDocumentUriGroupDefaultTypeInternalicing::lib::NamespaceDocumentUriGroupDefaultTypeInternal289   PROTOBUF_CONSTEXPR NamespaceDocumentUriGroupDefaultTypeInternal()
290       : _instance(::_pbi::ConstantInitialized{}) {}
~NamespaceDocumentUriGroupDefaultTypeInternalicing::lib::NamespaceDocumentUriGroupDefaultTypeInternal291   ~NamespaceDocumentUriGroupDefaultTypeInternal() {}
292   union {  // NOLINT(misc-non-private-member-variables-in-classes)
293     NamespaceDocumentUriGroup _instance;
294   };
295 };
296 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NamespaceDocumentUriGroupDefaultTypeInternal _NamespaceDocumentUriGroup_default_instance_;
SuggestionResponse_Suggestion(::_pbi::ConstantInitialized)297 PROTOBUF_CONSTEXPR SuggestionResponse_Suggestion::SuggestionResponse_Suggestion(
298     ::_pbi::ConstantInitialized): _impl_{
299     /*decltype(_impl_._has_bits_)*/{}
300   , /*decltype(_impl_._cached_size_)*/{}
301   , /*decltype(_impl_.query_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}} {}
302 struct SuggestionResponse_SuggestionDefaultTypeInternal {
SuggestionResponse_SuggestionDefaultTypeInternalicing::lib::SuggestionResponse_SuggestionDefaultTypeInternal303   PROTOBUF_CONSTEXPR SuggestionResponse_SuggestionDefaultTypeInternal()
304       : _instance(::_pbi::ConstantInitialized{}) {}
~SuggestionResponse_SuggestionDefaultTypeInternalicing::lib::SuggestionResponse_SuggestionDefaultTypeInternal305   ~SuggestionResponse_SuggestionDefaultTypeInternal() {}
306   union {  // NOLINT(misc-non-private-member-variables-in-classes)
307     SuggestionResponse_Suggestion _instance;
308   };
309 };
310 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SuggestionResponse_SuggestionDefaultTypeInternal _SuggestionResponse_Suggestion_default_instance_;
SuggestionResponse(::_pbi::ConstantInitialized)311 PROTOBUF_CONSTEXPR SuggestionResponse::SuggestionResponse(
312     ::_pbi::ConstantInitialized): _impl_{
313     /*decltype(_impl_._has_bits_)*/{}
314   , /*decltype(_impl_._cached_size_)*/{}
315   , /*decltype(_impl_.suggestions_)*/{}
316   , /*decltype(_impl_.status_)*/nullptr} {}
317 struct SuggestionResponseDefaultTypeInternal {
SuggestionResponseDefaultTypeInternalicing::lib::SuggestionResponseDefaultTypeInternal318   PROTOBUF_CONSTEXPR SuggestionResponseDefaultTypeInternal()
319       : _instance(::_pbi::ConstantInitialized{}) {}
~SuggestionResponseDefaultTypeInternalicing::lib::SuggestionResponseDefaultTypeInternal320   ~SuggestionResponseDefaultTypeInternal() {}
321   union {  // NOLINT(misc-non-private-member-variables-in-classes)
322     SuggestionResponse _instance;
323   };
324 };
325 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SuggestionResponseDefaultTypeInternal _SuggestionResponse_default_instance_;
JoinSpecProto_NestedSpecProto(::_pbi::ConstantInitialized)326 PROTOBUF_CONSTEXPR JoinSpecProto_NestedSpecProto::JoinSpecProto_NestedSpecProto(
327     ::_pbi::ConstantInitialized): _impl_{
328     /*decltype(_impl_._has_bits_)*/{}
329   , /*decltype(_impl_._cached_size_)*/{}
330   , /*decltype(_impl_.search_spec_)*/nullptr
331   , /*decltype(_impl_.scoring_spec_)*/nullptr
332   , /*decltype(_impl_.result_spec_)*/nullptr} {}
333 struct JoinSpecProto_NestedSpecProtoDefaultTypeInternal {
JoinSpecProto_NestedSpecProtoDefaultTypeInternalicing::lib::JoinSpecProto_NestedSpecProtoDefaultTypeInternal334   PROTOBUF_CONSTEXPR JoinSpecProto_NestedSpecProtoDefaultTypeInternal()
335       : _instance(::_pbi::ConstantInitialized{}) {}
~JoinSpecProto_NestedSpecProtoDefaultTypeInternalicing::lib::JoinSpecProto_NestedSpecProtoDefaultTypeInternal336   ~JoinSpecProto_NestedSpecProtoDefaultTypeInternal() {}
337   union {  // NOLINT(misc-non-private-member-variables-in-classes)
338     JoinSpecProto_NestedSpecProto _instance;
339   };
340 };
341 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 JoinSpecProto_NestedSpecProtoDefaultTypeInternal _JoinSpecProto_NestedSpecProto_default_instance_;
JoinSpecProto_AggregationScoringStrategy(::_pbi::ConstantInitialized)342 PROTOBUF_CONSTEXPR JoinSpecProto_AggregationScoringStrategy::JoinSpecProto_AggregationScoringStrategy(
343     ::_pbi::ConstantInitialized): _impl_{
344     /*decltype(_impl_._cached_size_)*/{}} {}
345 struct JoinSpecProto_AggregationScoringStrategyDefaultTypeInternal {
JoinSpecProto_AggregationScoringStrategyDefaultTypeInternalicing::lib::JoinSpecProto_AggregationScoringStrategyDefaultTypeInternal346   PROTOBUF_CONSTEXPR JoinSpecProto_AggregationScoringStrategyDefaultTypeInternal()
347       : _instance(::_pbi::ConstantInitialized{}) {}
~JoinSpecProto_AggregationScoringStrategyDefaultTypeInternalicing::lib::JoinSpecProto_AggregationScoringStrategyDefaultTypeInternal348   ~JoinSpecProto_AggregationScoringStrategyDefaultTypeInternal() {}
349   union {  // NOLINT(misc-non-private-member-variables-in-classes)
350     JoinSpecProto_AggregationScoringStrategy _instance;
351   };
352 };
353 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 JoinSpecProto_AggregationScoringStrategyDefaultTypeInternal _JoinSpecProto_AggregationScoringStrategy_default_instance_;
JoinSpecProto(::_pbi::ConstantInitialized)354 PROTOBUF_CONSTEXPR JoinSpecProto::JoinSpecProto(
355     ::_pbi::ConstantInitialized): _impl_{
356     /*decltype(_impl_._has_bits_)*/{}
357   , /*decltype(_impl_._cached_size_)*/{}
358   , /*decltype(_impl_.parent_property_expression_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
359   , /*decltype(_impl_.child_property_expression_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
360   , /*decltype(_impl_.nested_spec_)*/nullptr
361   , /*decltype(_impl_.max_joined_child_count_)*/0
362   , /*decltype(_impl_.aggregation_scoring_strategy_)*/0} {}
363 struct JoinSpecProtoDefaultTypeInternal {
JoinSpecProtoDefaultTypeInternalicing::lib::JoinSpecProtoDefaultTypeInternal364   PROTOBUF_CONSTEXPR JoinSpecProtoDefaultTypeInternal()
365       : _instance(::_pbi::ConstantInitialized{}) {}
~JoinSpecProtoDefaultTypeInternalicing::lib::JoinSpecProtoDefaultTypeInternal366   ~JoinSpecProtoDefaultTypeInternal() {}
367   union {  // NOLINT(misc-non-private-member-variables-in-classes)
368     JoinSpecProto _instance;
369   };
370 };
371 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 JoinSpecProtoDefaultTypeInternal _JoinSpecProto_default_instance_;
372 }  // namespace lib
373 }  // namespace icing
374 namespace icing {
375 namespace lib {
SearchSpecProto_EmbeddingQueryMetricType_Code_IsValid(int value)376 bool SearchSpecProto_EmbeddingQueryMetricType_Code_IsValid(int value) {
377   switch (value) {
378     case 0:
379     case 1:
380     case 2:
381     case 3:
382       return true;
383     default:
384       return false;
385   }
386 }
387 
388 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> SearchSpecProto_EmbeddingQueryMetricType_Code_strings[4] = {};
389 
390 static const char SearchSpecProto_EmbeddingQueryMetricType_Code_names[] =
391   "COSINE"
392   "DOT_PRODUCT"
393   "EUCLIDEAN"
394   "UNKNOWN";
395 
396 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry SearchSpecProto_EmbeddingQueryMetricType_Code_entries[] = {
397   { {SearchSpecProto_EmbeddingQueryMetricType_Code_names + 0, 6}, 1 },
398   { {SearchSpecProto_EmbeddingQueryMetricType_Code_names + 6, 11}, 2 },
399   { {SearchSpecProto_EmbeddingQueryMetricType_Code_names + 17, 9}, 3 },
400   { {SearchSpecProto_EmbeddingQueryMetricType_Code_names + 26, 7}, 0 },
401 };
402 
403 static const int SearchSpecProto_EmbeddingQueryMetricType_Code_entries_by_number[] = {
404   3, // 0 -> UNKNOWN
405   0, // 1 -> COSINE
406   1, // 2 -> DOT_PRODUCT
407   2, // 3 -> EUCLIDEAN
408 };
409 
SearchSpecProto_EmbeddingQueryMetricType_Code_Name(SearchSpecProto_EmbeddingQueryMetricType_Code value)410 const std::string& SearchSpecProto_EmbeddingQueryMetricType_Code_Name(
411     SearchSpecProto_EmbeddingQueryMetricType_Code value) {
412   static const bool dummy =
413       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
414           SearchSpecProto_EmbeddingQueryMetricType_Code_entries,
415           SearchSpecProto_EmbeddingQueryMetricType_Code_entries_by_number,
416           4, SearchSpecProto_EmbeddingQueryMetricType_Code_strings);
417   (void) dummy;
418   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
419       SearchSpecProto_EmbeddingQueryMetricType_Code_entries,
420       SearchSpecProto_EmbeddingQueryMetricType_Code_entries_by_number,
421       4, value);
422   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
423                      SearchSpecProto_EmbeddingQueryMetricType_Code_strings[idx].get();
424 }
SearchSpecProto_EmbeddingQueryMetricType_Code_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,SearchSpecProto_EmbeddingQueryMetricType_Code * value)425 bool SearchSpecProto_EmbeddingQueryMetricType_Code_Parse(
426     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, SearchSpecProto_EmbeddingQueryMetricType_Code* value) {
427   int int_value;
428   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
429       SearchSpecProto_EmbeddingQueryMetricType_Code_entries, 4, name, &int_value);
430   if (success) {
431     *value = static_cast<SearchSpecProto_EmbeddingQueryMetricType_Code>(int_value);
432   }
433   return success;
434 }
435 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
436 constexpr SearchSpecProto_EmbeddingQueryMetricType_Code SearchSpecProto_EmbeddingQueryMetricType::UNKNOWN;
437 constexpr SearchSpecProto_EmbeddingQueryMetricType_Code SearchSpecProto_EmbeddingQueryMetricType::COSINE;
438 constexpr SearchSpecProto_EmbeddingQueryMetricType_Code SearchSpecProto_EmbeddingQueryMetricType::DOT_PRODUCT;
439 constexpr SearchSpecProto_EmbeddingQueryMetricType_Code SearchSpecProto_EmbeddingQueryMetricType::EUCLIDEAN;
440 constexpr SearchSpecProto_EmbeddingQueryMetricType_Code SearchSpecProto_EmbeddingQueryMetricType::Code_MIN;
441 constexpr SearchSpecProto_EmbeddingQueryMetricType_Code SearchSpecProto_EmbeddingQueryMetricType::Code_MAX;
442 constexpr int SearchSpecProto_EmbeddingQueryMetricType::Code_ARRAYSIZE;
443 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
ResultSpecProto_ResultGroupingType_IsValid(int value)444 bool ResultSpecProto_ResultGroupingType_IsValid(int value) {
445   switch (value) {
446     case 0:
447     case 1:
448     case 2:
449     case 3:
450       return true;
451     default:
452       return false;
453   }
454 }
455 
456 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> ResultSpecProto_ResultGroupingType_strings[4] = {};
457 
458 static const char ResultSpecProto_ResultGroupingType_names[] =
459   "NAMESPACE"
460   "NAMESPACE_AND_SCHEMA_TYPE"
461   "NONE"
462   "SCHEMA_TYPE";
463 
464 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry ResultSpecProto_ResultGroupingType_entries[] = {
465   { {ResultSpecProto_ResultGroupingType_names + 0, 9}, 2 },
466   { {ResultSpecProto_ResultGroupingType_names + 9, 25}, 3 },
467   { {ResultSpecProto_ResultGroupingType_names + 34, 4}, 0 },
468   { {ResultSpecProto_ResultGroupingType_names + 38, 11}, 1 },
469 };
470 
471 static const int ResultSpecProto_ResultGroupingType_entries_by_number[] = {
472   2, // 0 -> NONE
473   3, // 1 -> SCHEMA_TYPE
474   0, // 2 -> NAMESPACE
475   1, // 3 -> NAMESPACE_AND_SCHEMA_TYPE
476 };
477 
ResultSpecProto_ResultGroupingType_Name(ResultSpecProto_ResultGroupingType value)478 const std::string& ResultSpecProto_ResultGroupingType_Name(
479     ResultSpecProto_ResultGroupingType value) {
480   static const bool dummy =
481       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
482           ResultSpecProto_ResultGroupingType_entries,
483           ResultSpecProto_ResultGroupingType_entries_by_number,
484           4, ResultSpecProto_ResultGroupingType_strings);
485   (void) dummy;
486   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
487       ResultSpecProto_ResultGroupingType_entries,
488       ResultSpecProto_ResultGroupingType_entries_by_number,
489       4, value);
490   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
491                      ResultSpecProto_ResultGroupingType_strings[idx].get();
492 }
ResultSpecProto_ResultGroupingType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,ResultSpecProto_ResultGroupingType * value)493 bool ResultSpecProto_ResultGroupingType_Parse(
494     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ResultSpecProto_ResultGroupingType* value) {
495   int int_value;
496   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
497       ResultSpecProto_ResultGroupingType_entries, 4, name, &int_value);
498   if (success) {
499     *value = static_cast<ResultSpecProto_ResultGroupingType>(int_value);
500   }
501   return success;
502 }
503 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
504 constexpr ResultSpecProto_ResultGroupingType ResultSpecProto::NONE;
505 constexpr ResultSpecProto_ResultGroupingType ResultSpecProto::SCHEMA_TYPE;
506 constexpr ResultSpecProto_ResultGroupingType ResultSpecProto::NAMESPACE;
507 constexpr ResultSpecProto_ResultGroupingType ResultSpecProto::NAMESPACE_AND_SCHEMA_TYPE;
508 constexpr ResultSpecProto_ResultGroupingType ResultSpecProto::ResultGroupingType_MIN;
509 constexpr ResultSpecProto_ResultGroupingType ResultSpecProto::ResultGroupingType_MAX;
510 constexpr int ResultSpecProto::ResultGroupingType_ARRAYSIZE;
511 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
JoinSpecProto_AggregationScoringStrategy_Code_IsValid(int value)512 bool JoinSpecProto_AggregationScoringStrategy_Code_IsValid(int value) {
513   switch (value) {
514     case 0:
515     case 1:
516     case 2:
517     case 3:
518     case 4:
519     case 5:
520       return true;
521     default:
522       return false;
523   }
524 }
525 
526 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> JoinSpecProto_AggregationScoringStrategy_Code_strings[6] = {};
527 
528 static const char JoinSpecProto_AggregationScoringStrategy_Code_names[] =
529   "AVG"
530   "COUNT"
531   "MAX"
532   "MIN"
533   "NONE"
534   "SUM";
535 
536 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry JoinSpecProto_AggregationScoringStrategy_Code_entries[] = {
537   { {JoinSpecProto_AggregationScoringStrategy_Code_names + 0, 3}, 3 },
538   { {JoinSpecProto_AggregationScoringStrategy_Code_names + 3, 5}, 1 },
539   { {JoinSpecProto_AggregationScoringStrategy_Code_names + 8, 3}, 4 },
540   { {JoinSpecProto_AggregationScoringStrategy_Code_names + 11, 3}, 2 },
541   { {JoinSpecProto_AggregationScoringStrategy_Code_names + 14, 4}, 0 },
542   { {JoinSpecProto_AggregationScoringStrategy_Code_names + 18, 3}, 5 },
543 };
544 
545 static const int JoinSpecProto_AggregationScoringStrategy_Code_entries_by_number[] = {
546   4, // 0 -> NONE
547   1, // 1 -> COUNT
548   3, // 2 -> MIN
549   0, // 3 -> AVG
550   2, // 4 -> MAX
551   5, // 5 -> SUM
552 };
553 
JoinSpecProto_AggregationScoringStrategy_Code_Name(JoinSpecProto_AggregationScoringStrategy_Code value)554 const std::string& JoinSpecProto_AggregationScoringStrategy_Code_Name(
555     JoinSpecProto_AggregationScoringStrategy_Code value) {
556   static const bool dummy =
557       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
558           JoinSpecProto_AggregationScoringStrategy_Code_entries,
559           JoinSpecProto_AggregationScoringStrategy_Code_entries_by_number,
560           6, JoinSpecProto_AggregationScoringStrategy_Code_strings);
561   (void) dummy;
562   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
563       JoinSpecProto_AggregationScoringStrategy_Code_entries,
564       JoinSpecProto_AggregationScoringStrategy_Code_entries_by_number,
565       6, value);
566   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
567                      JoinSpecProto_AggregationScoringStrategy_Code_strings[idx].get();
568 }
JoinSpecProto_AggregationScoringStrategy_Code_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,JoinSpecProto_AggregationScoringStrategy_Code * value)569 bool JoinSpecProto_AggregationScoringStrategy_Code_Parse(
570     ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, JoinSpecProto_AggregationScoringStrategy_Code* value) {
571   int int_value;
572   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
573       JoinSpecProto_AggregationScoringStrategy_Code_entries, 6, name, &int_value);
574   if (success) {
575     *value = static_cast<JoinSpecProto_AggregationScoringStrategy_Code>(int_value);
576   }
577   return success;
578 }
579 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
580 constexpr JoinSpecProto_AggregationScoringStrategy_Code JoinSpecProto_AggregationScoringStrategy::NONE;
581 constexpr JoinSpecProto_AggregationScoringStrategy_Code JoinSpecProto_AggregationScoringStrategy::COUNT;
582 constexpr JoinSpecProto_AggregationScoringStrategy_Code JoinSpecProto_AggregationScoringStrategy::MIN;
583 constexpr JoinSpecProto_AggregationScoringStrategy_Code JoinSpecProto_AggregationScoringStrategy::AVG;
584 constexpr JoinSpecProto_AggregationScoringStrategy_Code JoinSpecProto_AggregationScoringStrategy::MAX;
585 constexpr JoinSpecProto_AggregationScoringStrategy_Code JoinSpecProto_AggregationScoringStrategy::SUM;
586 constexpr JoinSpecProto_AggregationScoringStrategy_Code JoinSpecProto_AggregationScoringStrategy::Code_MIN;
587 constexpr JoinSpecProto_AggregationScoringStrategy_Code JoinSpecProto_AggregationScoringStrategy::Code_MAX;
588 constexpr int JoinSpecProto_AggregationScoringStrategy::Code_ARRAYSIZE;
589 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
590 
591 // ===================================================================
592 
593 class SearchSpecProto_EmbeddingQueryMetricType::_Internal {
594  public:
595 };
596 
SearchSpecProto_EmbeddingQueryMetricType(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)597 SearchSpecProto_EmbeddingQueryMetricType::SearchSpecProto_EmbeddingQueryMetricType(::PROTOBUF_NAMESPACE_ID::Arena* arena,
598                          bool is_message_owned)
599   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
600   SharedCtor(arena, is_message_owned);
601   // @@protoc_insertion_point(arena_constructor:icing.lib.SearchSpecProto.EmbeddingQueryMetricType)
602 }
SearchSpecProto_EmbeddingQueryMetricType(const SearchSpecProto_EmbeddingQueryMetricType & from)603 SearchSpecProto_EmbeddingQueryMetricType::SearchSpecProto_EmbeddingQueryMetricType(const SearchSpecProto_EmbeddingQueryMetricType& from)
604   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
605   SearchSpecProto_EmbeddingQueryMetricType* const _this = this; (void)_this;
606   new (&_impl_) Impl_{
607       /*decltype(_impl_._cached_size_)*/{}};
608 
609   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
610   // @@protoc_insertion_point(copy_constructor:icing.lib.SearchSpecProto.EmbeddingQueryMetricType)
611 }
612 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)613 inline void SearchSpecProto_EmbeddingQueryMetricType::SharedCtor(
614     ::_pb::Arena* arena, bool is_message_owned) {
615   (void)arena;
616   (void)is_message_owned;
617   new (&_impl_) Impl_{
618       /*decltype(_impl_._cached_size_)*/{}
619   };
620 }
621 
~SearchSpecProto_EmbeddingQueryMetricType()622 SearchSpecProto_EmbeddingQueryMetricType::~SearchSpecProto_EmbeddingQueryMetricType() {
623   // @@protoc_insertion_point(destructor:icing.lib.SearchSpecProto.EmbeddingQueryMetricType)
624   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
625   (void)arena;
626     return;
627   }
628   SharedDtor();
629 }
630 
SharedDtor()631 inline void SearchSpecProto_EmbeddingQueryMetricType::SharedDtor() {
632   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
633 }
634 
SetCachedSize(int size) const635 void SearchSpecProto_EmbeddingQueryMetricType::SetCachedSize(int size) const {
636   _impl_._cached_size_.Set(size);
637 }
638 
Clear()639 void SearchSpecProto_EmbeddingQueryMetricType::Clear() {
640 // @@protoc_insertion_point(message_clear_start:icing.lib.SearchSpecProto.EmbeddingQueryMetricType)
641   ::uint32_t cached_has_bits = 0;
642   // Prevent compiler warnings about cached_has_bits being unused
643   (void) cached_has_bits;
644 
645   _internal_metadata_.Clear<std::string>();
646 }
647 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)648 const char* SearchSpecProto_EmbeddingQueryMetricType::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
649 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
650   while (!ctx->Done(&ptr)) {
651     ::uint32_t tag;
652     ptr = ::_pbi::ReadTag(ptr, &tag);
653     if ((tag == 0) || ((tag & 7) == 4)) {
654       CHK_(ptr);
655       ctx->SetLastTag(tag);
656       goto message_done;
657     }
658     ptr = UnknownFieldParse(
659         tag,
660         _internal_metadata_.mutable_unknown_fields<std::string>(),
661         ptr, ctx);
662     CHK_(ptr != nullptr);
663   }  // while
664 message_done:
665   return ptr;
666 failure:
667   ptr = nullptr;
668   goto message_done;
669 #undef CHK_
670 }
671 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const672 ::uint8_t* SearchSpecProto_EmbeddingQueryMetricType::_InternalSerialize(
673     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
674   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.SearchSpecProto.EmbeddingQueryMetricType)
675   ::uint32_t cached_has_bits = 0;
676   (void) cached_has_bits;
677 
678   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
679     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
680         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
681   }
682   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.SearchSpecProto.EmbeddingQueryMetricType)
683   return target;
684 }
685 
ByteSizeLong() const686 size_t SearchSpecProto_EmbeddingQueryMetricType::ByteSizeLong() const {
687 // @@protoc_insertion_point(message_byte_size_start:icing.lib.SearchSpecProto.EmbeddingQueryMetricType)
688   size_t total_size = 0;
689 
690   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
691     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
692   }
693   int cached_size = ::_pbi::ToCachedSize(total_size);
694   SetCachedSize(cached_size);
695   return total_size;
696 }
697 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)698 void SearchSpecProto_EmbeddingQueryMetricType::CheckTypeAndMergeFrom(
699     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
700   MergeFrom(*::_pbi::DownCast<const SearchSpecProto_EmbeddingQueryMetricType*>(
701       &from));
702 }
703 
MergeFrom(const SearchSpecProto_EmbeddingQueryMetricType & from)704 void SearchSpecProto_EmbeddingQueryMetricType::MergeFrom(const SearchSpecProto_EmbeddingQueryMetricType& from) {
705   SearchSpecProto_EmbeddingQueryMetricType* const _this = this;
706   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.SearchSpecProto.EmbeddingQueryMetricType)
707   GOOGLE_DCHECK_NE(&from, _this);
708   ::uint32_t cached_has_bits = 0;
709   (void) cached_has_bits;
710 
711   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
712 }
713 
CopyFrom(const SearchSpecProto_EmbeddingQueryMetricType & from)714 void SearchSpecProto_EmbeddingQueryMetricType::CopyFrom(const SearchSpecProto_EmbeddingQueryMetricType& from) {
715 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.SearchSpecProto.EmbeddingQueryMetricType)
716   if (&from == this) return;
717   Clear();
718   MergeFrom(from);
719 }
720 
IsInitialized() const721 bool SearchSpecProto_EmbeddingQueryMetricType::IsInitialized() const {
722   return true;
723 }
724 
InternalSwap(SearchSpecProto_EmbeddingQueryMetricType * other)725 void SearchSpecProto_EmbeddingQueryMetricType::InternalSwap(SearchSpecProto_EmbeddingQueryMetricType* other) {
726   using std::swap;
727   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
728 }
729 
GetTypeName() const730 std::string SearchSpecProto_EmbeddingQueryMetricType::GetTypeName() const {
731   return "icing.lib.SearchSpecProto.EmbeddingQueryMetricType";
732 }
733 
734 
735 // ===================================================================
736 
737 class SearchSpecProto::_Internal {
738  public:
739   using HasBits = decltype(std::declval<SearchSpecProto>()._impl_._has_bits_);
set_has_query(HasBits * has_bits)740   static void set_has_query(HasBits* has_bits) {
741     (*has_bits)[0] |= 1u;
742   }
set_has_term_match_type(HasBits * has_bits)743   static void set_has_term_match_type(HasBits* has_bits) {
744     (*has_bits)[0] |= 8u;
745   }
set_has_java_to_native_start_timestamp_ms(HasBits * has_bits)746   static void set_has_java_to_native_start_timestamp_ms(HasBits* has_bits) {
747     (*has_bits)[0] |= 4u;
748   }
749   static const ::icing::lib::JoinSpecProto& join_spec(const SearchSpecProto* msg);
set_has_join_spec(HasBits * has_bits)750   static void set_has_join_spec(HasBits* has_bits) {
751     (*has_bits)[0] |= 2u;
752   }
set_has_use_read_only_search(HasBits * has_bits)753   static void set_has_use_read_only_search(HasBits* has_bits) {
754     (*has_bits)[0] |= 32u;
755   }
set_has_embedding_query_metric_type(HasBits * has_bits)756   static void set_has_embedding_query_metric_type(HasBits* has_bits) {
757     (*has_bits)[0] |= 16u;
758   }
759 };
760 
761 const ::icing::lib::JoinSpecProto&
join_spec(const SearchSpecProto * msg)762 SearchSpecProto::_Internal::join_spec(const SearchSpecProto* msg) {
763   return *msg->_impl_.join_spec_;
764 }
clear_embedding_query_vectors()765 void SearchSpecProto::clear_embedding_query_vectors() {
766   _impl_.embedding_query_vectors_.Clear();
767 }
SearchSpecProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)768 SearchSpecProto::SearchSpecProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
769                          bool is_message_owned)
770   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
771   SharedCtor(arena, is_message_owned);
772   // @@protoc_insertion_point(arena_constructor:icing.lib.SearchSpecProto)
773 }
SearchSpecProto(const SearchSpecProto & from)774 SearchSpecProto::SearchSpecProto(const SearchSpecProto& from)
775   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
776   SearchSpecProto* const _this = this; (void)_this;
777   new (&_impl_) Impl_{
778       decltype(_impl_._has_bits_){from._impl_._has_bits_}
779     , /*decltype(_impl_._cached_size_)*/{}
780     , decltype(_impl_.namespace_filters_){from._impl_.namespace_filters_}
781     , decltype(_impl_.schema_type_filters_){from._impl_.schema_type_filters_}
782     , decltype(_impl_.enabled_features_){from._impl_.enabled_features_}
783     , decltype(_impl_.type_property_filters_){from._impl_.type_property_filters_}
784     , decltype(_impl_.embedding_query_vectors_){from._impl_.embedding_query_vectors_}
785     , decltype(_impl_.query_parameter_strings_){from._impl_.query_parameter_strings_}
786     , decltype(_impl_.document_uri_filters_){from._impl_.document_uri_filters_}
787     , decltype(_impl_.query_){}
788     , decltype(_impl_.join_spec_){nullptr}
789     , decltype(_impl_.java_to_native_start_timestamp_ms_){}
790     , decltype(_impl_.term_match_type_){}
791     , decltype(_impl_.embedding_query_metric_type_){}
792     , decltype(_impl_.use_read_only_search_){}};
793 
794   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
795   _impl_.query_.InitDefault();
796   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
797     _impl_.query_.Set("", GetArenaForAllocation());
798   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
799   if (from._internal_has_query()) {
800     _this->_impl_.query_.Set(from._internal_query(),
801       _this->GetArenaForAllocation());
802   }
803   if (from._internal_has_join_spec()) {
804     _this->_impl_.join_spec_ = new ::icing::lib::JoinSpecProto(*from._impl_.join_spec_);
805   }
806   ::memcpy(&_impl_.java_to_native_start_timestamp_ms_, &from._impl_.java_to_native_start_timestamp_ms_,
807     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.use_read_only_search_) -
808     reinterpret_cast<char*>(&_impl_.java_to_native_start_timestamp_ms_)) + sizeof(_impl_.use_read_only_search_));
809   // @@protoc_insertion_point(copy_constructor:icing.lib.SearchSpecProto)
810 }
811 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)812 inline void SearchSpecProto::SharedCtor(
813     ::_pb::Arena* arena, bool is_message_owned) {
814   (void)arena;
815   (void)is_message_owned;
816   new (&_impl_) Impl_{
817       decltype(_impl_._has_bits_){}
818     , /*decltype(_impl_._cached_size_)*/{}
819     , decltype(_impl_.namespace_filters_){arena}
820     , decltype(_impl_.schema_type_filters_){arena}
821     , decltype(_impl_.enabled_features_){arena}
822     , decltype(_impl_.type_property_filters_){arena}
823     , decltype(_impl_.embedding_query_vectors_){arena}
824     , decltype(_impl_.query_parameter_strings_){arena}
825     , decltype(_impl_.document_uri_filters_){arena}
826     , decltype(_impl_.query_){}
827     , decltype(_impl_.join_spec_){nullptr}
828     , decltype(_impl_.java_to_native_start_timestamp_ms_){::int64_t{0}}
829     , decltype(_impl_.term_match_type_){0}
830     , decltype(_impl_.embedding_query_metric_type_){0}
831     , decltype(_impl_.use_read_only_search_){true}
832   };
833   _impl_.query_.InitDefault();
834   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
835     _impl_.query_.Set("", GetArenaForAllocation());
836   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
837 }
838 
~SearchSpecProto()839 SearchSpecProto::~SearchSpecProto() {
840   // @@protoc_insertion_point(destructor:icing.lib.SearchSpecProto)
841   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
842   (void)arena;
843     return;
844   }
845   SharedDtor();
846 }
847 
SharedDtor()848 inline void SearchSpecProto::SharedDtor() {
849   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
850   _impl_.namespace_filters_.~RepeatedPtrField();
851   _impl_.schema_type_filters_.~RepeatedPtrField();
852   _impl_.enabled_features_.~RepeatedPtrField();
853   _impl_.type_property_filters_.~RepeatedPtrField();
854   _impl_.embedding_query_vectors_.~RepeatedPtrField();
855   _impl_.query_parameter_strings_.~RepeatedPtrField();
856   _impl_.document_uri_filters_.~RepeatedPtrField();
857   _impl_.query_.Destroy();
858   if (this != internal_default_instance()) delete _impl_.join_spec_;
859 }
860 
SetCachedSize(int size) const861 void SearchSpecProto::SetCachedSize(int size) const {
862   _impl_._cached_size_.Set(size);
863 }
864 
Clear()865 void SearchSpecProto::Clear() {
866 // @@protoc_insertion_point(message_clear_start:icing.lib.SearchSpecProto)
867   ::uint32_t cached_has_bits = 0;
868   // Prevent compiler warnings about cached_has_bits being unused
869   (void) cached_has_bits;
870 
871   _impl_.namespace_filters_.Clear();
872   _impl_.schema_type_filters_.Clear();
873   _impl_.enabled_features_.Clear();
874   _impl_.type_property_filters_.Clear();
875   _impl_.embedding_query_vectors_.Clear();
876   _impl_.query_parameter_strings_.Clear();
877   _impl_.document_uri_filters_.Clear();
878   cached_has_bits = _impl_._has_bits_[0];
879   if (cached_has_bits & 0x00000003u) {
880     if (cached_has_bits & 0x00000001u) {
881       _impl_.query_.ClearNonDefaultToEmpty();
882     }
883     if (cached_has_bits & 0x00000002u) {
884       GOOGLE_DCHECK(_impl_.join_spec_ != nullptr);
885       _impl_.join_spec_->Clear();
886     }
887   }
888   if (cached_has_bits & 0x0000003cu) {
889     ::memset(&_impl_.java_to_native_start_timestamp_ms_, 0, static_cast<size_t>(
890         reinterpret_cast<char*>(&_impl_.embedding_query_metric_type_) -
891         reinterpret_cast<char*>(&_impl_.java_to_native_start_timestamp_ms_)) + sizeof(_impl_.embedding_query_metric_type_));
892     _impl_.use_read_only_search_ = true;
893   }
894   _impl_._has_bits_.Clear();
895   _internal_metadata_.Clear<std::string>();
896 }
897 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)898 const char* SearchSpecProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
899 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
900   _Internal::HasBits has_bits{};
901   while (!ctx->Done(&ptr)) {
902     ::uint32_t tag;
903     ptr = ::_pbi::ReadTag(ptr, &tag);
904     switch (tag >> 3) {
905       // optional string query = 1;
906       case 1:
907         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
908           auto str = _internal_mutable_query();
909           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
910           CHK_(ptr);
911         } else {
912           goto handle_unusual;
913         }
914         continue;
915       // optional .icing.lib.TermMatchType.Code term_match_type = 2;
916       case 2:
917         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
918           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
919           CHK_(ptr);
920           if (PROTOBUF_PREDICT_TRUE(::icing::lib::TermMatchType_Code_IsValid(val))) {
921             _internal_set_term_match_type(static_cast<::icing::lib::TermMatchType_Code>(val));
922           } else {
923             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
924           }
925         } else {
926           goto handle_unusual;
927         }
928         continue;
929       // repeated string namespace_filters = 3;
930       case 3:
931         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
932           ptr -= 1;
933           do {
934             ptr += 1;
935             auto str = _internal_add_namespace_filters();
936             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
937             CHK_(ptr);
938             if (!ctx->DataAvailable(ptr)) break;
939           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr));
940         } else {
941           goto handle_unusual;
942         }
943         continue;
944       // repeated string schema_type_filters = 4;
945       case 4:
946         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
947           ptr -= 1;
948           do {
949             ptr += 1;
950             auto str = _internal_add_schema_type_filters();
951             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
952             CHK_(ptr);
953             if (!ctx->DataAvailable(ptr)) break;
954           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
955         } else {
956           goto handle_unusual;
957         }
958         continue;
959       // optional int64 java_to_native_start_timestamp_ms = 5;
960       case 5:
961         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
962           _Internal::set_has_java_to_native_start_timestamp_ms(&has_bits);
963           _impl_.java_to_native_start_timestamp_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
964           CHK_(ptr);
965         } else {
966           goto handle_unusual;
967         }
968         continue;
969       // optional .icing.lib.JoinSpecProto join_spec = 7;
970       case 7:
971         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
972           ptr = ctx->ParseMessage(_internal_mutable_join_spec(), ptr);
973           CHK_(ptr);
974         } else {
975           goto handle_unusual;
976         }
977         continue;
978       // repeated string enabled_features = 8;
979       case 8:
980         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
981           ptr -= 1;
982           do {
983             ptr += 1;
984             auto str = _internal_add_enabled_features();
985             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
986             CHK_(ptr);
987             if (!ctx->DataAvailable(ptr)) break;
988           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
989         } else {
990           goto handle_unusual;
991         }
992         continue;
993       // optional bool use_read_only_search = 9 [default = true];
994       case 9:
995         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
996           _Internal::set_has_use_read_only_search(&has_bits);
997           _impl_.use_read_only_search_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
998           CHK_(ptr);
999         } else {
1000           goto handle_unusual;
1001         }
1002         continue;
1003       // repeated .icing.lib.TypePropertyMask type_property_filters = 10;
1004       case 10:
1005         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
1006           ptr -= 1;
1007           do {
1008             ptr += 1;
1009             ptr = ctx->ParseMessage(_internal_add_type_property_filters(), ptr);
1010             CHK_(ptr);
1011             if (!ctx->DataAvailable(ptr)) break;
1012           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr));
1013         } else {
1014           goto handle_unusual;
1015         }
1016         continue;
1017       // repeated .icing.lib.PropertyProto.VectorProto embedding_query_vectors = 11;
1018       case 11:
1019         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
1020           ptr -= 1;
1021           do {
1022             ptr += 1;
1023             ptr = ctx->ParseMessage(_internal_add_embedding_query_vectors(), ptr);
1024             CHK_(ptr);
1025             if (!ctx->DataAvailable(ptr)) break;
1026           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr));
1027         } else {
1028           goto handle_unusual;
1029         }
1030         continue;
1031       // optional .icing.lib.SearchSpecProto.EmbeddingQueryMetricType.Code embedding_query_metric_type = 12;
1032       case 12:
1033         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 96)) {
1034           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1035           CHK_(ptr);
1036           if (PROTOBUF_PREDICT_TRUE(::icing::lib::SearchSpecProto_EmbeddingQueryMetricType_Code_IsValid(val))) {
1037             _internal_set_embedding_query_metric_type(static_cast<::icing::lib::SearchSpecProto_EmbeddingQueryMetricType_Code>(val));
1038           } else {
1039             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(12, val, mutable_unknown_fields());
1040           }
1041         } else {
1042           goto handle_unusual;
1043         }
1044         continue;
1045       // repeated string query_parameter_strings = 13;
1046       case 13:
1047         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 106)) {
1048           ptr -= 1;
1049           do {
1050             ptr += 1;
1051             auto str = _internal_add_query_parameter_strings();
1052             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1053             CHK_(ptr);
1054             if (!ctx->DataAvailable(ptr)) break;
1055           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<106>(ptr));
1056         } else {
1057           goto handle_unusual;
1058         }
1059         continue;
1060       // repeated .icing.lib.NamespaceDocumentUriGroup document_uri_filters = 14;
1061       case 14:
1062         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 114)) {
1063           ptr -= 1;
1064           do {
1065             ptr += 1;
1066             ptr = ctx->ParseMessage(_internal_add_document_uri_filters(), ptr);
1067             CHK_(ptr);
1068             if (!ctx->DataAvailable(ptr)) break;
1069           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<114>(ptr));
1070         } else {
1071           goto handle_unusual;
1072         }
1073         continue;
1074       default:
1075         goto handle_unusual;
1076     }  // switch
1077   handle_unusual:
1078     if ((tag == 0) || ((tag & 7) == 4)) {
1079       CHK_(ptr);
1080       ctx->SetLastTag(tag);
1081       goto message_done;
1082     }
1083     ptr = UnknownFieldParse(
1084         tag,
1085         _internal_metadata_.mutable_unknown_fields<std::string>(),
1086         ptr, ctx);
1087     CHK_(ptr != nullptr);
1088   }  // while
1089 message_done:
1090   _impl_._has_bits_.Or(has_bits);
1091   return ptr;
1092 failure:
1093   ptr = nullptr;
1094   goto message_done;
1095 #undef CHK_
1096 }
1097 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1098 ::uint8_t* SearchSpecProto::_InternalSerialize(
1099     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1100   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.SearchSpecProto)
1101   ::uint32_t cached_has_bits = 0;
1102   (void) cached_has_bits;
1103 
1104   cached_has_bits = _impl_._has_bits_[0];
1105   // optional string query = 1;
1106   if (cached_has_bits & 0x00000001u) {
1107     target = stream->WriteStringMaybeAliased(
1108         1, this->_internal_query(), target);
1109   }
1110 
1111   // optional .icing.lib.TermMatchType.Code term_match_type = 2;
1112   if (cached_has_bits & 0x00000008u) {
1113     target = stream->EnsureSpace(target);
1114     target = ::_pbi::WireFormatLite::WriteEnumToArray(
1115       2, this->_internal_term_match_type(), target);
1116   }
1117 
1118   // repeated string namespace_filters = 3;
1119   for (int i = 0, n = this->_internal_namespace_filters_size(); i < n; i++) {
1120     const auto& s = this->_internal_namespace_filters(i);
1121     target = stream->WriteString(3, s, target);
1122   }
1123 
1124   // repeated string schema_type_filters = 4;
1125   for (int i = 0, n = this->_internal_schema_type_filters_size(); i < n; i++) {
1126     const auto& s = this->_internal_schema_type_filters(i);
1127     target = stream->WriteString(4, s, target);
1128   }
1129 
1130   // optional int64 java_to_native_start_timestamp_ms = 5;
1131   if (cached_has_bits & 0x00000004u) {
1132     target = stream->EnsureSpace(target);
1133     target = ::_pbi::WireFormatLite::WriteInt64ToArray(5, this->_internal_java_to_native_start_timestamp_ms(), target);
1134   }
1135 
1136   // optional .icing.lib.JoinSpecProto join_spec = 7;
1137   if (cached_has_bits & 0x00000002u) {
1138     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1139       InternalWriteMessage(7, _Internal::join_spec(this),
1140         _Internal::join_spec(this).GetCachedSize(), target, stream);
1141   }
1142 
1143   // repeated string enabled_features = 8;
1144   for (int i = 0, n = this->_internal_enabled_features_size(); i < n; i++) {
1145     const auto& s = this->_internal_enabled_features(i);
1146     target = stream->WriteString(8, s, target);
1147   }
1148 
1149   // optional bool use_read_only_search = 9 [default = true];
1150   if (cached_has_bits & 0x00000020u) {
1151     target = stream->EnsureSpace(target);
1152     target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_use_read_only_search(), target);
1153   }
1154 
1155   // repeated .icing.lib.TypePropertyMask type_property_filters = 10;
1156   for (unsigned i = 0,
1157       n = static_cast<unsigned>(this->_internal_type_property_filters_size()); i < n; i++) {
1158     const auto& repfield = this->_internal_type_property_filters(i);
1159     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1160         InternalWriteMessage(10, repfield, repfield.GetCachedSize(), target, stream);
1161   }
1162 
1163   // repeated .icing.lib.PropertyProto.VectorProto embedding_query_vectors = 11;
1164   for (unsigned i = 0,
1165       n = static_cast<unsigned>(this->_internal_embedding_query_vectors_size()); i < n; i++) {
1166     const auto& repfield = this->_internal_embedding_query_vectors(i);
1167     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1168         InternalWriteMessage(11, repfield, repfield.GetCachedSize(), target, stream);
1169   }
1170 
1171   // optional .icing.lib.SearchSpecProto.EmbeddingQueryMetricType.Code embedding_query_metric_type = 12;
1172   if (cached_has_bits & 0x00000010u) {
1173     target = stream->EnsureSpace(target);
1174     target = ::_pbi::WireFormatLite::WriteEnumToArray(
1175       12, this->_internal_embedding_query_metric_type(), target);
1176   }
1177 
1178   // repeated string query_parameter_strings = 13;
1179   for (int i = 0, n = this->_internal_query_parameter_strings_size(); i < n; i++) {
1180     const auto& s = this->_internal_query_parameter_strings(i);
1181     target = stream->WriteString(13, s, target);
1182   }
1183 
1184   // repeated .icing.lib.NamespaceDocumentUriGroup document_uri_filters = 14;
1185   for (unsigned i = 0,
1186       n = static_cast<unsigned>(this->_internal_document_uri_filters_size()); i < n; i++) {
1187     const auto& repfield = this->_internal_document_uri_filters(i);
1188     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
1189         InternalWriteMessage(14, repfield, repfield.GetCachedSize(), target, stream);
1190   }
1191 
1192   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1193     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1194         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1195   }
1196   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.SearchSpecProto)
1197   return target;
1198 }
1199 
ByteSizeLong() const1200 size_t SearchSpecProto::ByteSizeLong() const {
1201 // @@protoc_insertion_point(message_byte_size_start:icing.lib.SearchSpecProto)
1202   size_t total_size = 0;
1203 
1204   ::uint32_t cached_has_bits = 0;
1205   // Prevent compiler warnings about cached_has_bits being unused
1206   (void) cached_has_bits;
1207 
1208   // repeated string namespace_filters = 3;
1209   total_size += 1 *
1210       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.namespace_filters_.size());
1211   for (int i = 0, n = _impl_.namespace_filters_.size(); i < n; i++) {
1212     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1213       _impl_.namespace_filters_.Get(i));
1214   }
1215 
1216   // repeated string schema_type_filters = 4;
1217   total_size += 1 *
1218       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.schema_type_filters_.size());
1219   for (int i = 0, n = _impl_.schema_type_filters_.size(); i < n; i++) {
1220     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1221       _impl_.schema_type_filters_.Get(i));
1222   }
1223 
1224   // repeated string enabled_features = 8;
1225   total_size += 1 *
1226       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.enabled_features_.size());
1227   for (int i = 0, n = _impl_.enabled_features_.size(); i < n; i++) {
1228     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1229       _impl_.enabled_features_.Get(i));
1230   }
1231 
1232   // repeated .icing.lib.TypePropertyMask type_property_filters = 10;
1233   total_size += 1UL * this->_internal_type_property_filters_size();
1234   for (const auto& msg : this->_impl_.type_property_filters_) {
1235     total_size +=
1236       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1237   }
1238 
1239   // repeated .icing.lib.PropertyProto.VectorProto embedding_query_vectors = 11;
1240   total_size += 1UL * this->_internal_embedding_query_vectors_size();
1241   for (const auto& msg : this->_impl_.embedding_query_vectors_) {
1242     total_size +=
1243       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1244   }
1245 
1246   // repeated string query_parameter_strings = 13;
1247   total_size += 1 *
1248       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.query_parameter_strings_.size());
1249   for (int i = 0, n = _impl_.query_parameter_strings_.size(); i < n; i++) {
1250     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1251       _impl_.query_parameter_strings_.Get(i));
1252   }
1253 
1254   // repeated .icing.lib.NamespaceDocumentUriGroup document_uri_filters = 14;
1255   total_size += 1UL * this->_internal_document_uri_filters_size();
1256   for (const auto& msg : this->_impl_.document_uri_filters_) {
1257     total_size +=
1258       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
1259   }
1260 
1261   cached_has_bits = _impl_._has_bits_[0];
1262   if (cached_has_bits & 0x0000003fu) {
1263     // optional string query = 1;
1264     if (cached_has_bits & 0x00000001u) {
1265       total_size += 1 +
1266         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1267           this->_internal_query());
1268     }
1269 
1270     // optional .icing.lib.JoinSpecProto join_spec = 7;
1271     if (cached_has_bits & 0x00000002u) {
1272       total_size += 1 +
1273         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
1274           *_impl_.join_spec_);
1275     }
1276 
1277     // optional int64 java_to_native_start_timestamp_ms = 5;
1278     if (cached_has_bits & 0x00000004u) {
1279       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_java_to_native_start_timestamp_ms());
1280     }
1281 
1282     // optional .icing.lib.TermMatchType.Code term_match_type = 2;
1283     if (cached_has_bits & 0x00000008u) {
1284       total_size += 1 +
1285         ::_pbi::WireFormatLite::EnumSize(this->_internal_term_match_type());
1286     }
1287 
1288     // optional .icing.lib.SearchSpecProto.EmbeddingQueryMetricType.Code embedding_query_metric_type = 12;
1289     if (cached_has_bits & 0x00000010u) {
1290       total_size += 1 +
1291         ::_pbi::WireFormatLite::EnumSize(this->_internal_embedding_query_metric_type());
1292     }
1293 
1294     // optional bool use_read_only_search = 9 [default = true];
1295     if (cached_has_bits & 0x00000020u) {
1296       total_size += 1 + 1;
1297     }
1298 
1299   }
1300   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1301     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1302   }
1303   int cached_size = ::_pbi::ToCachedSize(total_size);
1304   SetCachedSize(cached_size);
1305   return total_size;
1306 }
1307 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1308 void SearchSpecProto::CheckTypeAndMergeFrom(
1309     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1310   MergeFrom(*::_pbi::DownCast<const SearchSpecProto*>(
1311       &from));
1312 }
1313 
MergeFrom(const SearchSpecProto & from)1314 void SearchSpecProto::MergeFrom(const SearchSpecProto& from) {
1315   SearchSpecProto* const _this = this;
1316   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.SearchSpecProto)
1317   GOOGLE_DCHECK_NE(&from, _this);
1318   ::uint32_t cached_has_bits = 0;
1319   (void) cached_has_bits;
1320 
1321   _this->_impl_.namespace_filters_.MergeFrom(from._impl_.namespace_filters_);
1322   _this->_impl_.schema_type_filters_.MergeFrom(from._impl_.schema_type_filters_);
1323   _this->_impl_.enabled_features_.MergeFrom(from._impl_.enabled_features_);
1324   _this->_impl_.type_property_filters_.MergeFrom(from._impl_.type_property_filters_);
1325   _this->_impl_.embedding_query_vectors_.MergeFrom(from._impl_.embedding_query_vectors_);
1326   _this->_impl_.query_parameter_strings_.MergeFrom(from._impl_.query_parameter_strings_);
1327   _this->_impl_.document_uri_filters_.MergeFrom(from._impl_.document_uri_filters_);
1328   cached_has_bits = from._impl_._has_bits_[0];
1329   if (cached_has_bits & 0x0000003fu) {
1330     if (cached_has_bits & 0x00000001u) {
1331       _this->_internal_set_query(from._internal_query());
1332     }
1333     if (cached_has_bits & 0x00000002u) {
1334       _this->_internal_mutable_join_spec()->::icing::lib::JoinSpecProto::MergeFrom(
1335           from._internal_join_spec());
1336     }
1337     if (cached_has_bits & 0x00000004u) {
1338       _this->_impl_.java_to_native_start_timestamp_ms_ = from._impl_.java_to_native_start_timestamp_ms_;
1339     }
1340     if (cached_has_bits & 0x00000008u) {
1341       _this->_impl_.term_match_type_ = from._impl_.term_match_type_;
1342     }
1343     if (cached_has_bits & 0x00000010u) {
1344       _this->_impl_.embedding_query_metric_type_ = from._impl_.embedding_query_metric_type_;
1345     }
1346     if (cached_has_bits & 0x00000020u) {
1347       _this->_impl_.use_read_only_search_ = from._impl_.use_read_only_search_;
1348     }
1349     _this->_impl_._has_bits_[0] |= cached_has_bits;
1350   }
1351   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1352 }
1353 
CopyFrom(const SearchSpecProto & from)1354 void SearchSpecProto::CopyFrom(const SearchSpecProto& from) {
1355 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.SearchSpecProto)
1356   if (&from == this) return;
1357   Clear();
1358   MergeFrom(from);
1359 }
1360 
IsInitialized() const1361 bool SearchSpecProto::IsInitialized() const {
1362   return true;
1363 }
1364 
InternalSwap(SearchSpecProto * other)1365 void SearchSpecProto::InternalSwap(SearchSpecProto* other) {
1366   using std::swap;
1367   auto* lhs_arena = GetArenaForAllocation();
1368   auto* rhs_arena = other->GetArenaForAllocation();
1369   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1370   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1371   _impl_.namespace_filters_.InternalSwap(&other->_impl_.namespace_filters_);
1372   _impl_.schema_type_filters_.InternalSwap(&other->_impl_.schema_type_filters_);
1373   _impl_.enabled_features_.InternalSwap(&other->_impl_.enabled_features_);
1374   _impl_.type_property_filters_.InternalSwap(&other->_impl_.type_property_filters_);
1375   _impl_.embedding_query_vectors_.InternalSwap(&other->_impl_.embedding_query_vectors_);
1376   _impl_.query_parameter_strings_.InternalSwap(&other->_impl_.query_parameter_strings_);
1377   _impl_.document_uri_filters_.InternalSwap(&other->_impl_.document_uri_filters_);
1378   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1379       &_impl_.query_, lhs_arena,
1380       &other->_impl_.query_, rhs_arena
1381   );
1382   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1383       PROTOBUF_FIELD_OFFSET(SearchSpecProto, _impl_.embedding_query_metric_type_)
1384       + sizeof(SearchSpecProto::_impl_.embedding_query_metric_type_)  // NOLINT
1385       - PROTOBUF_FIELD_OFFSET(SearchSpecProto, _impl_.join_spec_)>(
1386           reinterpret_cast<char*>(&_impl_.join_spec_),
1387           reinterpret_cast<char*>(&other->_impl_.join_spec_));
1388   swap(_impl_.use_read_only_search_, other->_impl_.use_read_only_search_);
1389 }
1390 
GetTypeName() const1391 std::string SearchSpecProto::GetTypeName() const {
1392   return "icing.lib.SearchSpecProto";
1393 }
1394 
1395 
1396 // ===================================================================
1397 
1398 class ResultSpecProto_SnippetSpecProto::_Internal {
1399  public:
1400   using HasBits = decltype(std::declval<ResultSpecProto_SnippetSpecProto>()._impl_._has_bits_);
set_has_num_to_snippet(HasBits * has_bits)1401   static void set_has_num_to_snippet(HasBits* has_bits) {
1402     (*has_bits)[0] |= 1u;
1403   }
set_has_num_matches_per_property(HasBits * has_bits)1404   static void set_has_num_matches_per_property(HasBits* has_bits) {
1405     (*has_bits)[0] |= 2u;
1406   }
set_has_max_window_utf32_length(HasBits * has_bits)1407   static void set_has_max_window_utf32_length(HasBits* has_bits) {
1408     (*has_bits)[0] |= 4u;
1409   }
1410 };
1411 
ResultSpecProto_SnippetSpecProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1412 ResultSpecProto_SnippetSpecProto::ResultSpecProto_SnippetSpecProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1413                          bool is_message_owned)
1414   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1415   SharedCtor(arena, is_message_owned);
1416   // @@protoc_insertion_point(arena_constructor:icing.lib.ResultSpecProto.SnippetSpecProto)
1417 }
ResultSpecProto_SnippetSpecProto(const ResultSpecProto_SnippetSpecProto & from)1418 ResultSpecProto_SnippetSpecProto::ResultSpecProto_SnippetSpecProto(const ResultSpecProto_SnippetSpecProto& from)
1419   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1420   ResultSpecProto_SnippetSpecProto* const _this = this; (void)_this;
1421   new (&_impl_) Impl_{
1422       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1423     , /*decltype(_impl_._cached_size_)*/{}
1424     , decltype(_impl_.num_to_snippet_){}
1425     , decltype(_impl_.num_matches_per_property_){}
1426     , decltype(_impl_.max_window_utf32_length_){}};
1427 
1428   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1429   ::memcpy(&_impl_.num_to_snippet_, &from._impl_.num_to_snippet_,
1430     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.max_window_utf32_length_) -
1431     reinterpret_cast<char*>(&_impl_.num_to_snippet_)) + sizeof(_impl_.max_window_utf32_length_));
1432   // @@protoc_insertion_point(copy_constructor:icing.lib.ResultSpecProto.SnippetSpecProto)
1433 }
1434 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1435 inline void ResultSpecProto_SnippetSpecProto::SharedCtor(
1436     ::_pb::Arena* arena, bool is_message_owned) {
1437   (void)arena;
1438   (void)is_message_owned;
1439   new (&_impl_) Impl_{
1440       decltype(_impl_._has_bits_){}
1441     , /*decltype(_impl_._cached_size_)*/{}
1442     , decltype(_impl_.num_to_snippet_){0}
1443     , decltype(_impl_.num_matches_per_property_){0}
1444     , decltype(_impl_.max_window_utf32_length_){0}
1445   };
1446 }
1447 
~ResultSpecProto_SnippetSpecProto()1448 ResultSpecProto_SnippetSpecProto::~ResultSpecProto_SnippetSpecProto() {
1449   // @@protoc_insertion_point(destructor:icing.lib.ResultSpecProto.SnippetSpecProto)
1450   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1451   (void)arena;
1452     return;
1453   }
1454   SharedDtor();
1455 }
1456 
SharedDtor()1457 inline void ResultSpecProto_SnippetSpecProto::SharedDtor() {
1458   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1459 }
1460 
SetCachedSize(int size) const1461 void ResultSpecProto_SnippetSpecProto::SetCachedSize(int size) const {
1462   _impl_._cached_size_.Set(size);
1463 }
1464 
Clear()1465 void ResultSpecProto_SnippetSpecProto::Clear() {
1466 // @@protoc_insertion_point(message_clear_start:icing.lib.ResultSpecProto.SnippetSpecProto)
1467   ::uint32_t cached_has_bits = 0;
1468   // Prevent compiler warnings about cached_has_bits being unused
1469   (void) cached_has_bits;
1470 
1471   cached_has_bits = _impl_._has_bits_[0];
1472   if (cached_has_bits & 0x00000007u) {
1473     ::memset(&_impl_.num_to_snippet_, 0, static_cast<size_t>(
1474         reinterpret_cast<char*>(&_impl_.max_window_utf32_length_) -
1475         reinterpret_cast<char*>(&_impl_.num_to_snippet_)) + sizeof(_impl_.max_window_utf32_length_));
1476   }
1477   _impl_._has_bits_.Clear();
1478   _internal_metadata_.Clear<std::string>();
1479 }
1480 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1481 const char* ResultSpecProto_SnippetSpecProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1482 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1483   _Internal::HasBits has_bits{};
1484   while (!ctx->Done(&ptr)) {
1485     ::uint32_t tag;
1486     ptr = ::_pbi::ReadTag(ptr, &tag);
1487     switch (tag >> 3) {
1488       // optional int32 num_to_snippet = 1;
1489       case 1:
1490         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
1491           _Internal::set_has_num_to_snippet(&has_bits);
1492           _impl_.num_to_snippet_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1493           CHK_(ptr);
1494         } else {
1495           goto handle_unusual;
1496         }
1497         continue;
1498       // optional int32 num_matches_per_property = 2;
1499       case 2:
1500         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
1501           _Internal::set_has_num_matches_per_property(&has_bits);
1502           _impl_.num_matches_per_property_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1503           CHK_(ptr);
1504         } else {
1505           goto handle_unusual;
1506         }
1507         continue;
1508       // optional int32 max_window_utf32_length = 3;
1509       case 3:
1510         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
1511           _Internal::set_has_max_window_utf32_length(&has_bits);
1512           _impl_.max_window_utf32_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1513           CHK_(ptr);
1514         } else {
1515           goto handle_unusual;
1516         }
1517         continue;
1518       default:
1519         goto handle_unusual;
1520     }  // switch
1521   handle_unusual:
1522     if ((tag == 0) || ((tag & 7) == 4)) {
1523       CHK_(ptr);
1524       ctx->SetLastTag(tag);
1525       goto message_done;
1526     }
1527     ptr = UnknownFieldParse(
1528         tag,
1529         _internal_metadata_.mutable_unknown_fields<std::string>(),
1530         ptr, ctx);
1531     CHK_(ptr != nullptr);
1532   }  // while
1533 message_done:
1534   _impl_._has_bits_.Or(has_bits);
1535   return ptr;
1536 failure:
1537   ptr = nullptr;
1538   goto message_done;
1539 #undef CHK_
1540 }
1541 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1542 ::uint8_t* ResultSpecProto_SnippetSpecProto::_InternalSerialize(
1543     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1544   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.ResultSpecProto.SnippetSpecProto)
1545   ::uint32_t cached_has_bits = 0;
1546   (void) cached_has_bits;
1547 
1548   cached_has_bits = _impl_._has_bits_[0];
1549   // optional int32 num_to_snippet = 1;
1550   if (cached_has_bits & 0x00000001u) {
1551     target = stream->EnsureSpace(target);
1552     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_num_to_snippet(), target);
1553   }
1554 
1555   // optional int32 num_matches_per_property = 2;
1556   if (cached_has_bits & 0x00000002u) {
1557     target = stream->EnsureSpace(target);
1558     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_matches_per_property(), target);
1559   }
1560 
1561   // optional int32 max_window_utf32_length = 3;
1562   if (cached_has_bits & 0x00000004u) {
1563     target = stream->EnsureSpace(target);
1564     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_max_window_utf32_length(), target);
1565   }
1566 
1567   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1568     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1569         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1570   }
1571   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.ResultSpecProto.SnippetSpecProto)
1572   return target;
1573 }
1574 
ByteSizeLong() const1575 size_t ResultSpecProto_SnippetSpecProto::ByteSizeLong() const {
1576 // @@protoc_insertion_point(message_byte_size_start:icing.lib.ResultSpecProto.SnippetSpecProto)
1577   size_t total_size = 0;
1578 
1579   ::uint32_t cached_has_bits = 0;
1580   // Prevent compiler warnings about cached_has_bits being unused
1581   (void) cached_has_bits;
1582 
1583   cached_has_bits = _impl_._has_bits_[0];
1584   if (cached_has_bits & 0x00000007u) {
1585     // optional int32 num_to_snippet = 1;
1586     if (cached_has_bits & 0x00000001u) {
1587       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_to_snippet());
1588     }
1589 
1590     // optional int32 num_matches_per_property = 2;
1591     if (cached_has_bits & 0x00000002u) {
1592       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_matches_per_property());
1593     }
1594 
1595     // optional int32 max_window_utf32_length = 3;
1596     if (cached_has_bits & 0x00000004u) {
1597       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_window_utf32_length());
1598     }
1599 
1600   }
1601   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1602     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1603   }
1604   int cached_size = ::_pbi::ToCachedSize(total_size);
1605   SetCachedSize(cached_size);
1606   return total_size;
1607 }
1608 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1609 void ResultSpecProto_SnippetSpecProto::CheckTypeAndMergeFrom(
1610     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1611   MergeFrom(*::_pbi::DownCast<const ResultSpecProto_SnippetSpecProto*>(
1612       &from));
1613 }
1614 
MergeFrom(const ResultSpecProto_SnippetSpecProto & from)1615 void ResultSpecProto_SnippetSpecProto::MergeFrom(const ResultSpecProto_SnippetSpecProto& from) {
1616   ResultSpecProto_SnippetSpecProto* const _this = this;
1617   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.ResultSpecProto.SnippetSpecProto)
1618   GOOGLE_DCHECK_NE(&from, _this);
1619   ::uint32_t cached_has_bits = 0;
1620   (void) cached_has_bits;
1621 
1622   cached_has_bits = from._impl_._has_bits_[0];
1623   if (cached_has_bits & 0x00000007u) {
1624     if (cached_has_bits & 0x00000001u) {
1625       _this->_impl_.num_to_snippet_ = from._impl_.num_to_snippet_;
1626     }
1627     if (cached_has_bits & 0x00000002u) {
1628       _this->_impl_.num_matches_per_property_ = from._impl_.num_matches_per_property_;
1629     }
1630     if (cached_has_bits & 0x00000004u) {
1631       _this->_impl_.max_window_utf32_length_ = from._impl_.max_window_utf32_length_;
1632     }
1633     _this->_impl_._has_bits_[0] |= cached_has_bits;
1634   }
1635   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1636 }
1637 
CopyFrom(const ResultSpecProto_SnippetSpecProto & from)1638 void ResultSpecProto_SnippetSpecProto::CopyFrom(const ResultSpecProto_SnippetSpecProto& from) {
1639 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.ResultSpecProto.SnippetSpecProto)
1640   if (&from == this) return;
1641   Clear();
1642   MergeFrom(from);
1643 }
1644 
IsInitialized() const1645 bool ResultSpecProto_SnippetSpecProto::IsInitialized() const {
1646   return true;
1647 }
1648 
InternalSwap(ResultSpecProto_SnippetSpecProto * other)1649 void ResultSpecProto_SnippetSpecProto::InternalSwap(ResultSpecProto_SnippetSpecProto* other) {
1650   using std::swap;
1651   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1652   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1653   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1654       PROTOBUF_FIELD_OFFSET(ResultSpecProto_SnippetSpecProto, _impl_.max_window_utf32_length_)
1655       + sizeof(ResultSpecProto_SnippetSpecProto::_impl_.max_window_utf32_length_)  // NOLINT
1656       - PROTOBUF_FIELD_OFFSET(ResultSpecProto_SnippetSpecProto, _impl_.num_to_snippet_)>(
1657           reinterpret_cast<char*>(&_impl_.num_to_snippet_),
1658           reinterpret_cast<char*>(&other->_impl_.num_to_snippet_));
1659 }
1660 
GetTypeName() const1661 std::string ResultSpecProto_SnippetSpecProto::GetTypeName() const {
1662   return "icing.lib.ResultSpecProto.SnippetSpecProto";
1663 }
1664 
1665 
1666 // ===================================================================
1667 
1668 class ResultSpecProto_ResultGrouping_Entry::_Internal {
1669  public:
1670   using HasBits = decltype(std::declval<ResultSpecProto_ResultGrouping_Entry>()._impl_._has_bits_);
set_has_namespace_(HasBits * has_bits)1671   static void set_has_namespace_(HasBits* has_bits) {
1672     (*has_bits)[0] |= 1u;
1673   }
set_has_schema(HasBits * has_bits)1674   static void set_has_schema(HasBits* has_bits) {
1675     (*has_bits)[0] |= 2u;
1676   }
1677 };
1678 
ResultSpecProto_ResultGrouping_Entry(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1679 ResultSpecProto_ResultGrouping_Entry::ResultSpecProto_ResultGrouping_Entry(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1680                          bool is_message_owned)
1681   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1682   SharedCtor(arena, is_message_owned);
1683   // @@protoc_insertion_point(arena_constructor:icing.lib.ResultSpecProto.ResultGrouping.Entry)
1684 }
ResultSpecProto_ResultGrouping_Entry(const ResultSpecProto_ResultGrouping_Entry & from)1685 ResultSpecProto_ResultGrouping_Entry::ResultSpecProto_ResultGrouping_Entry(const ResultSpecProto_ResultGrouping_Entry& from)
1686   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1687   ResultSpecProto_ResultGrouping_Entry* const _this = this; (void)_this;
1688   new (&_impl_) Impl_{
1689       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1690     , /*decltype(_impl_._cached_size_)*/{}
1691     , decltype(_impl_.namespace__){}
1692     , decltype(_impl_.schema_){}};
1693 
1694   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1695   _impl_.namespace__.InitDefault();
1696   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1697     _impl_.namespace__.Set("", GetArenaForAllocation());
1698   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1699   if (from._internal_has_namespace_()) {
1700     _this->_impl_.namespace__.Set(from._internal_namespace_(),
1701       _this->GetArenaForAllocation());
1702   }
1703   _impl_.schema_.InitDefault();
1704   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1705     _impl_.schema_.Set("", GetArenaForAllocation());
1706   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1707   if (from._internal_has_schema()) {
1708     _this->_impl_.schema_.Set(from._internal_schema(),
1709       _this->GetArenaForAllocation());
1710   }
1711   // @@protoc_insertion_point(copy_constructor:icing.lib.ResultSpecProto.ResultGrouping.Entry)
1712 }
1713 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1714 inline void ResultSpecProto_ResultGrouping_Entry::SharedCtor(
1715     ::_pb::Arena* arena, bool is_message_owned) {
1716   (void)arena;
1717   (void)is_message_owned;
1718   new (&_impl_) Impl_{
1719       decltype(_impl_._has_bits_){}
1720     , /*decltype(_impl_._cached_size_)*/{}
1721     , decltype(_impl_.namespace__){}
1722     , decltype(_impl_.schema_){}
1723   };
1724   _impl_.namespace__.InitDefault();
1725   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1726     _impl_.namespace__.Set("", GetArenaForAllocation());
1727   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1728   _impl_.schema_.InitDefault();
1729   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
1730     _impl_.schema_.Set("", GetArenaForAllocation());
1731   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
1732 }
1733 
~ResultSpecProto_ResultGrouping_Entry()1734 ResultSpecProto_ResultGrouping_Entry::~ResultSpecProto_ResultGrouping_Entry() {
1735   // @@protoc_insertion_point(destructor:icing.lib.ResultSpecProto.ResultGrouping.Entry)
1736   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1737   (void)arena;
1738     return;
1739   }
1740   SharedDtor();
1741 }
1742 
SharedDtor()1743 inline void ResultSpecProto_ResultGrouping_Entry::SharedDtor() {
1744   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1745   _impl_.namespace__.Destroy();
1746   _impl_.schema_.Destroy();
1747 }
1748 
SetCachedSize(int size) const1749 void ResultSpecProto_ResultGrouping_Entry::SetCachedSize(int size) const {
1750   _impl_._cached_size_.Set(size);
1751 }
1752 
Clear()1753 void ResultSpecProto_ResultGrouping_Entry::Clear() {
1754 // @@protoc_insertion_point(message_clear_start:icing.lib.ResultSpecProto.ResultGrouping.Entry)
1755   ::uint32_t cached_has_bits = 0;
1756   // Prevent compiler warnings about cached_has_bits being unused
1757   (void) cached_has_bits;
1758 
1759   cached_has_bits = _impl_._has_bits_[0];
1760   if (cached_has_bits & 0x00000003u) {
1761     if (cached_has_bits & 0x00000001u) {
1762       _impl_.namespace__.ClearNonDefaultToEmpty();
1763     }
1764     if (cached_has_bits & 0x00000002u) {
1765       _impl_.schema_.ClearNonDefaultToEmpty();
1766     }
1767   }
1768   _impl_._has_bits_.Clear();
1769   _internal_metadata_.Clear<std::string>();
1770 }
1771 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1772 const char* ResultSpecProto_ResultGrouping_Entry::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1773 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1774   _Internal::HasBits has_bits{};
1775   while (!ctx->Done(&ptr)) {
1776     ::uint32_t tag;
1777     ptr = ::_pbi::ReadTag(ptr, &tag);
1778     switch (tag >> 3) {
1779       // optional string namespace = 1;
1780       case 1:
1781         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
1782           auto str = _internal_mutable_namespace_();
1783           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1784           CHK_(ptr);
1785         } else {
1786           goto handle_unusual;
1787         }
1788         continue;
1789       // optional string schema = 2;
1790       case 2:
1791         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
1792           auto str = _internal_mutable_schema();
1793           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
1794           CHK_(ptr);
1795         } else {
1796           goto handle_unusual;
1797         }
1798         continue;
1799       default:
1800         goto handle_unusual;
1801     }  // switch
1802   handle_unusual:
1803     if ((tag == 0) || ((tag & 7) == 4)) {
1804       CHK_(ptr);
1805       ctx->SetLastTag(tag);
1806       goto message_done;
1807     }
1808     ptr = UnknownFieldParse(
1809         tag,
1810         _internal_metadata_.mutable_unknown_fields<std::string>(),
1811         ptr, ctx);
1812     CHK_(ptr != nullptr);
1813   }  // while
1814 message_done:
1815   _impl_._has_bits_.Or(has_bits);
1816   return ptr;
1817 failure:
1818   ptr = nullptr;
1819   goto message_done;
1820 #undef CHK_
1821 }
1822 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1823 ::uint8_t* ResultSpecProto_ResultGrouping_Entry::_InternalSerialize(
1824     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1825   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.ResultSpecProto.ResultGrouping.Entry)
1826   ::uint32_t cached_has_bits = 0;
1827   (void) cached_has_bits;
1828 
1829   cached_has_bits = _impl_._has_bits_[0];
1830   // optional string namespace = 1;
1831   if (cached_has_bits & 0x00000001u) {
1832     target = stream->WriteStringMaybeAliased(
1833         1, this->_internal_namespace_(), target);
1834   }
1835 
1836   // optional string schema = 2;
1837   if (cached_has_bits & 0x00000002u) {
1838     target = stream->WriteStringMaybeAliased(
1839         2, this->_internal_schema(), target);
1840   }
1841 
1842   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1843     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1844         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1845   }
1846   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.ResultSpecProto.ResultGrouping.Entry)
1847   return target;
1848 }
1849 
ByteSizeLong() const1850 size_t ResultSpecProto_ResultGrouping_Entry::ByteSizeLong() const {
1851 // @@protoc_insertion_point(message_byte_size_start:icing.lib.ResultSpecProto.ResultGrouping.Entry)
1852   size_t total_size = 0;
1853 
1854   ::uint32_t cached_has_bits = 0;
1855   // Prevent compiler warnings about cached_has_bits being unused
1856   (void) cached_has_bits;
1857 
1858   cached_has_bits = _impl_._has_bits_[0];
1859   if (cached_has_bits & 0x00000003u) {
1860     // optional string namespace = 1;
1861     if (cached_has_bits & 0x00000001u) {
1862       total_size += 1 +
1863         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1864           this->_internal_namespace_());
1865     }
1866 
1867     // optional string schema = 2;
1868     if (cached_has_bits & 0x00000002u) {
1869       total_size += 1 +
1870         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
1871           this->_internal_schema());
1872     }
1873 
1874   }
1875   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1876     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1877   }
1878   int cached_size = ::_pbi::ToCachedSize(total_size);
1879   SetCachedSize(cached_size);
1880   return total_size;
1881 }
1882 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1883 void ResultSpecProto_ResultGrouping_Entry::CheckTypeAndMergeFrom(
1884     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1885   MergeFrom(*::_pbi::DownCast<const ResultSpecProto_ResultGrouping_Entry*>(
1886       &from));
1887 }
1888 
MergeFrom(const ResultSpecProto_ResultGrouping_Entry & from)1889 void ResultSpecProto_ResultGrouping_Entry::MergeFrom(const ResultSpecProto_ResultGrouping_Entry& from) {
1890   ResultSpecProto_ResultGrouping_Entry* const _this = this;
1891   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.ResultSpecProto.ResultGrouping.Entry)
1892   GOOGLE_DCHECK_NE(&from, _this);
1893   ::uint32_t cached_has_bits = 0;
1894   (void) cached_has_bits;
1895 
1896   cached_has_bits = from._impl_._has_bits_[0];
1897   if (cached_has_bits & 0x00000003u) {
1898     if (cached_has_bits & 0x00000001u) {
1899       _this->_internal_set_namespace_(from._internal_namespace_());
1900     }
1901     if (cached_has_bits & 0x00000002u) {
1902       _this->_internal_set_schema(from._internal_schema());
1903     }
1904   }
1905   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1906 }
1907 
CopyFrom(const ResultSpecProto_ResultGrouping_Entry & from)1908 void ResultSpecProto_ResultGrouping_Entry::CopyFrom(const ResultSpecProto_ResultGrouping_Entry& from) {
1909 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.ResultSpecProto.ResultGrouping.Entry)
1910   if (&from == this) return;
1911   Clear();
1912   MergeFrom(from);
1913 }
1914 
IsInitialized() const1915 bool ResultSpecProto_ResultGrouping_Entry::IsInitialized() const {
1916   return true;
1917 }
1918 
InternalSwap(ResultSpecProto_ResultGrouping_Entry * other)1919 void ResultSpecProto_ResultGrouping_Entry::InternalSwap(ResultSpecProto_ResultGrouping_Entry* other) {
1920   using std::swap;
1921   auto* lhs_arena = GetArenaForAllocation();
1922   auto* rhs_arena = other->GetArenaForAllocation();
1923   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1924   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1925   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1926       &_impl_.namespace__, lhs_arena,
1927       &other->_impl_.namespace__, rhs_arena
1928   );
1929   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
1930       &_impl_.schema_, lhs_arena,
1931       &other->_impl_.schema_, rhs_arena
1932   );
1933 }
1934 
GetTypeName() const1935 std::string ResultSpecProto_ResultGrouping_Entry::GetTypeName() const {
1936   return "icing.lib.ResultSpecProto.ResultGrouping.Entry";
1937 }
1938 
1939 
1940 // ===================================================================
1941 
1942 class ResultSpecProto_ResultGrouping::_Internal {
1943  public:
1944   using HasBits = decltype(std::declval<ResultSpecProto_ResultGrouping>()._impl_._has_bits_);
set_has_max_results(HasBits * has_bits)1945   static void set_has_max_results(HasBits* has_bits) {
1946     (*has_bits)[0] |= 1u;
1947   }
1948 };
1949 
ResultSpecProto_ResultGrouping(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1950 ResultSpecProto_ResultGrouping::ResultSpecProto_ResultGrouping(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1951                          bool is_message_owned)
1952   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1953   SharedCtor(arena, is_message_owned);
1954   // @@protoc_insertion_point(arena_constructor:icing.lib.ResultSpecProto.ResultGrouping)
1955 }
ResultSpecProto_ResultGrouping(const ResultSpecProto_ResultGrouping & from)1956 ResultSpecProto_ResultGrouping::ResultSpecProto_ResultGrouping(const ResultSpecProto_ResultGrouping& from)
1957   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1958   ResultSpecProto_ResultGrouping* const _this = this; (void)_this;
1959   new (&_impl_) Impl_{
1960       decltype(_impl_._has_bits_){from._impl_._has_bits_}
1961     , /*decltype(_impl_._cached_size_)*/{}
1962     , decltype(_impl_.entry_groupings_){from._impl_.entry_groupings_}
1963     , decltype(_impl_.max_results_){}};
1964 
1965   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1966   _this->_impl_.max_results_ = from._impl_.max_results_;
1967   // @@protoc_insertion_point(copy_constructor:icing.lib.ResultSpecProto.ResultGrouping)
1968 }
1969 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1970 inline void ResultSpecProto_ResultGrouping::SharedCtor(
1971     ::_pb::Arena* arena, bool is_message_owned) {
1972   (void)arena;
1973   (void)is_message_owned;
1974   new (&_impl_) Impl_{
1975       decltype(_impl_._has_bits_){}
1976     , /*decltype(_impl_._cached_size_)*/{}
1977     , decltype(_impl_.entry_groupings_){arena}
1978     , decltype(_impl_.max_results_){0}
1979   };
1980 }
1981 
~ResultSpecProto_ResultGrouping()1982 ResultSpecProto_ResultGrouping::~ResultSpecProto_ResultGrouping() {
1983   // @@protoc_insertion_point(destructor:icing.lib.ResultSpecProto.ResultGrouping)
1984   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1985   (void)arena;
1986     return;
1987   }
1988   SharedDtor();
1989 }
1990 
SharedDtor()1991 inline void ResultSpecProto_ResultGrouping::SharedDtor() {
1992   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1993   _impl_.entry_groupings_.~RepeatedPtrField();
1994 }
1995 
SetCachedSize(int size) const1996 void ResultSpecProto_ResultGrouping::SetCachedSize(int size) const {
1997   _impl_._cached_size_.Set(size);
1998 }
1999 
Clear()2000 void ResultSpecProto_ResultGrouping::Clear() {
2001 // @@protoc_insertion_point(message_clear_start:icing.lib.ResultSpecProto.ResultGrouping)
2002   ::uint32_t cached_has_bits = 0;
2003   // Prevent compiler warnings about cached_has_bits being unused
2004   (void) cached_has_bits;
2005 
2006   _impl_.entry_groupings_.Clear();
2007   _impl_.max_results_ = 0;
2008   _impl_._has_bits_.Clear();
2009   _internal_metadata_.Clear<std::string>();
2010 }
2011 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2012 const char* ResultSpecProto_ResultGrouping::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2013 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2014   _Internal::HasBits has_bits{};
2015   while (!ctx->Done(&ptr)) {
2016     ::uint32_t tag;
2017     ptr = ::_pbi::ReadTag(ptr, &tag);
2018     switch (tag >> 3) {
2019       // repeated .icing.lib.ResultSpecProto.ResultGrouping.Entry entry_groupings = 1;
2020       case 1:
2021         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
2022           ptr -= 1;
2023           do {
2024             ptr += 1;
2025             ptr = ctx->ParseMessage(_internal_add_entry_groupings(), ptr);
2026             CHK_(ptr);
2027             if (!ctx->DataAvailable(ptr)) break;
2028           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
2029         } else {
2030           goto handle_unusual;
2031         }
2032         continue;
2033       // optional int32 max_results = 2;
2034       case 2:
2035         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2036           _Internal::set_has_max_results(&has_bits);
2037           _impl_.max_results_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2038           CHK_(ptr);
2039         } else {
2040           goto handle_unusual;
2041         }
2042         continue;
2043       default:
2044         goto handle_unusual;
2045     }  // switch
2046   handle_unusual:
2047     if ((tag == 0) || ((tag & 7) == 4)) {
2048       CHK_(ptr);
2049       ctx->SetLastTag(tag);
2050       goto message_done;
2051     }
2052     ptr = UnknownFieldParse(
2053         tag,
2054         _internal_metadata_.mutable_unknown_fields<std::string>(),
2055         ptr, ctx);
2056     CHK_(ptr != nullptr);
2057   }  // while
2058 message_done:
2059   _impl_._has_bits_.Or(has_bits);
2060   return ptr;
2061 failure:
2062   ptr = nullptr;
2063   goto message_done;
2064 #undef CHK_
2065 }
2066 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2067 ::uint8_t* ResultSpecProto_ResultGrouping::_InternalSerialize(
2068     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2069   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.ResultSpecProto.ResultGrouping)
2070   ::uint32_t cached_has_bits = 0;
2071   (void) cached_has_bits;
2072 
2073   // repeated .icing.lib.ResultSpecProto.ResultGrouping.Entry entry_groupings = 1;
2074   for (unsigned i = 0,
2075       n = static_cast<unsigned>(this->_internal_entry_groupings_size()); i < n; i++) {
2076     const auto& repfield = this->_internal_entry_groupings(i);
2077     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2078         InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
2079   }
2080 
2081   cached_has_bits = _impl_._has_bits_[0];
2082   // optional int32 max_results = 2;
2083   if (cached_has_bits & 0x00000001u) {
2084     target = stream->EnsureSpace(target);
2085     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_max_results(), target);
2086   }
2087 
2088   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2089     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2090         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2091   }
2092   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.ResultSpecProto.ResultGrouping)
2093   return target;
2094 }
2095 
ByteSizeLong() const2096 size_t ResultSpecProto_ResultGrouping::ByteSizeLong() const {
2097 // @@protoc_insertion_point(message_byte_size_start:icing.lib.ResultSpecProto.ResultGrouping)
2098   size_t total_size = 0;
2099 
2100   ::uint32_t cached_has_bits = 0;
2101   // Prevent compiler warnings about cached_has_bits being unused
2102   (void) cached_has_bits;
2103 
2104   // repeated .icing.lib.ResultSpecProto.ResultGrouping.Entry entry_groupings = 1;
2105   total_size += 1UL * this->_internal_entry_groupings_size();
2106   for (const auto& msg : this->_impl_.entry_groupings_) {
2107     total_size +=
2108       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2109   }
2110 
2111   // optional int32 max_results = 2;
2112   cached_has_bits = _impl_._has_bits_[0];
2113   if (cached_has_bits & 0x00000001u) {
2114     total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_results());
2115   }
2116 
2117   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2118     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2119   }
2120   int cached_size = ::_pbi::ToCachedSize(total_size);
2121   SetCachedSize(cached_size);
2122   return total_size;
2123 }
2124 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2125 void ResultSpecProto_ResultGrouping::CheckTypeAndMergeFrom(
2126     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2127   MergeFrom(*::_pbi::DownCast<const ResultSpecProto_ResultGrouping*>(
2128       &from));
2129 }
2130 
MergeFrom(const ResultSpecProto_ResultGrouping & from)2131 void ResultSpecProto_ResultGrouping::MergeFrom(const ResultSpecProto_ResultGrouping& from) {
2132   ResultSpecProto_ResultGrouping* const _this = this;
2133   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.ResultSpecProto.ResultGrouping)
2134   GOOGLE_DCHECK_NE(&from, _this);
2135   ::uint32_t cached_has_bits = 0;
2136   (void) cached_has_bits;
2137 
2138   _this->_impl_.entry_groupings_.MergeFrom(from._impl_.entry_groupings_);
2139   if (from._internal_has_max_results()) {
2140     _this->_internal_set_max_results(from._internal_max_results());
2141   }
2142   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2143 }
2144 
CopyFrom(const ResultSpecProto_ResultGrouping & from)2145 void ResultSpecProto_ResultGrouping::CopyFrom(const ResultSpecProto_ResultGrouping& from) {
2146 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.ResultSpecProto.ResultGrouping)
2147   if (&from == this) return;
2148   Clear();
2149   MergeFrom(from);
2150 }
2151 
IsInitialized() const2152 bool ResultSpecProto_ResultGrouping::IsInitialized() const {
2153   return true;
2154 }
2155 
InternalSwap(ResultSpecProto_ResultGrouping * other)2156 void ResultSpecProto_ResultGrouping::InternalSwap(ResultSpecProto_ResultGrouping* other) {
2157   using std::swap;
2158   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2159   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2160   _impl_.entry_groupings_.InternalSwap(&other->_impl_.entry_groupings_);
2161   swap(_impl_.max_results_, other->_impl_.max_results_);
2162 }
2163 
GetTypeName() const2164 std::string ResultSpecProto_ResultGrouping::GetTypeName() const {
2165   return "icing.lib.ResultSpecProto.ResultGrouping";
2166 }
2167 
2168 
2169 // ===================================================================
2170 
2171 class ResultSpecProto::_Internal {
2172  public:
2173   using HasBits = decltype(std::declval<ResultSpecProto>()._impl_._has_bits_);
set_has_num_per_page(HasBits * has_bits)2174   static void set_has_num_per_page(HasBits* has_bits) {
2175     (*has_bits)[0] |= 32u;
2176   }
set_has_debug_info(HasBits * has_bits)2177   static void set_has_debug_info(HasBits* has_bits) {
2178     (*has_bits)[0] |= 2u;
2179   }
2180   static const ::icing::lib::ResultSpecProto_SnippetSpecProto& snippet_spec(const ResultSpecProto* msg);
set_has_snippet_spec(HasBits * has_bits)2181   static void set_has_snippet_spec(HasBits* has_bits) {
2182     (*has_bits)[0] |= 1u;
2183   }
set_has_num_total_bytes_per_page_threshold(HasBits * has_bits)2184   static void set_has_num_total_bytes_per_page_threshold(HasBits* has_bits) {
2185     (*has_bits)[0] |= 64u;
2186   }
set_has_result_group_type(HasBits * has_bits)2187   static void set_has_result_group_type(HasBits* has_bits) {
2188     (*has_bits)[0] |= 4u;
2189   }
set_has_max_joined_children_per_parent_to_return(HasBits * has_bits)2190   static void set_has_max_joined_children_per_parent_to_return(HasBits* has_bits) {
2191     (*has_bits)[0] |= 8u;
2192   }
set_has_num_to_score(HasBits * has_bits)2193   static void set_has_num_to_score(HasBits* has_bits) {
2194     (*has_bits)[0] |= 16u;
2195   }
2196 };
2197 
2198 const ::icing::lib::ResultSpecProto_SnippetSpecProto&
snippet_spec(const ResultSpecProto * msg)2199 ResultSpecProto::_Internal::snippet_spec(const ResultSpecProto* msg) {
2200   return *msg->_impl_.snippet_spec_;
2201 }
ResultSpecProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2202 ResultSpecProto::ResultSpecProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2203                          bool is_message_owned)
2204   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2205   SharedCtor(arena, is_message_owned);
2206   // @@protoc_insertion_point(arena_constructor:icing.lib.ResultSpecProto)
2207 }
ResultSpecProto(const ResultSpecProto & from)2208 ResultSpecProto::ResultSpecProto(const ResultSpecProto& from)
2209   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2210   ResultSpecProto* const _this = this; (void)_this;
2211   new (&_impl_) Impl_{
2212       decltype(_impl_._has_bits_){from._impl_._has_bits_}
2213     , /*decltype(_impl_._cached_size_)*/{}
2214     , decltype(_impl_.type_property_masks_){from._impl_.type_property_masks_}
2215     , decltype(_impl_.result_groupings_){from._impl_.result_groupings_}
2216     , decltype(_impl_.snippet_spec_){nullptr}
2217     , decltype(_impl_.debug_info_){}
2218     , decltype(_impl_.result_group_type_){}
2219     , decltype(_impl_.max_joined_children_per_parent_to_return_){}
2220     , decltype(_impl_.num_to_score_){}
2221     , decltype(_impl_.num_per_page_){}
2222     , decltype(_impl_.num_total_bytes_per_page_threshold_){}};
2223 
2224   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2225   if (from._internal_has_snippet_spec()) {
2226     _this->_impl_.snippet_spec_ = new ::icing::lib::ResultSpecProto_SnippetSpecProto(*from._impl_.snippet_spec_);
2227   }
2228   ::memcpy(&_impl_.debug_info_, &from._impl_.debug_info_,
2229     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.num_total_bytes_per_page_threshold_) -
2230     reinterpret_cast<char*>(&_impl_.debug_info_)) + sizeof(_impl_.num_total_bytes_per_page_threshold_));
2231   // @@protoc_insertion_point(copy_constructor:icing.lib.ResultSpecProto)
2232 }
2233 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2234 inline void ResultSpecProto::SharedCtor(
2235     ::_pb::Arena* arena, bool is_message_owned) {
2236   (void)arena;
2237   (void)is_message_owned;
2238   new (&_impl_) Impl_{
2239       decltype(_impl_._has_bits_){}
2240     , /*decltype(_impl_._cached_size_)*/{}
2241     , decltype(_impl_.type_property_masks_){arena}
2242     , decltype(_impl_.result_groupings_){arena}
2243     , decltype(_impl_.snippet_spec_){nullptr}
2244     , decltype(_impl_.debug_info_){false}
2245     , decltype(_impl_.result_group_type_){0}
2246     , decltype(_impl_.max_joined_children_per_parent_to_return_){0}
2247     , decltype(_impl_.num_to_score_){30000}
2248     , decltype(_impl_.num_per_page_){10}
2249     , decltype(_impl_.num_total_bytes_per_page_threshold_){2147483647}
2250   };
2251 }
2252 
~ResultSpecProto()2253 ResultSpecProto::~ResultSpecProto() {
2254   // @@protoc_insertion_point(destructor:icing.lib.ResultSpecProto)
2255   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2256   (void)arena;
2257     return;
2258   }
2259   SharedDtor();
2260 }
2261 
SharedDtor()2262 inline void ResultSpecProto::SharedDtor() {
2263   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2264   _impl_.type_property_masks_.~RepeatedPtrField();
2265   _impl_.result_groupings_.~RepeatedPtrField();
2266   if (this != internal_default_instance()) delete _impl_.snippet_spec_;
2267 }
2268 
SetCachedSize(int size) const2269 void ResultSpecProto::SetCachedSize(int size) const {
2270   _impl_._cached_size_.Set(size);
2271 }
2272 
Clear()2273 void ResultSpecProto::Clear() {
2274 // @@protoc_insertion_point(message_clear_start:icing.lib.ResultSpecProto)
2275   ::uint32_t cached_has_bits = 0;
2276   // Prevent compiler warnings about cached_has_bits being unused
2277   (void) cached_has_bits;
2278 
2279   _impl_.type_property_masks_.Clear();
2280   _impl_.result_groupings_.Clear();
2281   cached_has_bits = _impl_._has_bits_[0];
2282   if (cached_has_bits & 0x00000001u) {
2283     GOOGLE_DCHECK(_impl_.snippet_spec_ != nullptr);
2284     _impl_.snippet_spec_->Clear();
2285   }
2286   if (cached_has_bits & 0x0000007eu) {
2287     ::memset(&_impl_.debug_info_, 0, static_cast<size_t>(
2288         reinterpret_cast<char*>(&_impl_.max_joined_children_per_parent_to_return_) -
2289         reinterpret_cast<char*>(&_impl_.debug_info_)) + sizeof(_impl_.max_joined_children_per_parent_to_return_));
2290     _impl_.num_to_score_ = 30000;
2291     _impl_.num_per_page_ = 10;
2292     _impl_.num_total_bytes_per_page_threshold_ = 2147483647;
2293   }
2294   _impl_._has_bits_.Clear();
2295   _internal_metadata_.Clear<std::string>();
2296 }
2297 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2298 const char* ResultSpecProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2299 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2300   _Internal::HasBits has_bits{};
2301   while (!ctx->Done(&ptr)) {
2302     ::uint32_t tag;
2303     ptr = ::_pbi::ReadTag(ptr, &tag);
2304     switch (tag >> 3) {
2305       // optional int32 num_per_page = 1 [default = 10];
2306       case 1:
2307         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 8)) {
2308           _Internal::set_has_num_per_page(&has_bits);
2309           _impl_.num_per_page_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2310           CHK_(ptr);
2311         } else {
2312           goto handle_unusual;
2313         }
2314         continue;
2315       // optional bool debug_info = 2;
2316       case 2:
2317         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2318           _Internal::set_has_debug_info(&has_bits);
2319           _impl_.debug_info_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2320           CHK_(ptr);
2321         } else {
2322           goto handle_unusual;
2323         }
2324         continue;
2325       // optional .icing.lib.ResultSpecProto.SnippetSpecProto snippet_spec = 3;
2326       case 3:
2327         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
2328           ptr = ctx->ParseMessage(_internal_mutable_snippet_spec(), ptr);
2329           CHK_(ptr);
2330         } else {
2331           goto handle_unusual;
2332         }
2333         continue;
2334       // repeated .icing.lib.TypePropertyMask type_property_masks = 4;
2335       case 4:
2336         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
2337           ptr -= 1;
2338           do {
2339             ptr += 1;
2340             ptr = ctx->ParseMessage(_internal_add_type_property_masks(), ptr);
2341             CHK_(ptr);
2342             if (!ctx->DataAvailable(ptr)) break;
2343           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
2344         } else {
2345           goto handle_unusual;
2346         }
2347         continue;
2348       // repeated .icing.lib.ResultSpecProto.ResultGrouping result_groupings = 5;
2349       case 5:
2350         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
2351           ptr -= 1;
2352           do {
2353             ptr += 1;
2354             ptr = ctx->ParseMessage(_internal_add_result_groupings(), ptr);
2355             CHK_(ptr);
2356             if (!ctx->DataAvailable(ptr)) break;
2357           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
2358         } else {
2359           goto handle_unusual;
2360         }
2361         continue;
2362       // optional int32 num_total_bytes_per_page_threshold = 6 [default = 2147483647];
2363       case 6:
2364         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
2365           _Internal::set_has_num_total_bytes_per_page_threshold(&has_bits);
2366           _impl_.num_total_bytes_per_page_threshold_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2367           CHK_(ptr);
2368         } else {
2369           goto handle_unusual;
2370         }
2371         continue;
2372       // optional .icing.lib.ResultSpecProto.ResultGroupingType result_group_type = 7;
2373       case 7:
2374         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
2375           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2376           CHK_(ptr);
2377           if (PROTOBUF_PREDICT_TRUE(::icing::lib::ResultSpecProto_ResultGroupingType_IsValid(val))) {
2378             _internal_set_result_group_type(static_cast<::icing::lib::ResultSpecProto_ResultGroupingType>(val));
2379           } else {
2380             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(7, val, mutable_unknown_fields());
2381           }
2382         } else {
2383           goto handle_unusual;
2384         }
2385         continue;
2386       // optional int32 max_joined_children_per_parent_to_return = 8;
2387       case 8:
2388         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
2389           _Internal::set_has_max_joined_children_per_parent_to_return(&has_bits);
2390           _impl_.max_joined_children_per_parent_to_return_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2391           CHK_(ptr);
2392         } else {
2393           goto handle_unusual;
2394         }
2395         continue;
2396       // optional int32 num_to_score = 9 [default = 30000];
2397       case 9:
2398         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
2399           _Internal::set_has_num_to_score(&has_bits);
2400           _impl_.num_to_score_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2401           CHK_(ptr);
2402         } else {
2403           goto handle_unusual;
2404         }
2405         continue;
2406       default:
2407         goto handle_unusual;
2408     }  // switch
2409   handle_unusual:
2410     if ((tag == 0) || ((tag & 7) == 4)) {
2411       CHK_(ptr);
2412       ctx->SetLastTag(tag);
2413       goto message_done;
2414     }
2415     ptr = UnknownFieldParse(
2416         tag,
2417         _internal_metadata_.mutable_unknown_fields<std::string>(),
2418         ptr, ctx);
2419     CHK_(ptr != nullptr);
2420   }  // while
2421 message_done:
2422   _impl_._has_bits_.Or(has_bits);
2423   return ptr;
2424 failure:
2425   ptr = nullptr;
2426   goto message_done;
2427 #undef CHK_
2428 }
2429 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2430 ::uint8_t* ResultSpecProto::_InternalSerialize(
2431     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2432   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.ResultSpecProto)
2433   ::uint32_t cached_has_bits = 0;
2434   (void) cached_has_bits;
2435 
2436   cached_has_bits = _impl_._has_bits_[0];
2437   // optional int32 num_per_page = 1 [default = 10];
2438   if (cached_has_bits & 0x00000020u) {
2439     target = stream->EnsureSpace(target);
2440     target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_num_per_page(), target);
2441   }
2442 
2443   // optional bool debug_info = 2;
2444   if (cached_has_bits & 0x00000002u) {
2445     target = stream->EnsureSpace(target);
2446     target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_debug_info(), target);
2447   }
2448 
2449   // optional .icing.lib.ResultSpecProto.SnippetSpecProto snippet_spec = 3;
2450   if (cached_has_bits & 0x00000001u) {
2451     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2452       InternalWriteMessage(3, _Internal::snippet_spec(this),
2453         _Internal::snippet_spec(this).GetCachedSize(), target, stream);
2454   }
2455 
2456   // repeated .icing.lib.TypePropertyMask type_property_masks = 4;
2457   for (unsigned i = 0,
2458       n = static_cast<unsigned>(this->_internal_type_property_masks_size()); i < n; i++) {
2459     const auto& repfield = this->_internal_type_property_masks(i);
2460     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2461         InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
2462   }
2463 
2464   // repeated .icing.lib.ResultSpecProto.ResultGrouping result_groupings = 5;
2465   for (unsigned i = 0,
2466       n = static_cast<unsigned>(this->_internal_result_groupings_size()); i < n; i++) {
2467     const auto& repfield = this->_internal_result_groupings(i);
2468     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2469         InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream);
2470   }
2471 
2472   // optional int32 num_total_bytes_per_page_threshold = 6 [default = 2147483647];
2473   if (cached_has_bits & 0x00000040u) {
2474     target = stream->EnsureSpace(target);
2475     target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_num_total_bytes_per_page_threshold(), target);
2476   }
2477 
2478   // optional .icing.lib.ResultSpecProto.ResultGroupingType result_group_type = 7;
2479   if (cached_has_bits & 0x00000004u) {
2480     target = stream->EnsureSpace(target);
2481     target = ::_pbi::WireFormatLite::WriteEnumToArray(
2482       7, this->_internal_result_group_type(), target);
2483   }
2484 
2485   // optional int32 max_joined_children_per_parent_to_return = 8;
2486   if (cached_has_bits & 0x00000008u) {
2487     target = stream->EnsureSpace(target);
2488     target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_max_joined_children_per_parent_to_return(), target);
2489   }
2490 
2491   // optional int32 num_to_score = 9 [default = 30000];
2492   if (cached_has_bits & 0x00000010u) {
2493     target = stream->EnsureSpace(target);
2494     target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_num_to_score(), target);
2495   }
2496 
2497   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2498     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2499         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2500   }
2501   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.ResultSpecProto)
2502   return target;
2503 }
2504 
ByteSizeLong() const2505 size_t ResultSpecProto::ByteSizeLong() const {
2506 // @@protoc_insertion_point(message_byte_size_start:icing.lib.ResultSpecProto)
2507   size_t total_size = 0;
2508 
2509   ::uint32_t cached_has_bits = 0;
2510   // Prevent compiler warnings about cached_has_bits being unused
2511   (void) cached_has_bits;
2512 
2513   // repeated .icing.lib.TypePropertyMask type_property_masks = 4;
2514   total_size += 1UL * this->_internal_type_property_masks_size();
2515   for (const auto& msg : this->_impl_.type_property_masks_) {
2516     total_size +=
2517       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2518   }
2519 
2520   // repeated .icing.lib.ResultSpecProto.ResultGrouping result_groupings = 5;
2521   total_size += 1UL * this->_internal_result_groupings_size();
2522   for (const auto& msg : this->_impl_.result_groupings_) {
2523     total_size +=
2524       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
2525   }
2526 
2527   cached_has_bits = _impl_._has_bits_[0];
2528   if (cached_has_bits & 0x0000007fu) {
2529     // optional .icing.lib.ResultSpecProto.SnippetSpecProto snippet_spec = 3;
2530     if (cached_has_bits & 0x00000001u) {
2531       total_size += 1 +
2532         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2533           *_impl_.snippet_spec_);
2534     }
2535 
2536     // optional bool debug_info = 2;
2537     if (cached_has_bits & 0x00000002u) {
2538       total_size += 1 + 1;
2539     }
2540 
2541     // optional .icing.lib.ResultSpecProto.ResultGroupingType result_group_type = 7;
2542     if (cached_has_bits & 0x00000004u) {
2543       total_size += 1 +
2544         ::_pbi::WireFormatLite::EnumSize(this->_internal_result_group_type());
2545     }
2546 
2547     // optional int32 max_joined_children_per_parent_to_return = 8;
2548     if (cached_has_bits & 0x00000008u) {
2549       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_joined_children_per_parent_to_return());
2550     }
2551 
2552     // optional int32 num_to_score = 9 [default = 30000];
2553     if (cached_has_bits & 0x00000010u) {
2554       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_to_score());
2555     }
2556 
2557     // optional int32 num_per_page = 1 [default = 10];
2558     if (cached_has_bits & 0x00000020u) {
2559       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_per_page());
2560     }
2561 
2562     // optional int32 num_total_bytes_per_page_threshold = 6 [default = 2147483647];
2563     if (cached_has_bits & 0x00000040u) {
2564       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_total_bytes_per_page_threshold());
2565     }
2566 
2567   }
2568   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2569     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2570   }
2571   int cached_size = ::_pbi::ToCachedSize(total_size);
2572   SetCachedSize(cached_size);
2573   return total_size;
2574 }
2575 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2576 void ResultSpecProto::CheckTypeAndMergeFrom(
2577     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2578   MergeFrom(*::_pbi::DownCast<const ResultSpecProto*>(
2579       &from));
2580 }
2581 
MergeFrom(const ResultSpecProto & from)2582 void ResultSpecProto::MergeFrom(const ResultSpecProto& from) {
2583   ResultSpecProto* const _this = this;
2584   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.ResultSpecProto)
2585   GOOGLE_DCHECK_NE(&from, _this);
2586   ::uint32_t cached_has_bits = 0;
2587   (void) cached_has_bits;
2588 
2589   _this->_impl_.type_property_masks_.MergeFrom(from._impl_.type_property_masks_);
2590   _this->_impl_.result_groupings_.MergeFrom(from._impl_.result_groupings_);
2591   cached_has_bits = from._impl_._has_bits_[0];
2592   if (cached_has_bits & 0x0000007fu) {
2593     if (cached_has_bits & 0x00000001u) {
2594       _this->_internal_mutable_snippet_spec()->::icing::lib::ResultSpecProto_SnippetSpecProto::MergeFrom(
2595           from._internal_snippet_spec());
2596     }
2597     if (cached_has_bits & 0x00000002u) {
2598       _this->_impl_.debug_info_ = from._impl_.debug_info_;
2599     }
2600     if (cached_has_bits & 0x00000004u) {
2601       _this->_impl_.result_group_type_ = from._impl_.result_group_type_;
2602     }
2603     if (cached_has_bits & 0x00000008u) {
2604       _this->_impl_.max_joined_children_per_parent_to_return_ = from._impl_.max_joined_children_per_parent_to_return_;
2605     }
2606     if (cached_has_bits & 0x00000010u) {
2607       _this->_impl_.num_to_score_ = from._impl_.num_to_score_;
2608     }
2609     if (cached_has_bits & 0x00000020u) {
2610       _this->_impl_.num_per_page_ = from._impl_.num_per_page_;
2611     }
2612     if (cached_has_bits & 0x00000040u) {
2613       _this->_impl_.num_total_bytes_per_page_threshold_ = from._impl_.num_total_bytes_per_page_threshold_;
2614     }
2615     _this->_impl_._has_bits_[0] |= cached_has_bits;
2616   }
2617   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2618 }
2619 
CopyFrom(const ResultSpecProto & from)2620 void ResultSpecProto::CopyFrom(const ResultSpecProto& from) {
2621 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.ResultSpecProto)
2622   if (&from == this) return;
2623   Clear();
2624   MergeFrom(from);
2625 }
2626 
IsInitialized() const2627 bool ResultSpecProto::IsInitialized() const {
2628   return true;
2629 }
2630 
InternalSwap(ResultSpecProto * other)2631 void ResultSpecProto::InternalSwap(ResultSpecProto* other) {
2632   using std::swap;
2633   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2634   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2635   _impl_.type_property_masks_.InternalSwap(&other->_impl_.type_property_masks_);
2636   _impl_.result_groupings_.InternalSwap(&other->_impl_.result_groupings_);
2637   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2638       PROTOBUF_FIELD_OFFSET(ResultSpecProto, _impl_.max_joined_children_per_parent_to_return_)
2639       + sizeof(ResultSpecProto::_impl_.max_joined_children_per_parent_to_return_)  // NOLINT
2640       - PROTOBUF_FIELD_OFFSET(ResultSpecProto, _impl_.snippet_spec_)>(
2641           reinterpret_cast<char*>(&_impl_.snippet_spec_),
2642           reinterpret_cast<char*>(&other->_impl_.snippet_spec_));
2643   swap(_impl_.num_to_score_, other->_impl_.num_to_score_);
2644   swap(_impl_.num_per_page_, other->_impl_.num_per_page_);
2645   swap(_impl_.num_total_bytes_per_page_threshold_, other->_impl_.num_total_bytes_per_page_threshold_);
2646 }
2647 
GetTypeName() const2648 std::string ResultSpecProto::GetTypeName() const {
2649   return "icing.lib.ResultSpecProto";
2650 }
2651 
2652 
2653 // ===================================================================
2654 
2655 class SnippetMatchProto::_Internal {
2656  public:
2657   using HasBits = decltype(std::declval<SnippetMatchProto>()._impl_._has_bits_);
set_has_exact_match_byte_position(HasBits * has_bits)2658   static void set_has_exact_match_byte_position(HasBits* has_bits) {
2659     (*has_bits)[0] |= 1u;
2660   }
set_has_exact_match_byte_length(HasBits * has_bits)2661   static void set_has_exact_match_byte_length(HasBits* has_bits) {
2662     (*has_bits)[0] |= 2u;
2663   }
set_has_submatch_byte_length(HasBits * has_bits)2664   static void set_has_submatch_byte_length(HasBits* has_bits) {
2665     (*has_bits)[0] |= 256u;
2666   }
set_has_exact_match_utf16_position(HasBits * has_bits)2667   static void set_has_exact_match_utf16_position(HasBits* has_bits) {
2668     (*has_bits)[0] |= 16u;
2669   }
set_has_exact_match_utf16_length(HasBits * has_bits)2670   static void set_has_exact_match_utf16_length(HasBits* has_bits) {
2671     (*has_bits)[0] |= 32u;
2672   }
set_has_submatch_utf16_length(HasBits * has_bits)2673   static void set_has_submatch_utf16_length(HasBits* has_bits) {
2674     (*has_bits)[0] |= 512u;
2675   }
set_has_window_byte_position(HasBits * has_bits)2676   static void set_has_window_byte_position(HasBits* has_bits) {
2677     (*has_bits)[0] |= 4u;
2678   }
set_has_window_byte_length(HasBits * has_bits)2679   static void set_has_window_byte_length(HasBits* has_bits) {
2680     (*has_bits)[0] |= 8u;
2681   }
set_has_window_utf16_position(HasBits * has_bits)2682   static void set_has_window_utf16_position(HasBits* has_bits) {
2683     (*has_bits)[0] |= 64u;
2684   }
set_has_window_utf16_length(HasBits * has_bits)2685   static void set_has_window_utf16_length(HasBits* has_bits) {
2686     (*has_bits)[0] |= 128u;
2687   }
2688 };
2689 
SnippetMatchProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2690 SnippetMatchProto::SnippetMatchProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2691                          bool is_message_owned)
2692   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2693   SharedCtor(arena, is_message_owned);
2694   // @@protoc_insertion_point(arena_constructor:icing.lib.SnippetMatchProto)
2695 }
SnippetMatchProto(const SnippetMatchProto & from)2696 SnippetMatchProto::SnippetMatchProto(const SnippetMatchProto& from)
2697   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2698   SnippetMatchProto* const _this = this; (void)_this;
2699   new (&_impl_) Impl_{
2700       decltype(_impl_._has_bits_){from._impl_._has_bits_}
2701     , /*decltype(_impl_._cached_size_)*/{}
2702     , decltype(_impl_.exact_match_byte_position_){}
2703     , decltype(_impl_.exact_match_byte_length_){}
2704     , decltype(_impl_.window_byte_position_){}
2705     , decltype(_impl_.window_byte_length_){}
2706     , decltype(_impl_.exact_match_utf16_position_){}
2707     , decltype(_impl_.exact_match_utf16_length_){}
2708     , decltype(_impl_.window_utf16_position_){}
2709     , decltype(_impl_.window_utf16_length_){}
2710     , decltype(_impl_.submatch_byte_length_){}
2711     , decltype(_impl_.submatch_utf16_length_){}};
2712 
2713   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2714   ::memcpy(&_impl_.exact_match_byte_position_, &from._impl_.exact_match_byte_position_,
2715     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.submatch_utf16_length_) -
2716     reinterpret_cast<char*>(&_impl_.exact_match_byte_position_)) + sizeof(_impl_.submatch_utf16_length_));
2717   // @@protoc_insertion_point(copy_constructor:icing.lib.SnippetMatchProto)
2718 }
2719 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2720 inline void SnippetMatchProto::SharedCtor(
2721     ::_pb::Arena* arena, bool is_message_owned) {
2722   (void)arena;
2723   (void)is_message_owned;
2724   new (&_impl_) Impl_{
2725       decltype(_impl_._has_bits_){}
2726     , /*decltype(_impl_._cached_size_)*/{}
2727     , decltype(_impl_.exact_match_byte_position_){0}
2728     , decltype(_impl_.exact_match_byte_length_){0}
2729     , decltype(_impl_.window_byte_position_){0}
2730     , decltype(_impl_.window_byte_length_){0}
2731     , decltype(_impl_.exact_match_utf16_position_){0}
2732     , decltype(_impl_.exact_match_utf16_length_){0}
2733     , decltype(_impl_.window_utf16_position_){0}
2734     , decltype(_impl_.window_utf16_length_){0}
2735     , decltype(_impl_.submatch_byte_length_){0}
2736     , decltype(_impl_.submatch_utf16_length_){0}
2737   };
2738 }
2739 
~SnippetMatchProto()2740 SnippetMatchProto::~SnippetMatchProto() {
2741   // @@protoc_insertion_point(destructor:icing.lib.SnippetMatchProto)
2742   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2743   (void)arena;
2744     return;
2745   }
2746   SharedDtor();
2747 }
2748 
SharedDtor()2749 inline void SnippetMatchProto::SharedDtor() {
2750   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2751 }
2752 
SetCachedSize(int size) const2753 void SnippetMatchProto::SetCachedSize(int size) const {
2754   _impl_._cached_size_.Set(size);
2755 }
2756 
Clear()2757 void SnippetMatchProto::Clear() {
2758 // @@protoc_insertion_point(message_clear_start:icing.lib.SnippetMatchProto)
2759   ::uint32_t cached_has_bits = 0;
2760   // Prevent compiler warnings about cached_has_bits being unused
2761   (void) cached_has_bits;
2762 
2763   cached_has_bits = _impl_._has_bits_[0];
2764   if (cached_has_bits & 0x000000ffu) {
2765     ::memset(&_impl_.exact_match_byte_position_, 0, static_cast<size_t>(
2766         reinterpret_cast<char*>(&_impl_.window_utf16_length_) -
2767         reinterpret_cast<char*>(&_impl_.exact_match_byte_position_)) + sizeof(_impl_.window_utf16_length_));
2768   }
2769   if (cached_has_bits & 0x00000300u) {
2770     ::memset(&_impl_.submatch_byte_length_, 0, static_cast<size_t>(
2771         reinterpret_cast<char*>(&_impl_.submatch_utf16_length_) -
2772         reinterpret_cast<char*>(&_impl_.submatch_byte_length_)) + sizeof(_impl_.submatch_utf16_length_));
2773   }
2774   _impl_._has_bits_.Clear();
2775   _internal_metadata_.Clear<std::string>();
2776 }
2777 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2778 const char* SnippetMatchProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2779 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2780   _Internal::HasBits has_bits{};
2781   while (!ctx->Done(&ptr)) {
2782     ::uint32_t tag;
2783     ptr = ::_pbi::ReadTag(ptr, &tag);
2784     switch (tag >> 3) {
2785       // optional int32 exact_match_byte_position = 2;
2786       case 2:
2787         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 16)) {
2788           _Internal::set_has_exact_match_byte_position(&has_bits);
2789           _impl_.exact_match_byte_position_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2790           CHK_(ptr);
2791         } else {
2792           goto handle_unusual;
2793         }
2794         continue;
2795       // optional int32 exact_match_byte_length = 3;
2796       case 3:
2797         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
2798           _Internal::set_has_exact_match_byte_length(&has_bits);
2799           _impl_.exact_match_byte_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2800           CHK_(ptr);
2801         } else {
2802           goto handle_unusual;
2803         }
2804         continue;
2805       // optional int32 window_byte_position = 4;
2806       case 4:
2807         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
2808           _Internal::set_has_window_byte_position(&has_bits);
2809           _impl_.window_byte_position_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2810           CHK_(ptr);
2811         } else {
2812           goto handle_unusual;
2813         }
2814         continue;
2815       // optional int32 window_byte_length = 5;
2816       case 5:
2817         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
2818           _Internal::set_has_window_byte_length(&has_bits);
2819           _impl_.window_byte_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2820           CHK_(ptr);
2821         } else {
2822           goto handle_unusual;
2823         }
2824         continue;
2825       // optional int32 exact_match_utf16_position = 6;
2826       case 6:
2827         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 48)) {
2828           _Internal::set_has_exact_match_utf16_position(&has_bits);
2829           _impl_.exact_match_utf16_position_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2830           CHK_(ptr);
2831         } else {
2832           goto handle_unusual;
2833         }
2834         continue;
2835       // optional int32 exact_match_utf16_length = 7;
2836       case 7:
2837         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 56)) {
2838           _Internal::set_has_exact_match_utf16_length(&has_bits);
2839           _impl_.exact_match_utf16_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2840           CHK_(ptr);
2841         } else {
2842           goto handle_unusual;
2843         }
2844         continue;
2845       // optional int32 window_utf16_position = 8;
2846       case 8:
2847         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 64)) {
2848           _Internal::set_has_window_utf16_position(&has_bits);
2849           _impl_.window_utf16_position_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2850           CHK_(ptr);
2851         } else {
2852           goto handle_unusual;
2853         }
2854         continue;
2855       // optional int32 window_utf16_length = 9;
2856       case 9:
2857         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
2858           _Internal::set_has_window_utf16_length(&has_bits);
2859           _impl_.window_utf16_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2860           CHK_(ptr);
2861         } else {
2862           goto handle_unusual;
2863         }
2864         continue;
2865       // optional int32 submatch_byte_length = 10;
2866       case 10:
2867         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 80)) {
2868           _Internal::set_has_submatch_byte_length(&has_bits);
2869           _impl_.submatch_byte_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2870           CHK_(ptr);
2871         } else {
2872           goto handle_unusual;
2873         }
2874         continue;
2875       // optional int32 submatch_utf16_length = 11;
2876       case 11:
2877         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 88)) {
2878           _Internal::set_has_submatch_utf16_length(&has_bits);
2879           _impl_.submatch_utf16_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2880           CHK_(ptr);
2881         } else {
2882           goto handle_unusual;
2883         }
2884         continue;
2885       default:
2886         goto handle_unusual;
2887     }  // switch
2888   handle_unusual:
2889     if ((tag == 0) || ((tag & 7) == 4)) {
2890       CHK_(ptr);
2891       ctx->SetLastTag(tag);
2892       goto message_done;
2893     }
2894     ptr = UnknownFieldParse(
2895         tag,
2896         _internal_metadata_.mutable_unknown_fields<std::string>(),
2897         ptr, ctx);
2898     CHK_(ptr != nullptr);
2899   }  // while
2900 message_done:
2901   _impl_._has_bits_.Or(has_bits);
2902   return ptr;
2903 failure:
2904   ptr = nullptr;
2905   goto message_done;
2906 #undef CHK_
2907 }
2908 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2909 ::uint8_t* SnippetMatchProto::_InternalSerialize(
2910     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2911   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.SnippetMatchProto)
2912   ::uint32_t cached_has_bits = 0;
2913   (void) cached_has_bits;
2914 
2915   cached_has_bits = _impl_._has_bits_[0];
2916   // optional int32 exact_match_byte_position = 2;
2917   if (cached_has_bits & 0x00000001u) {
2918     target = stream->EnsureSpace(target);
2919     target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_exact_match_byte_position(), target);
2920   }
2921 
2922   // optional int32 exact_match_byte_length = 3;
2923   if (cached_has_bits & 0x00000002u) {
2924     target = stream->EnsureSpace(target);
2925     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_exact_match_byte_length(), target);
2926   }
2927 
2928   // optional int32 window_byte_position = 4;
2929   if (cached_has_bits & 0x00000004u) {
2930     target = stream->EnsureSpace(target);
2931     target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_window_byte_position(), target);
2932   }
2933 
2934   // optional int32 window_byte_length = 5;
2935   if (cached_has_bits & 0x00000008u) {
2936     target = stream->EnsureSpace(target);
2937     target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_window_byte_length(), target);
2938   }
2939 
2940   // optional int32 exact_match_utf16_position = 6;
2941   if (cached_has_bits & 0x00000010u) {
2942     target = stream->EnsureSpace(target);
2943     target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_exact_match_utf16_position(), target);
2944   }
2945 
2946   // optional int32 exact_match_utf16_length = 7;
2947   if (cached_has_bits & 0x00000020u) {
2948     target = stream->EnsureSpace(target);
2949     target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_exact_match_utf16_length(), target);
2950   }
2951 
2952   // optional int32 window_utf16_position = 8;
2953   if (cached_has_bits & 0x00000040u) {
2954     target = stream->EnsureSpace(target);
2955     target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_window_utf16_position(), target);
2956   }
2957 
2958   // optional int32 window_utf16_length = 9;
2959   if (cached_has_bits & 0x00000080u) {
2960     target = stream->EnsureSpace(target);
2961     target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_window_utf16_length(), target);
2962   }
2963 
2964   // optional int32 submatch_byte_length = 10;
2965   if (cached_has_bits & 0x00000100u) {
2966     target = stream->EnsureSpace(target);
2967     target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_submatch_byte_length(), target);
2968   }
2969 
2970   // optional int32 submatch_utf16_length = 11;
2971   if (cached_has_bits & 0x00000200u) {
2972     target = stream->EnsureSpace(target);
2973     target = ::_pbi::WireFormatLite::WriteInt32ToArray(11, this->_internal_submatch_utf16_length(), target);
2974   }
2975 
2976   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2977     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2978         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2979   }
2980   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.SnippetMatchProto)
2981   return target;
2982 }
2983 
ByteSizeLong() const2984 size_t SnippetMatchProto::ByteSizeLong() const {
2985 // @@protoc_insertion_point(message_byte_size_start:icing.lib.SnippetMatchProto)
2986   size_t total_size = 0;
2987 
2988   ::uint32_t cached_has_bits = 0;
2989   // Prevent compiler warnings about cached_has_bits being unused
2990   (void) cached_has_bits;
2991 
2992   cached_has_bits = _impl_._has_bits_[0];
2993   if (cached_has_bits & 0x000000ffu) {
2994     // optional int32 exact_match_byte_position = 2;
2995     if (cached_has_bits & 0x00000001u) {
2996       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_exact_match_byte_position());
2997     }
2998 
2999     // optional int32 exact_match_byte_length = 3;
3000     if (cached_has_bits & 0x00000002u) {
3001       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_exact_match_byte_length());
3002     }
3003 
3004     // optional int32 window_byte_position = 4;
3005     if (cached_has_bits & 0x00000004u) {
3006       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_window_byte_position());
3007     }
3008 
3009     // optional int32 window_byte_length = 5;
3010     if (cached_has_bits & 0x00000008u) {
3011       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_window_byte_length());
3012     }
3013 
3014     // optional int32 exact_match_utf16_position = 6;
3015     if (cached_has_bits & 0x00000010u) {
3016       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_exact_match_utf16_position());
3017     }
3018 
3019     // optional int32 exact_match_utf16_length = 7;
3020     if (cached_has_bits & 0x00000020u) {
3021       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_exact_match_utf16_length());
3022     }
3023 
3024     // optional int32 window_utf16_position = 8;
3025     if (cached_has_bits & 0x00000040u) {
3026       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_window_utf16_position());
3027     }
3028 
3029     // optional int32 window_utf16_length = 9;
3030     if (cached_has_bits & 0x00000080u) {
3031       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_window_utf16_length());
3032     }
3033 
3034   }
3035   if (cached_has_bits & 0x00000300u) {
3036     // optional int32 submatch_byte_length = 10;
3037     if (cached_has_bits & 0x00000100u) {
3038       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_submatch_byte_length());
3039     }
3040 
3041     // optional int32 submatch_utf16_length = 11;
3042     if (cached_has_bits & 0x00000200u) {
3043       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_submatch_utf16_length());
3044     }
3045 
3046   }
3047   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3048     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3049   }
3050   int cached_size = ::_pbi::ToCachedSize(total_size);
3051   SetCachedSize(cached_size);
3052   return total_size;
3053 }
3054 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3055 void SnippetMatchProto::CheckTypeAndMergeFrom(
3056     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3057   MergeFrom(*::_pbi::DownCast<const SnippetMatchProto*>(
3058       &from));
3059 }
3060 
MergeFrom(const SnippetMatchProto & from)3061 void SnippetMatchProto::MergeFrom(const SnippetMatchProto& from) {
3062   SnippetMatchProto* const _this = this;
3063   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.SnippetMatchProto)
3064   GOOGLE_DCHECK_NE(&from, _this);
3065   ::uint32_t cached_has_bits = 0;
3066   (void) cached_has_bits;
3067 
3068   cached_has_bits = from._impl_._has_bits_[0];
3069   if (cached_has_bits & 0x000000ffu) {
3070     if (cached_has_bits & 0x00000001u) {
3071       _this->_impl_.exact_match_byte_position_ = from._impl_.exact_match_byte_position_;
3072     }
3073     if (cached_has_bits & 0x00000002u) {
3074       _this->_impl_.exact_match_byte_length_ = from._impl_.exact_match_byte_length_;
3075     }
3076     if (cached_has_bits & 0x00000004u) {
3077       _this->_impl_.window_byte_position_ = from._impl_.window_byte_position_;
3078     }
3079     if (cached_has_bits & 0x00000008u) {
3080       _this->_impl_.window_byte_length_ = from._impl_.window_byte_length_;
3081     }
3082     if (cached_has_bits & 0x00000010u) {
3083       _this->_impl_.exact_match_utf16_position_ = from._impl_.exact_match_utf16_position_;
3084     }
3085     if (cached_has_bits & 0x00000020u) {
3086       _this->_impl_.exact_match_utf16_length_ = from._impl_.exact_match_utf16_length_;
3087     }
3088     if (cached_has_bits & 0x00000040u) {
3089       _this->_impl_.window_utf16_position_ = from._impl_.window_utf16_position_;
3090     }
3091     if (cached_has_bits & 0x00000080u) {
3092       _this->_impl_.window_utf16_length_ = from._impl_.window_utf16_length_;
3093     }
3094     _this->_impl_._has_bits_[0] |= cached_has_bits;
3095   }
3096   if (cached_has_bits & 0x00000300u) {
3097     if (cached_has_bits & 0x00000100u) {
3098       _this->_impl_.submatch_byte_length_ = from._impl_.submatch_byte_length_;
3099     }
3100     if (cached_has_bits & 0x00000200u) {
3101       _this->_impl_.submatch_utf16_length_ = from._impl_.submatch_utf16_length_;
3102     }
3103     _this->_impl_._has_bits_[0] |= cached_has_bits;
3104   }
3105   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3106 }
3107 
CopyFrom(const SnippetMatchProto & from)3108 void SnippetMatchProto::CopyFrom(const SnippetMatchProto& from) {
3109 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.SnippetMatchProto)
3110   if (&from == this) return;
3111   Clear();
3112   MergeFrom(from);
3113 }
3114 
IsInitialized() const3115 bool SnippetMatchProto::IsInitialized() const {
3116   return true;
3117 }
3118 
InternalSwap(SnippetMatchProto * other)3119 void SnippetMatchProto::InternalSwap(SnippetMatchProto* other) {
3120   using std::swap;
3121   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3122   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3123   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3124       PROTOBUF_FIELD_OFFSET(SnippetMatchProto, _impl_.submatch_utf16_length_)
3125       + sizeof(SnippetMatchProto::_impl_.submatch_utf16_length_)  // NOLINT
3126       - PROTOBUF_FIELD_OFFSET(SnippetMatchProto, _impl_.exact_match_byte_position_)>(
3127           reinterpret_cast<char*>(&_impl_.exact_match_byte_position_),
3128           reinterpret_cast<char*>(&other->_impl_.exact_match_byte_position_));
3129 }
3130 
GetTypeName() const3131 std::string SnippetMatchProto::GetTypeName() const {
3132   return "icing.lib.SnippetMatchProto";
3133 }
3134 
3135 
3136 // ===================================================================
3137 
3138 class SnippetProto_EntryProto::_Internal {
3139  public:
3140   using HasBits = decltype(std::declval<SnippetProto_EntryProto>()._impl_._has_bits_);
set_has_property_name(HasBits * has_bits)3141   static void set_has_property_name(HasBits* has_bits) {
3142     (*has_bits)[0] |= 1u;
3143   }
3144 };
3145 
SnippetProto_EntryProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3146 SnippetProto_EntryProto::SnippetProto_EntryProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3147                          bool is_message_owned)
3148   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3149   SharedCtor(arena, is_message_owned);
3150   // @@protoc_insertion_point(arena_constructor:icing.lib.SnippetProto.EntryProto)
3151 }
SnippetProto_EntryProto(const SnippetProto_EntryProto & from)3152 SnippetProto_EntryProto::SnippetProto_EntryProto(const SnippetProto_EntryProto& from)
3153   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3154   SnippetProto_EntryProto* const _this = this; (void)_this;
3155   new (&_impl_) Impl_{
3156       decltype(_impl_._has_bits_){from._impl_._has_bits_}
3157     , /*decltype(_impl_._cached_size_)*/{}
3158     , decltype(_impl_.snippet_matches_){from._impl_.snippet_matches_}
3159     , decltype(_impl_.property_name_){}};
3160 
3161   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3162   _impl_.property_name_.InitDefault();
3163   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3164     _impl_.property_name_.Set("", GetArenaForAllocation());
3165   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3166   if (from._internal_has_property_name()) {
3167     _this->_impl_.property_name_.Set(from._internal_property_name(),
3168       _this->GetArenaForAllocation());
3169   }
3170   // @@protoc_insertion_point(copy_constructor:icing.lib.SnippetProto.EntryProto)
3171 }
3172 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3173 inline void SnippetProto_EntryProto::SharedCtor(
3174     ::_pb::Arena* arena, bool is_message_owned) {
3175   (void)arena;
3176   (void)is_message_owned;
3177   new (&_impl_) Impl_{
3178       decltype(_impl_._has_bits_){}
3179     , /*decltype(_impl_._cached_size_)*/{}
3180     , decltype(_impl_.snippet_matches_){arena}
3181     , decltype(_impl_.property_name_){}
3182   };
3183   _impl_.property_name_.InitDefault();
3184   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3185     _impl_.property_name_.Set("", GetArenaForAllocation());
3186   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3187 }
3188 
~SnippetProto_EntryProto()3189 SnippetProto_EntryProto::~SnippetProto_EntryProto() {
3190   // @@protoc_insertion_point(destructor:icing.lib.SnippetProto.EntryProto)
3191   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3192   (void)arena;
3193     return;
3194   }
3195   SharedDtor();
3196 }
3197 
SharedDtor()3198 inline void SnippetProto_EntryProto::SharedDtor() {
3199   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3200   _impl_.snippet_matches_.~RepeatedPtrField();
3201   _impl_.property_name_.Destroy();
3202 }
3203 
SetCachedSize(int size) const3204 void SnippetProto_EntryProto::SetCachedSize(int size) const {
3205   _impl_._cached_size_.Set(size);
3206 }
3207 
Clear()3208 void SnippetProto_EntryProto::Clear() {
3209 // @@protoc_insertion_point(message_clear_start:icing.lib.SnippetProto.EntryProto)
3210   ::uint32_t cached_has_bits = 0;
3211   // Prevent compiler warnings about cached_has_bits being unused
3212   (void) cached_has_bits;
3213 
3214   _impl_.snippet_matches_.Clear();
3215   cached_has_bits = _impl_._has_bits_[0];
3216   if (cached_has_bits & 0x00000001u) {
3217     _impl_.property_name_.ClearNonDefaultToEmpty();
3218   }
3219   _impl_._has_bits_.Clear();
3220   _internal_metadata_.Clear<std::string>();
3221 }
3222 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3223 const char* SnippetProto_EntryProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3224 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3225   _Internal::HasBits has_bits{};
3226   while (!ctx->Done(&ptr)) {
3227     ::uint32_t tag;
3228     ptr = ::_pbi::ReadTag(ptr, &tag);
3229     switch (tag >> 3) {
3230       // optional string property_name = 1;
3231       case 1:
3232         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3233           auto str = _internal_mutable_property_name();
3234           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
3235           CHK_(ptr);
3236         } else {
3237           goto handle_unusual;
3238         }
3239         continue;
3240       // repeated .icing.lib.SnippetMatchProto snippet_matches = 2;
3241       case 2:
3242         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
3243           ptr -= 1;
3244           do {
3245             ptr += 1;
3246             ptr = ctx->ParseMessage(_internal_add_snippet_matches(), ptr);
3247             CHK_(ptr);
3248             if (!ctx->DataAvailable(ptr)) break;
3249           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
3250         } else {
3251           goto handle_unusual;
3252         }
3253         continue;
3254       default:
3255         goto handle_unusual;
3256     }  // switch
3257   handle_unusual:
3258     if ((tag == 0) || ((tag & 7) == 4)) {
3259       CHK_(ptr);
3260       ctx->SetLastTag(tag);
3261       goto message_done;
3262     }
3263     ptr = UnknownFieldParse(
3264         tag,
3265         _internal_metadata_.mutable_unknown_fields<std::string>(),
3266         ptr, ctx);
3267     CHK_(ptr != nullptr);
3268   }  // while
3269 message_done:
3270   _impl_._has_bits_.Or(has_bits);
3271   return ptr;
3272 failure:
3273   ptr = nullptr;
3274   goto message_done;
3275 #undef CHK_
3276 }
3277 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3278 ::uint8_t* SnippetProto_EntryProto::_InternalSerialize(
3279     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3280   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.SnippetProto.EntryProto)
3281   ::uint32_t cached_has_bits = 0;
3282   (void) cached_has_bits;
3283 
3284   cached_has_bits = _impl_._has_bits_[0];
3285   // optional string property_name = 1;
3286   if (cached_has_bits & 0x00000001u) {
3287     target = stream->WriteStringMaybeAliased(
3288         1, this->_internal_property_name(), target);
3289   }
3290 
3291   // repeated .icing.lib.SnippetMatchProto snippet_matches = 2;
3292   for (unsigned i = 0,
3293       n = static_cast<unsigned>(this->_internal_snippet_matches_size()); i < n; i++) {
3294     const auto& repfield = this->_internal_snippet_matches(i);
3295     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3296         InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
3297   }
3298 
3299   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3300     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3301         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3302   }
3303   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.SnippetProto.EntryProto)
3304   return target;
3305 }
3306 
ByteSizeLong() const3307 size_t SnippetProto_EntryProto::ByteSizeLong() const {
3308 // @@protoc_insertion_point(message_byte_size_start:icing.lib.SnippetProto.EntryProto)
3309   size_t total_size = 0;
3310 
3311   ::uint32_t cached_has_bits = 0;
3312   // Prevent compiler warnings about cached_has_bits being unused
3313   (void) cached_has_bits;
3314 
3315   // repeated .icing.lib.SnippetMatchProto snippet_matches = 2;
3316   total_size += 1UL * this->_internal_snippet_matches_size();
3317   for (const auto& msg : this->_impl_.snippet_matches_) {
3318     total_size +=
3319       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
3320   }
3321 
3322   // optional string property_name = 1;
3323   cached_has_bits = _impl_._has_bits_[0];
3324   if (cached_has_bits & 0x00000001u) {
3325     total_size += 1 +
3326       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
3327         this->_internal_property_name());
3328   }
3329 
3330   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3331     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3332   }
3333   int cached_size = ::_pbi::ToCachedSize(total_size);
3334   SetCachedSize(cached_size);
3335   return total_size;
3336 }
3337 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3338 void SnippetProto_EntryProto::CheckTypeAndMergeFrom(
3339     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3340   MergeFrom(*::_pbi::DownCast<const SnippetProto_EntryProto*>(
3341       &from));
3342 }
3343 
MergeFrom(const SnippetProto_EntryProto & from)3344 void SnippetProto_EntryProto::MergeFrom(const SnippetProto_EntryProto& from) {
3345   SnippetProto_EntryProto* const _this = this;
3346   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.SnippetProto.EntryProto)
3347   GOOGLE_DCHECK_NE(&from, _this);
3348   ::uint32_t cached_has_bits = 0;
3349   (void) cached_has_bits;
3350 
3351   _this->_impl_.snippet_matches_.MergeFrom(from._impl_.snippet_matches_);
3352   if (from._internal_has_property_name()) {
3353     _this->_internal_set_property_name(from._internal_property_name());
3354   }
3355   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3356 }
3357 
CopyFrom(const SnippetProto_EntryProto & from)3358 void SnippetProto_EntryProto::CopyFrom(const SnippetProto_EntryProto& from) {
3359 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.SnippetProto.EntryProto)
3360   if (&from == this) return;
3361   Clear();
3362   MergeFrom(from);
3363 }
3364 
IsInitialized() const3365 bool SnippetProto_EntryProto::IsInitialized() const {
3366   return true;
3367 }
3368 
InternalSwap(SnippetProto_EntryProto * other)3369 void SnippetProto_EntryProto::InternalSwap(SnippetProto_EntryProto* other) {
3370   using std::swap;
3371   auto* lhs_arena = GetArenaForAllocation();
3372   auto* rhs_arena = other->GetArenaForAllocation();
3373   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3374   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3375   _impl_.snippet_matches_.InternalSwap(&other->_impl_.snippet_matches_);
3376   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
3377       &_impl_.property_name_, lhs_arena,
3378       &other->_impl_.property_name_, rhs_arena
3379   );
3380 }
3381 
GetTypeName() const3382 std::string SnippetProto_EntryProto::GetTypeName() const {
3383   return "icing.lib.SnippetProto.EntryProto";
3384 }
3385 
3386 
3387 // ===================================================================
3388 
3389 class SnippetProto::_Internal {
3390  public:
3391 };
3392 
SnippetProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3393 SnippetProto::SnippetProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3394                          bool is_message_owned)
3395   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3396   SharedCtor(arena, is_message_owned);
3397   // @@protoc_insertion_point(arena_constructor:icing.lib.SnippetProto)
3398 }
SnippetProto(const SnippetProto & from)3399 SnippetProto::SnippetProto(const SnippetProto& from)
3400   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3401   SnippetProto* const _this = this; (void)_this;
3402   new (&_impl_) Impl_{
3403       decltype(_impl_.entries_){from._impl_.entries_}
3404     , /*decltype(_impl_._cached_size_)*/{}};
3405 
3406   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3407   // @@protoc_insertion_point(copy_constructor:icing.lib.SnippetProto)
3408 }
3409 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3410 inline void SnippetProto::SharedCtor(
3411     ::_pb::Arena* arena, bool is_message_owned) {
3412   (void)arena;
3413   (void)is_message_owned;
3414   new (&_impl_) Impl_{
3415       decltype(_impl_.entries_){arena}
3416     , /*decltype(_impl_._cached_size_)*/{}
3417   };
3418 }
3419 
~SnippetProto()3420 SnippetProto::~SnippetProto() {
3421   // @@protoc_insertion_point(destructor:icing.lib.SnippetProto)
3422   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3423   (void)arena;
3424     return;
3425   }
3426   SharedDtor();
3427 }
3428 
SharedDtor()3429 inline void SnippetProto::SharedDtor() {
3430   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3431   _impl_.entries_.~RepeatedPtrField();
3432 }
3433 
SetCachedSize(int size) const3434 void SnippetProto::SetCachedSize(int size) const {
3435   _impl_._cached_size_.Set(size);
3436 }
3437 
Clear()3438 void SnippetProto::Clear() {
3439 // @@protoc_insertion_point(message_clear_start:icing.lib.SnippetProto)
3440   ::uint32_t cached_has_bits = 0;
3441   // Prevent compiler warnings about cached_has_bits being unused
3442   (void) cached_has_bits;
3443 
3444   _impl_.entries_.Clear();
3445   _internal_metadata_.Clear<std::string>();
3446 }
3447 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3448 const char* SnippetProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3449 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3450   while (!ctx->Done(&ptr)) {
3451     ::uint32_t tag;
3452     ptr = ::_pbi::ReadTag(ptr, &tag);
3453     switch (tag >> 3) {
3454       // repeated .icing.lib.SnippetProto.EntryProto entries = 1;
3455       case 1:
3456         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3457           ptr -= 1;
3458           do {
3459             ptr += 1;
3460             ptr = ctx->ParseMessage(_internal_add_entries(), ptr);
3461             CHK_(ptr);
3462             if (!ctx->DataAvailable(ptr)) break;
3463           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
3464         } else {
3465           goto handle_unusual;
3466         }
3467         continue;
3468       default:
3469         goto handle_unusual;
3470     }  // switch
3471   handle_unusual:
3472     if ((tag == 0) || ((tag & 7) == 4)) {
3473       CHK_(ptr);
3474       ctx->SetLastTag(tag);
3475       goto message_done;
3476     }
3477     ptr = UnknownFieldParse(
3478         tag,
3479         _internal_metadata_.mutable_unknown_fields<std::string>(),
3480         ptr, ctx);
3481     CHK_(ptr != nullptr);
3482   }  // while
3483 message_done:
3484   return ptr;
3485 failure:
3486   ptr = nullptr;
3487   goto message_done;
3488 #undef CHK_
3489 }
3490 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3491 ::uint8_t* SnippetProto::_InternalSerialize(
3492     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3493   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.SnippetProto)
3494   ::uint32_t cached_has_bits = 0;
3495   (void) cached_has_bits;
3496 
3497   // repeated .icing.lib.SnippetProto.EntryProto entries = 1;
3498   for (unsigned i = 0,
3499       n = static_cast<unsigned>(this->_internal_entries_size()); i < n; i++) {
3500     const auto& repfield = this->_internal_entries(i);
3501     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3502         InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
3503   }
3504 
3505   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3506     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3507         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3508   }
3509   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.SnippetProto)
3510   return target;
3511 }
3512 
ByteSizeLong() const3513 size_t SnippetProto::ByteSizeLong() const {
3514 // @@protoc_insertion_point(message_byte_size_start:icing.lib.SnippetProto)
3515   size_t total_size = 0;
3516 
3517   ::uint32_t cached_has_bits = 0;
3518   // Prevent compiler warnings about cached_has_bits being unused
3519   (void) cached_has_bits;
3520 
3521   // repeated .icing.lib.SnippetProto.EntryProto entries = 1;
3522   total_size += 1UL * this->_internal_entries_size();
3523   for (const auto& msg : this->_impl_.entries_) {
3524     total_size +=
3525       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
3526   }
3527 
3528   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3529     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3530   }
3531   int cached_size = ::_pbi::ToCachedSize(total_size);
3532   SetCachedSize(cached_size);
3533   return total_size;
3534 }
3535 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3536 void SnippetProto::CheckTypeAndMergeFrom(
3537     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3538   MergeFrom(*::_pbi::DownCast<const SnippetProto*>(
3539       &from));
3540 }
3541 
MergeFrom(const SnippetProto & from)3542 void SnippetProto::MergeFrom(const SnippetProto& from) {
3543   SnippetProto* const _this = this;
3544   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.SnippetProto)
3545   GOOGLE_DCHECK_NE(&from, _this);
3546   ::uint32_t cached_has_bits = 0;
3547   (void) cached_has_bits;
3548 
3549   _this->_impl_.entries_.MergeFrom(from._impl_.entries_);
3550   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3551 }
3552 
CopyFrom(const SnippetProto & from)3553 void SnippetProto::CopyFrom(const SnippetProto& from) {
3554 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.SnippetProto)
3555   if (&from == this) return;
3556   Clear();
3557   MergeFrom(from);
3558 }
3559 
IsInitialized() const3560 bool SnippetProto::IsInitialized() const {
3561   return true;
3562 }
3563 
InternalSwap(SnippetProto * other)3564 void SnippetProto::InternalSwap(SnippetProto* other) {
3565   using std::swap;
3566   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3567   _impl_.entries_.InternalSwap(&other->_impl_.entries_);
3568 }
3569 
GetTypeName() const3570 std::string SnippetProto::GetTypeName() const {
3571   return "icing.lib.SnippetProto";
3572 }
3573 
3574 
3575 // ===================================================================
3576 
3577 class SearchResultProto_ResultProto::_Internal {
3578  public:
3579   using HasBits = decltype(std::declval<SearchResultProto_ResultProto>()._impl_._has_bits_);
3580   static const ::icing::lib::DocumentProto& document(const SearchResultProto_ResultProto* msg);
set_has_document(HasBits * has_bits)3581   static void set_has_document(HasBits* has_bits) {
3582     (*has_bits)[0] |= 1u;
3583   }
3584   static const ::icing::lib::SnippetProto& snippet(const SearchResultProto_ResultProto* msg);
set_has_snippet(HasBits * has_bits)3585   static void set_has_snippet(HasBits* has_bits) {
3586     (*has_bits)[0] |= 2u;
3587   }
set_has_score(HasBits * has_bits)3588   static void set_has_score(HasBits* has_bits) {
3589     (*has_bits)[0] |= 4u;
3590   }
3591 };
3592 
3593 const ::icing::lib::DocumentProto&
document(const SearchResultProto_ResultProto * msg)3594 SearchResultProto_ResultProto::_Internal::document(const SearchResultProto_ResultProto* msg) {
3595   return *msg->_impl_.document_;
3596 }
3597 const ::icing::lib::SnippetProto&
snippet(const SearchResultProto_ResultProto * msg)3598 SearchResultProto_ResultProto::_Internal::snippet(const SearchResultProto_ResultProto* msg) {
3599   return *msg->_impl_.snippet_;
3600 }
clear_document()3601 void SearchResultProto_ResultProto::clear_document() {
3602   if (_impl_.document_ != nullptr) _impl_.document_->Clear();
3603   _impl_._has_bits_[0] &= ~0x00000001u;
3604 }
SearchResultProto_ResultProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3605 SearchResultProto_ResultProto::SearchResultProto_ResultProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3606                          bool is_message_owned)
3607   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3608   SharedCtor(arena, is_message_owned);
3609   // @@protoc_insertion_point(arena_constructor:icing.lib.SearchResultProto.ResultProto)
3610 }
SearchResultProto_ResultProto(const SearchResultProto_ResultProto & from)3611 SearchResultProto_ResultProto::SearchResultProto_ResultProto(const SearchResultProto_ResultProto& from)
3612   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3613   SearchResultProto_ResultProto* const _this = this; (void)_this;
3614   new (&_impl_) Impl_{
3615       decltype(_impl_._has_bits_){from._impl_._has_bits_}
3616     , /*decltype(_impl_._cached_size_)*/{}
3617     , decltype(_impl_.joined_results_){from._impl_.joined_results_}
3618     , decltype(_impl_.additional_scores_){from._impl_.additional_scores_}
3619     , decltype(_impl_.document_){nullptr}
3620     , decltype(_impl_.snippet_){nullptr}
3621     , decltype(_impl_.score_){}};
3622 
3623   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3624   if (from._internal_has_document()) {
3625     _this->_impl_.document_ = new ::icing::lib::DocumentProto(*from._impl_.document_);
3626   }
3627   if (from._internal_has_snippet()) {
3628     _this->_impl_.snippet_ = new ::icing::lib::SnippetProto(*from._impl_.snippet_);
3629   }
3630   _this->_impl_.score_ = from._impl_.score_;
3631   // @@protoc_insertion_point(copy_constructor:icing.lib.SearchResultProto.ResultProto)
3632 }
3633 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3634 inline void SearchResultProto_ResultProto::SharedCtor(
3635     ::_pb::Arena* arena, bool is_message_owned) {
3636   (void)arena;
3637   (void)is_message_owned;
3638   new (&_impl_) Impl_{
3639       decltype(_impl_._has_bits_){}
3640     , /*decltype(_impl_._cached_size_)*/{}
3641     , decltype(_impl_.joined_results_){arena}
3642     , decltype(_impl_.additional_scores_){arena}
3643     , decltype(_impl_.document_){nullptr}
3644     , decltype(_impl_.snippet_){nullptr}
3645     , decltype(_impl_.score_){0}
3646   };
3647 }
3648 
~SearchResultProto_ResultProto()3649 SearchResultProto_ResultProto::~SearchResultProto_ResultProto() {
3650   // @@protoc_insertion_point(destructor:icing.lib.SearchResultProto.ResultProto)
3651   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3652   (void)arena;
3653     return;
3654   }
3655   SharedDtor();
3656 }
3657 
SharedDtor()3658 inline void SearchResultProto_ResultProto::SharedDtor() {
3659   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3660   _impl_.joined_results_.~RepeatedPtrField();
3661   _impl_.additional_scores_.~RepeatedField();
3662   if (this != internal_default_instance()) delete _impl_.document_;
3663   if (this != internal_default_instance()) delete _impl_.snippet_;
3664 }
3665 
SetCachedSize(int size) const3666 void SearchResultProto_ResultProto::SetCachedSize(int size) const {
3667   _impl_._cached_size_.Set(size);
3668 }
3669 
Clear()3670 void SearchResultProto_ResultProto::Clear() {
3671 // @@protoc_insertion_point(message_clear_start:icing.lib.SearchResultProto.ResultProto)
3672   ::uint32_t cached_has_bits = 0;
3673   // Prevent compiler warnings about cached_has_bits being unused
3674   (void) cached_has_bits;
3675 
3676   _impl_.joined_results_.Clear();
3677   _impl_.additional_scores_.Clear();
3678   cached_has_bits = _impl_._has_bits_[0];
3679   if (cached_has_bits & 0x00000003u) {
3680     if (cached_has_bits & 0x00000001u) {
3681       GOOGLE_DCHECK(_impl_.document_ != nullptr);
3682       _impl_.document_->Clear();
3683     }
3684     if (cached_has_bits & 0x00000002u) {
3685       GOOGLE_DCHECK(_impl_.snippet_ != nullptr);
3686       _impl_.snippet_->Clear();
3687     }
3688   }
3689   _impl_.score_ = 0;
3690   _impl_._has_bits_.Clear();
3691   _internal_metadata_.Clear<std::string>();
3692 }
3693 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3694 const char* SearchResultProto_ResultProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3695 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3696   _Internal::HasBits has_bits{};
3697   while (!ctx->Done(&ptr)) {
3698     ::uint32_t tag;
3699     ptr = ::_pbi::ReadTag(ptr, &tag);
3700     switch (tag >> 3) {
3701       // optional .icing.lib.DocumentProto document = 1;
3702       case 1:
3703         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
3704           ptr = ctx->ParseMessage(_internal_mutable_document(), ptr);
3705           CHK_(ptr);
3706         } else {
3707           goto handle_unusual;
3708         }
3709         continue;
3710       // optional .icing.lib.SnippetProto snippet = 2;
3711       case 2:
3712         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
3713           ptr = ctx->ParseMessage(_internal_mutable_snippet(), ptr);
3714           CHK_(ptr);
3715         } else {
3716           goto handle_unusual;
3717         }
3718         continue;
3719       // optional double score = 3;
3720       case 3:
3721         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 25)) {
3722           _Internal::set_has_score(&has_bits);
3723           _impl_.score_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
3724           ptr += sizeof(double);
3725         } else {
3726           goto handle_unusual;
3727         }
3728         continue;
3729       // repeated .icing.lib.SearchResultProto.ResultProto joined_results = 4;
3730       case 4:
3731         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
3732           ptr -= 1;
3733           do {
3734             ptr += 1;
3735             ptr = ctx->ParseMessage(_internal_add_joined_results(), ptr);
3736             CHK_(ptr);
3737             if (!ctx->DataAvailable(ptr)) break;
3738           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
3739         } else {
3740           goto handle_unusual;
3741         }
3742         continue;
3743       // repeated double additional_scores = 5 [packed = true];
3744       case 5:
3745         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
3746           ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_additional_scores(), ptr, ctx);
3747           CHK_(ptr);
3748         } else if (static_cast<::uint8_t>(tag) == 41) {
3749           _internal_add_additional_scores(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr));
3750           ptr += sizeof(double);
3751         } else {
3752           goto handle_unusual;
3753         }
3754         continue;
3755       default:
3756         goto handle_unusual;
3757     }  // switch
3758   handle_unusual:
3759     if ((tag == 0) || ((tag & 7) == 4)) {
3760       CHK_(ptr);
3761       ctx->SetLastTag(tag);
3762       goto message_done;
3763     }
3764     ptr = UnknownFieldParse(
3765         tag,
3766         _internal_metadata_.mutable_unknown_fields<std::string>(),
3767         ptr, ctx);
3768     CHK_(ptr != nullptr);
3769   }  // while
3770 message_done:
3771   _impl_._has_bits_.Or(has_bits);
3772   return ptr;
3773 failure:
3774   ptr = nullptr;
3775   goto message_done;
3776 #undef CHK_
3777 }
3778 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3779 ::uint8_t* SearchResultProto_ResultProto::_InternalSerialize(
3780     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3781   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.SearchResultProto.ResultProto)
3782   ::uint32_t cached_has_bits = 0;
3783   (void) cached_has_bits;
3784 
3785   cached_has_bits = _impl_._has_bits_[0];
3786   // optional .icing.lib.DocumentProto document = 1;
3787   if (cached_has_bits & 0x00000001u) {
3788     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3789       InternalWriteMessage(1, _Internal::document(this),
3790         _Internal::document(this).GetCachedSize(), target, stream);
3791   }
3792 
3793   // optional .icing.lib.SnippetProto snippet = 2;
3794   if (cached_has_bits & 0x00000002u) {
3795     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3796       InternalWriteMessage(2, _Internal::snippet(this),
3797         _Internal::snippet(this).GetCachedSize(), target, stream);
3798   }
3799 
3800   // optional double score = 3;
3801   if (cached_has_bits & 0x00000004u) {
3802     target = stream->EnsureSpace(target);
3803     target = ::_pbi::WireFormatLite::WriteDoubleToArray(3, this->_internal_score(), target);
3804   }
3805 
3806   // repeated .icing.lib.SearchResultProto.ResultProto joined_results = 4;
3807   for (unsigned i = 0,
3808       n = static_cast<unsigned>(this->_internal_joined_results_size()); i < n; i++) {
3809     const auto& repfield = this->_internal_joined_results(i);
3810     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3811         InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream);
3812   }
3813 
3814   // repeated double additional_scores = 5 [packed = true];
3815   if (this->_internal_additional_scores_size() > 0) {
3816     target = stream->WriteFixedPacked(5, _internal_additional_scores(), target);
3817   }
3818 
3819   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3820     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3821         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3822   }
3823   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.SearchResultProto.ResultProto)
3824   return target;
3825 }
3826 
ByteSizeLong() const3827 size_t SearchResultProto_ResultProto::ByteSizeLong() const {
3828 // @@protoc_insertion_point(message_byte_size_start:icing.lib.SearchResultProto.ResultProto)
3829   size_t total_size = 0;
3830 
3831   ::uint32_t cached_has_bits = 0;
3832   // Prevent compiler warnings about cached_has_bits being unused
3833   (void) cached_has_bits;
3834 
3835   // repeated .icing.lib.SearchResultProto.ResultProto joined_results = 4;
3836   total_size += 1UL * this->_internal_joined_results_size();
3837   for (const auto& msg : this->_impl_.joined_results_) {
3838     total_size +=
3839       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
3840   }
3841 
3842   // repeated double additional_scores = 5 [packed = true];
3843   {
3844     unsigned int count = static_cast<unsigned int>(this->_internal_additional_scores_size());
3845     size_t data_size = 8UL * count;
3846     if (data_size > 0) {
3847       total_size += 1 +
3848         ::_pbi::WireFormatLite::Int32Size(static_cast<::int32_t>(data_size));
3849     }
3850     total_size += data_size;
3851   }
3852 
3853   cached_has_bits = _impl_._has_bits_[0];
3854   if (cached_has_bits & 0x00000007u) {
3855     // optional .icing.lib.DocumentProto document = 1;
3856     if (cached_has_bits & 0x00000001u) {
3857       total_size += 1 +
3858         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3859           *_impl_.document_);
3860     }
3861 
3862     // optional .icing.lib.SnippetProto snippet = 2;
3863     if (cached_has_bits & 0x00000002u) {
3864       total_size += 1 +
3865         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3866           *_impl_.snippet_);
3867     }
3868 
3869     // optional double score = 3;
3870     if (cached_has_bits & 0x00000004u) {
3871       total_size += 1 + 8;
3872     }
3873 
3874   }
3875   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3876     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3877   }
3878   int cached_size = ::_pbi::ToCachedSize(total_size);
3879   SetCachedSize(cached_size);
3880   return total_size;
3881 }
3882 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3883 void SearchResultProto_ResultProto::CheckTypeAndMergeFrom(
3884     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3885   MergeFrom(*::_pbi::DownCast<const SearchResultProto_ResultProto*>(
3886       &from));
3887 }
3888 
MergeFrom(const SearchResultProto_ResultProto & from)3889 void SearchResultProto_ResultProto::MergeFrom(const SearchResultProto_ResultProto& from) {
3890   SearchResultProto_ResultProto* const _this = this;
3891   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.SearchResultProto.ResultProto)
3892   GOOGLE_DCHECK_NE(&from, _this);
3893   ::uint32_t cached_has_bits = 0;
3894   (void) cached_has_bits;
3895 
3896   _this->_impl_.joined_results_.MergeFrom(from._impl_.joined_results_);
3897   _this->_impl_.additional_scores_.MergeFrom(from._impl_.additional_scores_);
3898   cached_has_bits = from._impl_._has_bits_[0];
3899   if (cached_has_bits & 0x00000007u) {
3900     if (cached_has_bits & 0x00000001u) {
3901       _this->_internal_mutable_document()->::icing::lib::DocumentProto::MergeFrom(
3902           from._internal_document());
3903     }
3904     if (cached_has_bits & 0x00000002u) {
3905       _this->_internal_mutable_snippet()->::icing::lib::SnippetProto::MergeFrom(
3906           from._internal_snippet());
3907     }
3908     if (cached_has_bits & 0x00000004u) {
3909       _this->_impl_.score_ = from._impl_.score_;
3910     }
3911     _this->_impl_._has_bits_[0] |= cached_has_bits;
3912   }
3913   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3914 }
3915 
CopyFrom(const SearchResultProto_ResultProto & from)3916 void SearchResultProto_ResultProto::CopyFrom(const SearchResultProto_ResultProto& from) {
3917 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.SearchResultProto.ResultProto)
3918   if (&from == this) return;
3919   Clear();
3920   MergeFrom(from);
3921 }
3922 
IsInitialized() const3923 bool SearchResultProto_ResultProto::IsInitialized() const {
3924   return true;
3925 }
3926 
InternalSwap(SearchResultProto_ResultProto * other)3927 void SearchResultProto_ResultProto::InternalSwap(SearchResultProto_ResultProto* other) {
3928   using std::swap;
3929   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3930   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3931   _impl_.joined_results_.InternalSwap(&other->_impl_.joined_results_);
3932   _impl_.additional_scores_.InternalSwap(&other->_impl_.additional_scores_);
3933   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3934       PROTOBUF_FIELD_OFFSET(SearchResultProto_ResultProto, _impl_.score_)
3935       + sizeof(SearchResultProto_ResultProto::_impl_.score_)  // NOLINT
3936       - PROTOBUF_FIELD_OFFSET(SearchResultProto_ResultProto, _impl_.document_)>(
3937           reinterpret_cast<char*>(&_impl_.document_),
3938           reinterpret_cast<char*>(&other->_impl_.document_));
3939 }
3940 
GetTypeName() const3941 std::string SearchResultProto_ResultProto::GetTypeName() const {
3942   return "icing.lib.SearchResultProto.ResultProto";
3943 }
3944 
3945 
3946 // ===================================================================
3947 
3948 class SearchResultProto_DebugInfoProto::_Internal {
3949  public:
3950   using HasBits = decltype(std::declval<SearchResultProto_DebugInfoProto>()._impl_._has_bits_);
set_has_executed_query(HasBits * has_bits)3951   static void set_has_executed_query(HasBits* has_bits) {
3952     (*has_bits)[0] |= 1u;
3953   }
3954 };
3955 
SearchResultProto_DebugInfoProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3956 SearchResultProto_DebugInfoProto::SearchResultProto_DebugInfoProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3957                          bool is_message_owned)
3958   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3959   SharedCtor(arena, is_message_owned);
3960   // @@protoc_insertion_point(arena_constructor:icing.lib.SearchResultProto.DebugInfoProto)
3961 }
SearchResultProto_DebugInfoProto(const SearchResultProto_DebugInfoProto & from)3962 SearchResultProto_DebugInfoProto::SearchResultProto_DebugInfoProto(const SearchResultProto_DebugInfoProto& from)
3963   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3964   SearchResultProto_DebugInfoProto* const _this = this; (void)_this;
3965   new (&_impl_) Impl_{
3966       decltype(_impl_._has_bits_){from._impl_._has_bits_}
3967     , /*decltype(_impl_._cached_size_)*/{}
3968     , decltype(_impl_.executed_query_){}};
3969 
3970   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3971   _impl_.executed_query_.InitDefault();
3972   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3973     _impl_.executed_query_.Set("", GetArenaForAllocation());
3974   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3975   if (from._internal_has_executed_query()) {
3976     _this->_impl_.executed_query_.Set(from._internal_executed_query(),
3977       _this->GetArenaForAllocation());
3978   }
3979   // @@protoc_insertion_point(copy_constructor:icing.lib.SearchResultProto.DebugInfoProto)
3980 }
3981 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3982 inline void SearchResultProto_DebugInfoProto::SharedCtor(
3983     ::_pb::Arena* arena, bool is_message_owned) {
3984   (void)arena;
3985   (void)is_message_owned;
3986   new (&_impl_) Impl_{
3987       decltype(_impl_._has_bits_){}
3988     , /*decltype(_impl_._cached_size_)*/{}
3989     , decltype(_impl_.executed_query_){}
3990   };
3991   _impl_.executed_query_.InitDefault();
3992   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
3993     _impl_.executed_query_.Set("", GetArenaForAllocation());
3994   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
3995 }
3996 
~SearchResultProto_DebugInfoProto()3997 SearchResultProto_DebugInfoProto::~SearchResultProto_DebugInfoProto() {
3998   // @@protoc_insertion_point(destructor:icing.lib.SearchResultProto.DebugInfoProto)
3999   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
4000   (void)arena;
4001     return;
4002   }
4003   SharedDtor();
4004 }
4005 
SharedDtor()4006 inline void SearchResultProto_DebugInfoProto::SharedDtor() {
4007   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4008   _impl_.executed_query_.Destroy();
4009 }
4010 
SetCachedSize(int size) const4011 void SearchResultProto_DebugInfoProto::SetCachedSize(int size) const {
4012   _impl_._cached_size_.Set(size);
4013 }
4014 
Clear()4015 void SearchResultProto_DebugInfoProto::Clear() {
4016 // @@protoc_insertion_point(message_clear_start:icing.lib.SearchResultProto.DebugInfoProto)
4017   ::uint32_t cached_has_bits = 0;
4018   // Prevent compiler warnings about cached_has_bits being unused
4019   (void) cached_has_bits;
4020 
4021   cached_has_bits = _impl_._has_bits_[0];
4022   if (cached_has_bits & 0x00000001u) {
4023     _impl_.executed_query_.ClearNonDefaultToEmpty();
4024   }
4025   _impl_._has_bits_.Clear();
4026   _internal_metadata_.Clear<std::string>();
4027 }
4028 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)4029 const char* SearchResultProto_DebugInfoProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
4030 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
4031   _Internal::HasBits has_bits{};
4032   while (!ctx->Done(&ptr)) {
4033     ::uint32_t tag;
4034     ptr = ::_pbi::ReadTag(ptr, &tag);
4035     switch (tag >> 3) {
4036       // optional string executed_query = 3;
4037       case 3:
4038         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
4039           auto str = _internal_mutable_executed_query();
4040           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
4041           CHK_(ptr);
4042         } else {
4043           goto handle_unusual;
4044         }
4045         continue;
4046       default:
4047         goto handle_unusual;
4048     }  // switch
4049   handle_unusual:
4050     if ((tag == 0) || ((tag & 7) == 4)) {
4051       CHK_(ptr);
4052       ctx->SetLastTag(tag);
4053       goto message_done;
4054     }
4055     ptr = UnknownFieldParse(
4056         tag,
4057         _internal_metadata_.mutable_unknown_fields<std::string>(),
4058         ptr, ctx);
4059     CHK_(ptr != nullptr);
4060   }  // while
4061 message_done:
4062   _impl_._has_bits_.Or(has_bits);
4063   return ptr;
4064 failure:
4065   ptr = nullptr;
4066   goto message_done;
4067 #undef CHK_
4068 }
4069 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4070 ::uint8_t* SearchResultProto_DebugInfoProto::_InternalSerialize(
4071     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4072   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.SearchResultProto.DebugInfoProto)
4073   ::uint32_t cached_has_bits = 0;
4074   (void) cached_has_bits;
4075 
4076   cached_has_bits = _impl_._has_bits_[0];
4077   // optional string executed_query = 3;
4078   if (cached_has_bits & 0x00000001u) {
4079     target = stream->WriteStringMaybeAliased(
4080         3, this->_internal_executed_query(), target);
4081   }
4082 
4083   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4084     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4085         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4086   }
4087   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.SearchResultProto.DebugInfoProto)
4088   return target;
4089 }
4090 
ByteSizeLong() const4091 size_t SearchResultProto_DebugInfoProto::ByteSizeLong() const {
4092 // @@protoc_insertion_point(message_byte_size_start:icing.lib.SearchResultProto.DebugInfoProto)
4093   size_t total_size = 0;
4094 
4095   ::uint32_t cached_has_bits = 0;
4096   // Prevent compiler warnings about cached_has_bits being unused
4097   (void) cached_has_bits;
4098 
4099   // optional string executed_query = 3;
4100   cached_has_bits = _impl_._has_bits_[0];
4101   if (cached_has_bits & 0x00000001u) {
4102     total_size += 1 +
4103       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
4104         this->_internal_executed_query());
4105   }
4106 
4107   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4108     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4109   }
4110   int cached_size = ::_pbi::ToCachedSize(total_size);
4111   SetCachedSize(cached_size);
4112   return total_size;
4113 }
4114 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4115 void SearchResultProto_DebugInfoProto::CheckTypeAndMergeFrom(
4116     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4117   MergeFrom(*::_pbi::DownCast<const SearchResultProto_DebugInfoProto*>(
4118       &from));
4119 }
4120 
MergeFrom(const SearchResultProto_DebugInfoProto & from)4121 void SearchResultProto_DebugInfoProto::MergeFrom(const SearchResultProto_DebugInfoProto& from) {
4122   SearchResultProto_DebugInfoProto* const _this = this;
4123   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.SearchResultProto.DebugInfoProto)
4124   GOOGLE_DCHECK_NE(&from, _this);
4125   ::uint32_t cached_has_bits = 0;
4126   (void) cached_has_bits;
4127 
4128   if (from._internal_has_executed_query()) {
4129     _this->_internal_set_executed_query(from._internal_executed_query());
4130   }
4131   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4132 }
4133 
CopyFrom(const SearchResultProto_DebugInfoProto & from)4134 void SearchResultProto_DebugInfoProto::CopyFrom(const SearchResultProto_DebugInfoProto& from) {
4135 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.SearchResultProto.DebugInfoProto)
4136   if (&from == this) return;
4137   Clear();
4138   MergeFrom(from);
4139 }
4140 
IsInitialized() const4141 bool SearchResultProto_DebugInfoProto::IsInitialized() const {
4142   return true;
4143 }
4144 
InternalSwap(SearchResultProto_DebugInfoProto * other)4145 void SearchResultProto_DebugInfoProto::InternalSwap(SearchResultProto_DebugInfoProto* other) {
4146   using std::swap;
4147   auto* lhs_arena = GetArenaForAllocation();
4148   auto* rhs_arena = other->GetArenaForAllocation();
4149   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4150   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
4151   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
4152       &_impl_.executed_query_, lhs_arena,
4153       &other->_impl_.executed_query_, rhs_arena
4154   );
4155 }
4156 
GetTypeName() const4157 std::string SearchResultProto_DebugInfoProto::GetTypeName() const {
4158   return "icing.lib.SearchResultProto.DebugInfoProto";
4159 }
4160 
4161 
4162 // ===================================================================
4163 
4164 class SearchResultProto::_Internal {
4165  public:
4166   using HasBits = decltype(std::declval<SearchResultProto>()._impl_._has_bits_);
4167   static const ::icing::lib::StatusProto& status(const SearchResultProto* msg);
set_has_status(HasBits * has_bits)4168   static void set_has_status(HasBits* has_bits) {
4169     (*has_bits)[0] |= 1u;
4170   }
4171   static const ::icing::lib::SearchResultProto_DebugInfoProto& debug_info(const SearchResultProto* msg);
set_has_debug_info(HasBits * has_bits)4172   static void set_has_debug_info(HasBits* has_bits) {
4173     (*has_bits)[0] |= 2u;
4174   }
set_has_next_page_token(HasBits * has_bits)4175   static void set_has_next_page_token(HasBits* has_bits) {
4176     (*has_bits)[0] |= 8u;
4177   }
4178   static const ::icing::lib::QueryStatsProto& query_stats(const SearchResultProto* msg);
set_has_query_stats(HasBits * has_bits)4179   static void set_has_query_stats(HasBits* has_bits) {
4180     (*has_bits)[0] |= 4u;
4181   }
4182 };
4183 
4184 const ::icing::lib::StatusProto&
status(const SearchResultProto * msg)4185 SearchResultProto::_Internal::status(const SearchResultProto* msg) {
4186   return *msg->_impl_.status_;
4187 }
4188 const ::icing::lib::SearchResultProto_DebugInfoProto&
debug_info(const SearchResultProto * msg)4189 SearchResultProto::_Internal::debug_info(const SearchResultProto* msg) {
4190   return *msg->_impl_.debug_info_;
4191 }
4192 const ::icing::lib::QueryStatsProto&
query_stats(const SearchResultProto * msg)4193 SearchResultProto::_Internal::query_stats(const SearchResultProto* msg) {
4194   return *msg->_impl_.query_stats_;
4195 }
clear_status()4196 void SearchResultProto::clear_status() {
4197   if (_impl_.status_ != nullptr) _impl_.status_->Clear();
4198   _impl_._has_bits_[0] &= ~0x00000001u;
4199 }
clear_query_stats()4200 void SearchResultProto::clear_query_stats() {
4201   if (_impl_.query_stats_ != nullptr) _impl_.query_stats_->Clear();
4202   _impl_._has_bits_[0] &= ~0x00000004u;
4203 }
SearchResultProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)4204 SearchResultProto::SearchResultProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
4205                          bool is_message_owned)
4206   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
4207   SharedCtor(arena, is_message_owned);
4208   // @@protoc_insertion_point(arena_constructor:icing.lib.SearchResultProto)
4209 }
SearchResultProto(const SearchResultProto & from)4210 SearchResultProto::SearchResultProto(const SearchResultProto& from)
4211   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
4212   SearchResultProto* const _this = this; (void)_this;
4213   new (&_impl_) Impl_{
4214       decltype(_impl_._has_bits_){from._impl_._has_bits_}
4215     , /*decltype(_impl_._cached_size_)*/{}
4216     , decltype(_impl_.results_){from._impl_.results_}
4217     , decltype(_impl_.status_){nullptr}
4218     , decltype(_impl_.debug_info_){nullptr}
4219     , decltype(_impl_.query_stats_){nullptr}
4220     , decltype(_impl_.next_page_token_){}};
4221 
4222   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4223   if (from._internal_has_status()) {
4224     _this->_impl_.status_ = new ::icing::lib::StatusProto(*from._impl_.status_);
4225   }
4226   if (from._internal_has_debug_info()) {
4227     _this->_impl_.debug_info_ = new ::icing::lib::SearchResultProto_DebugInfoProto(*from._impl_.debug_info_);
4228   }
4229   if (from._internal_has_query_stats()) {
4230     _this->_impl_.query_stats_ = new ::icing::lib::QueryStatsProto(*from._impl_.query_stats_);
4231   }
4232   _this->_impl_.next_page_token_ = from._impl_.next_page_token_;
4233   // @@protoc_insertion_point(copy_constructor:icing.lib.SearchResultProto)
4234 }
4235 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)4236 inline void SearchResultProto::SharedCtor(
4237     ::_pb::Arena* arena, bool is_message_owned) {
4238   (void)arena;
4239   (void)is_message_owned;
4240   new (&_impl_) Impl_{
4241       decltype(_impl_._has_bits_){}
4242     , /*decltype(_impl_._cached_size_)*/{}
4243     , decltype(_impl_.results_){arena}
4244     , decltype(_impl_.status_){nullptr}
4245     , decltype(_impl_.debug_info_){nullptr}
4246     , decltype(_impl_.query_stats_){nullptr}
4247     , decltype(_impl_.next_page_token_){::uint64_t{0u}}
4248   };
4249 }
4250 
~SearchResultProto()4251 SearchResultProto::~SearchResultProto() {
4252   // @@protoc_insertion_point(destructor:icing.lib.SearchResultProto)
4253   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
4254   (void)arena;
4255     return;
4256   }
4257   SharedDtor();
4258 }
4259 
SharedDtor()4260 inline void SearchResultProto::SharedDtor() {
4261   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4262   _impl_.results_.~RepeatedPtrField();
4263   if (this != internal_default_instance()) delete _impl_.status_;
4264   if (this != internal_default_instance()) delete _impl_.debug_info_;
4265   if (this != internal_default_instance()) delete _impl_.query_stats_;
4266 }
4267 
SetCachedSize(int size) const4268 void SearchResultProto::SetCachedSize(int size) const {
4269   _impl_._cached_size_.Set(size);
4270 }
4271 
Clear()4272 void SearchResultProto::Clear() {
4273 // @@protoc_insertion_point(message_clear_start:icing.lib.SearchResultProto)
4274   ::uint32_t cached_has_bits = 0;
4275   // Prevent compiler warnings about cached_has_bits being unused
4276   (void) cached_has_bits;
4277 
4278   _impl_.results_.Clear();
4279   cached_has_bits = _impl_._has_bits_[0];
4280   if (cached_has_bits & 0x00000007u) {
4281     if (cached_has_bits & 0x00000001u) {
4282       GOOGLE_DCHECK(_impl_.status_ != nullptr);
4283       _impl_.status_->Clear();
4284     }
4285     if (cached_has_bits & 0x00000002u) {
4286       GOOGLE_DCHECK(_impl_.debug_info_ != nullptr);
4287       _impl_.debug_info_->Clear();
4288     }
4289     if (cached_has_bits & 0x00000004u) {
4290       GOOGLE_DCHECK(_impl_.query_stats_ != nullptr);
4291       _impl_.query_stats_->Clear();
4292     }
4293   }
4294   _impl_.next_page_token_ = ::uint64_t{0u};
4295   _impl_._has_bits_.Clear();
4296   _internal_metadata_.Clear<std::string>();
4297 }
4298 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)4299 const char* SearchResultProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
4300 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
4301   _Internal::HasBits has_bits{};
4302   while (!ctx->Done(&ptr)) {
4303     ::uint32_t tag;
4304     ptr = ::_pbi::ReadTag(ptr, &tag);
4305     switch (tag >> 3) {
4306       // optional .icing.lib.StatusProto status = 1;
4307       case 1:
4308         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
4309           ptr = ctx->ParseMessage(_internal_mutable_status(), ptr);
4310           CHK_(ptr);
4311         } else {
4312           goto handle_unusual;
4313         }
4314         continue;
4315       // repeated .icing.lib.SearchResultProto.ResultProto results = 2;
4316       case 2:
4317         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
4318           ptr -= 1;
4319           do {
4320             ptr += 1;
4321             ptr = ctx->ParseMessage(_internal_add_results(), ptr);
4322             CHK_(ptr);
4323             if (!ctx->DataAvailable(ptr)) break;
4324           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
4325         } else {
4326           goto handle_unusual;
4327         }
4328         continue;
4329       // optional .icing.lib.SearchResultProto.DebugInfoProto debug_info = 3;
4330       case 3:
4331         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
4332           ptr = ctx->ParseMessage(_internal_mutable_debug_info(), ptr);
4333           CHK_(ptr);
4334         } else {
4335           goto handle_unusual;
4336         }
4337         continue;
4338       // optional uint64 next_page_token = 4;
4339       case 4:
4340         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
4341           _Internal::set_has_next_page_token(&has_bits);
4342           _impl_.next_page_token_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
4343           CHK_(ptr);
4344         } else {
4345           goto handle_unusual;
4346         }
4347         continue;
4348       // optional .icing.lib.QueryStatsProto query_stats = 5;
4349       case 5:
4350         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
4351           ptr = ctx->ParseMessage(_internal_mutable_query_stats(), ptr);
4352           CHK_(ptr);
4353         } else {
4354           goto handle_unusual;
4355         }
4356         continue;
4357       default:
4358         goto handle_unusual;
4359     }  // switch
4360   handle_unusual:
4361     if ((tag == 0) || ((tag & 7) == 4)) {
4362       CHK_(ptr);
4363       ctx->SetLastTag(tag);
4364       goto message_done;
4365     }
4366     ptr = UnknownFieldParse(
4367         tag,
4368         _internal_metadata_.mutable_unknown_fields<std::string>(),
4369         ptr, ctx);
4370     CHK_(ptr != nullptr);
4371   }  // while
4372 message_done:
4373   _impl_._has_bits_.Or(has_bits);
4374   return ptr;
4375 failure:
4376   ptr = nullptr;
4377   goto message_done;
4378 #undef CHK_
4379 }
4380 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4381 ::uint8_t* SearchResultProto::_InternalSerialize(
4382     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4383   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.SearchResultProto)
4384   ::uint32_t cached_has_bits = 0;
4385   (void) cached_has_bits;
4386 
4387   cached_has_bits = _impl_._has_bits_[0];
4388   // optional .icing.lib.StatusProto status = 1;
4389   if (cached_has_bits & 0x00000001u) {
4390     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4391       InternalWriteMessage(1, _Internal::status(this),
4392         _Internal::status(this).GetCachedSize(), target, stream);
4393   }
4394 
4395   // repeated .icing.lib.SearchResultProto.ResultProto results = 2;
4396   for (unsigned i = 0,
4397       n = static_cast<unsigned>(this->_internal_results_size()); i < n; i++) {
4398     const auto& repfield = this->_internal_results(i);
4399     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4400         InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
4401   }
4402 
4403   // optional .icing.lib.SearchResultProto.DebugInfoProto debug_info = 3;
4404   if (cached_has_bits & 0x00000002u) {
4405     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4406       InternalWriteMessage(3, _Internal::debug_info(this),
4407         _Internal::debug_info(this).GetCachedSize(), target, stream);
4408   }
4409 
4410   // optional uint64 next_page_token = 4;
4411   if (cached_has_bits & 0x00000008u) {
4412     target = stream->EnsureSpace(target);
4413     target = ::_pbi::WireFormatLite::WriteUInt64ToArray(4, this->_internal_next_page_token(), target);
4414   }
4415 
4416   // optional .icing.lib.QueryStatsProto query_stats = 5;
4417   if (cached_has_bits & 0x00000004u) {
4418     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4419       InternalWriteMessage(5, _Internal::query_stats(this),
4420         _Internal::query_stats(this).GetCachedSize(), target, stream);
4421   }
4422 
4423   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4424     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4425         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4426   }
4427   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.SearchResultProto)
4428   return target;
4429 }
4430 
ByteSizeLong() const4431 size_t SearchResultProto::ByteSizeLong() const {
4432 // @@protoc_insertion_point(message_byte_size_start:icing.lib.SearchResultProto)
4433   size_t total_size = 0;
4434 
4435   ::uint32_t cached_has_bits = 0;
4436   // Prevent compiler warnings about cached_has_bits being unused
4437   (void) cached_has_bits;
4438 
4439   // repeated .icing.lib.SearchResultProto.ResultProto results = 2;
4440   total_size += 1UL * this->_internal_results_size();
4441   for (const auto& msg : this->_impl_.results_) {
4442     total_size +=
4443       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4444   }
4445 
4446   cached_has_bits = _impl_._has_bits_[0];
4447   if (cached_has_bits & 0x0000000fu) {
4448     // optional .icing.lib.StatusProto status = 1;
4449     if (cached_has_bits & 0x00000001u) {
4450       total_size += 1 +
4451         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
4452           *_impl_.status_);
4453     }
4454 
4455     // optional .icing.lib.SearchResultProto.DebugInfoProto debug_info = 3;
4456     if (cached_has_bits & 0x00000002u) {
4457       total_size += 1 +
4458         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
4459           *_impl_.debug_info_);
4460     }
4461 
4462     // optional .icing.lib.QueryStatsProto query_stats = 5;
4463     if (cached_has_bits & 0x00000004u) {
4464       total_size += 1 +
4465         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
4466           *_impl_.query_stats_);
4467     }
4468 
4469     // optional uint64 next_page_token = 4;
4470     if (cached_has_bits & 0x00000008u) {
4471       total_size += ::_pbi::WireFormatLite::UInt64SizePlusOne(this->_internal_next_page_token());
4472     }
4473 
4474   }
4475   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4476     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4477   }
4478   int cached_size = ::_pbi::ToCachedSize(total_size);
4479   SetCachedSize(cached_size);
4480   return total_size;
4481 }
4482 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4483 void SearchResultProto::CheckTypeAndMergeFrom(
4484     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4485   MergeFrom(*::_pbi::DownCast<const SearchResultProto*>(
4486       &from));
4487 }
4488 
MergeFrom(const SearchResultProto & from)4489 void SearchResultProto::MergeFrom(const SearchResultProto& from) {
4490   SearchResultProto* const _this = this;
4491   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.SearchResultProto)
4492   GOOGLE_DCHECK_NE(&from, _this);
4493   ::uint32_t cached_has_bits = 0;
4494   (void) cached_has_bits;
4495 
4496   _this->_impl_.results_.MergeFrom(from._impl_.results_);
4497   cached_has_bits = from._impl_._has_bits_[0];
4498   if (cached_has_bits & 0x0000000fu) {
4499     if (cached_has_bits & 0x00000001u) {
4500       _this->_internal_mutable_status()->::icing::lib::StatusProto::MergeFrom(
4501           from._internal_status());
4502     }
4503     if (cached_has_bits & 0x00000002u) {
4504       _this->_internal_mutable_debug_info()->::icing::lib::SearchResultProto_DebugInfoProto::MergeFrom(
4505           from._internal_debug_info());
4506     }
4507     if (cached_has_bits & 0x00000004u) {
4508       _this->_internal_mutable_query_stats()->::icing::lib::QueryStatsProto::MergeFrom(
4509           from._internal_query_stats());
4510     }
4511     if (cached_has_bits & 0x00000008u) {
4512       _this->_impl_.next_page_token_ = from._impl_.next_page_token_;
4513     }
4514     _this->_impl_._has_bits_[0] |= cached_has_bits;
4515   }
4516   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4517 }
4518 
CopyFrom(const SearchResultProto & from)4519 void SearchResultProto::CopyFrom(const SearchResultProto& from) {
4520 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.SearchResultProto)
4521   if (&from == this) return;
4522   Clear();
4523   MergeFrom(from);
4524 }
4525 
IsInitialized() const4526 bool SearchResultProto::IsInitialized() const {
4527   return true;
4528 }
4529 
InternalSwap(SearchResultProto * other)4530 void SearchResultProto::InternalSwap(SearchResultProto* other) {
4531   using std::swap;
4532   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4533   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
4534   _impl_.results_.InternalSwap(&other->_impl_.results_);
4535   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
4536       PROTOBUF_FIELD_OFFSET(SearchResultProto, _impl_.next_page_token_)
4537       + sizeof(SearchResultProto::_impl_.next_page_token_)  // NOLINT
4538       - PROTOBUF_FIELD_OFFSET(SearchResultProto, _impl_.status_)>(
4539           reinterpret_cast<char*>(&_impl_.status_),
4540           reinterpret_cast<char*>(&other->_impl_.status_));
4541 }
4542 
GetTypeName() const4543 std::string SearchResultProto::GetTypeName() const {
4544   return "icing.lib.SearchResultProto";
4545 }
4546 
4547 
4548 // ===================================================================
4549 
4550 class TypePropertyMask::_Internal {
4551  public:
4552   using HasBits = decltype(std::declval<TypePropertyMask>()._impl_._has_bits_);
set_has_schema_type(HasBits * has_bits)4553   static void set_has_schema_type(HasBits* has_bits) {
4554     (*has_bits)[0] |= 1u;
4555   }
4556 };
4557 
TypePropertyMask(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)4558 TypePropertyMask::TypePropertyMask(::PROTOBUF_NAMESPACE_ID::Arena* arena,
4559                          bool is_message_owned)
4560   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
4561   SharedCtor(arena, is_message_owned);
4562   // @@protoc_insertion_point(arena_constructor:icing.lib.TypePropertyMask)
4563 }
TypePropertyMask(const TypePropertyMask & from)4564 TypePropertyMask::TypePropertyMask(const TypePropertyMask& from)
4565   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
4566   TypePropertyMask* const _this = this; (void)_this;
4567   new (&_impl_) Impl_{
4568       decltype(_impl_._has_bits_){from._impl_._has_bits_}
4569     , /*decltype(_impl_._cached_size_)*/{}
4570     , decltype(_impl_.paths_){from._impl_.paths_}
4571     , decltype(_impl_.schema_type_){}};
4572 
4573   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4574   _impl_.schema_type_.InitDefault();
4575   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
4576     _impl_.schema_type_.Set("", GetArenaForAllocation());
4577   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
4578   if (from._internal_has_schema_type()) {
4579     _this->_impl_.schema_type_.Set(from._internal_schema_type(),
4580       _this->GetArenaForAllocation());
4581   }
4582   // @@protoc_insertion_point(copy_constructor:icing.lib.TypePropertyMask)
4583 }
4584 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)4585 inline void TypePropertyMask::SharedCtor(
4586     ::_pb::Arena* arena, bool is_message_owned) {
4587   (void)arena;
4588   (void)is_message_owned;
4589   new (&_impl_) Impl_{
4590       decltype(_impl_._has_bits_){}
4591     , /*decltype(_impl_._cached_size_)*/{}
4592     , decltype(_impl_.paths_){arena}
4593     , decltype(_impl_.schema_type_){}
4594   };
4595   _impl_.schema_type_.InitDefault();
4596   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
4597     _impl_.schema_type_.Set("", GetArenaForAllocation());
4598   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
4599 }
4600 
~TypePropertyMask()4601 TypePropertyMask::~TypePropertyMask() {
4602   // @@protoc_insertion_point(destructor:icing.lib.TypePropertyMask)
4603   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
4604   (void)arena;
4605     return;
4606   }
4607   SharedDtor();
4608 }
4609 
SharedDtor()4610 inline void TypePropertyMask::SharedDtor() {
4611   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4612   _impl_.paths_.~RepeatedPtrField();
4613   _impl_.schema_type_.Destroy();
4614 }
4615 
SetCachedSize(int size) const4616 void TypePropertyMask::SetCachedSize(int size) const {
4617   _impl_._cached_size_.Set(size);
4618 }
4619 
Clear()4620 void TypePropertyMask::Clear() {
4621 // @@protoc_insertion_point(message_clear_start:icing.lib.TypePropertyMask)
4622   ::uint32_t cached_has_bits = 0;
4623   // Prevent compiler warnings about cached_has_bits being unused
4624   (void) cached_has_bits;
4625 
4626   _impl_.paths_.Clear();
4627   cached_has_bits = _impl_._has_bits_[0];
4628   if (cached_has_bits & 0x00000001u) {
4629     _impl_.schema_type_.ClearNonDefaultToEmpty();
4630   }
4631   _impl_._has_bits_.Clear();
4632   _internal_metadata_.Clear<std::string>();
4633 }
4634 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)4635 const char* TypePropertyMask::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
4636 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
4637   _Internal::HasBits has_bits{};
4638   while (!ctx->Done(&ptr)) {
4639     ::uint32_t tag;
4640     ptr = ::_pbi::ReadTag(ptr, &tag);
4641     switch (tag >> 3) {
4642       // optional string schema_type = 1;
4643       case 1:
4644         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
4645           auto str = _internal_mutable_schema_type();
4646           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
4647           CHK_(ptr);
4648         } else {
4649           goto handle_unusual;
4650         }
4651         continue;
4652       // repeated string paths = 2;
4653       case 2:
4654         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
4655           ptr -= 1;
4656           do {
4657             ptr += 1;
4658             auto str = _internal_add_paths();
4659             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
4660             CHK_(ptr);
4661             if (!ctx->DataAvailable(ptr)) break;
4662           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
4663         } else {
4664           goto handle_unusual;
4665         }
4666         continue;
4667       default:
4668         goto handle_unusual;
4669     }  // switch
4670   handle_unusual:
4671     if ((tag == 0) || ((tag & 7) == 4)) {
4672       CHK_(ptr);
4673       ctx->SetLastTag(tag);
4674       goto message_done;
4675     }
4676     ptr = UnknownFieldParse(
4677         tag,
4678         _internal_metadata_.mutable_unknown_fields<std::string>(),
4679         ptr, ctx);
4680     CHK_(ptr != nullptr);
4681   }  // while
4682 message_done:
4683   _impl_._has_bits_.Or(has_bits);
4684   return ptr;
4685 failure:
4686   ptr = nullptr;
4687   goto message_done;
4688 #undef CHK_
4689 }
4690 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4691 ::uint8_t* TypePropertyMask::_InternalSerialize(
4692     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4693   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.TypePropertyMask)
4694   ::uint32_t cached_has_bits = 0;
4695   (void) cached_has_bits;
4696 
4697   cached_has_bits = _impl_._has_bits_[0];
4698   // optional string schema_type = 1;
4699   if (cached_has_bits & 0x00000001u) {
4700     target = stream->WriteStringMaybeAliased(
4701         1, this->_internal_schema_type(), target);
4702   }
4703 
4704   // repeated string paths = 2;
4705   for (int i = 0, n = this->_internal_paths_size(); i < n; i++) {
4706     const auto& s = this->_internal_paths(i);
4707     target = stream->WriteString(2, s, target);
4708   }
4709 
4710   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4711     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4712         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4713   }
4714   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.TypePropertyMask)
4715   return target;
4716 }
4717 
ByteSizeLong() const4718 size_t TypePropertyMask::ByteSizeLong() const {
4719 // @@protoc_insertion_point(message_byte_size_start:icing.lib.TypePropertyMask)
4720   size_t total_size = 0;
4721 
4722   ::uint32_t cached_has_bits = 0;
4723   // Prevent compiler warnings about cached_has_bits being unused
4724   (void) cached_has_bits;
4725 
4726   // repeated string paths = 2;
4727   total_size += 1 *
4728       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.paths_.size());
4729   for (int i = 0, n = _impl_.paths_.size(); i < n; i++) {
4730     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
4731       _impl_.paths_.Get(i));
4732   }
4733 
4734   // optional string schema_type = 1;
4735   cached_has_bits = _impl_._has_bits_[0];
4736   if (cached_has_bits & 0x00000001u) {
4737     total_size += 1 +
4738       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
4739         this->_internal_schema_type());
4740   }
4741 
4742   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4743     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4744   }
4745   int cached_size = ::_pbi::ToCachedSize(total_size);
4746   SetCachedSize(cached_size);
4747   return total_size;
4748 }
4749 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4750 void TypePropertyMask::CheckTypeAndMergeFrom(
4751     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4752   MergeFrom(*::_pbi::DownCast<const TypePropertyMask*>(
4753       &from));
4754 }
4755 
MergeFrom(const TypePropertyMask & from)4756 void TypePropertyMask::MergeFrom(const TypePropertyMask& from) {
4757   TypePropertyMask* const _this = this;
4758   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.TypePropertyMask)
4759   GOOGLE_DCHECK_NE(&from, _this);
4760   ::uint32_t cached_has_bits = 0;
4761   (void) cached_has_bits;
4762 
4763   _this->_impl_.paths_.MergeFrom(from._impl_.paths_);
4764   if (from._internal_has_schema_type()) {
4765     _this->_internal_set_schema_type(from._internal_schema_type());
4766   }
4767   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4768 }
4769 
CopyFrom(const TypePropertyMask & from)4770 void TypePropertyMask::CopyFrom(const TypePropertyMask& from) {
4771 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.TypePropertyMask)
4772   if (&from == this) return;
4773   Clear();
4774   MergeFrom(from);
4775 }
4776 
IsInitialized() const4777 bool TypePropertyMask::IsInitialized() const {
4778   return true;
4779 }
4780 
InternalSwap(TypePropertyMask * other)4781 void TypePropertyMask::InternalSwap(TypePropertyMask* other) {
4782   using std::swap;
4783   auto* lhs_arena = GetArenaForAllocation();
4784   auto* rhs_arena = other->GetArenaForAllocation();
4785   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4786   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
4787   _impl_.paths_.InternalSwap(&other->_impl_.paths_);
4788   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
4789       &_impl_.schema_type_, lhs_arena,
4790       &other->_impl_.schema_type_, rhs_arena
4791   );
4792 }
4793 
GetTypeName() const4794 std::string TypePropertyMask::GetTypeName() const {
4795   return "icing.lib.TypePropertyMask";
4796 }
4797 
4798 
4799 // ===================================================================
4800 
4801 class GetResultSpecProto::_Internal {
4802  public:
4803 };
4804 
GetResultSpecProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)4805 GetResultSpecProto::GetResultSpecProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
4806                          bool is_message_owned)
4807   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
4808   SharedCtor(arena, is_message_owned);
4809   // @@protoc_insertion_point(arena_constructor:icing.lib.GetResultSpecProto)
4810 }
GetResultSpecProto(const GetResultSpecProto & from)4811 GetResultSpecProto::GetResultSpecProto(const GetResultSpecProto& from)
4812   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
4813   GetResultSpecProto* const _this = this; (void)_this;
4814   new (&_impl_) Impl_{
4815       decltype(_impl_.type_property_masks_){from._impl_.type_property_masks_}
4816     , /*decltype(_impl_._cached_size_)*/{}};
4817 
4818   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4819   // @@protoc_insertion_point(copy_constructor:icing.lib.GetResultSpecProto)
4820 }
4821 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)4822 inline void GetResultSpecProto::SharedCtor(
4823     ::_pb::Arena* arena, bool is_message_owned) {
4824   (void)arena;
4825   (void)is_message_owned;
4826   new (&_impl_) Impl_{
4827       decltype(_impl_.type_property_masks_){arena}
4828     , /*decltype(_impl_._cached_size_)*/{}
4829   };
4830 }
4831 
~GetResultSpecProto()4832 GetResultSpecProto::~GetResultSpecProto() {
4833   // @@protoc_insertion_point(destructor:icing.lib.GetResultSpecProto)
4834   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
4835   (void)arena;
4836     return;
4837   }
4838   SharedDtor();
4839 }
4840 
SharedDtor()4841 inline void GetResultSpecProto::SharedDtor() {
4842   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
4843   _impl_.type_property_masks_.~RepeatedPtrField();
4844 }
4845 
SetCachedSize(int size) const4846 void GetResultSpecProto::SetCachedSize(int size) const {
4847   _impl_._cached_size_.Set(size);
4848 }
4849 
Clear()4850 void GetResultSpecProto::Clear() {
4851 // @@protoc_insertion_point(message_clear_start:icing.lib.GetResultSpecProto)
4852   ::uint32_t cached_has_bits = 0;
4853   // Prevent compiler warnings about cached_has_bits being unused
4854   (void) cached_has_bits;
4855 
4856   _impl_.type_property_masks_.Clear();
4857   _internal_metadata_.Clear<std::string>();
4858 }
4859 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)4860 const char* GetResultSpecProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
4861 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
4862   while (!ctx->Done(&ptr)) {
4863     ::uint32_t tag;
4864     ptr = ::_pbi::ReadTag(ptr, &tag);
4865     switch (tag >> 3) {
4866       // repeated .icing.lib.TypePropertyMask type_property_masks = 1;
4867       case 1:
4868         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
4869           ptr -= 1;
4870           do {
4871             ptr += 1;
4872             ptr = ctx->ParseMessage(_internal_add_type_property_masks(), ptr);
4873             CHK_(ptr);
4874             if (!ctx->DataAvailable(ptr)) break;
4875           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
4876         } else {
4877           goto handle_unusual;
4878         }
4879         continue;
4880       default:
4881         goto handle_unusual;
4882     }  // switch
4883   handle_unusual:
4884     if ((tag == 0) || ((tag & 7) == 4)) {
4885       CHK_(ptr);
4886       ctx->SetLastTag(tag);
4887       goto message_done;
4888     }
4889     ptr = UnknownFieldParse(
4890         tag,
4891         _internal_metadata_.mutable_unknown_fields<std::string>(),
4892         ptr, ctx);
4893     CHK_(ptr != nullptr);
4894   }  // while
4895 message_done:
4896   return ptr;
4897 failure:
4898   ptr = nullptr;
4899   goto message_done;
4900 #undef CHK_
4901 }
4902 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const4903 ::uint8_t* GetResultSpecProto::_InternalSerialize(
4904     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
4905   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.GetResultSpecProto)
4906   ::uint32_t cached_has_bits = 0;
4907   (void) cached_has_bits;
4908 
4909   // repeated .icing.lib.TypePropertyMask type_property_masks = 1;
4910   for (unsigned i = 0,
4911       n = static_cast<unsigned>(this->_internal_type_property_masks_size()); i < n; i++) {
4912     const auto& repfield = this->_internal_type_property_masks(i);
4913     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
4914         InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
4915   }
4916 
4917   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4918     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
4919         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
4920   }
4921   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.GetResultSpecProto)
4922   return target;
4923 }
4924 
ByteSizeLong() const4925 size_t GetResultSpecProto::ByteSizeLong() const {
4926 // @@protoc_insertion_point(message_byte_size_start:icing.lib.GetResultSpecProto)
4927   size_t total_size = 0;
4928 
4929   ::uint32_t cached_has_bits = 0;
4930   // Prevent compiler warnings about cached_has_bits being unused
4931   (void) cached_has_bits;
4932 
4933   // repeated .icing.lib.TypePropertyMask type_property_masks = 1;
4934   total_size += 1UL * this->_internal_type_property_masks_size();
4935   for (const auto& msg : this->_impl_.type_property_masks_) {
4936     total_size +=
4937       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
4938   }
4939 
4940   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4941     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4942   }
4943   int cached_size = ::_pbi::ToCachedSize(total_size);
4944   SetCachedSize(cached_size);
4945   return total_size;
4946 }
4947 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4948 void GetResultSpecProto::CheckTypeAndMergeFrom(
4949     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4950   MergeFrom(*::_pbi::DownCast<const GetResultSpecProto*>(
4951       &from));
4952 }
4953 
MergeFrom(const GetResultSpecProto & from)4954 void GetResultSpecProto::MergeFrom(const GetResultSpecProto& from) {
4955   GetResultSpecProto* const _this = this;
4956   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.GetResultSpecProto)
4957   GOOGLE_DCHECK_NE(&from, _this);
4958   ::uint32_t cached_has_bits = 0;
4959   (void) cached_has_bits;
4960 
4961   _this->_impl_.type_property_masks_.MergeFrom(from._impl_.type_property_masks_);
4962   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4963 }
4964 
CopyFrom(const GetResultSpecProto & from)4965 void GetResultSpecProto::CopyFrom(const GetResultSpecProto& from) {
4966 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.GetResultSpecProto)
4967   if (&from == this) return;
4968   Clear();
4969   MergeFrom(from);
4970 }
4971 
IsInitialized() const4972 bool GetResultSpecProto::IsInitialized() const {
4973   return true;
4974 }
4975 
InternalSwap(GetResultSpecProto * other)4976 void GetResultSpecProto::InternalSwap(GetResultSpecProto* other) {
4977   using std::swap;
4978   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4979   _impl_.type_property_masks_.InternalSwap(&other->_impl_.type_property_masks_);
4980 }
4981 
GetTypeName() const4982 std::string GetResultSpecProto::GetTypeName() const {
4983   return "icing.lib.GetResultSpecProto";
4984 }
4985 
4986 
4987 // ===================================================================
4988 
4989 class SuggestionSpecProto::_Internal {
4990  public:
4991   using HasBits = decltype(std::declval<SuggestionSpecProto>()._impl_._has_bits_);
set_has_prefix(HasBits * has_bits)4992   static void set_has_prefix(HasBits* has_bits) {
4993     (*has_bits)[0] |= 1u;
4994   }
set_has_num_to_return(HasBits * has_bits)4995   static void set_has_num_to_return(HasBits* has_bits) {
4996     (*has_bits)[0] |= 4u;
4997   }
4998   static const ::icing::lib::SuggestionScoringSpecProto& scoring_spec(const SuggestionSpecProto* msg);
set_has_scoring_spec(HasBits * has_bits)4999   static void set_has_scoring_spec(HasBits* has_bits) {
5000     (*has_bits)[0] |= 2u;
5001   }
set_has_embedding_query_metric_type(HasBits * has_bits)5002   static void set_has_embedding_query_metric_type(HasBits* has_bits) {
5003     (*has_bits)[0] |= 8u;
5004   }
5005 };
5006 
5007 const ::icing::lib::SuggestionScoringSpecProto&
scoring_spec(const SuggestionSpecProto * msg)5008 SuggestionSpecProto::_Internal::scoring_spec(const SuggestionSpecProto* msg) {
5009   return *msg->_impl_.scoring_spec_;
5010 }
clear_scoring_spec()5011 void SuggestionSpecProto::clear_scoring_spec() {
5012   if (_impl_.scoring_spec_ != nullptr) _impl_.scoring_spec_->Clear();
5013   _impl_._has_bits_[0] &= ~0x00000002u;
5014 }
clear_embedding_query_vectors()5015 void SuggestionSpecProto::clear_embedding_query_vectors() {
5016   _impl_.embedding_query_vectors_.Clear();
5017 }
SuggestionSpecProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)5018 SuggestionSpecProto::SuggestionSpecProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
5019                          bool is_message_owned)
5020   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
5021   SharedCtor(arena, is_message_owned);
5022   // @@protoc_insertion_point(arena_constructor:icing.lib.SuggestionSpecProto)
5023 }
SuggestionSpecProto(const SuggestionSpecProto & from)5024 SuggestionSpecProto::SuggestionSpecProto(const SuggestionSpecProto& from)
5025   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
5026   SuggestionSpecProto* const _this = this; (void)_this;
5027   new (&_impl_) Impl_{
5028       decltype(_impl_._has_bits_){from._impl_._has_bits_}
5029     , /*decltype(_impl_._cached_size_)*/{}
5030     , decltype(_impl_.namespace_filters_){from._impl_.namespace_filters_}
5031     , decltype(_impl_.document_uri_filters_){from._impl_.document_uri_filters_}
5032     , decltype(_impl_.schema_type_filters_){from._impl_.schema_type_filters_}
5033     , decltype(_impl_.type_property_filters_){from._impl_.type_property_filters_}
5034     , decltype(_impl_.embedding_query_vectors_){from._impl_.embedding_query_vectors_}
5035     , decltype(_impl_.query_parameter_strings_){from._impl_.query_parameter_strings_}
5036     , decltype(_impl_.enabled_features_){from._impl_.enabled_features_}
5037     , decltype(_impl_.prefix_){}
5038     , decltype(_impl_.scoring_spec_){nullptr}
5039     , decltype(_impl_.num_to_return_){}
5040     , decltype(_impl_.embedding_query_metric_type_){}};
5041 
5042   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
5043   _impl_.prefix_.InitDefault();
5044   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
5045     _impl_.prefix_.Set("", GetArenaForAllocation());
5046   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
5047   if (from._internal_has_prefix()) {
5048     _this->_impl_.prefix_.Set(from._internal_prefix(),
5049       _this->GetArenaForAllocation());
5050   }
5051   if (from._internal_has_scoring_spec()) {
5052     _this->_impl_.scoring_spec_ = new ::icing::lib::SuggestionScoringSpecProto(*from._impl_.scoring_spec_);
5053   }
5054   ::memcpy(&_impl_.num_to_return_, &from._impl_.num_to_return_,
5055     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.embedding_query_metric_type_) -
5056     reinterpret_cast<char*>(&_impl_.num_to_return_)) + sizeof(_impl_.embedding_query_metric_type_));
5057   // @@protoc_insertion_point(copy_constructor:icing.lib.SuggestionSpecProto)
5058 }
5059 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)5060 inline void SuggestionSpecProto::SharedCtor(
5061     ::_pb::Arena* arena, bool is_message_owned) {
5062   (void)arena;
5063   (void)is_message_owned;
5064   new (&_impl_) Impl_{
5065       decltype(_impl_._has_bits_){}
5066     , /*decltype(_impl_._cached_size_)*/{}
5067     , decltype(_impl_.namespace_filters_){arena}
5068     , decltype(_impl_.document_uri_filters_){arena}
5069     , decltype(_impl_.schema_type_filters_){arena}
5070     , decltype(_impl_.type_property_filters_){arena}
5071     , decltype(_impl_.embedding_query_vectors_){arena}
5072     , decltype(_impl_.query_parameter_strings_){arena}
5073     , decltype(_impl_.enabled_features_){arena}
5074     , decltype(_impl_.prefix_){}
5075     , decltype(_impl_.scoring_spec_){nullptr}
5076     , decltype(_impl_.num_to_return_){0}
5077     , decltype(_impl_.embedding_query_metric_type_){0}
5078   };
5079   _impl_.prefix_.InitDefault();
5080   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
5081     _impl_.prefix_.Set("", GetArenaForAllocation());
5082   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
5083 }
5084 
~SuggestionSpecProto()5085 SuggestionSpecProto::~SuggestionSpecProto() {
5086   // @@protoc_insertion_point(destructor:icing.lib.SuggestionSpecProto)
5087   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
5088   (void)arena;
5089     return;
5090   }
5091   SharedDtor();
5092 }
5093 
SharedDtor()5094 inline void SuggestionSpecProto::SharedDtor() {
5095   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
5096   _impl_.namespace_filters_.~RepeatedPtrField();
5097   _impl_.document_uri_filters_.~RepeatedPtrField();
5098   _impl_.schema_type_filters_.~RepeatedPtrField();
5099   _impl_.type_property_filters_.~RepeatedPtrField();
5100   _impl_.embedding_query_vectors_.~RepeatedPtrField();
5101   _impl_.query_parameter_strings_.~RepeatedPtrField();
5102   _impl_.enabled_features_.~RepeatedPtrField();
5103   _impl_.prefix_.Destroy();
5104   if (this != internal_default_instance()) delete _impl_.scoring_spec_;
5105 }
5106 
SetCachedSize(int size) const5107 void SuggestionSpecProto::SetCachedSize(int size) const {
5108   _impl_._cached_size_.Set(size);
5109 }
5110 
Clear()5111 void SuggestionSpecProto::Clear() {
5112 // @@protoc_insertion_point(message_clear_start:icing.lib.SuggestionSpecProto)
5113   ::uint32_t cached_has_bits = 0;
5114   // Prevent compiler warnings about cached_has_bits being unused
5115   (void) cached_has_bits;
5116 
5117   _impl_.namespace_filters_.Clear();
5118   _impl_.document_uri_filters_.Clear();
5119   _impl_.schema_type_filters_.Clear();
5120   _impl_.type_property_filters_.Clear();
5121   _impl_.embedding_query_vectors_.Clear();
5122   _impl_.query_parameter_strings_.Clear();
5123   _impl_.enabled_features_.Clear();
5124   cached_has_bits = _impl_._has_bits_[0];
5125   if (cached_has_bits & 0x00000003u) {
5126     if (cached_has_bits & 0x00000001u) {
5127       _impl_.prefix_.ClearNonDefaultToEmpty();
5128     }
5129     if (cached_has_bits & 0x00000002u) {
5130       GOOGLE_DCHECK(_impl_.scoring_spec_ != nullptr);
5131       _impl_.scoring_spec_->Clear();
5132     }
5133   }
5134   if (cached_has_bits & 0x0000000cu) {
5135     ::memset(&_impl_.num_to_return_, 0, static_cast<size_t>(
5136         reinterpret_cast<char*>(&_impl_.embedding_query_metric_type_) -
5137         reinterpret_cast<char*>(&_impl_.num_to_return_)) + sizeof(_impl_.embedding_query_metric_type_));
5138   }
5139   _impl_._has_bits_.Clear();
5140   _internal_metadata_.Clear<std::string>();
5141 }
5142 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)5143 const char* SuggestionSpecProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
5144 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
5145   _Internal::HasBits has_bits{};
5146   while (!ctx->Done(&ptr)) {
5147     ::uint32_t tag;
5148     ptr = ::_pbi::ReadTag(ptr, &tag);
5149     switch (tag >> 3) {
5150       // optional string prefix = 1;
5151       case 1:
5152         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
5153           auto str = _internal_mutable_prefix();
5154           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
5155           CHK_(ptr);
5156         } else {
5157           goto handle_unusual;
5158         }
5159         continue;
5160       // repeated string namespace_filters = 2;
5161       case 2:
5162         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
5163           ptr -= 1;
5164           do {
5165             ptr += 1;
5166             auto str = _internal_add_namespace_filters();
5167             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
5168             CHK_(ptr);
5169             if (!ctx->DataAvailable(ptr)) break;
5170           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
5171         } else {
5172           goto handle_unusual;
5173         }
5174         continue;
5175       // optional int32 num_to_return = 3;
5176       case 3:
5177         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 24)) {
5178           _Internal::set_has_num_to_return(&has_bits);
5179           _impl_.num_to_return_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
5180           CHK_(ptr);
5181         } else {
5182           goto handle_unusual;
5183         }
5184         continue;
5185       // optional .icing.lib.SuggestionScoringSpecProto scoring_spec = 4;
5186       case 4:
5187         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
5188           ptr = ctx->ParseMessage(_internal_mutable_scoring_spec(), ptr);
5189           CHK_(ptr);
5190         } else {
5191           goto handle_unusual;
5192         }
5193         continue;
5194       // repeated .icing.lib.NamespaceDocumentUriGroup document_uri_filters = 5;
5195       case 5:
5196         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 42)) {
5197           ptr -= 1;
5198           do {
5199             ptr += 1;
5200             ptr = ctx->ParseMessage(_internal_add_document_uri_filters(), ptr);
5201             CHK_(ptr);
5202             if (!ctx->DataAvailable(ptr)) break;
5203           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
5204         } else {
5205           goto handle_unusual;
5206         }
5207         continue;
5208       // repeated string schema_type_filters = 6;
5209       case 6:
5210         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 50)) {
5211           ptr -= 1;
5212           do {
5213             ptr += 1;
5214             auto str = _internal_add_schema_type_filters();
5215             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
5216             CHK_(ptr);
5217             if (!ctx->DataAvailable(ptr)) break;
5218           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
5219         } else {
5220           goto handle_unusual;
5221         }
5222         continue;
5223       // repeated .icing.lib.TypePropertyMask type_property_filters = 7;
5224       case 7:
5225         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 58)) {
5226           ptr -= 1;
5227           do {
5228             ptr += 1;
5229             ptr = ctx->ParseMessage(_internal_add_type_property_filters(), ptr);
5230             CHK_(ptr);
5231             if (!ctx->DataAvailable(ptr)) break;
5232           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<58>(ptr));
5233         } else {
5234           goto handle_unusual;
5235         }
5236         continue;
5237       // repeated .icing.lib.PropertyProto.VectorProto embedding_query_vectors = 8;
5238       case 8:
5239         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 66)) {
5240           ptr -= 1;
5241           do {
5242             ptr += 1;
5243             ptr = ctx->ParseMessage(_internal_add_embedding_query_vectors(), ptr);
5244             CHK_(ptr);
5245             if (!ctx->DataAvailable(ptr)) break;
5246           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<66>(ptr));
5247         } else {
5248           goto handle_unusual;
5249         }
5250         continue;
5251       // optional .icing.lib.SearchSpecProto.EmbeddingQueryMetricType.Code embedding_query_metric_type = 9;
5252       case 9:
5253         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 72)) {
5254           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
5255           CHK_(ptr);
5256           if (PROTOBUF_PREDICT_TRUE(::icing::lib::SearchSpecProto_EmbeddingQueryMetricType_Code_IsValid(val))) {
5257             _internal_set_embedding_query_metric_type(static_cast<::icing::lib::SearchSpecProto_EmbeddingQueryMetricType_Code>(val));
5258           } else {
5259             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(9, val, mutable_unknown_fields());
5260           }
5261         } else {
5262           goto handle_unusual;
5263         }
5264         continue;
5265       // repeated string query_parameter_strings = 10;
5266       case 10:
5267         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 82)) {
5268           ptr -= 1;
5269           do {
5270             ptr += 1;
5271             auto str = _internal_add_query_parameter_strings();
5272             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
5273             CHK_(ptr);
5274             if (!ctx->DataAvailable(ptr)) break;
5275           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<82>(ptr));
5276         } else {
5277           goto handle_unusual;
5278         }
5279         continue;
5280       // repeated string enabled_features = 11;
5281       case 11:
5282         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 90)) {
5283           ptr -= 1;
5284           do {
5285             ptr += 1;
5286             auto str = _internal_add_enabled_features();
5287             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
5288             CHK_(ptr);
5289             if (!ctx->DataAvailable(ptr)) break;
5290           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<90>(ptr));
5291         } else {
5292           goto handle_unusual;
5293         }
5294         continue;
5295       default:
5296         goto handle_unusual;
5297     }  // switch
5298   handle_unusual:
5299     if ((tag == 0) || ((tag & 7) == 4)) {
5300       CHK_(ptr);
5301       ctx->SetLastTag(tag);
5302       goto message_done;
5303     }
5304     ptr = UnknownFieldParse(
5305         tag,
5306         _internal_metadata_.mutable_unknown_fields<std::string>(),
5307         ptr, ctx);
5308     CHK_(ptr != nullptr);
5309   }  // while
5310 message_done:
5311   _impl_._has_bits_.Or(has_bits);
5312   return ptr;
5313 failure:
5314   ptr = nullptr;
5315   goto message_done;
5316 #undef CHK_
5317 }
5318 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const5319 ::uint8_t* SuggestionSpecProto::_InternalSerialize(
5320     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
5321   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.SuggestionSpecProto)
5322   ::uint32_t cached_has_bits = 0;
5323   (void) cached_has_bits;
5324 
5325   cached_has_bits = _impl_._has_bits_[0];
5326   // optional string prefix = 1;
5327   if (cached_has_bits & 0x00000001u) {
5328     target = stream->WriteStringMaybeAliased(
5329         1, this->_internal_prefix(), target);
5330   }
5331 
5332   // repeated string namespace_filters = 2;
5333   for (int i = 0, n = this->_internal_namespace_filters_size(); i < n; i++) {
5334     const auto& s = this->_internal_namespace_filters(i);
5335     target = stream->WriteString(2, s, target);
5336   }
5337 
5338   // optional int32 num_to_return = 3;
5339   if (cached_has_bits & 0x00000004u) {
5340     target = stream->EnsureSpace(target);
5341     target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_num_to_return(), target);
5342   }
5343 
5344   // optional .icing.lib.SuggestionScoringSpecProto scoring_spec = 4;
5345   if (cached_has_bits & 0x00000002u) {
5346     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
5347       InternalWriteMessage(4, _Internal::scoring_spec(this),
5348         _Internal::scoring_spec(this).GetCachedSize(), target, stream);
5349   }
5350 
5351   // repeated .icing.lib.NamespaceDocumentUriGroup document_uri_filters = 5;
5352   for (unsigned i = 0,
5353       n = static_cast<unsigned>(this->_internal_document_uri_filters_size()); i < n; i++) {
5354     const auto& repfield = this->_internal_document_uri_filters(i);
5355     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
5356         InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream);
5357   }
5358 
5359   // repeated string schema_type_filters = 6;
5360   for (int i = 0, n = this->_internal_schema_type_filters_size(); i < n; i++) {
5361     const auto& s = this->_internal_schema_type_filters(i);
5362     target = stream->WriteString(6, s, target);
5363   }
5364 
5365   // repeated .icing.lib.TypePropertyMask type_property_filters = 7;
5366   for (unsigned i = 0,
5367       n = static_cast<unsigned>(this->_internal_type_property_filters_size()); i < n; i++) {
5368     const auto& repfield = this->_internal_type_property_filters(i);
5369     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
5370         InternalWriteMessage(7, repfield, repfield.GetCachedSize(), target, stream);
5371   }
5372 
5373   // repeated .icing.lib.PropertyProto.VectorProto embedding_query_vectors = 8;
5374   for (unsigned i = 0,
5375       n = static_cast<unsigned>(this->_internal_embedding_query_vectors_size()); i < n; i++) {
5376     const auto& repfield = this->_internal_embedding_query_vectors(i);
5377     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
5378         InternalWriteMessage(8, repfield, repfield.GetCachedSize(), target, stream);
5379   }
5380 
5381   // optional .icing.lib.SearchSpecProto.EmbeddingQueryMetricType.Code embedding_query_metric_type = 9;
5382   if (cached_has_bits & 0x00000008u) {
5383     target = stream->EnsureSpace(target);
5384     target = ::_pbi::WireFormatLite::WriteEnumToArray(
5385       9, this->_internal_embedding_query_metric_type(), target);
5386   }
5387 
5388   // repeated string query_parameter_strings = 10;
5389   for (int i = 0, n = this->_internal_query_parameter_strings_size(); i < n; i++) {
5390     const auto& s = this->_internal_query_parameter_strings(i);
5391     target = stream->WriteString(10, s, target);
5392   }
5393 
5394   // repeated string enabled_features = 11;
5395   for (int i = 0, n = this->_internal_enabled_features_size(); i < n; i++) {
5396     const auto& s = this->_internal_enabled_features(i);
5397     target = stream->WriteString(11, s, target);
5398   }
5399 
5400   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
5401     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
5402         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
5403   }
5404   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.SuggestionSpecProto)
5405   return target;
5406 }
5407 
ByteSizeLong() const5408 size_t SuggestionSpecProto::ByteSizeLong() const {
5409 // @@protoc_insertion_point(message_byte_size_start:icing.lib.SuggestionSpecProto)
5410   size_t total_size = 0;
5411 
5412   ::uint32_t cached_has_bits = 0;
5413   // Prevent compiler warnings about cached_has_bits being unused
5414   (void) cached_has_bits;
5415 
5416   // repeated string namespace_filters = 2;
5417   total_size += 1 *
5418       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.namespace_filters_.size());
5419   for (int i = 0, n = _impl_.namespace_filters_.size(); i < n; i++) {
5420     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
5421       _impl_.namespace_filters_.Get(i));
5422   }
5423 
5424   // repeated .icing.lib.NamespaceDocumentUriGroup document_uri_filters = 5;
5425   total_size += 1UL * this->_internal_document_uri_filters_size();
5426   for (const auto& msg : this->_impl_.document_uri_filters_) {
5427     total_size +=
5428       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
5429   }
5430 
5431   // repeated string schema_type_filters = 6;
5432   total_size += 1 *
5433       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.schema_type_filters_.size());
5434   for (int i = 0, n = _impl_.schema_type_filters_.size(); i < n; i++) {
5435     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
5436       _impl_.schema_type_filters_.Get(i));
5437   }
5438 
5439   // repeated .icing.lib.TypePropertyMask type_property_filters = 7;
5440   total_size += 1UL * this->_internal_type_property_filters_size();
5441   for (const auto& msg : this->_impl_.type_property_filters_) {
5442     total_size +=
5443       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
5444   }
5445 
5446   // repeated .icing.lib.PropertyProto.VectorProto embedding_query_vectors = 8;
5447   total_size += 1UL * this->_internal_embedding_query_vectors_size();
5448   for (const auto& msg : this->_impl_.embedding_query_vectors_) {
5449     total_size +=
5450       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
5451   }
5452 
5453   // repeated string query_parameter_strings = 10;
5454   total_size += 1 *
5455       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.query_parameter_strings_.size());
5456   for (int i = 0, n = _impl_.query_parameter_strings_.size(); i < n; i++) {
5457     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
5458       _impl_.query_parameter_strings_.Get(i));
5459   }
5460 
5461   // repeated string enabled_features = 11;
5462   total_size += 1 *
5463       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.enabled_features_.size());
5464   for (int i = 0, n = _impl_.enabled_features_.size(); i < n; i++) {
5465     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
5466       _impl_.enabled_features_.Get(i));
5467   }
5468 
5469   cached_has_bits = _impl_._has_bits_[0];
5470   if (cached_has_bits & 0x0000000fu) {
5471     // optional string prefix = 1;
5472     if (cached_has_bits & 0x00000001u) {
5473       total_size += 1 +
5474         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
5475           this->_internal_prefix());
5476     }
5477 
5478     // optional .icing.lib.SuggestionScoringSpecProto scoring_spec = 4;
5479     if (cached_has_bits & 0x00000002u) {
5480       total_size += 1 +
5481         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
5482           *_impl_.scoring_spec_);
5483     }
5484 
5485     // optional int32 num_to_return = 3;
5486     if (cached_has_bits & 0x00000004u) {
5487       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_to_return());
5488     }
5489 
5490     // optional .icing.lib.SearchSpecProto.EmbeddingQueryMetricType.Code embedding_query_metric_type = 9;
5491     if (cached_has_bits & 0x00000008u) {
5492       total_size += 1 +
5493         ::_pbi::WireFormatLite::EnumSize(this->_internal_embedding_query_metric_type());
5494     }
5495 
5496   }
5497   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
5498     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
5499   }
5500   int cached_size = ::_pbi::ToCachedSize(total_size);
5501   SetCachedSize(cached_size);
5502   return total_size;
5503 }
5504 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)5505 void SuggestionSpecProto::CheckTypeAndMergeFrom(
5506     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
5507   MergeFrom(*::_pbi::DownCast<const SuggestionSpecProto*>(
5508       &from));
5509 }
5510 
MergeFrom(const SuggestionSpecProto & from)5511 void SuggestionSpecProto::MergeFrom(const SuggestionSpecProto& from) {
5512   SuggestionSpecProto* const _this = this;
5513   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.SuggestionSpecProto)
5514   GOOGLE_DCHECK_NE(&from, _this);
5515   ::uint32_t cached_has_bits = 0;
5516   (void) cached_has_bits;
5517 
5518   _this->_impl_.namespace_filters_.MergeFrom(from._impl_.namespace_filters_);
5519   _this->_impl_.document_uri_filters_.MergeFrom(from._impl_.document_uri_filters_);
5520   _this->_impl_.schema_type_filters_.MergeFrom(from._impl_.schema_type_filters_);
5521   _this->_impl_.type_property_filters_.MergeFrom(from._impl_.type_property_filters_);
5522   _this->_impl_.embedding_query_vectors_.MergeFrom(from._impl_.embedding_query_vectors_);
5523   _this->_impl_.query_parameter_strings_.MergeFrom(from._impl_.query_parameter_strings_);
5524   _this->_impl_.enabled_features_.MergeFrom(from._impl_.enabled_features_);
5525   cached_has_bits = from._impl_._has_bits_[0];
5526   if (cached_has_bits & 0x0000000fu) {
5527     if (cached_has_bits & 0x00000001u) {
5528       _this->_internal_set_prefix(from._internal_prefix());
5529     }
5530     if (cached_has_bits & 0x00000002u) {
5531       _this->_internal_mutable_scoring_spec()->::icing::lib::SuggestionScoringSpecProto::MergeFrom(
5532           from._internal_scoring_spec());
5533     }
5534     if (cached_has_bits & 0x00000004u) {
5535       _this->_impl_.num_to_return_ = from._impl_.num_to_return_;
5536     }
5537     if (cached_has_bits & 0x00000008u) {
5538       _this->_impl_.embedding_query_metric_type_ = from._impl_.embedding_query_metric_type_;
5539     }
5540     _this->_impl_._has_bits_[0] |= cached_has_bits;
5541   }
5542   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
5543 }
5544 
CopyFrom(const SuggestionSpecProto & from)5545 void SuggestionSpecProto::CopyFrom(const SuggestionSpecProto& from) {
5546 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.SuggestionSpecProto)
5547   if (&from == this) return;
5548   Clear();
5549   MergeFrom(from);
5550 }
5551 
IsInitialized() const5552 bool SuggestionSpecProto::IsInitialized() const {
5553   return true;
5554 }
5555 
InternalSwap(SuggestionSpecProto * other)5556 void SuggestionSpecProto::InternalSwap(SuggestionSpecProto* other) {
5557   using std::swap;
5558   auto* lhs_arena = GetArenaForAllocation();
5559   auto* rhs_arena = other->GetArenaForAllocation();
5560   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
5561   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
5562   _impl_.namespace_filters_.InternalSwap(&other->_impl_.namespace_filters_);
5563   _impl_.document_uri_filters_.InternalSwap(&other->_impl_.document_uri_filters_);
5564   _impl_.schema_type_filters_.InternalSwap(&other->_impl_.schema_type_filters_);
5565   _impl_.type_property_filters_.InternalSwap(&other->_impl_.type_property_filters_);
5566   _impl_.embedding_query_vectors_.InternalSwap(&other->_impl_.embedding_query_vectors_);
5567   _impl_.query_parameter_strings_.InternalSwap(&other->_impl_.query_parameter_strings_);
5568   _impl_.enabled_features_.InternalSwap(&other->_impl_.enabled_features_);
5569   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
5570       &_impl_.prefix_, lhs_arena,
5571       &other->_impl_.prefix_, rhs_arena
5572   );
5573   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
5574       PROTOBUF_FIELD_OFFSET(SuggestionSpecProto, _impl_.embedding_query_metric_type_)
5575       + sizeof(SuggestionSpecProto::_impl_.embedding_query_metric_type_)  // NOLINT
5576       - PROTOBUF_FIELD_OFFSET(SuggestionSpecProto, _impl_.scoring_spec_)>(
5577           reinterpret_cast<char*>(&_impl_.scoring_spec_),
5578           reinterpret_cast<char*>(&other->_impl_.scoring_spec_));
5579 }
5580 
GetTypeName() const5581 std::string SuggestionSpecProto::GetTypeName() const {
5582   return "icing.lib.SuggestionSpecProto";
5583 }
5584 
5585 
5586 // ===================================================================
5587 
5588 class NamespaceDocumentUriGroup::_Internal {
5589  public:
5590   using HasBits = decltype(std::declval<NamespaceDocumentUriGroup>()._impl_._has_bits_);
set_has_namespace_(HasBits * has_bits)5591   static void set_has_namespace_(HasBits* has_bits) {
5592     (*has_bits)[0] |= 1u;
5593   }
5594 };
5595 
NamespaceDocumentUriGroup(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)5596 NamespaceDocumentUriGroup::NamespaceDocumentUriGroup(::PROTOBUF_NAMESPACE_ID::Arena* arena,
5597                          bool is_message_owned)
5598   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
5599   SharedCtor(arena, is_message_owned);
5600   // @@protoc_insertion_point(arena_constructor:icing.lib.NamespaceDocumentUriGroup)
5601 }
NamespaceDocumentUriGroup(const NamespaceDocumentUriGroup & from)5602 NamespaceDocumentUriGroup::NamespaceDocumentUriGroup(const NamespaceDocumentUriGroup& from)
5603   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
5604   NamespaceDocumentUriGroup* const _this = this; (void)_this;
5605   new (&_impl_) Impl_{
5606       decltype(_impl_._has_bits_){from._impl_._has_bits_}
5607     , /*decltype(_impl_._cached_size_)*/{}
5608     , decltype(_impl_.document_uris_){from._impl_.document_uris_}
5609     , decltype(_impl_.namespace__){}};
5610 
5611   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
5612   _impl_.namespace__.InitDefault();
5613   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
5614     _impl_.namespace__.Set("", GetArenaForAllocation());
5615   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
5616   if (from._internal_has_namespace_()) {
5617     _this->_impl_.namespace__.Set(from._internal_namespace_(),
5618       _this->GetArenaForAllocation());
5619   }
5620   // @@protoc_insertion_point(copy_constructor:icing.lib.NamespaceDocumentUriGroup)
5621 }
5622 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)5623 inline void NamespaceDocumentUriGroup::SharedCtor(
5624     ::_pb::Arena* arena, bool is_message_owned) {
5625   (void)arena;
5626   (void)is_message_owned;
5627   new (&_impl_) Impl_{
5628       decltype(_impl_._has_bits_){}
5629     , /*decltype(_impl_._cached_size_)*/{}
5630     , decltype(_impl_.document_uris_){arena}
5631     , decltype(_impl_.namespace__){}
5632   };
5633   _impl_.namespace__.InitDefault();
5634   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
5635     _impl_.namespace__.Set("", GetArenaForAllocation());
5636   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
5637 }
5638 
~NamespaceDocumentUriGroup()5639 NamespaceDocumentUriGroup::~NamespaceDocumentUriGroup() {
5640   // @@protoc_insertion_point(destructor:icing.lib.NamespaceDocumentUriGroup)
5641   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
5642   (void)arena;
5643     return;
5644   }
5645   SharedDtor();
5646 }
5647 
SharedDtor()5648 inline void NamespaceDocumentUriGroup::SharedDtor() {
5649   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
5650   _impl_.document_uris_.~RepeatedPtrField();
5651   _impl_.namespace__.Destroy();
5652 }
5653 
SetCachedSize(int size) const5654 void NamespaceDocumentUriGroup::SetCachedSize(int size) const {
5655   _impl_._cached_size_.Set(size);
5656 }
5657 
Clear()5658 void NamespaceDocumentUriGroup::Clear() {
5659 // @@protoc_insertion_point(message_clear_start:icing.lib.NamespaceDocumentUriGroup)
5660   ::uint32_t cached_has_bits = 0;
5661   // Prevent compiler warnings about cached_has_bits being unused
5662   (void) cached_has_bits;
5663 
5664   _impl_.document_uris_.Clear();
5665   cached_has_bits = _impl_._has_bits_[0];
5666   if (cached_has_bits & 0x00000001u) {
5667     _impl_.namespace__.ClearNonDefaultToEmpty();
5668   }
5669   _impl_._has_bits_.Clear();
5670   _internal_metadata_.Clear<std::string>();
5671 }
5672 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)5673 const char* NamespaceDocumentUriGroup::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
5674 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
5675   _Internal::HasBits has_bits{};
5676   while (!ctx->Done(&ptr)) {
5677     ::uint32_t tag;
5678     ptr = ::_pbi::ReadTag(ptr, &tag);
5679     switch (tag >> 3) {
5680       // optional string namespace_ = 1;
5681       case 1:
5682         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
5683           auto str = _internal_mutable_namespace_();
5684           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
5685           CHK_(ptr);
5686         } else {
5687           goto handle_unusual;
5688         }
5689         continue;
5690       // repeated string document_uris = 2;
5691       case 2:
5692         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
5693           ptr -= 1;
5694           do {
5695             ptr += 1;
5696             auto str = _internal_add_document_uris();
5697             ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
5698             CHK_(ptr);
5699             if (!ctx->DataAvailable(ptr)) break;
5700           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
5701         } else {
5702           goto handle_unusual;
5703         }
5704         continue;
5705       default:
5706         goto handle_unusual;
5707     }  // switch
5708   handle_unusual:
5709     if ((tag == 0) || ((tag & 7) == 4)) {
5710       CHK_(ptr);
5711       ctx->SetLastTag(tag);
5712       goto message_done;
5713     }
5714     ptr = UnknownFieldParse(
5715         tag,
5716         _internal_metadata_.mutable_unknown_fields<std::string>(),
5717         ptr, ctx);
5718     CHK_(ptr != nullptr);
5719   }  // while
5720 message_done:
5721   _impl_._has_bits_.Or(has_bits);
5722   return ptr;
5723 failure:
5724   ptr = nullptr;
5725   goto message_done;
5726 #undef CHK_
5727 }
5728 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const5729 ::uint8_t* NamespaceDocumentUriGroup::_InternalSerialize(
5730     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
5731   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.NamespaceDocumentUriGroup)
5732   ::uint32_t cached_has_bits = 0;
5733   (void) cached_has_bits;
5734 
5735   cached_has_bits = _impl_._has_bits_[0];
5736   // optional string namespace_ = 1;
5737   if (cached_has_bits & 0x00000001u) {
5738     target = stream->WriteStringMaybeAliased(
5739         1, this->_internal_namespace_(), target);
5740   }
5741 
5742   // repeated string document_uris = 2;
5743   for (int i = 0, n = this->_internal_document_uris_size(); i < n; i++) {
5744     const auto& s = this->_internal_document_uris(i);
5745     target = stream->WriteString(2, s, target);
5746   }
5747 
5748   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
5749     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
5750         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
5751   }
5752   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.NamespaceDocumentUriGroup)
5753   return target;
5754 }
5755 
ByteSizeLong() const5756 size_t NamespaceDocumentUriGroup::ByteSizeLong() const {
5757 // @@protoc_insertion_point(message_byte_size_start:icing.lib.NamespaceDocumentUriGroup)
5758   size_t total_size = 0;
5759 
5760   ::uint32_t cached_has_bits = 0;
5761   // Prevent compiler warnings about cached_has_bits being unused
5762   (void) cached_has_bits;
5763 
5764   // repeated string document_uris = 2;
5765   total_size += 1 *
5766       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(_impl_.document_uris_.size());
5767   for (int i = 0, n = _impl_.document_uris_.size(); i < n; i++) {
5768     total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
5769       _impl_.document_uris_.Get(i));
5770   }
5771 
5772   // optional string namespace_ = 1;
5773   cached_has_bits = _impl_._has_bits_[0];
5774   if (cached_has_bits & 0x00000001u) {
5775     total_size += 1 +
5776       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
5777         this->_internal_namespace_());
5778   }
5779 
5780   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
5781     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
5782   }
5783   int cached_size = ::_pbi::ToCachedSize(total_size);
5784   SetCachedSize(cached_size);
5785   return total_size;
5786 }
5787 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)5788 void NamespaceDocumentUriGroup::CheckTypeAndMergeFrom(
5789     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
5790   MergeFrom(*::_pbi::DownCast<const NamespaceDocumentUriGroup*>(
5791       &from));
5792 }
5793 
MergeFrom(const NamespaceDocumentUriGroup & from)5794 void NamespaceDocumentUriGroup::MergeFrom(const NamespaceDocumentUriGroup& from) {
5795   NamespaceDocumentUriGroup* const _this = this;
5796   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.NamespaceDocumentUriGroup)
5797   GOOGLE_DCHECK_NE(&from, _this);
5798   ::uint32_t cached_has_bits = 0;
5799   (void) cached_has_bits;
5800 
5801   _this->_impl_.document_uris_.MergeFrom(from._impl_.document_uris_);
5802   if (from._internal_has_namespace_()) {
5803     _this->_internal_set_namespace_(from._internal_namespace_());
5804   }
5805   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
5806 }
5807 
CopyFrom(const NamespaceDocumentUriGroup & from)5808 void NamespaceDocumentUriGroup::CopyFrom(const NamespaceDocumentUriGroup& from) {
5809 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.NamespaceDocumentUriGroup)
5810   if (&from == this) return;
5811   Clear();
5812   MergeFrom(from);
5813 }
5814 
IsInitialized() const5815 bool NamespaceDocumentUriGroup::IsInitialized() const {
5816   return true;
5817 }
5818 
InternalSwap(NamespaceDocumentUriGroup * other)5819 void NamespaceDocumentUriGroup::InternalSwap(NamespaceDocumentUriGroup* other) {
5820   using std::swap;
5821   auto* lhs_arena = GetArenaForAllocation();
5822   auto* rhs_arena = other->GetArenaForAllocation();
5823   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
5824   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
5825   _impl_.document_uris_.InternalSwap(&other->_impl_.document_uris_);
5826   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
5827       &_impl_.namespace__, lhs_arena,
5828       &other->_impl_.namespace__, rhs_arena
5829   );
5830 }
5831 
GetTypeName() const5832 std::string NamespaceDocumentUriGroup::GetTypeName() const {
5833   return "icing.lib.NamespaceDocumentUriGroup";
5834 }
5835 
5836 
5837 // ===================================================================
5838 
5839 class SuggestionResponse_Suggestion::_Internal {
5840  public:
5841   using HasBits = decltype(std::declval<SuggestionResponse_Suggestion>()._impl_._has_bits_);
set_has_query(HasBits * has_bits)5842   static void set_has_query(HasBits* has_bits) {
5843     (*has_bits)[0] |= 1u;
5844   }
5845 };
5846 
SuggestionResponse_Suggestion(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)5847 SuggestionResponse_Suggestion::SuggestionResponse_Suggestion(::PROTOBUF_NAMESPACE_ID::Arena* arena,
5848                          bool is_message_owned)
5849   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
5850   SharedCtor(arena, is_message_owned);
5851   // @@protoc_insertion_point(arena_constructor:icing.lib.SuggestionResponse.Suggestion)
5852 }
SuggestionResponse_Suggestion(const SuggestionResponse_Suggestion & from)5853 SuggestionResponse_Suggestion::SuggestionResponse_Suggestion(const SuggestionResponse_Suggestion& from)
5854   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
5855   SuggestionResponse_Suggestion* const _this = this; (void)_this;
5856   new (&_impl_) Impl_{
5857       decltype(_impl_._has_bits_){from._impl_._has_bits_}
5858     , /*decltype(_impl_._cached_size_)*/{}
5859     , decltype(_impl_.query_){}};
5860 
5861   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
5862   _impl_.query_.InitDefault();
5863   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
5864     _impl_.query_.Set("", GetArenaForAllocation());
5865   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
5866   if (from._internal_has_query()) {
5867     _this->_impl_.query_.Set(from._internal_query(),
5868       _this->GetArenaForAllocation());
5869   }
5870   // @@protoc_insertion_point(copy_constructor:icing.lib.SuggestionResponse.Suggestion)
5871 }
5872 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)5873 inline void SuggestionResponse_Suggestion::SharedCtor(
5874     ::_pb::Arena* arena, bool is_message_owned) {
5875   (void)arena;
5876   (void)is_message_owned;
5877   new (&_impl_) Impl_{
5878       decltype(_impl_._has_bits_){}
5879     , /*decltype(_impl_._cached_size_)*/{}
5880     , decltype(_impl_.query_){}
5881   };
5882   _impl_.query_.InitDefault();
5883   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
5884     _impl_.query_.Set("", GetArenaForAllocation());
5885   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
5886 }
5887 
~SuggestionResponse_Suggestion()5888 SuggestionResponse_Suggestion::~SuggestionResponse_Suggestion() {
5889   // @@protoc_insertion_point(destructor:icing.lib.SuggestionResponse.Suggestion)
5890   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
5891   (void)arena;
5892     return;
5893   }
5894   SharedDtor();
5895 }
5896 
SharedDtor()5897 inline void SuggestionResponse_Suggestion::SharedDtor() {
5898   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
5899   _impl_.query_.Destroy();
5900 }
5901 
SetCachedSize(int size) const5902 void SuggestionResponse_Suggestion::SetCachedSize(int size) const {
5903   _impl_._cached_size_.Set(size);
5904 }
5905 
Clear()5906 void SuggestionResponse_Suggestion::Clear() {
5907 // @@protoc_insertion_point(message_clear_start:icing.lib.SuggestionResponse.Suggestion)
5908   ::uint32_t cached_has_bits = 0;
5909   // Prevent compiler warnings about cached_has_bits being unused
5910   (void) cached_has_bits;
5911 
5912   cached_has_bits = _impl_._has_bits_[0];
5913   if (cached_has_bits & 0x00000001u) {
5914     _impl_.query_.ClearNonDefaultToEmpty();
5915   }
5916   _impl_._has_bits_.Clear();
5917   _internal_metadata_.Clear<std::string>();
5918 }
5919 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)5920 const char* SuggestionResponse_Suggestion::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
5921 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
5922   _Internal::HasBits has_bits{};
5923   while (!ctx->Done(&ptr)) {
5924     ::uint32_t tag;
5925     ptr = ::_pbi::ReadTag(ptr, &tag);
5926     switch (tag >> 3) {
5927       // optional string query = 1;
5928       case 1:
5929         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
5930           auto str = _internal_mutable_query();
5931           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
5932           CHK_(ptr);
5933         } else {
5934           goto handle_unusual;
5935         }
5936         continue;
5937       default:
5938         goto handle_unusual;
5939     }  // switch
5940   handle_unusual:
5941     if ((tag == 0) || ((tag & 7) == 4)) {
5942       CHK_(ptr);
5943       ctx->SetLastTag(tag);
5944       goto message_done;
5945     }
5946     ptr = UnknownFieldParse(
5947         tag,
5948         _internal_metadata_.mutable_unknown_fields<std::string>(),
5949         ptr, ctx);
5950     CHK_(ptr != nullptr);
5951   }  // while
5952 message_done:
5953   _impl_._has_bits_.Or(has_bits);
5954   return ptr;
5955 failure:
5956   ptr = nullptr;
5957   goto message_done;
5958 #undef CHK_
5959 }
5960 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const5961 ::uint8_t* SuggestionResponse_Suggestion::_InternalSerialize(
5962     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
5963   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.SuggestionResponse.Suggestion)
5964   ::uint32_t cached_has_bits = 0;
5965   (void) cached_has_bits;
5966 
5967   cached_has_bits = _impl_._has_bits_[0];
5968   // optional string query = 1;
5969   if (cached_has_bits & 0x00000001u) {
5970     target = stream->WriteStringMaybeAliased(
5971         1, this->_internal_query(), target);
5972   }
5973 
5974   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
5975     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
5976         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
5977   }
5978   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.SuggestionResponse.Suggestion)
5979   return target;
5980 }
5981 
ByteSizeLong() const5982 size_t SuggestionResponse_Suggestion::ByteSizeLong() const {
5983 // @@protoc_insertion_point(message_byte_size_start:icing.lib.SuggestionResponse.Suggestion)
5984   size_t total_size = 0;
5985 
5986   ::uint32_t cached_has_bits = 0;
5987   // Prevent compiler warnings about cached_has_bits being unused
5988   (void) cached_has_bits;
5989 
5990   // optional string query = 1;
5991   cached_has_bits = _impl_._has_bits_[0];
5992   if (cached_has_bits & 0x00000001u) {
5993     total_size += 1 +
5994       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
5995         this->_internal_query());
5996   }
5997 
5998   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
5999     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
6000   }
6001   int cached_size = ::_pbi::ToCachedSize(total_size);
6002   SetCachedSize(cached_size);
6003   return total_size;
6004 }
6005 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)6006 void SuggestionResponse_Suggestion::CheckTypeAndMergeFrom(
6007     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
6008   MergeFrom(*::_pbi::DownCast<const SuggestionResponse_Suggestion*>(
6009       &from));
6010 }
6011 
MergeFrom(const SuggestionResponse_Suggestion & from)6012 void SuggestionResponse_Suggestion::MergeFrom(const SuggestionResponse_Suggestion& from) {
6013   SuggestionResponse_Suggestion* const _this = this;
6014   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.SuggestionResponse.Suggestion)
6015   GOOGLE_DCHECK_NE(&from, _this);
6016   ::uint32_t cached_has_bits = 0;
6017   (void) cached_has_bits;
6018 
6019   if (from._internal_has_query()) {
6020     _this->_internal_set_query(from._internal_query());
6021   }
6022   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
6023 }
6024 
CopyFrom(const SuggestionResponse_Suggestion & from)6025 void SuggestionResponse_Suggestion::CopyFrom(const SuggestionResponse_Suggestion& from) {
6026 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.SuggestionResponse.Suggestion)
6027   if (&from == this) return;
6028   Clear();
6029   MergeFrom(from);
6030 }
6031 
IsInitialized() const6032 bool SuggestionResponse_Suggestion::IsInitialized() const {
6033   return true;
6034 }
6035 
InternalSwap(SuggestionResponse_Suggestion * other)6036 void SuggestionResponse_Suggestion::InternalSwap(SuggestionResponse_Suggestion* other) {
6037   using std::swap;
6038   auto* lhs_arena = GetArenaForAllocation();
6039   auto* rhs_arena = other->GetArenaForAllocation();
6040   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
6041   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
6042   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
6043       &_impl_.query_, lhs_arena,
6044       &other->_impl_.query_, rhs_arena
6045   );
6046 }
6047 
GetTypeName() const6048 std::string SuggestionResponse_Suggestion::GetTypeName() const {
6049   return "icing.lib.SuggestionResponse.Suggestion";
6050 }
6051 
6052 
6053 // ===================================================================
6054 
6055 class SuggestionResponse::_Internal {
6056  public:
6057   using HasBits = decltype(std::declval<SuggestionResponse>()._impl_._has_bits_);
6058   static const ::icing::lib::StatusProto& status(const SuggestionResponse* msg);
set_has_status(HasBits * has_bits)6059   static void set_has_status(HasBits* has_bits) {
6060     (*has_bits)[0] |= 1u;
6061   }
6062 };
6063 
6064 const ::icing::lib::StatusProto&
status(const SuggestionResponse * msg)6065 SuggestionResponse::_Internal::status(const SuggestionResponse* msg) {
6066   return *msg->_impl_.status_;
6067 }
clear_status()6068 void SuggestionResponse::clear_status() {
6069   if (_impl_.status_ != nullptr) _impl_.status_->Clear();
6070   _impl_._has_bits_[0] &= ~0x00000001u;
6071 }
SuggestionResponse(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)6072 SuggestionResponse::SuggestionResponse(::PROTOBUF_NAMESPACE_ID::Arena* arena,
6073                          bool is_message_owned)
6074   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
6075   SharedCtor(arena, is_message_owned);
6076   // @@protoc_insertion_point(arena_constructor:icing.lib.SuggestionResponse)
6077 }
SuggestionResponse(const SuggestionResponse & from)6078 SuggestionResponse::SuggestionResponse(const SuggestionResponse& from)
6079   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
6080   SuggestionResponse* const _this = this; (void)_this;
6081   new (&_impl_) Impl_{
6082       decltype(_impl_._has_bits_){from._impl_._has_bits_}
6083     , /*decltype(_impl_._cached_size_)*/{}
6084     , decltype(_impl_.suggestions_){from._impl_.suggestions_}
6085     , decltype(_impl_.status_){nullptr}};
6086 
6087   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
6088   if (from._internal_has_status()) {
6089     _this->_impl_.status_ = new ::icing::lib::StatusProto(*from._impl_.status_);
6090   }
6091   // @@protoc_insertion_point(copy_constructor:icing.lib.SuggestionResponse)
6092 }
6093 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)6094 inline void SuggestionResponse::SharedCtor(
6095     ::_pb::Arena* arena, bool is_message_owned) {
6096   (void)arena;
6097   (void)is_message_owned;
6098   new (&_impl_) Impl_{
6099       decltype(_impl_._has_bits_){}
6100     , /*decltype(_impl_._cached_size_)*/{}
6101     , decltype(_impl_.suggestions_){arena}
6102     , decltype(_impl_.status_){nullptr}
6103   };
6104 }
6105 
~SuggestionResponse()6106 SuggestionResponse::~SuggestionResponse() {
6107   // @@protoc_insertion_point(destructor:icing.lib.SuggestionResponse)
6108   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
6109   (void)arena;
6110     return;
6111   }
6112   SharedDtor();
6113 }
6114 
SharedDtor()6115 inline void SuggestionResponse::SharedDtor() {
6116   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
6117   _impl_.suggestions_.~RepeatedPtrField();
6118   if (this != internal_default_instance()) delete _impl_.status_;
6119 }
6120 
SetCachedSize(int size) const6121 void SuggestionResponse::SetCachedSize(int size) const {
6122   _impl_._cached_size_.Set(size);
6123 }
6124 
Clear()6125 void SuggestionResponse::Clear() {
6126 // @@protoc_insertion_point(message_clear_start:icing.lib.SuggestionResponse)
6127   ::uint32_t cached_has_bits = 0;
6128   // Prevent compiler warnings about cached_has_bits being unused
6129   (void) cached_has_bits;
6130 
6131   _impl_.suggestions_.Clear();
6132   cached_has_bits = _impl_._has_bits_[0];
6133   if (cached_has_bits & 0x00000001u) {
6134     GOOGLE_DCHECK(_impl_.status_ != nullptr);
6135     _impl_.status_->Clear();
6136   }
6137   _impl_._has_bits_.Clear();
6138   _internal_metadata_.Clear<std::string>();
6139 }
6140 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)6141 const char* SuggestionResponse::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
6142 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
6143   _Internal::HasBits has_bits{};
6144   while (!ctx->Done(&ptr)) {
6145     ::uint32_t tag;
6146     ptr = ::_pbi::ReadTag(ptr, &tag);
6147     switch (tag >> 3) {
6148       // optional .icing.lib.StatusProto status = 1;
6149       case 1:
6150         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
6151           ptr = ctx->ParseMessage(_internal_mutable_status(), ptr);
6152           CHK_(ptr);
6153         } else {
6154           goto handle_unusual;
6155         }
6156         continue;
6157       // repeated .icing.lib.SuggestionResponse.Suggestion suggestions = 2;
6158       case 2:
6159         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
6160           ptr -= 1;
6161           do {
6162             ptr += 1;
6163             ptr = ctx->ParseMessage(_internal_add_suggestions(), ptr);
6164             CHK_(ptr);
6165             if (!ctx->DataAvailable(ptr)) break;
6166           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr));
6167         } else {
6168           goto handle_unusual;
6169         }
6170         continue;
6171       default:
6172         goto handle_unusual;
6173     }  // switch
6174   handle_unusual:
6175     if ((tag == 0) || ((tag & 7) == 4)) {
6176       CHK_(ptr);
6177       ctx->SetLastTag(tag);
6178       goto message_done;
6179     }
6180     ptr = UnknownFieldParse(
6181         tag,
6182         _internal_metadata_.mutable_unknown_fields<std::string>(),
6183         ptr, ctx);
6184     CHK_(ptr != nullptr);
6185   }  // while
6186 message_done:
6187   _impl_._has_bits_.Or(has_bits);
6188   return ptr;
6189 failure:
6190   ptr = nullptr;
6191   goto message_done;
6192 #undef CHK_
6193 }
6194 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const6195 ::uint8_t* SuggestionResponse::_InternalSerialize(
6196     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
6197   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.SuggestionResponse)
6198   ::uint32_t cached_has_bits = 0;
6199   (void) cached_has_bits;
6200 
6201   cached_has_bits = _impl_._has_bits_[0];
6202   // optional .icing.lib.StatusProto status = 1;
6203   if (cached_has_bits & 0x00000001u) {
6204     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
6205       InternalWriteMessage(1, _Internal::status(this),
6206         _Internal::status(this).GetCachedSize(), target, stream);
6207   }
6208 
6209   // repeated .icing.lib.SuggestionResponse.Suggestion suggestions = 2;
6210   for (unsigned i = 0,
6211       n = static_cast<unsigned>(this->_internal_suggestions_size()); i < n; i++) {
6212     const auto& repfield = this->_internal_suggestions(i);
6213     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
6214         InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream);
6215   }
6216 
6217   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
6218     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
6219         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
6220   }
6221   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.SuggestionResponse)
6222   return target;
6223 }
6224 
ByteSizeLong() const6225 size_t SuggestionResponse::ByteSizeLong() const {
6226 // @@protoc_insertion_point(message_byte_size_start:icing.lib.SuggestionResponse)
6227   size_t total_size = 0;
6228 
6229   ::uint32_t cached_has_bits = 0;
6230   // Prevent compiler warnings about cached_has_bits being unused
6231   (void) cached_has_bits;
6232 
6233   // repeated .icing.lib.SuggestionResponse.Suggestion suggestions = 2;
6234   total_size += 1UL * this->_internal_suggestions_size();
6235   for (const auto& msg : this->_impl_.suggestions_) {
6236     total_size +=
6237       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
6238   }
6239 
6240   // optional .icing.lib.StatusProto status = 1;
6241   cached_has_bits = _impl_._has_bits_[0];
6242   if (cached_has_bits & 0x00000001u) {
6243     total_size += 1 +
6244       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
6245         *_impl_.status_);
6246   }
6247 
6248   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
6249     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
6250   }
6251   int cached_size = ::_pbi::ToCachedSize(total_size);
6252   SetCachedSize(cached_size);
6253   return total_size;
6254 }
6255 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)6256 void SuggestionResponse::CheckTypeAndMergeFrom(
6257     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
6258   MergeFrom(*::_pbi::DownCast<const SuggestionResponse*>(
6259       &from));
6260 }
6261 
MergeFrom(const SuggestionResponse & from)6262 void SuggestionResponse::MergeFrom(const SuggestionResponse& from) {
6263   SuggestionResponse* const _this = this;
6264   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.SuggestionResponse)
6265   GOOGLE_DCHECK_NE(&from, _this);
6266   ::uint32_t cached_has_bits = 0;
6267   (void) cached_has_bits;
6268 
6269   _this->_impl_.suggestions_.MergeFrom(from._impl_.suggestions_);
6270   if (from._internal_has_status()) {
6271     _this->_internal_mutable_status()->::icing::lib::StatusProto::MergeFrom(
6272         from._internal_status());
6273   }
6274   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
6275 }
6276 
CopyFrom(const SuggestionResponse & from)6277 void SuggestionResponse::CopyFrom(const SuggestionResponse& from) {
6278 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.SuggestionResponse)
6279   if (&from == this) return;
6280   Clear();
6281   MergeFrom(from);
6282 }
6283 
IsInitialized() const6284 bool SuggestionResponse::IsInitialized() const {
6285   return true;
6286 }
6287 
InternalSwap(SuggestionResponse * other)6288 void SuggestionResponse::InternalSwap(SuggestionResponse* other) {
6289   using std::swap;
6290   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
6291   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
6292   _impl_.suggestions_.InternalSwap(&other->_impl_.suggestions_);
6293   swap(_impl_.status_, other->_impl_.status_);
6294 }
6295 
GetTypeName() const6296 std::string SuggestionResponse::GetTypeName() const {
6297   return "icing.lib.SuggestionResponse";
6298 }
6299 
6300 
6301 // ===================================================================
6302 
6303 class JoinSpecProto_NestedSpecProto::_Internal {
6304  public:
6305   using HasBits = decltype(std::declval<JoinSpecProto_NestedSpecProto>()._impl_._has_bits_);
6306   static const ::icing::lib::SearchSpecProto& search_spec(const JoinSpecProto_NestedSpecProto* msg);
set_has_search_spec(HasBits * has_bits)6307   static void set_has_search_spec(HasBits* has_bits) {
6308     (*has_bits)[0] |= 1u;
6309   }
6310   static const ::icing::lib::ScoringSpecProto& scoring_spec(const JoinSpecProto_NestedSpecProto* msg);
set_has_scoring_spec(HasBits * has_bits)6311   static void set_has_scoring_spec(HasBits* has_bits) {
6312     (*has_bits)[0] |= 2u;
6313   }
6314   static const ::icing::lib::ResultSpecProto& result_spec(const JoinSpecProto_NestedSpecProto* msg);
set_has_result_spec(HasBits * has_bits)6315   static void set_has_result_spec(HasBits* has_bits) {
6316     (*has_bits)[0] |= 4u;
6317   }
6318 };
6319 
6320 const ::icing::lib::SearchSpecProto&
search_spec(const JoinSpecProto_NestedSpecProto * msg)6321 JoinSpecProto_NestedSpecProto::_Internal::search_spec(const JoinSpecProto_NestedSpecProto* msg) {
6322   return *msg->_impl_.search_spec_;
6323 }
6324 const ::icing::lib::ScoringSpecProto&
scoring_spec(const JoinSpecProto_NestedSpecProto * msg)6325 JoinSpecProto_NestedSpecProto::_Internal::scoring_spec(const JoinSpecProto_NestedSpecProto* msg) {
6326   return *msg->_impl_.scoring_spec_;
6327 }
6328 const ::icing::lib::ResultSpecProto&
result_spec(const JoinSpecProto_NestedSpecProto * msg)6329 JoinSpecProto_NestedSpecProto::_Internal::result_spec(const JoinSpecProto_NestedSpecProto* msg) {
6330   return *msg->_impl_.result_spec_;
6331 }
clear_scoring_spec()6332 void JoinSpecProto_NestedSpecProto::clear_scoring_spec() {
6333   if (_impl_.scoring_spec_ != nullptr) _impl_.scoring_spec_->Clear();
6334   _impl_._has_bits_[0] &= ~0x00000002u;
6335 }
JoinSpecProto_NestedSpecProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)6336 JoinSpecProto_NestedSpecProto::JoinSpecProto_NestedSpecProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
6337                          bool is_message_owned)
6338   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
6339   SharedCtor(arena, is_message_owned);
6340   // @@protoc_insertion_point(arena_constructor:icing.lib.JoinSpecProto.NestedSpecProto)
6341 }
JoinSpecProto_NestedSpecProto(const JoinSpecProto_NestedSpecProto & from)6342 JoinSpecProto_NestedSpecProto::JoinSpecProto_NestedSpecProto(const JoinSpecProto_NestedSpecProto& from)
6343   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
6344   JoinSpecProto_NestedSpecProto* const _this = this; (void)_this;
6345   new (&_impl_) Impl_{
6346       decltype(_impl_._has_bits_){from._impl_._has_bits_}
6347     , /*decltype(_impl_._cached_size_)*/{}
6348     , decltype(_impl_.search_spec_){nullptr}
6349     , decltype(_impl_.scoring_spec_){nullptr}
6350     , decltype(_impl_.result_spec_){nullptr}};
6351 
6352   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
6353   if (from._internal_has_search_spec()) {
6354     _this->_impl_.search_spec_ = new ::icing::lib::SearchSpecProto(*from._impl_.search_spec_);
6355   }
6356   if (from._internal_has_scoring_spec()) {
6357     _this->_impl_.scoring_spec_ = new ::icing::lib::ScoringSpecProto(*from._impl_.scoring_spec_);
6358   }
6359   if (from._internal_has_result_spec()) {
6360     _this->_impl_.result_spec_ = new ::icing::lib::ResultSpecProto(*from._impl_.result_spec_);
6361   }
6362   // @@protoc_insertion_point(copy_constructor:icing.lib.JoinSpecProto.NestedSpecProto)
6363 }
6364 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)6365 inline void JoinSpecProto_NestedSpecProto::SharedCtor(
6366     ::_pb::Arena* arena, bool is_message_owned) {
6367   (void)arena;
6368   (void)is_message_owned;
6369   new (&_impl_) Impl_{
6370       decltype(_impl_._has_bits_){}
6371     , /*decltype(_impl_._cached_size_)*/{}
6372     , decltype(_impl_.search_spec_){nullptr}
6373     , decltype(_impl_.scoring_spec_){nullptr}
6374     , decltype(_impl_.result_spec_){nullptr}
6375   };
6376 }
6377 
~JoinSpecProto_NestedSpecProto()6378 JoinSpecProto_NestedSpecProto::~JoinSpecProto_NestedSpecProto() {
6379   // @@protoc_insertion_point(destructor:icing.lib.JoinSpecProto.NestedSpecProto)
6380   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
6381   (void)arena;
6382     return;
6383   }
6384   SharedDtor();
6385 }
6386 
SharedDtor()6387 inline void JoinSpecProto_NestedSpecProto::SharedDtor() {
6388   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
6389   if (this != internal_default_instance()) delete _impl_.search_spec_;
6390   if (this != internal_default_instance()) delete _impl_.scoring_spec_;
6391   if (this != internal_default_instance()) delete _impl_.result_spec_;
6392 }
6393 
SetCachedSize(int size) const6394 void JoinSpecProto_NestedSpecProto::SetCachedSize(int size) const {
6395   _impl_._cached_size_.Set(size);
6396 }
6397 
Clear()6398 void JoinSpecProto_NestedSpecProto::Clear() {
6399 // @@protoc_insertion_point(message_clear_start:icing.lib.JoinSpecProto.NestedSpecProto)
6400   ::uint32_t cached_has_bits = 0;
6401   // Prevent compiler warnings about cached_has_bits being unused
6402   (void) cached_has_bits;
6403 
6404   cached_has_bits = _impl_._has_bits_[0];
6405   if (cached_has_bits & 0x00000007u) {
6406     if (cached_has_bits & 0x00000001u) {
6407       GOOGLE_DCHECK(_impl_.search_spec_ != nullptr);
6408       _impl_.search_spec_->Clear();
6409     }
6410     if (cached_has_bits & 0x00000002u) {
6411       GOOGLE_DCHECK(_impl_.scoring_spec_ != nullptr);
6412       _impl_.scoring_spec_->Clear();
6413     }
6414     if (cached_has_bits & 0x00000004u) {
6415       GOOGLE_DCHECK(_impl_.result_spec_ != nullptr);
6416       _impl_.result_spec_->Clear();
6417     }
6418   }
6419   _impl_._has_bits_.Clear();
6420   _internal_metadata_.Clear<std::string>();
6421 }
6422 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)6423 const char* JoinSpecProto_NestedSpecProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
6424 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
6425   _Internal::HasBits has_bits{};
6426   while (!ctx->Done(&ptr)) {
6427     ::uint32_t tag;
6428     ptr = ::_pbi::ReadTag(ptr, &tag);
6429     switch (tag >> 3) {
6430       // optional .icing.lib.SearchSpecProto search_spec = 1;
6431       case 1:
6432         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
6433           ptr = ctx->ParseMessage(_internal_mutable_search_spec(), ptr);
6434           CHK_(ptr);
6435         } else {
6436           goto handle_unusual;
6437         }
6438         continue;
6439       // optional .icing.lib.ScoringSpecProto scoring_spec = 2;
6440       case 2:
6441         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
6442           ptr = ctx->ParseMessage(_internal_mutable_scoring_spec(), ptr);
6443           CHK_(ptr);
6444         } else {
6445           goto handle_unusual;
6446         }
6447         continue;
6448       // optional .icing.lib.ResultSpecProto result_spec = 3;
6449       case 3:
6450         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
6451           ptr = ctx->ParseMessage(_internal_mutable_result_spec(), ptr);
6452           CHK_(ptr);
6453         } else {
6454           goto handle_unusual;
6455         }
6456         continue;
6457       default:
6458         goto handle_unusual;
6459     }  // switch
6460   handle_unusual:
6461     if ((tag == 0) || ((tag & 7) == 4)) {
6462       CHK_(ptr);
6463       ctx->SetLastTag(tag);
6464       goto message_done;
6465     }
6466     ptr = UnknownFieldParse(
6467         tag,
6468         _internal_metadata_.mutable_unknown_fields<std::string>(),
6469         ptr, ctx);
6470     CHK_(ptr != nullptr);
6471   }  // while
6472 message_done:
6473   _impl_._has_bits_.Or(has_bits);
6474   return ptr;
6475 failure:
6476   ptr = nullptr;
6477   goto message_done;
6478 #undef CHK_
6479 }
6480 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const6481 ::uint8_t* JoinSpecProto_NestedSpecProto::_InternalSerialize(
6482     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
6483   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.JoinSpecProto.NestedSpecProto)
6484   ::uint32_t cached_has_bits = 0;
6485   (void) cached_has_bits;
6486 
6487   cached_has_bits = _impl_._has_bits_[0];
6488   // optional .icing.lib.SearchSpecProto search_spec = 1;
6489   if (cached_has_bits & 0x00000001u) {
6490     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
6491       InternalWriteMessage(1, _Internal::search_spec(this),
6492         _Internal::search_spec(this).GetCachedSize(), target, stream);
6493   }
6494 
6495   // optional .icing.lib.ScoringSpecProto scoring_spec = 2;
6496   if (cached_has_bits & 0x00000002u) {
6497     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
6498       InternalWriteMessage(2, _Internal::scoring_spec(this),
6499         _Internal::scoring_spec(this).GetCachedSize(), target, stream);
6500   }
6501 
6502   // optional .icing.lib.ResultSpecProto result_spec = 3;
6503   if (cached_has_bits & 0x00000004u) {
6504     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
6505       InternalWriteMessage(3, _Internal::result_spec(this),
6506         _Internal::result_spec(this).GetCachedSize(), target, stream);
6507   }
6508 
6509   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
6510     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
6511         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
6512   }
6513   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.JoinSpecProto.NestedSpecProto)
6514   return target;
6515 }
6516 
ByteSizeLong() const6517 size_t JoinSpecProto_NestedSpecProto::ByteSizeLong() const {
6518 // @@protoc_insertion_point(message_byte_size_start:icing.lib.JoinSpecProto.NestedSpecProto)
6519   size_t total_size = 0;
6520 
6521   ::uint32_t cached_has_bits = 0;
6522   // Prevent compiler warnings about cached_has_bits being unused
6523   (void) cached_has_bits;
6524 
6525   cached_has_bits = _impl_._has_bits_[0];
6526   if (cached_has_bits & 0x00000007u) {
6527     // optional .icing.lib.SearchSpecProto search_spec = 1;
6528     if (cached_has_bits & 0x00000001u) {
6529       total_size += 1 +
6530         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
6531           *_impl_.search_spec_);
6532     }
6533 
6534     // optional .icing.lib.ScoringSpecProto scoring_spec = 2;
6535     if (cached_has_bits & 0x00000002u) {
6536       total_size += 1 +
6537         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
6538           *_impl_.scoring_spec_);
6539     }
6540 
6541     // optional .icing.lib.ResultSpecProto result_spec = 3;
6542     if (cached_has_bits & 0x00000004u) {
6543       total_size += 1 +
6544         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
6545           *_impl_.result_spec_);
6546     }
6547 
6548   }
6549   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
6550     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
6551   }
6552   int cached_size = ::_pbi::ToCachedSize(total_size);
6553   SetCachedSize(cached_size);
6554   return total_size;
6555 }
6556 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)6557 void JoinSpecProto_NestedSpecProto::CheckTypeAndMergeFrom(
6558     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
6559   MergeFrom(*::_pbi::DownCast<const JoinSpecProto_NestedSpecProto*>(
6560       &from));
6561 }
6562 
MergeFrom(const JoinSpecProto_NestedSpecProto & from)6563 void JoinSpecProto_NestedSpecProto::MergeFrom(const JoinSpecProto_NestedSpecProto& from) {
6564   JoinSpecProto_NestedSpecProto* const _this = this;
6565   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.JoinSpecProto.NestedSpecProto)
6566   GOOGLE_DCHECK_NE(&from, _this);
6567   ::uint32_t cached_has_bits = 0;
6568   (void) cached_has_bits;
6569 
6570   cached_has_bits = from._impl_._has_bits_[0];
6571   if (cached_has_bits & 0x00000007u) {
6572     if (cached_has_bits & 0x00000001u) {
6573       _this->_internal_mutable_search_spec()->::icing::lib::SearchSpecProto::MergeFrom(
6574           from._internal_search_spec());
6575     }
6576     if (cached_has_bits & 0x00000002u) {
6577       _this->_internal_mutable_scoring_spec()->::icing::lib::ScoringSpecProto::MergeFrom(
6578           from._internal_scoring_spec());
6579     }
6580     if (cached_has_bits & 0x00000004u) {
6581       _this->_internal_mutable_result_spec()->::icing::lib::ResultSpecProto::MergeFrom(
6582           from._internal_result_spec());
6583     }
6584   }
6585   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
6586 }
6587 
CopyFrom(const JoinSpecProto_NestedSpecProto & from)6588 void JoinSpecProto_NestedSpecProto::CopyFrom(const JoinSpecProto_NestedSpecProto& from) {
6589 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.JoinSpecProto.NestedSpecProto)
6590   if (&from == this) return;
6591   Clear();
6592   MergeFrom(from);
6593 }
6594 
IsInitialized() const6595 bool JoinSpecProto_NestedSpecProto::IsInitialized() const {
6596   return true;
6597 }
6598 
InternalSwap(JoinSpecProto_NestedSpecProto * other)6599 void JoinSpecProto_NestedSpecProto::InternalSwap(JoinSpecProto_NestedSpecProto* other) {
6600   using std::swap;
6601   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
6602   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
6603   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
6604       PROTOBUF_FIELD_OFFSET(JoinSpecProto_NestedSpecProto, _impl_.result_spec_)
6605       + sizeof(JoinSpecProto_NestedSpecProto::_impl_.result_spec_)  // NOLINT
6606       - PROTOBUF_FIELD_OFFSET(JoinSpecProto_NestedSpecProto, _impl_.search_spec_)>(
6607           reinterpret_cast<char*>(&_impl_.search_spec_),
6608           reinterpret_cast<char*>(&other->_impl_.search_spec_));
6609 }
6610 
GetTypeName() const6611 std::string JoinSpecProto_NestedSpecProto::GetTypeName() const {
6612   return "icing.lib.JoinSpecProto.NestedSpecProto";
6613 }
6614 
6615 
6616 // ===================================================================
6617 
6618 class JoinSpecProto_AggregationScoringStrategy::_Internal {
6619  public:
6620 };
6621 
JoinSpecProto_AggregationScoringStrategy(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)6622 JoinSpecProto_AggregationScoringStrategy::JoinSpecProto_AggregationScoringStrategy(::PROTOBUF_NAMESPACE_ID::Arena* arena,
6623                          bool is_message_owned)
6624   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
6625   SharedCtor(arena, is_message_owned);
6626   // @@protoc_insertion_point(arena_constructor:icing.lib.JoinSpecProto.AggregationScoringStrategy)
6627 }
JoinSpecProto_AggregationScoringStrategy(const JoinSpecProto_AggregationScoringStrategy & from)6628 JoinSpecProto_AggregationScoringStrategy::JoinSpecProto_AggregationScoringStrategy(const JoinSpecProto_AggregationScoringStrategy& from)
6629   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
6630   JoinSpecProto_AggregationScoringStrategy* const _this = this; (void)_this;
6631   new (&_impl_) Impl_{
6632       /*decltype(_impl_._cached_size_)*/{}};
6633 
6634   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
6635   // @@protoc_insertion_point(copy_constructor:icing.lib.JoinSpecProto.AggregationScoringStrategy)
6636 }
6637 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)6638 inline void JoinSpecProto_AggregationScoringStrategy::SharedCtor(
6639     ::_pb::Arena* arena, bool is_message_owned) {
6640   (void)arena;
6641   (void)is_message_owned;
6642   new (&_impl_) Impl_{
6643       /*decltype(_impl_._cached_size_)*/{}
6644   };
6645 }
6646 
~JoinSpecProto_AggregationScoringStrategy()6647 JoinSpecProto_AggregationScoringStrategy::~JoinSpecProto_AggregationScoringStrategy() {
6648   // @@protoc_insertion_point(destructor:icing.lib.JoinSpecProto.AggregationScoringStrategy)
6649   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
6650   (void)arena;
6651     return;
6652   }
6653   SharedDtor();
6654 }
6655 
SharedDtor()6656 inline void JoinSpecProto_AggregationScoringStrategy::SharedDtor() {
6657   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
6658 }
6659 
SetCachedSize(int size) const6660 void JoinSpecProto_AggregationScoringStrategy::SetCachedSize(int size) const {
6661   _impl_._cached_size_.Set(size);
6662 }
6663 
Clear()6664 void JoinSpecProto_AggregationScoringStrategy::Clear() {
6665 // @@protoc_insertion_point(message_clear_start:icing.lib.JoinSpecProto.AggregationScoringStrategy)
6666   ::uint32_t cached_has_bits = 0;
6667   // Prevent compiler warnings about cached_has_bits being unused
6668   (void) cached_has_bits;
6669 
6670   _internal_metadata_.Clear<std::string>();
6671 }
6672 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)6673 const char* JoinSpecProto_AggregationScoringStrategy::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
6674 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
6675   while (!ctx->Done(&ptr)) {
6676     ::uint32_t tag;
6677     ptr = ::_pbi::ReadTag(ptr, &tag);
6678     if ((tag == 0) || ((tag & 7) == 4)) {
6679       CHK_(ptr);
6680       ctx->SetLastTag(tag);
6681       goto message_done;
6682     }
6683     ptr = UnknownFieldParse(
6684         tag,
6685         _internal_metadata_.mutable_unknown_fields<std::string>(),
6686         ptr, ctx);
6687     CHK_(ptr != nullptr);
6688   }  // while
6689 message_done:
6690   return ptr;
6691 failure:
6692   ptr = nullptr;
6693   goto message_done;
6694 #undef CHK_
6695 }
6696 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const6697 ::uint8_t* JoinSpecProto_AggregationScoringStrategy::_InternalSerialize(
6698     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
6699   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.JoinSpecProto.AggregationScoringStrategy)
6700   ::uint32_t cached_has_bits = 0;
6701   (void) cached_has_bits;
6702 
6703   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
6704     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
6705         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
6706   }
6707   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.JoinSpecProto.AggregationScoringStrategy)
6708   return target;
6709 }
6710 
ByteSizeLong() const6711 size_t JoinSpecProto_AggregationScoringStrategy::ByteSizeLong() const {
6712 // @@protoc_insertion_point(message_byte_size_start:icing.lib.JoinSpecProto.AggregationScoringStrategy)
6713   size_t total_size = 0;
6714 
6715   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
6716     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
6717   }
6718   int cached_size = ::_pbi::ToCachedSize(total_size);
6719   SetCachedSize(cached_size);
6720   return total_size;
6721 }
6722 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)6723 void JoinSpecProto_AggregationScoringStrategy::CheckTypeAndMergeFrom(
6724     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
6725   MergeFrom(*::_pbi::DownCast<const JoinSpecProto_AggregationScoringStrategy*>(
6726       &from));
6727 }
6728 
MergeFrom(const JoinSpecProto_AggregationScoringStrategy & from)6729 void JoinSpecProto_AggregationScoringStrategy::MergeFrom(const JoinSpecProto_AggregationScoringStrategy& from) {
6730   JoinSpecProto_AggregationScoringStrategy* const _this = this;
6731   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.JoinSpecProto.AggregationScoringStrategy)
6732   GOOGLE_DCHECK_NE(&from, _this);
6733   ::uint32_t cached_has_bits = 0;
6734   (void) cached_has_bits;
6735 
6736   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
6737 }
6738 
CopyFrom(const JoinSpecProto_AggregationScoringStrategy & from)6739 void JoinSpecProto_AggregationScoringStrategy::CopyFrom(const JoinSpecProto_AggregationScoringStrategy& from) {
6740 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.JoinSpecProto.AggregationScoringStrategy)
6741   if (&from == this) return;
6742   Clear();
6743   MergeFrom(from);
6744 }
6745 
IsInitialized() const6746 bool JoinSpecProto_AggregationScoringStrategy::IsInitialized() const {
6747   return true;
6748 }
6749 
InternalSwap(JoinSpecProto_AggregationScoringStrategy * other)6750 void JoinSpecProto_AggregationScoringStrategy::InternalSwap(JoinSpecProto_AggregationScoringStrategy* other) {
6751   using std::swap;
6752   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
6753 }
6754 
GetTypeName() const6755 std::string JoinSpecProto_AggregationScoringStrategy::GetTypeName() const {
6756   return "icing.lib.JoinSpecProto.AggregationScoringStrategy";
6757 }
6758 
6759 
6760 // ===================================================================
6761 
6762 class JoinSpecProto::_Internal {
6763  public:
6764   using HasBits = decltype(std::declval<JoinSpecProto>()._impl_._has_bits_);
6765   static const ::icing::lib::JoinSpecProto_NestedSpecProto& nested_spec(const JoinSpecProto* msg);
set_has_nested_spec(HasBits * has_bits)6766   static void set_has_nested_spec(HasBits* has_bits) {
6767     (*has_bits)[0] |= 4u;
6768   }
set_has_parent_property_expression(HasBits * has_bits)6769   static void set_has_parent_property_expression(HasBits* has_bits) {
6770     (*has_bits)[0] |= 1u;
6771   }
set_has_child_property_expression(HasBits * has_bits)6772   static void set_has_child_property_expression(HasBits* has_bits) {
6773     (*has_bits)[0] |= 2u;
6774   }
set_has_max_joined_child_count(HasBits * has_bits)6775   static void set_has_max_joined_child_count(HasBits* has_bits) {
6776     (*has_bits)[0] |= 8u;
6777   }
set_has_aggregation_scoring_strategy(HasBits * has_bits)6778   static void set_has_aggregation_scoring_strategy(HasBits* has_bits) {
6779     (*has_bits)[0] |= 16u;
6780   }
6781 };
6782 
6783 const ::icing::lib::JoinSpecProto_NestedSpecProto&
nested_spec(const JoinSpecProto * msg)6784 JoinSpecProto::_Internal::nested_spec(const JoinSpecProto* msg) {
6785   return *msg->_impl_.nested_spec_;
6786 }
JoinSpecProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)6787 JoinSpecProto::JoinSpecProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
6788                          bool is_message_owned)
6789   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
6790   SharedCtor(arena, is_message_owned);
6791   // @@protoc_insertion_point(arena_constructor:icing.lib.JoinSpecProto)
6792 }
JoinSpecProto(const JoinSpecProto & from)6793 JoinSpecProto::JoinSpecProto(const JoinSpecProto& from)
6794   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
6795   JoinSpecProto* const _this = this; (void)_this;
6796   new (&_impl_) Impl_{
6797       decltype(_impl_._has_bits_){from._impl_._has_bits_}
6798     , /*decltype(_impl_._cached_size_)*/{}
6799     , decltype(_impl_.parent_property_expression_){}
6800     , decltype(_impl_.child_property_expression_){}
6801     , decltype(_impl_.nested_spec_){nullptr}
6802     , decltype(_impl_.max_joined_child_count_){}
6803     , decltype(_impl_.aggregation_scoring_strategy_){}};
6804 
6805   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
6806   _impl_.parent_property_expression_.InitDefault();
6807   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
6808     _impl_.parent_property_expression_.Set("", GetArenaForAllocation());
6809   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
6810   if (from._internal_has_parent_property_expression()) {
6811     _this->_impl_.parent_property_expression_.Set(from._internal_parent_property_expression(),
6812       _this->GetArenaForAllocation());
6813   }
6814   _impl_.child_property_expression_.InitDefault();
6815   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
6816     _impl_.child_property_expression_.Set("", GetArenaForAllocation());
6817   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
6818   if (from._internal_has_child_property_expression()) {
6819     _this->_impl_.child_property_expression_.Set(from._internal_child_property_expression(),
6820       _this->GetArenaForAllocation());
6821   }
6822   if (from._internal_has_nested_spec()) {
6823     _this->_impl_.nested_spec_ = new ::icing::lib::JoinSpecProto_NestedSpecProto(*from._impl_.nested_spec_);
6824   }
6825   ::memcpy(&_impl_.max_joined_child_count_, &from._impl_.max_joined_child_count_,
6826     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.aggregation_scoring_strategy_) -
6827     reinterpret_cast<char*>(&_impl_.max_joined_child_count_)) + sizeof(_impl_.aggregation_scoring_strategy_));
6828   // @@protoc_insertion_point(copy_constructor:icing.lib.JoinSpecProto)
6829 }
6830 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)6831 inline void JoinSpecProto::SharedCtor(
6832     ::_pb::Arena* arena, bool is_message_owned) {
6833   (void)arena;
6834   (void)is_message_owned;
6835   new (&_impl_) Impl_{
6836       decltype(_impl_._has_bits_){}
6837     , /*decltype(_impl_._cached_size_)*/{}
6838     , decltype(_impl_.parent_property_expression_){}
6839     , decltype(_impl_.child_property_expression_){}
6840     , decltype(_impl_.nested_spec_){nullptr}
6841     , decltype(_impl_.max_joined_child_count_){0}
6842     , decltype(_impl_.aggregation_scoring_strategy_){0}
6843   };
6844   _impl_.parent_property_expression_.InitDefault();
6845   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
6846     _impl_.parent_property_expression_.Set("", GetArenaForAllocation());
6847   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
6848   _impl_.child_property_expression_.InitDefault();
6849   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
6850     _impl_.child_property_expression_.Set("", GetArenaForAllocation());
6851   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
6852 }
6853 
~JoinSpecProto()6854 JoinSpecProto::~JoinSpecProto() {
6855   // @@protoc_insertion_point(destructor:icing.lib.JoinSpecProto)
6856   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
6857   (void)arena;
6858     return;
6859   }
6860   SharedDtor();
6861 }
6862 
SharedDtor()6863 inline void JoinSpecProto::SharedDtor() {
6864   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
6865   _impl_.parent_property_expression_.Destroy();
6866   _impl_.child_property_expression_.Destroy();
6867   if (this != internal_default_instance()) delete _impl_.nested_spec_;
6868 }
6869 
SetCachedSize(int size) const6870 void JoinSpecProto::SetCachedSize(int size) const {
6871   _impl_._cached_size_.Set(size);
6872 }
6873 
Clear()6874 void JoinSpecProto::Clear() {
6875 // @@protoc_insertion_point(message_clear_start:icing.lib.JoinSpecProto)
6876   ::uint32_t cached_has_bits = 0;
6877   // Prevent compiler warnings about cached_has_bits being unused
6878   (void) cached_has_bits;
6879 
6880   cached_has_bits = _impl_._has_bits_[0];
6881   if (cached_has_bits & 0x00000007u) {
6882     if (cached_has_bits & 0x00000001u) {
6883       _impl_.parent_property_expression_.ClearNonDefaultToEmpty();
6884     }
6885     if (cached_has_bits & 0x00000002u) {
6886       _impl_.child_property_expression_.ClearNonDefaultToEmpty();
6887     }
6888     if (cached_has_bits & 0x00000004u) {
6889       GOOGLE_DCHECK(_impl_.nested_spec_ != nullptr);
6890       _impl_.nested_spec_->Clear();
6891     }
6892   }
6893   if (cached_has_bits & 0x00000018u) {
6894     ::memset(&_impl_.max_joined_child_count_, 0, static_cast<size_t>(
6895         reinterpret_cast<char*>(&_impl_.aggregation_scoring_strategy_) -
6896         reinterpret_cast<char*>(&_impl_.max_joined_child_count_)) + sizeof(_impl_.aggregation_scoring_strategy_));
6897   }
6898   _impl_._has_bits_.Clear();
6899   _internal_metadata_.Clear<std::string>();
6900 }
6901 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)6902 const char* JoinSpecProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
6903 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
6904   _Internal::HasBits has_bits{};
6905   while (!ctx->Done(&ptr)) {
6906     ::uint32_t tag;
6907     ptr = ::_pbi::ReadTag(ptr, &tag);
6908     switch (tag >> 3) {
6909       // optional .icing.lib.JoinSpecProto.NestedSpecProto nested_spec = 1;
6910       case 1:
6911         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
6912           ptr = ctx->ParseMessage(_internal_mutable_nested_spec(), ptr);
6913           CHK_(ptr);
6914         } else {
6915           goto handle_unusual;
6916         }
6917         continue;
6918       // optional string parent_property_expression = 2;
6919       case 2:
6920         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
6921           auto str = _internal_mutable_parent_property_expression();
6922           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
6923           CHK_(ptr);
6924         } else {
6925           goto handle_unusual;
6926         }
6927         continue;
6928       // optional string child_property_expression = 3;
6929       case 3:
6930         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
6931           auto str = _internal_mutable_child_property_expression();
6932           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
6933           CHK_(ptr);
6934         } else {
6935           goto handle_unusual;
6936         }
6937         continue;
6938       // optional int32 max_joined_child_count = 4 [deprecated = true];
6939       case 4:
6940         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 32)) {
6941           _Internal::set_has_max_joined_child_count(&has_bits);
6942           _impl_.max_joined_child_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
6943           CHK_(ptr);
6944         } else {
6945           goto handle_unusual;
6946         }
6947         continue;
6948       // optional .icing.lib.JoinSpecProto.AggregationScoringStrategy.Code aggregation_scoring_strategy = 5;
6949       case 5:
6950         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 40)) {
6951           ::uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
6952           CHK_(ptr);
6953           if (PROTOBUF_PREDICT_TRUE(::icing::lib::JoinSpecProto_AggregationScoringStrategy_Code_IsValid(val))) {
6954             _internal_set_aggregation_scoring_strategy(static_cast<::icing::lib::JoinSpecProto_AggregationScoringStrategy_Code>(val));
6955           } else {
6956             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields());
6957           }
6958         } else {
6959           goto handle_unusual;
6960         }
6961         continue;
6962       default:
6963         goto handle_unusual;
6964     }  // switch
6965   handle_unusual:
6966     if ((tag == 0) || ((tag & 7) == 4)) {
6967       CHK_(ptr);
6968       ctx->SetLastTag(tag);
6969       goto message_done;
6970     }
6971     ptr = UnknownFieldParse(
6972         tag,
6973         _internal_metadata_.mutable_unknown_fields<std::string>(),
6974         ptr, ctx);
6975     CHK_(ptr != nullptr);
6976   }  // while
6977 message_done:
6978   _impl_._has_bits_.Or(has_bits);
6979   return ptr;
6980 failure:
6981   ptr = nullptr;
6982   goto message_done;
6983 #undef CHK_
6984 }
6985 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const6986 ::uint8_t* JoinSpecProto::_InternalSerialize(
6987     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
6988   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.JoinSpecProto)
6989   ::uint32_t cached_has_bits = 0;
6990   (void) cached_has_bits;
6991 
6992   cached_has_bits = _impl_._has_bits_[0];
6993   // optional .icing.lib.JoinSpecProto.NestedSpecProto nested_spec = 1;
6994   if (cached_has_bits & 0x00000004u) {
6995     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
6996       InternalWriteMessage(1, _Internal::nested_spec(this),
6997         _Internal::nested_spec(this).GetCachedSize(), target, stream);
6998   }
6999 
7000   // optional string parent_property_expression = 2;
7001   if (cached_has_bits & 0x00000001u) {
7002     target = stream->WriteStringMaybeAliased(
7003         2, this->_internal_parent_property_expression(), target);
7004   }
7005 
7006   // optional string child_property_expression = 3;
7007   if (cached_has_bits & 0x00000002u) {
7008     target = stream->WriteStringMaybeAliased(
7009         3, this->_internal_child_property_expression(), target);
7010   }
7011 
7012   // optional int32 max_joined_child_count = 4 [deprecated = true];
7013   if (cached_has_bits & 0x00000008u) {
7014     target = stream->EnsureSpace(target);
7015     target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_max_joined_child_count(), target);
7016   }
7017 
7018   // optional .icing.lib.JoinSpecProto.AggregationScoringStrategy.Code aggregation_scoring_strategy = 5;
7019   if (cached_has_bits & 0x00000010u) {
7020     target = stream->EnsureSpace(target);
7021     target = ::_pbi::WireFormatLite::WriteEnumToArray(
7022       5, this->_internal_aggregation_scoring_strategy(), target);
7023   }
7024 
7025   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
7026     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
7027         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
7028   }
7029   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.JoinSpecProto)
7030   return target;
7031 }
7032 
ByteSizeLong() const7033 size_t JoinSpecProto::ByteSizeLong() const {
7034 // @@protoc_insertion_point(message_byte_size_start:icing.lib.JoinSpecProto)
7035   size_t total_size = 0;
7036 
7037   ::uint32_t cached_has_bits = 0;
7038   // Prevent compiler warnings about cached_has_bits being unused
7039   (void) cached_has_bits;
7040 
7041   cached_has_bits = _impl_._has_bits_[0];
7042   if (cached_has_bits & 0x0000001fu) {
7043     // optional string parent_property_expression = 2;
7044     if (cached_has_bits & 0x00000001u) {
7045       total_size += 1 +
7046         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
7047           this->_internal_parent_property_expression());
7048     }
7049 
7050     // optional string child_property_expression = 3;
7051     if (cached_has_bits & 0x00000002u) {
7052       total_size += 1 +
7053         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
7054           this->_internal_child_property_expression());
7055     }
7056 
7057     // optional .icing.lib.JoinSpecProto.NestedSpecProto nested_spec = 1;
7058     if (cached_has_bits & 0x00000004u) {
7059       total_size += 1 +
7060         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
7061           *_impl_.nested_spec_);
7062     }
7063 
7064     // optional int32 max_joined_child_count = 4 [deprecated = true];
7065     if (cached_has_bits & 0x00000008u) {
7066       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_joined_child_count());
7067     }
7068 
7069     // optional .icing.lib.JoinSpecProto.AggregationScoringStrategy.Code aggregation_scoring_strategy = 5;
7070     if (cached_has_bits & 0x00000010u) {
7071       total_size += 1 +
7072         ::_pbi::WireFormatLite::EnumSize(this->_internal_aggregation_scoring_strategy());
7073     }
7074 
7075   }
7076   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
7077     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
7078   }
7079   int cached_size = ::_pbi::ToCachedSize(total_size);
7080   SetCachedSize(cached_size);
7081   return total_size;
7082 }
7083 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)7084 void JoinSpecProto::CheckTypeAndMergeFrom(
7085     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
7086   MergeFrom(*::_pbi::DownCast<const JoinSpecProto*>(
7087       &from));
7088 }
7089 
MergeFrom(const JoinSpecProto & from)7090 void JoinSpecProto::MergeFrom(const JoinSpecProto& from) {
7091   JoinSpecProto* const _this = this;
7092   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.JoinSpecProto)
7093   GOOGLE_DCHECK_NE(&from, _this);
7094   ::uint32_t cached_has_bits = 0;
7095   (void) cached_has_bits;
7096 
7097   cached_has_bits = from._impl_._has_bits_[0];
7098   if (cached_has_bits & 0x0000001fu) {
7099     if (cached_has_bits & 0x00000001u) {
7100       _this->_internal_set_parent_property_expression(from._internal_parent_property_expression());
7101     }
7102     if (cached_has_bits & 0x00000002u) {
7103       _this->_internal_set_child_property_expression(from._internal_child_property_expression());
7104     }
7105     if (cached_has_bits & 0x00000004u) {
7106       _this->_internal_mutable_nested_spec()->::icing::lib::JoinSpecProto_NestedSpecProto::MergeFrom(
7107           from._internal_nested_spec());
7108     }
7109     if (cached_has_bits & 0x00000008u) {
7110       _this->_impl_.max_joined_child_count_ = from._impl_.max_joined_child_count_;
7111     }
7112     if (cached_has_bits & 0x00000010u) {
7113       _this->_impl_.aggregation_scoring_strategy_ = from._impl_.aggregation_scoring_strategy_;
7114     }
7115     _this->_impl_._has_bits_[0] |= cached_has_bits;
7116   }
7117   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
7118 }
7119 
CopyFrom(const JoinSpecProto & from)7120 void JoinSpecProto::CopyFrom(const JoinSpecProto& from) {
7121 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.JoinSpecProto)
7122   if (&from == this) return;
7123   Clear();
7124   MergeFrom(from);
7125 }
7126 
IsInitialized() const7127 bool JoinSpecProto::IsInitialized() const {
7128   return true;
7129 }
7130 
InternalSwap(JoinSpecProto * other)7131 void JoinSpecProto::InternalSwap(JoinSpecProto* other) {
7132   using std::swap;
7133   auto* lhs_arena = GetArenaForAllocation();
7134   auto* rhs_arena = other->GetArenaForAllocation();
7135   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
7136   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
7137   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
7138       &_impl_.parent_property_expression_, lhs_arena,
7139       &other->_impl_.parent_property_expression_, rhs_arena
7140   );
7141   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
7142       &_impl_.child_property_expression_, lhs_arena,
7143       &other->_impl_.child_property_expression_, rhs_arena
7144   );
7145   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
7146       PROTOBUF_FIELD_OFFSET(JoinSpecProto, _impl_.aggregation_scoring_strategy_)
7147       + sizeof(JoinSpecProto::_impl_.aggregation_scoring_strategy_)  // NOLINT
7148       - PROTOBUF_FIELD_OFFSET(JoinSpecProto, _impl_.nested_spec_)>(
7149           reinterpret_cast<char*>(&_impl_.nested_spec_),
7150           reinterpret_cast<char*>(&other->_impl_.nested_spec_));
7151 }
7152 
GetTypeName() const7153 std::string JoinSpecProto::GetTypeName() const {
7154   return "icing.lib.JoinSpecProto";
7155 }
7156 
7157 
7158 // @@protoc_insertion_point(namespace_scope)
7159 }  // namespace lib
7160 }  // namespace icing
7161 PROTOBUF_NAMESPACE_OPEN
7162 template<> PROTOBUF_NOINLINE ::icing::lib::SearchSpecProto_EmbeddingQueryMetricType*
CreateMaybeMessage(Arena * arena)7163 Arena::CreateMaybeMessage< ::icing::lib::SearchSpecProto_EmbeddingQueryMetricType >(Arena* arena) {
7164   return Arena::CreateMessageInternal< ::icing::lib::SearchSpecProto_EmbeddingQueryMetricType >(arena);
7165 }
7166 template<> PROTOBUF_NOINLINE ::icing::lib::SearchSpecProto*
CreateMaybeMessage(Arena * arena)7167 Arena::CreateMaybeMessage< ::icing::lib::SearchSpecProto >(Arena* arena) {
7168   return Arena::CreateMessageInternal< ::icing::lib::SearchSpecProto >(arena);
7169 }
7170 template<> PROTOBUF_NOINLINE ::icing::lib::ResultSpecProto_SnippetSpecProto*
CreateMaybeMessage(Arena * arena)7171 Arena::CreateMaybeMessage< ::icing::lib::ResultSpecProto_SnippetSpecProto >(Arena* arena) {
7172   return Arena::CreateMessageInternal< ::icing::lib::ResultSpecProto_SnippetSpecProto >(arena);
7173 }
7174 template<> PROTOBUF_NOINLINE ::icing::lib::ResultSpecProto_ResultGrouping_Entry*
CreateMaybeMessage(Arena * arena)7175 Arena::CreateMaybeMessage< ::icing::lib::ResultSpecProto_ResultGrouping_Entry >(Arena* arena) {
7176   return Arena::CreateMessageInternal< ::icing::lib::ResultSpecProto_ResultGrouping_Entry >(arena);
7177 }
7178 template<> PROTOBUF_NOINLINE ::icing::lib::ResultSpecProto_ResultGrouping*
CreateMaybeMessage(Arena * arena)7179 Arena::CreateMaybeMessage< ::icing::lib::ResultSpecProto_ResultGrouping >(Arena* arena) {
7180   return Arena::CreateMessageInternal< ::icing::lib::ResultSpecProto_ResultGrouping >(arena);
7181 }
7182 template<> PROTOBUF_NOINLINE ::icing::lib::ResultSpecProto*
CreateMaybeMessage(Arena * arena)7183 Arena::CreateMaybeMessage< ::icing::lib::ResultSpecProto >(Arena* arena) {
7184   return Arena::CreateMessageInternal< ::icing::lib::ResultSpecProto >(arena);
7185 }
7186 template<> PROTOBUF_NOINLINE ::icing::lib::SnippetMatchProto*
CreateMaybeMessage(Arena * arena)7187 Arena::CreateMaybeMessage< ::icing::lib::SnippetMatchProto >(Arena* arena) {
7188   return Arena::CreateMessageInternal< ::icing::lib::SnippetMatchProto >(arena);
7189 }
7190 template<> PROTOBUF_NOINLINE ::icing::lib::SnippetProto_EntryProto*
CreateMaybeMessage(Arena * arena)7191 Arena::CreateMaybeMessage< ::icing::lib::SnippetProto_EntryProto >(Arena* arena) {
7192   return Arena::CreateMessageInternal< ::icing::lib::SnippetProto_EntryProto >(arena);
7193 }
7194 template<> PROTOBUF_NOINLINE ::icing::lib::SnippetProto*
CreateMaybeMessage(Arena * arena)7195 Arena::CreateMaybeMessage< ::icing::lib::SnippetProto >(Arena* arena) {
7196   return Arena::CreateMessageInternal< ::icing::lib::SnippetProto >(arena);
7197 }
7198 template<> PROTOBUF_NOINLINE ::icing::lib::SearchResultProto_ResultProto*
CreateMaybeMessage(Arena * arena)7199 Arena::CreateMaybeMessage< ::icing::lib::SearchResultProto_ResultProto >(Arena* arena) {
7200   return Arena::CreateMessageInternal< ::icing::lib::SearchResultProto_ResultProto >(arena);
7201 }
7202 template<> PROTOBUF_NOINLINE ::icing::lib::SearchResultProto_DebugInfoProto*
CreateMaybeMessage(Arena * arena)7203 Arena::CreateMaybeMessage< ::icing::lib::SearchResultProto_DebugInfoProto >(Arena* arena) {
7204   return Arena::CreateMessageInternal< ::icing::lib::SearchResultProto_DebugInfoProto >(arena);
7205 }
7206 template<> PROTOBUF_NOINLINE ::icing::lib::SearchResultProto*
CreateMaybeMessage(Arena * arena)7207 Arena::CreateMaybeMessage< ::icing::lib::SearchResultProto >(Arena* arena) {
7208   return Arena::CreateMessageInternal< ::icing::lib::SearchResultProto >(arena);
7209 }
7210 template<> PROTOBUF_NOINLINE ::icing::lib::TypePropertyMask*
CreateMaybeMessage(Arena * arena)7211 Arena::CreateMaybeMessage< ::icing::lib::TypePropertyMask >(Arena* arena) {
7212   return Arena::CreateMessageInternal< ::icing::lib::TypePropertyMask >(arena);
7213 }
7214 template<> PROTOBUF_NOINLINE ::icing::lib::GetResultSpecProto*
CreateMaybeMessage(Arena * arena)7215 Arena::CreateMaybeMessage< ::icing::lib::GetResultSpecProto >(Arena* arena) {
7216   return Arena::CreateMessageInternal< ::icing::lib::GetResultSpecProto >(arena);
7217 }
7218 template<> PROTOBUF_NOINLINE ::icing::lib::SuggestionSpecProto*
CreateMaybeMessage(Arena * arena)7219 Arena::CreateMaybeMessage< ::icing::lib::SuggestionSpecProto >(Arena* arena) {
7220   return Arena::CreateMessageInternal< ::icing::lib::SuggestionSpecProto >(arena);
7221 }
7222 template<> PROTOBUF_NOINLINE ::icing::lib::NamespaceDocumentUriGroup*
CreateMaybeMessage(Arena * arena)7223 Arena::CreateMaybeMessage< ::icing::lib::NamespaceDocumentUriGroup >(Arena* arena) {
7224   return Arena::CreateMessageInternal< ::icing::lib::NamespaceDocumentUriGroup >(arena);
7225 }
7226 template<> PROTOBUF_NOINLINE ::icing::lib::SuggestionResponse_Suggestion*
CreateMaybeMessage(Arena * arena)7227 Arena::CreateMaybeMessage< ::icing::lib::SuggestionResponse_Suggestion >(Arena* arena) {
7228   return Arena::CreateMessageInternal< ::icing::lib::SuggestionResponse_Suggestion >(arena);
7229 }
7230 template<> PROTOBUF_NOINLINE ::icing::lib::SuggestionResponse*
CreateMaybeMessage(Arena * arena)7231 Arena::CreateMaybeMessage< ::icing::lib::SuggestionResponse >(Arena* arena) {
7232   return Arena::CreateMessageInternal< ::icing::lib::SuggestionResponse >(arena);
7233 }
7234 template<> PROTOBUF_NOINLINE ::icing::lib::JoinSpecProto_NestedSpecProto*
CreateMaybeMessage(Arena * arena)7235 Arena::CreateMaybeMessage< ::icing::lib::JoinSpecProto_NestedSpecProto >(Arena* arena) {
7236   return Arena::CreateMessageInternal< ::icing::lib::JoinSpecProto_NestedSpecProto >(arena);
7237 }
7238 template<> PROTOBUF_NOINLINE ::icing::lib::JoinSpecProto_AggregationScoringStrategy*
CreateMaybeMessage(Arena * arena)7239 Arena::CreateMaybeMessage< ::icing::lib::JoinSpecProto_AggregationScoringStrategy >(Arena* arena) {
7240   return Arena::CreateMessageInternal< ::icing::lib::JoinSpecProto_AggregationScoringStrategy >(arena);
7241 }
7242 template<> PROTOBUF_NOINLINE ::icing::lib::JoinSpecProto*
CreateMaybeMessage(Arena * arena)7243 Arena::CreateMaybeMessage< ::icing::lib::JoinSpecProto >(Arena* arena) {
7244   return Arena::CreateMessageInternal< ::icing::lib::JoinSpecProto >(arena);
7245 }
7246 PROTOBUF_NAMESPACE_CLOSE
7247 
7248 // @@protoc_insertion_point(global_scope)
7249 #include <google/protobuf/port_undef.inc>
7250