1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: google/protobuf/any.proto
3 
4 #ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
5 #define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
6 
7 #include <limits>
8 #include <string>
9 
10 #include <google/protobuf/port_def.inc>
11 #if PROTOBUF_VERSION < 3017000
12 #error This file was generated by a newer version of protoc which is
13 #error incompatible with your Protocol Buffer headers. Please update
14 #error your headers.
15 #endif
16 #if 3017003 < PROTOBUF_MIN_PROTOC_VERSION
17 #error This file was generated by an older version of protoc which is
18 #error incompatible with your Protocol Buffer headers. Please
19 #error regenerate this file with a newer version of protoc.
20 #endif
21 
22 #include <google/protobuf/port_undef.inc>
23 #include <google/protobuf/io/coded_stream.h>
24 #include <google/protobuf/arena.h>
25 #include <google/protobuf/arenastring.h>
26 #include <google/protobuf/generated_message_table_driven.h>
27 #include <google/protobuf/generated_message_util.h>
28 #include <google/protobuf/metadata_lite.h>
29 #include <google/protobuf/generated_message_reflection.h>
30 #include <google/protobuf/message.h>
31 #include <google/protobuf/repeated_field.h>  // IWYU pragma: export
32 #include <google/protobuf/extension_set.h>  // IWYU pragma: export
33 #include <google/protobuf/unknown_field_set.h>
34 // @@protoc_insertion_point(includes)
35 #include <google/protobuf/port_def.inc>
36 #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto PROTOBUF_EXPORT
37 PROTOBUF_NAMESPACE_OPEN
38 namespace internal {
39 class AnyMetadata;
40 }  // namespace internal
41 PROTOBUF_NAMESPACE_CLOSE
42 
43 // Internal implementation detail -- do not use these members.
44 struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fany_2eproto {
45   static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
46     PROTOBUF_SECTION_VARIABLE(protodesc_cold);
47   static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
48     PROTOBUF_SECTION_VARIABLE(protodesc_cold);
49   static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
50     PROTOBUF_SECTION_VARIABLE(protodesc_cold);
51   static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
52   static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
53   static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
54 };
55 PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fany_2eproto;
56 PROTOBUF_NAMESPACE_OPEN
57 class Any;
58 struct AnyDefaultTypeInternal;
59 PROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_;
60 PROTOBUF_NAMESPACE_CLOSE
61 PROTOBUF_NAMESPACE_OPEN
62 template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Any* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Any>(Arena*);
63 PROTOBUF_NAMESPACE_CLOSE
64 PROTOBUF_NAMESPACE_OPEN
65 
66 // ===================================================================
67 
68 class PROTOBUF_EXPORT Any final :
69     public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ {
70  public:
Any()71   inline Any() : Any(nullptr) {}
72   ~Any() override;
73   explicit constexpr Any(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
74 
75   Any(const Any& from);
Any(Any && from)76   Any(Any&& from) noexcept
77     : Any() {
78     *this = ::std::move(from);
79   }
80 
81   inline Any& operator=(const Any& from) {
82     CopyFrom(from);
83     return *this;
84   }
85   inline Any& operator=(Any&& from) noexcept {
86     if (this == &from) return *this;
87     if (GetOwningArena() == from.GetOwningArena()) {
88       InternalSwap(&from);
89     } else {
90       CopyFrom(from);
91     }
92     return *this;
93   }
94 
descriptor()95   static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
96     return GetDescriptor();
97   }
GetDescriptor()98   static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
99     return default_instance().GetMetadata().descriptor;
100   }
GetReflection()101   static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
102     return default_instance().GetMetadata().reflection;
103   }
default_instance()104   static const Any& default_instance() {
105     return *internal_default_instance();
106   }
internal_default_instance()107   static inline const Any* internal_default_instance() {
108     return reinterpret_cast<const Any*>(
109                &_Any_default_instance_);
110   }
111   static constexpr int kIndexInFileMessages =
112     0;
113 
114   // implements Any -----------------------------------------------
115 
PackFrom(const::PROTOBUF_NAMESPACE_ID::Message & message)116   bool PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message) {
117     return _any_metadata_.PackFrom(message);
118   }
PackFrom(const::PROTOBUF_NAMESPACE_ID::Message & message,::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url_prefix)119   bool PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message,
120                 ::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url_prefix) {
121     return _any_metadata_.PackFrom(message, type_url_prefix);
122   }
UnpackTo(::PROTOBUF_NAMESPACE_ID::Message * message)123   bool UnpackTo(::PROTOBUF_NAMESPACE_ID::Message* message) const {
124     return _any_metadata_.UnpackTo(message);
125   }
126   static bool GetAnyFieldDescriptors(
127       const ::PROTOBUF_NAMESPACE_ID::Message& message,
128       const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** type_url_field,
129       const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** value_field);
130   template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
PackFrom(const T & message)131   bool PackFrom(const T& message) {
132     return _any_metadata_.PackFrom<T>(message);
133   }
134   template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
PackFrom(const T & message,::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url_prefix)135   bool PackFrom(const T& message,
136                 ::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url_prefix) {
137     return _any_metadata_.PackFrom<T>(message, type_url_prefix);}
138   template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
UnpackTo(T * message)139   bool UnpackTo(T* message) const {
140     return _any_metadata_.UnpackTo<T>(message);
141   }
Is()142   template<typename T> bool Is() const {
143     return _any_metadata_.Is<T>();
144   }
145   static bool ParseAnyTypeUrl(::PROTOBUF_NAMESPACE_ID::ConstStringParam type_url,
146                               std::string* full_type_name);
swap(Any & a,Any & b)147   friend void swap(Any& a, Any& b) {
148     a.Swap(&b);
149   }
Swap(Any * other)150   inline void Swap(Any* other) {
151     if (other == this) return;
152     if (GetOwningArena() == other->GetOwningArena()) {
153       InternalSwap(other);
154     } else {
155       ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
156     }
157   }
UnsafeArenaSwap(Any * other)158   void UnsafeArenaSwap(Any* other) {
159     if (other == this) return;
160     GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
161     InternalSwap(other);
162   }
163 
164   // implements Message ----------------------------------------------
165 
New()166   inline Any* New() const final {
167     return new Any();
168   }
169 
New(::PROTOBUF_NAMESPACE_ID::Arena * arena)170   Any* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
171     return CreateMaybeMessage<Any>(arena);
172   }
173   using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
174   void CopyFrom(const Any& from);
175   using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
176   void MergeFrom(const Any& from);
177   private:
178   static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message*to, const ::PROTOBUF_NAMESPACE_ID::Message&from);
179   public:
180   PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
181   bool IsInitialized() const final;
182 
183   size_t ByteSizeLong() const final;
184   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
185   ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
186       ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
GetCachedSize()187   int GetCachedSize() const final { return _cached_size_.Get(); }
188 
189   private:
190   void SharedCtor();
191   void SharedDtor();
192   void SetCachedSize(int size) const final;
193   void InternalSwap(Any* other);
194   friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
FullMessageName()195   static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
196     return "google.protobuf.Any";
197   }
198   protected:
199   explicit Any(::PROTOBUF_NAMESPACE_ID::Arena* arena,
200                        bool is_message_owned = false);
201   private:
202   static void ArenaDtor(void* object);
203   inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
204   public:
205 
206   static const ClassData _class_data_;
207   const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
208 
209   ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
210 
211   // nested types ----------------------------------------------------
212 
213   // accessors -------------------------------------------------------
214 
215   enum : int {
216     kTypeUrlFieldNumber = 1,
217     kValueFieldNumber = 2,
218   };
219   // string type_url = 1;
220   void clear_type_url();
221   const std::string& type_url() const;
222   template <typename ArgT0 = const std::string&, typename... ArgT>
223   void set_type_url(ArgT0&& arg0, ArgT... args);
224   std::string* mutable_type_url();
225   PROTOBUF_MUST_USE_RESULT std::string* release_type_url();
226   void set_allocated_type_url(std::string* type_url);
227   private:
228   const std::string& _internal_type_url() const;
229   inline PROTOBUF_ALWAYS_INLINE void _internal_set_type_url(const std::string& value);
230   std::string* _internal_mutable_type_url();
231   public:
232 
233   // bytes value = 2;
234   void clear_value();
235   const std::string& value() const;
236   template <typename ArgT0 = const std::string&, typename... ArgT>
237   void set_value(ArgT0&& arg0, ArgT... args);
238   std::string* mutable_value();
239   PROTOBUF_MUST_USE_RESULT std::string* release_value();
240   void set_allocated_value(std::string* value);
241   private:
242   const std::string& _internal_value() const;
243   inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value);
244   std::string* _internal_mutable_value();
245   public:
246 
247   // @@protoc_insertion_point(class_scope:google.protobuf.Any)
248  private:
249   class _Internal;
250 
251   template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
252   typedef void InternalArenaConstructable_;
253   typedef void DestructorSkippable_;
254   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
255   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
256   mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
257   ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata _any_metadata_;
258   friend struct ::TableStruct_google_2fprotobuf_2fany_2eproto;
259 };
260 // ===================================================================
261 
262 
263 // ===================================================================
264 
265 #ifdef __GNUC__
266   #pragma GCC diagnostic push
267   #pragma GCC diagnostic ignored "-Wstrict-aliasing"
268 #endif  // __GNUC__
269 // Any
270 
271 // string type_url = 1;
clear_type_url()272 inline void Any::clear_type_url() {
273   type_url_.ClearToEmpty();
274 }
type_url()275 inline const std::string& Any::type_url() const {
276   // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
277   return _internal_type_url();
278 }
279 template <typename ArgT0, typename... ArgT>
280 inline PROTOBUF_ALWAYS_INLINE
set_type_url(ArgT0 && arg0,ArgT...args)281 void Any::set_type_url(ArgT0&& arg0, ArgT... args) {
282 
283  type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
284   // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
285 }
mutable_type_url()286 inline std::string* Any::mutable_type_url() {
287   std::string* _s = _internal_mutable_type_url();
288   // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
289   return _s;
290 }
_internal_type_url()291 inline const std::string& Any::_internal_type_url() const {
292   return type_url_.Get();
293 }
_internal_set_type_url(const std::string & value)294 inline void Any::_internal_set_type_url(const std::string& value) {
295 
296   type_url_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
297 }
_internal_mutable_type_url()298 inline std::string* Any::_internal_mutable_type_url() {
299 
300   return type_url_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
301 }
release_type_url()302 inline std::string* Any::release_type_url() {
303   // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
304   return type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
305 }
set_allocated_type_url(std::string * type_url)306 inline void Any::set_allocated_type_url(std::string* type_url) {
307   if (type_url != nullptr) {
308 
309   } else {
310 
311   }
312   type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url,
313       GetArenaForAllocation());
314   // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
315 }
316 
317 // bytes value = 2;
clear_value()318 inline void Any::clear_value() {
319   value_.ClearToEmpty();
320 }
value()321 inline const std::string& Any::value() const {
322   // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
323   return _internal_value();
324 }
325 template <typename ArgT0, typename... ArgT>
326 inline PROTOBUF_ALWAYS_INLINE
set_value(ArgT0 && arg0,ArgT...args)327 void Any::set_value(ArgT0&& arg0, ArgT... args) {
328 
329  value_.SetBytes(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, static_cast<ArgT0 &&>(arg0), args..., GetArenaForAllocation());
330   // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
331 }
mutable_value()332 inline std::string* Any::mutable_value() {
333   std::string* _s = _internal_mutable_value();
334   // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
335   return _s;
336 }
_internal_value()337 inline const std::string& Any::_internal_value() const {
338   return value_.Get();
339 }
_internal_set_value(const std::string & value)340 inline void Any::_internal_set_value(const std::string& value) {
341 
342   value_.Set(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, value, GetArenaForAllocation());
343 }
_internal_mutable_value()344 inline std::string* Any::_internal_mutable_value() {
345 
346   return value_.Mutable(::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::EmptyDefault{}, GetArenaForAllocation());
347 }
release_value()348 inline std::string* Any::release_value() {
349   // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
350   return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaForAllocation());
351 }
set_allocated_value(std::string * value)352 inline void Any::set_allocated_value(std::string* value) {
353   if (value != nullptr) {
354 
355   } else {
356 
357   }
358   value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value,
359       GetArenaForAllocation());
360   // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
361 }
362 
363 #ifdef __GNUC__
364   #pragma GCC diagnostic pop
365 #endif  // __GNUC__
366 
367 // @@protoc_insertion_point(namespace_scope)
368 
369 PROTOBUF_NAMESPACE_CLOSE
370 
371 // @@protoc_insertion_point(global_scope)
372 
373 #include <google/protobuf/port_undef.inc>
374 #endif  // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
375