1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: fcp/client/cache/cache_manifest.proto
3 
4 #include "fcp/client/cache/cache_manifest.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 fcp {
22 namespace client {
23 namespace cache {
CacheManifest_CacheEntry_DoNotUse(::_pbi::ConstantInitialized)24 PROTOBUF_CONSTEXPR CacheManifest_CacheEntry_DoNotUse::CacheManifest_CacheEntry_DoNotUse(
25     ::_pbi::ConstantInitialized) {}
26 struct CacheManifest_CacheEntry_DoNotUseDefaultTypeInternal {
CacheManifest_CacheEntry_DoNotUseDefaultTypeInternalfcp::client::cache::CacheManifest_CacheEntry_DoNotUseDefaultTypeInternal27   PROTOBUF_CONSTEXPR CacheManifest_CacheEntry_DoNotUseDefaultTypeInternal()
28       : _instance(::_pbi::ConstantInitialized{}) {}
~CacheManifest_CacheEntry_DoNotUseDefaultTypeInternalfcp::client::cache::CacheManifest_CacheEntry_DoNotUseDefaultTypeInternal29   ~CacheManifest_CacheEntry_DoNotUseDefaultTypeInternal() {}
30   union {  // NOLINT(misc-non-private-member-variables-in-classes)
31     CacheManifest_CacheEntry_DoNotUse _instance;
32   };
33 };
34 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CacheManifest_CacheEntry_DoNotUseDefaultTypeInternal _CacheManifest_CacheEntry_DoNotUse_default_instance_;
CacheManifest(::_pbi::ConstantInitialized)35 PROTOBUF_CONSTEXPR CacheManifest::CacheManifest(
36     ::_pbi::ConstantInitialized): _impl_{
37     /*decltype(_impl_.cache_)*/{}
38   , /*decltype(_impl_._cached_size_)*/{}} {}
39 struct CacheManifestDefaultTypeInternal {
CacheManifestDefaultTypeInternalfcp::client::cache::CacheManifestDefaultTypeInternal40   PROTOBUF_CONSTEXPR CacheManifestDefaultTypeInternal()
41       : _instance(::_pbi::ConstantInitialized{}) {}
~CacheManifestDefaultTypeInternalfcp::client::cache::CacheManifestDefaultTypeInternal42   ~CacheManifestDefaultTypeInternal() {}
43   union {  // NOLINT(misc-non-private-member-variables-in-classes)
44     CacheManifest _instance;
45   };
46 };
47 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CacheManifestDefaultTypeInternal _CacheManifest_default_instance_;
CachedResource(::_pbi::ConstantInitialized)48 PROTOBUF_CONSTEXPR CachedResource::CachedResource(
49     ::_pbi::ConstantInitialized): _impl_{
50     /*decltype(_impl_.file_name_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
51   , /*decltype(_impl_.metadata_)*/nullptr
52   , /*decltype(_impl_.expiry_time_)*/nullptr
53   , /*decltype(_impl_.last_accessed_time_)*/nullptr
54   , /*decltype(_impl_._cached_size_)*/{}} {}
55 struct CachedResourceDefaultTypeInternal {
CachedResourceDefaultTypeInternalfcp::client::cache::CachedResourceDefaultTypeInternal56   PROTOBUF_CONSTEXPR CachedResourceDefaultTypeInternal()
57       : _instance(::_pbi::ConstantInitialized{}) {}
~CachedResourceDefaultTypeInternalfcp::client::cache::CachedResourceDefaultTypeInternal58   ~CachedResourceDefaultTypeInternal() {}
59   union {  // NOLINT(misc-non-private-member-variables-in-classes)
60     CachedResource _instance;
61   };
62 };
63 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CachedResourceDefaultTypeInternal _CachedResource_default_instance_;
64 }  // namespace cache
65 }  // namespace client
66 }  // namespace fcp
67 namespace fcp {
68 namespace client {
69 namespace cache {
70 
71 // ===================================================================
72 
CacheManifest_CacheEntry_DoNotUse()73 CacheManifest_CacheEntry_DoNotUse::CacheManifest_CacheEntry_DoNotUse() {}
CacheManifest_CacheEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena * arena)74 CacheManifest_CacheEntry_DoNotUse::CacheManifest_CacheEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
75     : SuperType(arena) {}
MergeFrom(const CacheManifest_CacheEntry_DoNotUse & other)76 void CacheManifest_CacheEntry_DoNotUse::MergeFrom(const CacheManifest_CacheEntry_DoNotUse& other) {
77   MergeFromInternal(other);
78 }
79 
80 // ===================================================================
81 
82 class CacheManifest::_Internal {
83  public:
84 };
85 
CacheManifest(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)86 CacheManifest::CacheManifest(::PROTOBUF_NAMESPACE_ID::Arena* arena,
87                          bool is_message_owned)
88   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
89   SharedCtor(arena, is_message_owned);
90   // @@protoc_insertion_point(arena_constructor:fcp.client.cache.CacheManifest)
91 }
CacheManifest(const CacheManifest & from)92 CacheManifest::CacheManifest(const CacheManifest& from)
93   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
94   CacheManifest* const _this = this; (void)_this;
95   new (&_impl_) Impl_{
96       /*decltype(_impl_.cache_)*/{}
97     , /*decltype(_impl_._cached_size_)*/{}};
98 
99   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
100   _this->_impl_.cache_.MergeFrom(from._impl_.cache_);
101   // @@protoc_insertion_point(copy_constructor:fcp.client.cache.CacheManifest)
102 }
103 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)104 inline void CacheManifest::SharedCtor(
105     ::_pb::Arena* arena, bool is_message_owned) {
106   (void)arena;
107   (void)is_message_owned;
108   new (&_impl_) Impl_{
109       /*decltype(_impl_.cache_)*/{::_pbi::ArenaInitialized(), arena}
110     , /*decltype(_impl_._cached_size_)*/{}
111   };
112 }
113 
~CacheManifest()114 CacheManifest::~CacheManifest() {
115   // @@protoc_insertion_point(destructor:fcp.client.cache.CacheManifest)
116   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
117   (void)arena;
118     return;
119   }
120   SharedDtor();
121 }
122 
SharedDtor()123 inline void CacheManifest::SharedDtor() {
124   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
125   _impl_.cache_.Destruct();
126   _impl_.cache_.~MapFieldLite();
127 }
128 
SetCachedSize(int size) const129 void CacheManifest::SetCachedSize(int size) const {
130   _impl_._cached_size_.Set(size);
131 }
132 
Clear()133 void CacheManifest::Clear() {
134 // @@protoc_insertion_point(message_clear_start:fcp.client.cache.CacheManifest)
135   ::uint32_t cached_has_bits = 0;
136   // Prevent compiler warnings about cached_has_bits being unused
137   (void) cached_has_bits;
138 
139   _impl_.cache_.Clear();
140   _internal_metadata_.Clear<std::string>();
141 }
142 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)143 const char* CacheManifest::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
144 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
145   while (!ctx->Done(&ptr)) {
146     ::uint32_t tag;
147     ptr = ::_pbi::ReadTag(ptr, &tag);
148     switch (tag >> 3) {
149       // map<string, .fcp.client.cache.CachedResource> cache = 1;
150       case 1:
151         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
152           ptr -= 1;
153           do {
154             ptr += 1;
155             ptr = ctx->ParseMessage(&_impl_.cache_, ptr);
156             CHK_(ptr);
157             if (!ctx->DataAvailable(ptr)) break;
158           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr));
159         } else {
160           goto handle_unusual;
161         }
162         continue;
163       default:
164         goto handle_unusual;
165     }  // switch
166   handle_unusual:
167     if ((tag == 0) || ((tag & 7) == 4)) {
168       CHK_(ptr);
169       ctx->SetLastTag(tag);
170       goto message_done;
171     }
172     ptr = UnknownFieldParse(
173         tag,
174         _internal_metadata_.mutable_unknown_fields<std::string>(),
175         ptr, ctx);
176     CHK_(ptr != nullptr);
177   }  // while
178 message_done:
179   return ptr;
180 failure:
181   ptr = nullptr;
182   goto message_done;
183 #undef CHK_
184 }
185 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const186 ::uint8_t* CacheManifest::_InternalSerialize(
187     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
188   // @@protoc_insertion_point(serialize_to_array_start:fcp.client.cache.CacheManifest)
189   ::uint32_t cached_has_bits = 0;
190   (void) cached_has_bits;
191 
192   // map<string, .fcp.client.cache.CachedResource> cache = 1;
193   if (!this->_internal_cache().empty()) {
194     using MapType = ::_pb::Map<std::string, ::fcp::client::cache::CachedResource>;
195     using WireHelper = CacheManifest_CacheEntry_DoNotUse::Funcs;
196     const auto& map_field = this->_internal_cache();
197     auto check_utf8 = [](const MapType::value_type& entry) {
198       (void)entry;
199       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
200         entry.first.data(), static_cast<int>(entry.first.length()),
201         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
202         "fcp.client.cache.CacheManifest.CacheEntry.key");
203     };
204 
205     if (stream->IsSerializationDeterministic() && map_field.size() > 1) {
206       for (const auto& entry : ::_pbi::MapSorterPtr<MapType>(map_field)) {
207         target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream);
208         check_utf8(entry);
209       }
210     } else {
211       for (const auto& entry : map_field) {
212         target = WireHelper::InternalSerialize(1, entry.first, entry.second, target, stream);
213         check_utf8(entry);
214       }
215     }
216   }
217 
218   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
219     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
220         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
221   }
222   // @@protoc_insertion_point(serialize_to_array_end:fcp.client.cache.CacheManifest)
223   return target;
224 }
225 
ByteSizeLong() const226 size_t CacheManifest::ByteSizeLong() const {
227 // @@protoc_insertion_point(message_byte_size_start:fcp.client.cache.CacheManifest)
228   size_t total_size = 0;
229 
230   ::uint32_t cached_has_bits = 0;
231   // Prevent compiler warnings about cached_has_bits being unused
232   (void) cached_has_bits;
233 
234   // map<string, .fcp.client.cache.CachedResource> cache = 1;
235   total_size += 1 *
236       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_cache_size());
237   for (::PROTOBUF_NAMESPACE_ID::Map< std::string, ::fcp::client::cache::CachedResource >::const_iterator
238       it = this->_internal_cache().begin();
239       it != this->_internal_cache().end(); ++it) {
240     total_size += CacheManifest_CacheEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
241   }
242 
243   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
244     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
245   }
246   int cached_size = ::_pbi::ToCachedSize(total_size);
247   SetCachedSize(cached_size);
248   return total_size;
249 }
250 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)251 void CacheManifest::CheckTypeAndMergeFrom(
252     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
253   MergeFrom(*::_pbi::DownCast<const CacheManifest*>(
254       &from));
255 }
256 
MergeFrom(const CacheManifest & from)257 void CacheManifest::MergeFrom(const CacheManifest& from) {
258   CacheManifest* const _this = this;
259   // @@protoc_insertion_point(class_specific_merge_from_start:fcp.client.cache.CacheManifest)
260   GOOGLE_DCHECK_NE(&from, _this);
261   ::uint32_t cached_has_bits = 0;
262   (void) cached_has_bits;
263 
264   _this->_impl_.cache_.MergeFrom(from._impl_.cache_);
265   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
266 }
267 
CopyFrom(const CacheManifest & from)268 void CacheManifest::CopyFrom(const CacheManifest& from) {
269 // @@protoc_insertion_point(class_specific_copy_from_start:fcp.client.cache.CacheManifest)
270   if (&from == this) return;
271   Clear();
272   MergeFrom(from);
273 }
274 
IsInitialized() const275 bool CacheManifest::IsInitialized() const {
276   return true;
277 }
278 
InternalSwap(CacheManifest * other)279 void CacheManifest::InternalSwap(CacheManifest* other) {
280   using std::swap;
281   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
282   _impl_.cache_.InternalSwap(&other->_impl_.cache_);
283 }
284 
GetTypeName() const285 std::string CacheManifest::GetTypeName() const {
286   return "fcp.client.cache.CacheManifest";
287 }
288 
289 
290 // ===================================================================
291 
292 class CachedResource::_Internal {
293  public:
294   static const ::PROTOBUF_NAMESPACE_ID::Any& metadata(const CachedResource* msg);
295   static const ::PROTOBUF_NAMESPACE_ID::Timestamp& expiry_time(const CachedResource* msg);
296   static const ::PROTOBUF_NAMESPACE_ID::Timestamp& last_accessed_time(const CachedResource* msg);
297 };
298 
299 const ::PROTOBUF_NAMESPACE_ID::Any&
metadata(const CachedResource * msg)300 CachedResource::_Internal::metadata(const CachedResource* msg) {
301   return *msg->_impl_.metadata_;
302 }
303 const ::PROTOBUF_NAMESPACE_ID::Timestamp&
expiry_time(const CachedResource * msg)304 CachedResource::_Internal::expiry_time(const CachedResource* msg) {
305   return *msg->_impl_.expiry_time_;
306 }
307 const ::PROTOBUF_NAMESPACE_ID::Timestamp&
last_accessed_time(const CachedResource * msg)308 CachedResource::_Internal::last_accessed_time(const CachedResource* msg) {
309   return *msg->_impl_.last_accessed_time_;
310 }
clear_metadata()311 void CachedResource::clear_metadata() {
312   if (GetArenaForAllocation() == nullptr && _impl_.metadata_ != nullptr) {
313     delete _impl_.metadata_;
314   }
315   _impl_.metadata_ = nullptr;
316 }
clear_expiry_time()317 void CachedResource::clear_expiry_time() {
318   if (GetArenaForAllocation() == nullptr && _impl_.expiry_time_ != nullptr) {
319     delete _impl_.expiry_time_;
320   }
321   _impl_.expiry_time_ = nullptr;
322 }
clear_last_accessed_time()323 void CachedResource::clear_last_accessed_time() {
324   if (GetArenaForAllocation() == nullptr && _impl_.last_accessed_time_ != nullptr) {
325     delete _impl_.last_accessed_time_;
326   }
327   _impl_.last_accessed_time_ = nullptr;
328 }
CachedResource(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)329 CachedResource::CachedResource(::PROTOBUF_NAMESPACE_ID::Arena* arena,
330                          bool is_message_owned)
331   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
332   SharedCtor(arena, is_message_owned);
333   // @@protoc_insertion_point(arena_constructor:fcp.client.cache.CachedResource)
334 }
CachedResource(const CachedResource & from)335 CachedResource::CachedResource(const CachedResource& from)
336   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
337   CachedResource* const _this = this; (void)_this;
338   new (&_impl_) Impl_{
339       decltype(_impl_.file_name_){}
340     , decltype(_impl_.metadata_){nullptr}
341     , decltype(_impl_.expiry_time_){nullptr}
342     , decltype(_impl_.last_accessed_time_){nullptr}
343     , /*decltype(_impl_._cached_size_)*/{}};
344 
345   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
346   _impl_.file_name_.InitDefault();
347   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
348     _impl_.file_name_.Set("", GetArenaForAllocation());
349   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
350   if (!from._internal_file_name().empty()) {
351     _this->_impl_.file_name_.Set(from._internal_file_name(),
352       _this->GetArenaForAllocation());
353   }
354   if (from._internal_has_metadata()) {
355     _this->_impl_.metadata_ = new ::PROTOBUF_NAMESPACE_ID::Any(*from._impl_.metadata_);
356   }
357   if (from._internal_has_expiry_time()) {
358     _this->_impl_.expiry_time_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.expiry_time_);
359   }
360   if (from._internal_has_last_accessed_time()) {
361     _this->_impl_.last_accessed_time_ = new ::PROTOBUF_NAMESPACE_ID::Timestamp(*from._impl_.last_accessed_time_);
362   }
363   // @@protoc_insertion_point(copy_constructor:fcp.client.cache.CachedResource)
364 }
365 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)366 inline void CachedResource::SharedCtor(
367     ::_pb::Arena* arena, bool is_message_owned) {
368   (void)arena;
369   (void)is_message_owned;
370   new (&_impl_) Impl_{
371       decltype(_impl_.file_name_){}
372     , decltype(_impl_.metadata_){nullptr}
373     , decltype(_impl_.expiry_time_){nullptr}
374     , decltype(_impl_.last_accessed_time_){nullptr}
375     , /*decltype(_impl_._cached_size_)*/{}
376   };
377   _impl_.file_name_.InitDefault();
378   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
379     _impl_.file_name_.Set("", GetArenaForAllocation());
380   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
381 }
382 
~CachedResource()383 CachedResource::~CachedResource() {
384   // @@protoc_insertion_point(destructor:fcp.client.cache.CachedResource)
385   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
386   (void)arena;
387     return;
388   }
389   SharedDtor();
390 }
391 
SharedDtor()392 inline void CachedResource::SharedDtor() {
393   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
394   _impl_.file_name_.Destroy();
395   if (this != internal_default_instance()) delete _impl_.metadata_;
396   if (this != internal_default_instance()) delete _impl_.expiry_time_;
397   if (this != internal_default_instance()) delete _impl_.last_accessed_time_;
398 }
399 
SetCachedSize(int size) const400 void CachedResource::SetCachedSize(int size) const {
401   _impl_._cached_size_.Set(size);
402 }
403 
Clear()404 void CachedResource::Clear() {
405 // @@protoc_insertion_point(message_clear_start:fcp.client.cache.CachedResource)
406   ::uint32_t cached_has_bits = 0;
407   // Prevent compiler warnings about cached_has_bits being unused
408   (void) cached_has_bits;
409 
410   _impl_.file_name_.ClearToEmpty();
411   if (GetArenaForAllocation() == nullptr && _impl_.metadata_ != nullptr) {
412     delete _impl_.metadata_;
413   }
414   _impl_.metadata_ = nullptr;
415   if (GetArenaForAllocation() == nullptr && _impl_.expiry_time_ != nullptr) {
416     delete _impl_.expiry_time_;
417   }
418   _impl_.expiry_time_ = nullptr;
419   if (GetArenaForAllocation() == nullptr && _impl_.last_accessed_time_ != nullptr) {
420     delete _impl_.last_accessed_time_;
421   }
422   _impl_.last_accessed_time_ = nullptr;
423   _internal_metadata_.Clear<std::string>();
424 }
425 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)426 const char* CachedResource::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
427 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
428   while (!ctx->Done(&ptr)) {
429     ::uint32_t tag;
430     ptr = ::_pbi::ReadTag(ptr, &tag);
431     switch (tag >> 3) {
432       // string file_name = 1;
433       case 1:
434         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 10)) {
435           auto str = _internal_mutable_file_name();
436           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
437           CHK_(ptr);
438           CHK_(::_pbi::VerifyUTF8(str, nullptr));
439         } else {
440           goto handle_unusual;
441         }
442         continue;
443       // .google.protobuf.Any metadata = 2;
444       case 2:
445         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 18)) {
446           ptr = ctx->ParseMessage(_internal_mutable_metadata(), ptr);
447           CHK_(ptr);
448         } else {
449           goto handle_unusual;
450         }
451         continue;
452       // .google.protobuf.Timestamp expiry_time = 3;
453       case 3:
454         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 26)) {
455           ptr = ctx->ParseMessage(_internal_mutable_expiry_time(), ptr);
456           CHK_(ptr);
457         } else {
458           goto handle_unusual;
459         }
460         continue;
461       // .google.protobuf.Timestamp last_accessed_time = 4;
462       case 4:
463         if (PROTOBUF_PREDICT_TRUE(static_cast<::uint8_t>(tag) == 34)) {
464           ptr = ctx->ParseMessage(_internal_mutable_last_accessed_time(), ptr);
465           CHK_(ptr);
466         } else {
467           goto handle_unusual;
468         }
469         continue;
470       default:
471         goto handle_unusual;
472     }  // switch
473   handle_unusual:
474     if ((tag == 0) || ((tag & 7) == 4)) {
475       CHK_(ptr);
476       ctx->SetLastTag(tag);
477       goto message_done;
478     }
479     ptr = UnknownFieldParse(
480         tag,
481         _internal_metadata_.mutable_unknown_fields<std::string>(),
482         ptr, ctx);
483     CHK_(ptr != nullptr);
484   }  // while
485 message_done:
486   return ptr;
487 failure:
488   ptr = nullptr;
489   goto message_done;
490 #undef CHK_
491 }
492 
_InternalSerialize(::uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const493 ::uint8_t* CachedResource::_InternalSerialize(
494     ::uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
495   // @@protoc_insertion_point(serialize_to_array_start:fcp.client.cache.CachedResource)
496   ::uint32_t cached_has_bits = 0;
497   (void) cached_has_bits;
498 
499   // string file_name = 1;
500   if (!this->_internal_file_name().empty()) {
501     ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
502       this->_internal_file_name().data(), static_cast<int>(this->_internal_file_name().length()),
503       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
504       "fcp.client.cache.CachedResource.file_name");
505     target = stream->WriteStringMaybeAliased(
506         1, this->_internal_file_name(), target);
507   }
508 
509   // .google.protobuf.Any metadata = 2;
510   if (this->_internal_has_metadata()) {
511     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
512       InternalWriteMessage(2, _Internal::metadata(this),
513         _Internal::metadata(this).GetCachedSize(), target, stream);
514   }
515 
516   // .google.protobuf.Timestamp expiry_time = 3;
517   if (this->_internal_has_expiry_time()) {
518     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
519       InternalWriteMessage(3, _Internal::expiry_time(this),
520         _Internal::expiry_time(this).GetCachedSize(), target, stream);
521   }
522 
523   // .google.protobuf.Timestamp last_accessed_time = 4;
524   if (this->_internal_has_last_accessed_time()) {
525     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
526       InternalWriteMessage(4, _Internal::last_accessed_time(this),
527         _Internal::last_accessed_time(this).GetCachedSize(), target, stream);
528   }
529 
530   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
531     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
532         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
533   }
534   // @@protoc_insertion_point(serialize_to_array_end:fcp.client.cache.CachedResource)
535   return target;
536 }
537 
ByteSizeLong() const538 size_t CachedResource::ByteSizeLong() const {
539 // @@protoc_insertion_point(message_byte_size_start:fcp.client.cache.CachedResource)
540   size_t total_size = 0;
541 
542   ::uint32_t cached_has_bits = 0;
543   // Prevent compiler warnings about cached_has_bits being unused
544   (void) cached_has_bits;
545 
546   // string file_name = 1;
547   if (!this->_internal_file_name().empty()) {
548     total_size += 1 +
549       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
550         this->_internal_file_name());
551   }
552 
553   // .google.protobuf.Any metadata = 2;
554   if (this->_internal_has_metadata()) {
555     total_size += 1 +
556       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
557         *_impl_.metadata_);
558   }
559 
560   // .google.protobuf.Timestamp expiry_time = 3;
561   if (this->_internal_has_expiry_time()) {
562     total_size += 1 +
563       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
564         *_impl_.expiry_time_);
565   }
566 
567   // .google.protobuf.Timestamp last_accessed_time = 4;
568   if (this->_internal_has_last_accessed_time()) {
569     total_size += 1 +
570       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
571         *_impl_.last_accessed_time_);
572   }
573 
574   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
575     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
576   }
577   int cached_size = ::_pbi::ToCachedSize(total_size);
578   SetCachedSize(cached_size);
579   return total_size;
580 }
581 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)582 void CachedResource::CheckTypeAndMergeFrom(
583     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
584   MergeFrom(*::_pbi::DownCast<const CachedResource*>(
585       &from));
586 }
587 
MergeFrom(const CachedResource & from)588 void CachedResource::MergeFrom(const CachedResource& from) {
589   CachedResource* const _this = this;
590   // @@protoc_insertion_point(class_specific_merge_from_start:fcp.client.cache.CachedResource)
591   GOOGLE_DCHECK_NE(&from, _this);
592   ::uint32_t cached_has_bits = 0;
593   (void) cached_has_bits;
594 
595   if (!from._internal_file_name().empty()) {
596     _this->_internal_set_file_name(from._internal_file_name());
597   }
598   if (from._internal_has_metadata()) {
599     _this->_internal_mutable_metadata()->::PROTOBUF_NAMESPACE_ID::Any::MergeFrom(
600         from._internal_metadata());
601   }
602   if (from._internal_has_expiry_time()) {
603     _this->_internal_mutable_expiry_time()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
604         from._internal_expiry_time());
605   }
606   if (from._internal_has_last_accessed_time()) {
607     _this->_internal_mutable_last_accessed_time()->::PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(
608         from._internal_last_accessed_time());
609   }
610   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
611 }
612 
CopyFrom(const CachedResource & from)613 void CachedResource::CopyFrom(const CachedResource& from) {
614 // @@protoc_insertion_point(class_specific_copy_from_start:fcp.client.cache.CachedResource)
615   if (&from == this) return;
616   Clear();
617   MergeFrom(from);
618 }
619 
IsInitialized() const620 bool CachedResource::IsInitialized() const {
621   return true;
622 }
623 
InternalSwap(CachedResource * other)624 void CachedResource::InternalSwap(CachedResource* other) {
625   using std::swap;
626   auto* lhs_arena = GetArenaForAllocation();
627   auto* rhs_arena = other->GetArenaForAllocation();
628   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
629   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
630       &_impl_.file_name_, lhs_arena,
631       &other->_impl_.file_name_, rhs_arena
632   );
633   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
634       PROTOBUF_FIELD_OFFSET(CachedResource, _impl_.last_accessed_time_)
635       + sizeof(CachedResource::_impl_.last_accessed_time_)  // NOLINT
636       - PROTOBUF_FIELD_OFFSET(CachedResource, _impl_.metadata_)>(
637           reinterpret_cast<char*>(&_impl_.metadata_),
638           reinterpret_cast<char*>(&other->_impl_.metadata_));
639 }
640 
GetTypeName() const641 std::string CachedResource::GetTypeName() const {
642   return "fcp.client.cache.CachedResource";
643 }
644 
645 
646 // @@protoc_insertion_point(namespace_scope)
647 }  // namespace cache
648 }  // namespace client
649 }  // namespace fcp
650 PROTOBUF_NAMESPACE_OPEN
651 template<> PROTOBUF_NOINLINE ::fcp::client::cache::CacheManifest_CacheEntry_DoNotUse*
CreateMaybeMessage(Arena * arena)652 Arena::CreateMaybeMessage< ::fcp::client::cache::CacheManifest_CacheEntry_DoNotUse >(Arena* arena) {
653   return Arena::CreateMessageInternal< ::fcp::client::cache::CacheManifest_CacheEntry_DoNotUse >(arena);
654 }
655 template<> PROTOBUF_NOINLINE ::fcp::client::cache::CacheManifest*
CreateMaybeMessage(Arena * arena)656 Arena::CreateMaybeMessage< ::fcp::client::cache::CacheManifest >(Arena* arena) {
657   return Arena::CreateMessageInternal< ::fcp::client::cache::CacheManifest >(arena);
658 }
659 template<> PROTOBUF_NOINLINE ::fcp::client::cache::CachedResource*
CreateMaybeMessage(Arena * arena)660 Arena::CreateMaybeMessage< ::fcp::client::cache::CachedResource >(Arena* arena) {
661   return Arena::CreateMessageInternal< ::fcp::client::cache::CachedResource >(arena);
662 }
663 PROTOBUF_NAMESPACE_CLOSE
664 
665 // @@protoc_insertion_point(global_scope)
666 #include <google/protobuf/port_undef.inc>
667