1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: icing/proto/document_wrapper.proto
3 
4 #ifndef GOOGLE_PROTOBUF_INCLUDED_icing_2fproto_2fdocument_5fwrapper_2eproto
5 #define GOOGLE_PROTOBUF_INCLUDED_icing_2fproto_2fdocument_5fwrapper_2eproto
6 
7 #include <cstdint>
8 #include <limits>
9 #include <string>
10 
11 #include <google/protobuf/port_def.inc>
12 #if PROTOBUF_VERSION < 3021000
13 #error This file was generated by a newer version of protoc which is
14 #error incompatible with your Protocol Buffer headers. Please update
15 #error your headers.
16 #endif
17 #if 3021012 < PROTOBUF_MIN_PROTOC_VERSION
18 #error This file was generated by an older version of protoc which is
19 #error incompatible with your Protocol Buffer headers. Please
20 #error regenerate this file with a newer version of protoc.
21 #endif
22 
23 #include <google/protobuf/port_undef.inc>
24 #include <google/protobuf/io/coded_stream.h>
25 #include <google/protobuf/arena.h>
26 #include <google/protobuf/arenastring.h>
27 #include <google/protobuf/generated_message_util.h>
28 #include <google/protobuf/metadata_lite.h>
29 #include <google/protobuf/message_lite.h>
30 #include <google/protobuf/repeated_field.h>  // IWYU pragma: export
31 #include <google/protobuf/extension_set.h>  // IWYU pragma: export
32 #include "icing/proto/document.pb.h"
33 // @@protoc_insertion_point(includes)
34 #include <google/protobuf/port_def.inc>
35 #define PROTOBUF_INTERNAL_EXPORT_icing_2fproto_2fdocument_5fwrapper_2eproto
36 PROTOBUF_NAMESPACE_OPEN
37 namespace internal {
38 class AnyMetadata;
39 }  // namespace internal
40 PROTOBUF_NAMESPACE_CLOSE
41 
42 // Internal implementation detail -- do not use these members.
43 struct TableStruct_icing_2fproto_2fdocument_5fwrapper_2eproto {
44   static const ::uint32_t offsets[];
45 };
46 namespace icing {
47 namespace lib {
48 class DocumentWrapper;
49 struct DocumentWrapperDefaultTypeInternal;
50 extern DocumentWrapperDefaultTypeInternal _DocumentWrapper_default_instance_;
51 }  // namespace lib
52 }  // namespace icing
53 PROTOBUF_NAMESPACE_OPEN
54 template<> ::icing::lib::DocumentWrapper* Arena::CreateMaybeMessage<::icing::lib::DocumentWrapper>(Arena*);
55 PROTOBUF_NAMESPACE_CLOSE
56 namespace icing {
57 namespace lib {
58 
59 // ===================================================================
60 
61 class DocumentWrapper final :
62     public ::PROTOBUF_NAMESPACE_ID::MessageLite /* @@protoc_insertion_point(class_definition:icing.lib.DocumentWrapper) */ {
63  public:
DocumentWrapper()64   inline DocumentWrapper() : DocumentWrapper(nullptr) {}
65   ~DocumentWrapper() override;
66   explicit PROTOBUF_CONSTEXPR DocumentWrapper(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
67 
68   DocumentWrapper(const DocumentWrapper& from);
DocumentWrapper(DocumentWrapper && from)69   DocumentWrapper(DocumentWrapper&& from) noexcept
70     : DocumentWrapper() {
71     *this = ::std::move(from);
72   }
73 
74   inline DocumentWrapper& operator=(const DocumentWrapper& from) {
75     if (this == &from) return *this;
76     CopyFrom(from);
77     return *this;
78   }
79   inline DocumentWrapper& operator=(DocumentWrapper&& from) noexcept {
80     if (this == &from) return *this;
81     if (GetOwningArena() == from.GetOwningArena()
82   #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
83         && GetOwningArena() != nullptr
84   #endif  // !PROTOBUF_FORCE_COPY_IN_MOVE
85     ) {
86       InternalSwap(&from);
87     } else {
88       CopyFrom(from);
89     }
90     return *this;
91   }
92 
unknown_fields()93   inline const std::string& unknown_fields() const {
94     return _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString);
95   }
mutable_unknown_fields()96   inline std::string* mutable_unknown_fields() {
97     return _internal_metadata_.mutable_unknown_fields<std::string>();
98   }
99 
default_instance()100   static const DocumentWrapper& default_instance() {
101     return *internal_default_instance();
102   }
internal_default_instance()103   static inline const DocumentWrapper* internal_default_instance() {
104     return reinterpret_cast<const DocumentWrapper*>(
105                &_DocumentWrapper_default_instance_);
106   }
107   static constexpr int kIndexInFileMessages =
108     0;
109 
swap(DocumentWrapper & a,DocumentWrapper & b)110   friend void swap(DocumentWrapper& a, DocumentWrapper& b) {
111     a.Swap(&b);
112   }
Swap(DocumentWrapper * other)113   inline void Swap(DocumentWrapper* other) {
114     if (other == this) return;
115   #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
116     if (GetOwningArena() != nullptr &&
117         GetOwningArena() == other->GetOwningArena()) {
118    #else  // PROTOBUF_FORCE_COPY_IN_SWAP
119     if (GetOwningArena() == other->GetOwningArena()) {
120   #endif  // !PROTOBUF_FORCE_COPY_IN_SWAP
121       InternalSwap(other);
122     } else {
123       ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
124     }
125   }
126   void UnsafeArenaSwap(DocumentWrapper* other) {
127     if (other == this) return;
128     GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
129     InternalSwap(other);
130   }
131 
132   // implements Message ----------------------------------------------
133 
134   DocumentWrapper* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
135     return CreateMaybeMessage<DocumentWrapper>(arena);
136   }
137   DocumentWrapper* New() const {
138     return New(nullptr);
139   }
140   void CheckTypeAndMergeFrom(const ::PROTOBUF_NAMESPACE_ID::MessageLite& from)  final;
141   void CopyFrom(const DocumentWrapper& from);
142   void MergeFrom(const DocumentWrapper& from);
143   PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
144   bool IsInitialized() const final;
145 
146   size_t ByteSizeLong() const final;
147   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
148   ::uint8_t* _InternalSerialize(
149       ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
150   int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
151 
152   private:
153   void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
154   void SharedDtor();
155   void SetCachedSize(int size) const;
156   void InternalSwap(DocumentWrapper* other);
157 
158   private:
159   friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
160   static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
161     return "icing.lib.DocumentWrapper";
162   }
163   protected:
164   explicit DocumentWrapper(::PROTOBUF_NAMESPACE_ID::Arena* arena,
165                        bool is_message_owned = false);
166   public:
167 
168   std::string GetTypeName() const final;
169 
170   // nested types ----------------------------------------------------
171 
172   // accessors -------------------------------------------------------
173 
174   enum : int {
175     kDocumentFieldNumber = 1,
176   };
177   // optional .icing.lib.DocumentProto document = 1;
178   bool has_document() const;
179   private:
180   bool _internal_has_document() const;
181   public:
182   void clear_document();
183   const ::icing::lib::DocumentProto& document() const;
184   PROTOBUF_NODISCARD ::icing::lib::DocumentProto* release_document();
185   ::icing::lib::DocumentProto* mutable_document();
186   void set_allocated_document(::icing::lib::DocumentProto* document);
187   private:
188   const ::icing::lib::DocumentProto& _internal_document() const;
189   ::icing::lib::DocumentProto* _internal_mutable_document();
190   public:
191   void unsafe_arena_set_allocated_document(
192       ::icing::lib::DocumentProto* document);
193   ::icing::lib::DocumentProto* unsafe_arena_release_document();
194 
195   // @@protoc_insertion_point(class_scope:icing.lib.DocumentWrapper)
196  private:
197   class _Internal;
198 
199   template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
200   typedef void InternalArenaConstructable_;
201   typedef void DestructorSkippable_;
202   struct Impl_ {
203     ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_;
204     mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
205     ::icing::lib::DocumentProto* document_;
206   };
207   union { Impl_ _impl_; };
208   friend struct ::TableStruct_icing_2fproto_2fdocument_5fwrapper_2eproto;
209 };
210 // ===================================================================
211 
212 
213 // ===================================================================
214 
215 #ifdef __GNUC__
216   #pragma GCC diagnostic push
217   #pragma GCC diagnostic ignored "-Wstrict-aliasing"
218 #endif  // __GNUC__
219 // DocumentWrapper
220 
221 // optional .icing.lib.DocumentProto document = 1;
_internal_has_document()222 inline bool DocumentWrapper::_internal_has_document() const {
223   bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
224   PROTOBUF_ASSUME(!value || _impl_.document_ != nullptr);
225   return value;
226 }
has_document()227 inline bool DocumentWrapper::has_document() const {
228   return _internal_has_document();
229 }
_internal_document()230 inline const ::icing::lib::DocumentProto& DocumentWrapper::_internal_document() const {
231   const ::icing::lib::DocumentProto* p = _impl_.document_;
232   return p != nullptr ? *p : reinterpret_cast<const ::icing::lib::DocumentProto&>(
233       ::icing::lib::_DocumentProto_default_instance_);
234 }
document()235 inline const ::icing::lib::DocumentProto& DocumentWrapper::document() const {
236   // @@protoc_insertion_point(field_get:icing.lib.DocumentWrapper.document)
237   return _internal_document();
238 }
unsafe_arena_set_allocated_document(::icing::lib::DocumentProto * document)239 inline void DocumentWrapper::unsafe_arena_set_allocated_document(
240     ::icing::lib::DocumentProto* document) {
241   if (GetArenaForAllocation() == nullptr) {
242     delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.document_);
243   }
244   _impl_.document_ = document;
245   if (document) {
246     _impl_._has_bits_[0] |= 0x00000001u;
247   } else {
248     _impl_._has_bits_[0] &= ~0x00000001u;
249   }
250   // @@protoc_insertion_point(field_unsafe_arena_set_allocated:icing.lib.DocumentWrapper.document)
251 }
release_document()252 inline ::icing::lib::DocumentProto* DocumentWrapper::release_document() {
253   _impl_._has_bits_[0] &= ~0x00000001u;
254   ::icing::lib::DocumentProto* temp = _impl_.document_;
255   _impl_.document_ = nullptr;
256 #ifdef PROTOBUF_FORCE_COPY_IN_RELEASE
257   auto* old =  reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp);
258   temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
259   if (GetArenaForAllocation() == nullptr) { delete old; }
260 #else  // PROTOBUF_FORCE_COPY_IN_RELEASE
261   if (GetArenaForAllocation() != nullptr) {
262     temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp);
263   }
264 #endif  // !PROTOBUF_FORCE_COPY_IN_RELEASE
265   return temp;
266 }
unsafe_arena_release_document()267 inline ::icing::lib::DocumentProto* DocumentWrapper::unsafe_arena_release_document() {
268   // @@protoc_insertion_point(field_release:icing.lib.DocumentWrapper.document)
269   _impl_._has_bits_[0] &= ~0x00000001u;
270   ::icing::lib::DocumentProto* temp = _impl_.document_;
271   _impl_.document_ = nullptr;
272   return temp;
273 }
_internal_mutable_document()274 inline ::icing::lib::DocumentProto* DocumentWrapper::_internal_mutable_document() {
275   _impl_._has_bits_[0] |= 0x00000001u;
276   if (_impl_.document_ == nullptr) {
277     auto* p = CreateMaybeMessage<::icing::lib::DocumentProto>(GetArenaForAllocation());
278     _impl_.document_ = p;
279   }
280   return _impl_.document_;
281 }
mutable_document()282 inline ::icing::lib::DocumentProto* DocumentWrapper::mutable_document() {
283   ::icing::lib::DocumentProto* _msg = _internal_mutable_document();
284   // @@protoc_insertion_point(field_mutable:icing.lib.DocumentWrapper.document)
285   return _msg;
286 }
set_allocated_document(::icing::lib::DocumentProto * document)287 inline void DocumentWrapper::set_allocated_document(::icing::lib::DocumentProto* document) {
288   ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation();
289   if (message_arena == nullptr) {
290     delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(_impl_.document_);
291   }
292   if (document) {
293     ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena =
294         ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(
295                 reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(document));
296     if (message_arena != submessage_arena) {
297       document = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(
298           message_arena, document, submessage_arena);
299     }
300     _impl_._has_bits_[0] |= 0x00000001u;
301   } else {
302     _impl_._has_bits_[0] &= ~0x00000001u;
303   }
304   _impl_.document_ = document;
305   // @@protoc_insertion_point(field_set_allocated:icing.lib.DocumentWrapper.document)
306 }
307 
308 #ifdef __GNUC__
309   #pragma GCC diagnostic pop
310 #endif  // __GNUC__
311 
312 // @@protoc_insertion_point(namespace_scope)
313 
314 }  // namespace lib
315 }  // namespace icing
316 
317 // @@protoc_insertion_point(global_scope)
318 
319 #include <google/protobuf/port_undef.inc>
320 #endif  // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_icing_2fproto_2fdocument_5fwrapper_2eproto
321