• 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 < 3009000
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 3009001 < 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/inlined_string_field.h>
29 #include <google/protobuf/metadata.h>
30 #include <google/protobuf/generated_message_reflection.h>
31 #include <google/protobuf/message.h>
32 #include <google/protobuf/repeated_field.h>  // IWYU pragma: export
33 #include <google/protobuf/extension_set.h>  // IWYU pragma: export
34 #include <google/protobuf/unknown_field_set.h>
35 #include <google/protobuf/any.h>
36 // @@protoc_insertion_point(includes)
37 #include <google/protobuf/port_def.inc>
38 #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto PROTOBUF_EXPORT
39 PROTOBUF_NAMESPACE_OPEN
40 namespace internal {
41 class AnyMetadata;
42 }  // namespace internal
43 PROTOBUF_NAMESPACE_CLOSE
44 
45 // Internal implementation detail -- do not use these members.
46 struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fany_2eproto {
47   static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
48     PROTOBUF_SECTION_VARIABLE(protodesc_cold);
49   static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
50     PROTOBUF_SECTION_VARIABLE(protodesc_cold);
51   static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
52     PROTOBUF_SECTION_VARIABLE(protodesc_cold);
53   static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
54   static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
55   static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
56 };
57 extern PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fany_2eproto;
58 PROTOBUF_NAMESPACE_OPEN
59 class Any;
60 class AnyDefaultTypeInternal;
61 PROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_;
62 PROTOBUF_NAMESPACE_CLOSE
63 PROTOBUF_NAMESPACE_OPEN
64 template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Any* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Any>(Arena*);
65 PROTOBUF_NAMESPACE_CLOSE
66 PROTOBUF_NAMESPACE_OPEN
67 
68 // ===================================================================
69 
70 class PROTOBUF_EXPORT Any :
71     public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ {
72  public:
73   Any();
74   virtual ~Any();
75 
76   Any(const Any& from);
Any(Any && from)77   Any(Any&& from) noexcept
78     : Any() {
79     *this = ::std::move(from);
80   }
81 
82   inline Any& operator=(const Any& from) {
83     CopyFrom(from);
84     return *this;
85   }
86   inline Any& operator=(Any&& from) noexcept {
87     if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
88       if (this != &from) 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 GetMetadataStatic().descriptor;
100   }
GetReflection()101   static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
102     return GetMetadataStatic().reflection;
103   }
104   static const Any& default_instance();
105 
106   static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
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 
116   void PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message);
117   void PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message,
118                 const std::string& type_url_prefix);
119   bool UnpackTo(::PROTOBUF_NAMESPACE_ID::Message* message) const;
120   static bool GetAnyFieldDescriptors(
121       const ::PROTOBUF_NAMESPACE_ID::Message& message,
122       const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** type_url_field,
123       const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** value_field);
Is()124   template<typename T> bool Is() const {
125     return _any_metadata_.Is<T>();
126   }
127   static bool ParseAnyTypeUrl(const string& type_url,
128                               std::string* full_type_name);
swap(Any & a,Any & b)129   friend void swap(Any& a, Any& b) {
130     a.Swap(&b);
131   }
Swap(Any * other)132   inline void Swap(Any* other) {
133     if (other == this) return;
134     InternalSwap(other);
135   }
136 
137   // implements Message ----------------------------------------------
138 
New()139   inline Any* New() const final {
140     return CreateMaybeMessage<Any>(nullptr);
141   }
142 
New(::PROTOBUF_NAMESPACE_ID::Arena * arena)143   Any* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
144     return CreateMaybeMessage<Any>(arena);
145   }
146   void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
147   void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
148   void CopyFrom(const Any& from);
149   void MergeFrom(const Any& from);
150   PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
151   bool IsInitialized() const final;
152 
153   size_t ByteSizeLong() const final;
154   #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
155   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
156   #else
157   bool MergePartialFromCodedStream(
158       ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
159   #endif  // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
160   void SerializeWithCachedSizes(
161       ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
162   ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
163       ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
GetCachedSize()164   int GetCachedSize() const final { return _cached_size_.Get(); }
165 
166   private:
167   inline void SharedCtor();
168   inline void SharedDtor();
169   void SetCachedSize(int size) const final;
170   void InternalSwap(Any* other);
171   friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
FullMessageName()172   static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
173     return "google.protobuf.Any";
174   }
175   private:
GetArenaNoVirtual()176   inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
177     return nullptr;
178   }
MaybeArenaPtr()179   inline void* MaybeArenaPtr() const {
180     return nullptr;
181   }
182   public:
183 
184   ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
185   private:
GetMetadataStatic()186   static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
187     ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fany_2eproto);
188     return ::descriptor_table_google_2fprotobuf_2fany_2eproto.file_level_metadata[kIndexInFileMessages];
189   }
190 
191   public:
192 
193   // nested types ----------------------------------------------------
194 
195   // accessors -------------------------------------------------------
196 
197   enum : int {
198     kTypeUrlFieldNumber = 1,
199     kValueFieldNumber = 2,
200   };
201   // string type_url = 1;
202   void clear_type_url();
203   const std::string& type_url() const;
204   void set_type_url(const std::string& value);
205   void set_type_url(std::string&& value);
206   void set_type_url(const char* value);
207   void set_type_url(const char* value, size_t size);
208   std::string* mutable_type_url();
209   std::string* release_type_url();
210   void set_allocated_type_url(std::string* type_url);
211 
212   // bytes value = 2;
213   void clear_value();
214   const std::string& value() const;
215   void set_value(const std::string& value);
216   void set_value(std::string&& value);
217   void set_value(const char* value);
218   void set_value(const void* value, size_t size);
219   std::string* mutable_value();
220   std::string* release_value();
221   void set_allocated_value(std::string* value);
222 
223   // @@protoc_insertion_point(class_scope:google.protobuf.Any)
224  private:
225   class _Internal;
226 
227   ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
228   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
229   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
230   mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
231   ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata _any_metadata_;
232   friend struct ::TableStruct_google_2fprotobuf_2fany_2eproto;
233 };
234 // ===================================================================
235 
236 
237 // ===================================================================
238 
239 #ifdef __GNUC__
240   #pragma GCC diagnostic push
241   #pragma GCC diagnostic ignored "-Wstrict-aliasing"
242 #endif  // __GNUC__
243 // Any
244 
245 // string type_url = 1;
clear_type_url()246 inline void Any::clear_type_url() {
247   type_url_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
248 }
type_url()249 inline const std::string& Any::type_url() const {
250   // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
251   return type_url_.GetNoArena();
252 }
set_type_url(const std::string & value)253 inline void Any::set_type_url(const std::string& value) {
254 
255   type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
256   // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
257 }
set_type_url(std::string && value)258 inline void Any::set_type_url(std::string&& value) {
259 
260   type_url_.SetNoArena(
261     &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
262   // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url)
263 }
set_type_url(const char * value)264 inline void Any::set_type_url(const char* value) {
265   GOOGLE_DCHECK(value != nullptr);
266 
267   type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
268   // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url)
269 }
set_type_url(const char * value,size_t size)270 inline void Any::set_type_url(const char* value, size_t size) {
271 
272   type_url_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
273       ::std::string(reinterpret_cast<const char*>(value), size));
274   // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url)
275 }
mutable_type_url()276 inline std::string* Any::mutable_type_url() {
277 
278   // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
279   return type_url_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
280 }
release_type_url()281 inline std::string* Any::release_type_url() {
282   // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
283 
284   return type_url_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
285 }
set_allocated_type_url(std::string * type_url)286 inline void Any::set_allocated_type_url(std::string* type_url) {
287   if (type_url != nullptr) {
288 
289   } else {
290 
291   }
292   type_url_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url);
293   // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
294 }
295 
296 // bytes value = 2;
clear_value()297 inline void Any::clear_value() {
298   value_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
299 }
value()300 inline const std::string& Any::value() const {
301   // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
302   return value_.GetNoArena();
303 }
set_value(const std::string & value)304 inline void Any::set_value(const std::string& value) {
305 
306   value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
307   // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
308 }
set_value(std::string && value)309 inline void Any::set_value(std::string&& value) {
310 
311   value_.SetNoArena(
312     &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
313   // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value)
314 }
set_value(const char * value)315 inline void Any::set_value(const char* value) {
316   GOOGLE_DCHECK(value != nullptr);
317 
318   value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
319   // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value)
320 }
set_value(const void * value,size_t size)321 inline void Any::set_value(const void* value, size_t size) {
322 
323   value_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
324       ::std::string(reinterpret_cast<const char*>(value), size));
325   // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value)
326 }
mutable_value()327 inline std::string* Any::mutable_value() {
328 
329   // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
330   return value_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
331 }
release_value()332 inline std::string* Any::release_value() {
333   // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
334 
335   return value_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
336 }
set_allocated_value(std::string * value)337 inline void Any::set_allocated_value(std::string* value) {
338   if (value != nullptr) {
339 
340   } else {
341 
342   }
343   value_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
344   // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
345 }
346 
347 #ifdef __GNUC__
348   #pragma GCC diagnostic pop
349 #endif  // __GNUC__
350 
351 // @@protoc_insertion_point(namespace_scope)
352 
353 PROTOBUF_NAMESPACE_CLOSE
354 
355 // @@protoc_insertion_point(global_scope)
356 
357 #include <google/protobuf/port_undef.inc>
358 #endif  // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
359