1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: icing/proto/reset.proto
3 
4 #include "icing/proto/reset.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 {
ResetResultProto(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR ResetResultProto::ResetResultProto(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.status_)*/nullptr} {}
28 struct ResetResultProtoDefaultTypeInternal {
ResetResultProtoDefaultTypeInternalicing::lib::ResetResultProtoDefaultTypeInternal29   PROTOBUF_CONSTEXPR ResetResultProtoDefaultTypeInternal()
30       : _instance(::_pbi::ConstantInitialized{}) {}
~ResetResultProtoDefaultTypeInternalicing::lib::ResetResultProtoDefaultTypeInternal31   ~ResetResultProtoDefaultTypeInternal() {}
32   union {  // NOLINT(misc-non-private-member-variables-in-classes)
33     ResetResultProto _instance;
34   };
35 };
36 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResetResultProtoDefaultTypeInternal _ResetResultProto_default_instance_;
37 }  // namespace lib
38 }  // namespace icing
39 namespace icing {
40 namespace lib {
41 
42 // ===================================================================
43 
44 class ResetResultProto::_Internal {
45  public:
46   using HasBits = decltype(std::declval<ResetResultProto>()._impl_._has_bits_);
47   static const ::icing::lib::StatusProto& status(const ResetResultProto* msg);
set_has_status(HasBits * has_bits)48   static void set_has_status(HasBits* has_bits) {
49     (*has_bits)[0] |= 1u;
50   }
51 };
52 
53 const ::icing::lib::StatusProto&
status(const ResetResultProto * msg)54 ResetResultProto::_Internal::status(const ResetResultProto* msg) {
55   return *msg->_impl_.status_;
56 }
clear_status()57 void ResetResultProto::clear_status() {
58   if (_impl_.status_ != nullptr) _impl_.status_->Clear();
59   _impl_._has_bits_[0] &= ~0x00000001u;
60 }
ResetResultProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)61 ResetResultProto::ResetResultProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
62                          bool is_message_owned)
63   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
64   SharedCtor(arena, is_message_owned);
65   // @@protoc_insertion_point(arena_constructor:icing.lib.ResetResultProto)
66 }
ResetResultProto(const ResetResultProto & from)67 ResetResultProto::ResetResultProto(const ResetResultProto& from)
68   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
69   ResetResultProto* const _this = this; (void)_this;
70   new (&_impl_) Impl_{
71       decltype(_impl_._has_bits_){from._impl_._has_bits_}
72     , /*decltype(_impl_._cached_size_)*/{}
73     , decltype(_impl_.status_){nullptr}};
74 
75   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
76   if (from._internal_has_status()) {
77     _this->_impl_.status_ = new ::icing::lib::StatusProto(*from._impl_.status_);
78   }
79   // @@protoc_insertion_point(copy_constructor:icing.lib.ResetResultProto)
80 }
81 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)82 inline void ResetResultProto::SharedCtor(
83     ::_pb::Arena* arena, bool is_message_owned) {
84   (void)arena;
85   (void)is_message_owned;
86   new (&_impl_) Impl_{
87       decltype(_impl_._has_bits_){}
88     , /*decltype(_impl_._cached_size_)*/{}
89     , decltype(_impl_.status_){nullptr}
90   };
91 }
92 
~ResetResultProto()93 ResetResultProto::~ResetResultProto() {
94   // @@protoc_insertion_point(destructor:icing.lib.ResetResultProto)
95   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
96   (void)arena;
97     return;
98   }
99   SharedDtor();
100 }
101 
SharedDtor()102 inline void ResetResultProto::SharedDtor() {
103   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
104   if (this != internal_default_instance()) delete _impl_.status_;
105 }
106 
SetCachedSize(int size) const107 void ResetResultProto::SetCachedSize(int size) const {
108   _impl_._cached_size_.Set(size);
109 }
110 
Clear()111 void ResetResultProto::Clear() {
112 // @@protoc_insertion_point(message_clear_start:icing.lib.ResetResultProto)
113   ::uint32_t cached_has_bits = 0;
114   // Prevent compiler warnings about cached_has_bits being unused
115   (void) cached_has_bits;
116 
117   cached_has_bits = _impl_._has_bits_[0];
118   if (cached_has_bits & 0x00000001u) {
119     GOOGLE_DCHECK(_impl_.status_ != nullptr);
120     _impl_.status_->Clear();
121   }
122   _impl_._has_bits_.Clear();
123   _internal_metadata_.Clear<std::string>();
124 }
125 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)126 const char* ResetResultProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
127 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
128   _Internal::HasBits has_bits{};
129   while (!ctx->Done(&ptr)) {
130     ::uint32_t tag;
131     ptr = ::_pbi::ReadTag(ptr, &tag);
132     switch (tag >> 3) {
133       // optional .icing.lib.StatusProto status = 1;
134       case 1:
135         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
136           ptr = ctx->ParseMessage(_internal_mutable_status(), ptr);
137           CHK_(ptr);
138         } else {
139           goto handle_unusual;
140         }
141         continue;
142       default:
143         goto handle_unusual;
144     }  // switch
145   handle_unusual:
146     if ((tag == 0) || ((tag & 7) == 4)) {
147       CHK_(ptr);
148       ctx->SetLastTag(tag);
149       goto message_done;
150     }
151     ptr = UnknownFieldParse(
152         tag,
153         _internal_metadata_.mutable_unknown_fields<std::string>(),
154         ptr, ctx);
155     CHK_(ptr != nullptr);
156   }  // while
157 message_done:
158   _impl_._has_bits_.Or(has_bits);
159   return ptr;
160 failure:
161   ptr = nullptr;
162   goto message_done;
163 #undef CHK_
164 }
165 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const166 ::uint8_t* ResetResultProto::_InternalSerialize(
167     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
168   // @@protoc_insertion_point(serialize_to_array_start:icing.lib.ResetResultProto)
169   ::uint32_t cached_has_bits = 0;
170   (void) cached_has_bits;
171 
172   cached_has_bits = _impl_._has_bits_[0];
173   // optional .icing.lib.StatusProto status = 1;
174   if (cached_has_bits & 0x00000001u) {
175     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
176       InternalWriteMessage(1, _Internal::status(this),
177         _Internal::status(this).GetCachedSize(), target, stream);
178   }
179 
180   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
181     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
182         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
183   }
184   // @@protoc_insertion_point(serialize_to_array_end:icing.lib.ResetResultProto)
185   return target;
186 }
187 
ByteSizeLong() const188 size_t ResetResultProto::ByteSizeLong() const {
189 // @@protoc_insertion_point(message_byte_size_start:icing.lib.ResetResultProto)
190   size_t total_size = 0;
191 
192   ::uint32_t cached_has_bits = 0;
193   // Prevent compiler warnings about cached_has_bits being unused
194   (void) cached_has_bits;
195 
196   // optional .icing.lib.StatusProto status = 1;
197   cached_has_bits = _impl_._has_bits_[0];
198   if (cached_has_bits & 0x00000001u) {
199     total_size += 1 +
200       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
201         *_impl_.status_);
202   }
203 
204   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
205     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
206   }
207   int cached_size = ::_pbi::ToCachedSize(total_size);
208   SetCachedSize(cached_size);
209   return total_size;
210 }
211 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)212 void ResetResultProto::CheckTypeAndMergeFrom(
213     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
214   MergeFrom(*::_pbi::DownCast<const ResetResultProto*>(
215       &from));
216 }
217 
MergeFrom(const ResetResultProto & from)218 void ResetResultProto::MergeFrom(const ResetResultProto& from) {
219   ResetResultProto* const _this = this;
220   // @@protoc_insertion_point(class_specific_merge_from_start:icing.lib.ResetResultProto)
221   GOOGLE_DCHECK_NE(&from, _this);
222   ::uint32_t cached_has_bits = 0;
223   (void) cached_has_bits;
224 
225   if (from._internal_has_status()) {
226     _this->_internal_mutable_status()->::icing::lib::StatusProto::MergeFrom(
227         from._internal_status());
228   }
229   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
230 }
231 
CopyFrom(const ResetResultProto & from)232 void ResetResultProto::CopyFrom(const ResetResultProto& from) {
233 // @@protoc_insertion_point(class_specific_copy_from_start:icing.lib.ResetResultProto)
234   if (&from == this) return;
235   Clear();
236   MergeFrom(from);
237 }
238 
IsInitialized() const239 bool ResetResultProto::IsInitialized() const {
240   return true;
241 }
242 
InternalSwap(ResetResultProto * other)243 void ResetResultProto::InternalSwap(ResetResultProto* other) {
244   using std::swap;
245   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
246   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
247   swap(_impl_.status_, other->_impl_.status_);
248 }
249 
GetTypeName() const250 std::string ResetResultProto::GetTypeName() const {
251   return "icing.lib.ResetResultProto";
252 }
253 
254 
255 // @@protoc_insertion_point(namespace_scope)
256 }  // namespace lib
257 }  // namespace icing
258 PROTOBUF_NAMESPACE_OPEN
259 template<> PROTOBUF_NOINLINE ::icing::lib::ResetResultProto*
CreateMaybeMessage(Arena * arena)260 Arena::CreateMaybeMessage< ::icing::lib::ResetResultProto >(Arena* arena) {
261   return Arena::CreateMessageInternal< ::icing::lib::ResetResultProto >(arena);
262 }
263 PROTOBUF_NAMESPACE_CLOSE
264 
265 // @@protoc_insertion_point(global_scope)
266 #include <google/protobuf/port_undef.inc>
267