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