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