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