4 #ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
5 #define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
10 #include <google/protobuf/port_def.inc>
11 #if PROTOBUF_VERSION < 3019000
12 #error This file was generated by a newer version of protoc which is
13 #error incompatible with your Protocol Buffer headers. Please update
16 #if 3019005 < 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.
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>
32 #include <google/protobuf/extension_set.h>
33 #include <google/protobuf/unknown_field_set.h>
35 #include <google/protobuf/port_def.inc>
36 #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto PROTOBUF_EXPORT
37 PROTOBUF_NAMESPACE_OPEN
41 PROTOBUF_NAMESPACE_CLOSE
45 static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
47 static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField aux[]
49 static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
51 static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
52 static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
56 PROTOBUF_NAMESPACE_OPEN
60 PROTOBUF_NAMESPACE_CLOSE
61 PROTOBUF_NAMESPACE_OPEN
63 PROTOBUF_NAMESPACE_CLOSE
64 PROTOBUF_NAMESPACE_OPEN
68 class PROTOBUF_EXPORT
Any final :
73 explicit constexpr
Any(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
86 if (
this == &
from)
return *
this;
87 if (GetOwningArena() ==
from.GetOwningArena()
88 #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
89 && GetOwningArena() !=
nullptr
103 return default_instance().GetMetadata().descriptor;
106 return default_instance().GetMetadata().reflection;
109 return *internal_default_instance();
112 return reinterpret_cast<const Any*
>(
115 static constexpr
int kIndexInFileMessages =
128 return _any_metadata_.UnpackTo(
message);
144 return _any_metadata_.UnpackTo<
T>(
message);
146 template<
typename T>
bool Is()
const {
147 return _any_metadata_.Is<
T>();
155 if (other ==
this)
return;
156 #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
157 if (GetOwningArena() !=
nullptr &&
158 GetOwningArena() == other->GetOwningArena()) {
159 #else // PROTOBUF_FORCE_COPY_IN_SWAP
160 if (GetOwningArena() == other->GetOwningArena()) {
161 #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
168 if (other ==
this)
return;
176 return CreateMaybeMessage<Any>(
arena);
185 PROTOBUF_ATTRIBUTE_REINITIALIZES
void Clear() final;
188 size_t ByteSizeLong()
const final;
192 int GetCachedSize()
const final {
return _cached_size_.Get(); }
197 void SetCachedSize(
int size)
const final;
198 void InternalSwap(
Any* other);
201 friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
203 return "google.protobuf.Any";
207 bool is_message_owned =
false);
209 static void ArenaDtor(
void*
object);
214 const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData()
const final;
223 kTypeUrlFieldNumber = 1,
224 kValueFieldNumber = 2,
227 void clear_type_url();
229 template <
typename ArgT0 =
const std::string&,
typename... ArgT>
230 void set_type_url(ArgT0&& arg0, ArgT...
args);
232 PROTOBUF_NODISCARD
std::string* release_type_url();
236 inline PROTOBUF_ALWAYS_INLINE
void _internal_set_type_url(
const std::string&
value);
243 template <
typename ArgT0 =
const std::string&,
typename... ArgT>
244 void set_value(ArgT0&& arg0, ArgT...
args);
250 inline PROTOBUF_ALWAYS_INLINE
void _internal_set_value(
const std::string&
value);
258 template <
typename T>
friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
261 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
262 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr
value_;
263 mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
264 ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata _any_metadata_;
265 friend struct ::TableStruct_google_2fprotobuf_2fany_2eproto;
273 #pragma GCC diagnostic push
274 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
280 type_url_.ClearToEmpty();
284 return _internal_type_url();
286 template <
typename ArgT0,
typename... ArgT>
287 inline PROTOBUF_ALWAYS_INLINE
299 return type_url_.Get();
320 GetArenaForAllocation());
321 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
325 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
335 return _internal_value();
337 template <
typename ArgT0,
typename... ArgT>
338 inline PROTOBUF_ALWAYS_INLINE
365 if (
value !=
nullptr) {
371 GetArenaForAllocation());
372 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
376 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
381 #pragma GCC diagnostic pop
386 PROTOBUF_NAMESPACE_CLOSE
390 #include <google/protobuf/port_undef.inc>
391 #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto