1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: google/protobuf/any.proto
3 
4 #ifndef PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
5 #define PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
6 
7 #include <string>
8 
9 #include <google/protobuf/stubs/common.h>
10 
11 #if GOOGLE_PROTOBUF_VERSION < 3004000
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 3004000 < GOOGLE_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/io/coded_stream.h>
23 #include <google/protobuf/arena.h>
24 #include <google/protobuf/arenastring.h>
25 #include <google/protobuf/generated_message_table_driven.h>
26 #include <google/protobuf/generated_message_util.h>
27 #include <google/protobuf/metadata.h>
28 #include <google/protobuf/message.h>
29 #include <google/protobuf/repeated_field.h>  // IWYU pragma: export
30 #include <google/protobuf/extension_set.h>  // IWYU pragma: export
31 #include <google/protobuf/unknown_field_set.h>
32 #include <google/protobuf/any.h>
33 // @@protoc_insertion_point(includes)
34 namespace google {
35 namespace protobuf {
36 class Any;
37 class AnyDefaultTypeInternal;
38 LIBPROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_;
39 }  // namespace protobuf
40 }  // namespace google
41 
42 namespace google {
43 namespace protobuf {
44 
45 namespace protobuf_google_2fprotobuf_2fany_2eproto {
46 // Internal implementation detail -- do not call these.
47 struct LIBPROTOBUF_EXPORT TableStruct {
48   static const ::google::protobuf::internal::ParseTableField entries[];
49   static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
50   static const ::google::protobuf::internal::ParseTable schema[];
51   static const ::google::protobuf::uint32 offsets[];
52   static const ::google::protobuf::internal::FieldMetadata field_metadata[];
53   static const ::google::protobuf::internal::SerializationTable serialization_table[];
54   static void InitDefaultsImpl();
55 };
56 void LIBPROTOBUF_EXPORT AddDescriptors();
57 void LIBPROTOBUF_EXPORT InitDefaults();
58 }  // namespace protobuf_google_2fprotobuf_2fany_2eproto
59 
60 // ===================================================================
61 
62 class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ {
63  public:
64   Any();
65   virtual ~Any();
66 
67   Any(const Any& from);
68 
69   inline Any& operator=(const Any& from) {
70     CopyFrom(from);
71     return *this;
72   }
73   static const ::google::protobuf::Descriptor* descriptor();
74   static const Any& default_instance();
75 
internal_default_instance()76   static inline const Any* internal_default_instance() {
77     return reinterpret_cast<const Any*>(
78                &_Any_default_instance_);
79   }
80   static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
81     0;
82 
83   // implements Any -----------------------------------------------
84 
85   void PackFrom(const ::google::protobuf::Message& message);
86   void PackFrom(const ::google::protobuf::Message& message,
87                 const ::std::string& type_url_prefix);
88   bool UnpackTo(::google::protobuf::Message* message) const;
Is()89   template<typename T> bool Is() const {
90     return _any_metadata_.Is<T>();
91   }
92 
93   void Swap(Any* other);
swap(Any & a,Any & b)94   friend void swap(Any& a, Any& b) {
95     a.Swap(&b);
96   }
97 
98   // implements Message ----------------------------------------------
99 
New()100   inline Any* New() const PROTOBUF_FINAL { return New(NULL); }
101 
102   Any* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
103   void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
104   void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
105   void CopyFrom(const Any& from);
106   void MergeFrom(const Any& from);
107   void Clear() PROTOBUF_FINAL;
108   bool IsInitialized() const PROTOBUF_FINAL;
109 
110   size_t ByteSizeLong() const PROTOBUF_FINAL;
111   bool MergePartialFromCodedStream(
112       ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
113   void SerializeWithCachedSizes(
114       ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
115   ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
116       bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
GetCachedSize()117   int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
118   private:
119   void SharedCtor();
120   void SharedDtor();
121   void SetCachedSize(int size) const PROTOBUF_FINAL;
122   void InternalSwap(Any* other);
123   private:
GetArenaNoVirtual()124   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
125     return NULL;
126   }
MaybeArenaPtr()127   inline void* MaybeArenaPtr() const {
128     return NULL;
129   }
130   public:
131 
132   ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
133 
134   // nested types ----------------------------------------------------
135 
136   // accessors -------------------------------------------------------
137 
138   // string type_url = 1;
139   void clear_type_url();
140   static const int kTypeUrlFieldNumber = 1;
141   const ::std::string& type_url() const;
142   void set_type_url(const ::std::string& value);
143   #if LANG_CXX11
144   void set_type_url(::std::string&& value);
145   #endif
146   void set_type_url(const char* value);
147   void set_type_url(const char* value, size_t size);
148   ::std::string* mutable_type_url();
149   ::std::string* release_type_url();
150   void set_allocated_type_url(::std::string* type_url);
151 
152   // bytes value = 2;
153   void clear_value();
154   static const int kValueFieldNumber = 2;
155   const ::std::string& value() const;
156   void set_value(const ::std::string& value);
157   #if LANG_CXX11
158   void set_value(::std::string&& value);
159   #endif
160   void set_value(const char* value);
161   void set_value(const void* value, size_t size);
162   ::std::string* mutable_value();
163   ::std::string* release_value();
164   void set_allocated_value(::std::string* value);
165 
166   // @@protoc_insertion_point(class_scope:google.protobuf.Any)
167  private:
168 
169   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
170   ::google::protobuf::internal::ArenaStringPtr type_url_;
171   ::google::protobuf::internal::ArenaStringPtr value_;
172   mutable int _cached_size_;
173   ::google::protobuf::internal::AnyMetadata _any_metadata_;
174   friend struct protobuf_google_2fprotobuf_2fany_2eproto::TableStruct;
175 };
176 // ===================================================================
177 
178 
179 // ===================================================================
180 
181 #if !PROTOBUF_INLINE_NOT_IN_HEADERS
182 #ifdef __GNUC__
183   #pragma GCC diagnostic push
184   #pragma GCC diagnostic ignored "-Wstrict-aliasing"
185 #endif  // __GNUC__
186 // Any
187 
188 // string type_url = 1;
clear_type_url()189 inline void Any::clear_type_url() {
190   type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
191 }
type_url()192 inline const ::std::string& Any::type_url() const {
193   // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
194   return type_url_.GetNoArena();
195 }
set_type_url(const::std::string & value)196 inline void Any::set_type_url(const ::std::string& value) {
197 
198   type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
199   // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
200 }
201 #if LANG_CXX11
set_type_url(::std::string && value)202 inline void Any::set_type_url(::std::string&& value) {
203 
204   type_url_.SetNoArena(
205     &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
206   // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url)
207 }
208 #endif
set_type_url(const char * value)209 inline void Any::set_type_url(const char* value) {
210   GOOGLE_DCHECK(value != NULL);
211 
212   type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
213   // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url)
214 }
set_type_url(const char * value,size_t size)215 inline void Any::set_type_url(const char* value, size_t size) {
216 
217   type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
218       ::std::string(reinterpret_cast<const char*>(value), size));
219   // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url)
220 }
mutable_type_url()221 inline ::std::string* Any::mutable_type_url() {
222 
223   // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
224   return type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
225 }
release_type_url()226 inline ::std::string* Any::release_type_url() {
227   // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
228 
229   return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
230 }
set_allocated_type_url(::std::string * type_url)231 inline void Any::set_allocated_type_url(::std::string* type_url) {
232   if (type_url != NULL) {
233 
234   } else {
235 
236   }
237   type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_url);
238   // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
239 }
240 
241 // bytes value = 2;
clear_value()242 inline void Any::clear_value() {
243   value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
244 }
value()245 inline const ::std::string& Any::value() const {
246   // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
247   return value_.GetNoArena();
248 }
set_value(const::std::string & value)249 inline void Any::set_value(const ::std::string& value) {
250 
251   value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
252   // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
253 }
254 #if LANG_CXX11
set_value(::std::string && value)255 inline void Any::set_value(::std::string&& value) {
256 
257   value_.SetNoArena(
258     &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
259   // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value)
260 }
261 #endif
set_value(const char * value)262 inline void Any::set_value(const char* value) {
263   GOOGLE_DCHECK(value != NULL);
264 
265   value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
266   // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value)
267 }
set_value(const void * value,size_t size)268 inline void Any::set_value(const void* value, size_t size) {
269 
270   value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
271       ::std::string(reinterpret_cast<const char*>(value), size));
272   // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value)
273 }
mutable_value()274 inline ::std::string* Any::mutable_value() {
275 
276   // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
277   return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
278 }
release_value()279 inline ::std::string* Any::release_value() {
280   // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
281 
282   return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
283 }
set_allocated_value(::std::string * value)284 inline void Any::set_allocated_value(::std::string* value) {
285   if (value != NULL) {
286 
287   } else {
288 
289   }
290   value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
291   // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
292 }
293 
294 #ifdef __GNUC__
295   #pragma GCC diagnostic pop
296 #endif  // __GNUC__
297 #endif  // !PROTOBUF_INLINE_NOT_IN_HEADERS
298 
299 // @@protoc_insertion_point(namespace_scope)
300 
301 
302 }  // namespace protobuf
303 }  // namespace google
304 
305 // @@protoc_insertion_point(global_scope)
306 
307 #endif  // PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
308