File indexing completed on 2025-01-31 10:12:05
0001
0002
0003
0004
0005
0006 #ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto_2epb_2eh
0007 #define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto_2epb_2eh
0008
0009 #include <limits>
0010 #include <string>
0011 #include <type_traits>
0012 #include <utility>
0013
0014 #include "google/protobuf/runtime_version.h"
0015 #if PROTOBUF_VERSION != 5028002
0016 #error "Protobuf C++ gencode is built with an incompatible version of"
0017 #error "Protobuf C++ headers/runtime. See"
0018 #error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp"
0019 #endif
0020 #include "google/protobuf/io/coded_stream.h"
0021 #include "google/protobuf/arena.h"
0022 #include "google/protobuf/arenastring.h"
0023 #include "google/protobuf/generated_message_tctable_decl.h"
0024 #include "google/protobuf/generated_message_util.h"
0025 #include "google/protobuf/metadata_lite.h"
0026 #include "google/protobuf/generated_message_reflection.h"
0027 #include "google/protobuf/message.h"
0028 #include "google/protobuf/repeated_field.h" // IWYU pragma: export
0029 #include "google/protobuf/extension_set.h" // IWYU pragma: export
0030 #include "google/protobuf/unknown_field_set.h"
0031
0032
0033
0034 #include "google/protobuf/port_def.inc"
0035
0036 #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto PROTOBUF_EXPORT
0037
0038 namespace google {
0039 namespace protobuf {
0040 namespace internal {
0041 class AnyMetadata;
0042 }
0043 }
0044 }
0045
0046
0047 struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fany_2eproto {
0048 static const ::uint32_t offsets[];
0049 };
0050 PROTOBUF_EXPORT extern const ::google::protobuf::internal::DescriptorTable
0051 descriptor_table_google_2fprotobuf_2fany_2eproto;
0052 namespace google {
0053 namespace protobuf {
0054 class Any;
0055 struct AnyDefaultTypeInternal;
0056 PROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_;
0057 }
0058 }
0059
0060 namespace google {
0061 namespace protobuf {
0062
0063
0064
0065
0066
0067
0068 class PROTOBUF_EXPORT Any final : public ::google::protobuf::Message
0069 {
0070 public:
0071 inline Any() : Any(nullptr) {}
0072 ~Any() PROTOBUF_FINAL;
0073 template <typename = void>
0074 explicit PROTOBUF_CONSTEXPR Any(
0075 ::google::protobuf::internal::ConstantInitialized);
0076
0077 inline Any(const Any& from) : Any(nullptr, from) {}
0078 inline Any(Any&& from) noexcept
0079 : Any(nullptr, std::move(from)) {}
0080 inline Any& operator=(const Any& from) {
0081 CopyFrom(from);
0082 return *this;
0083 }
0084 inline Any& operator=(Any&& from) noexcept {
0085 if (this == &from) return *this;
0086 if (GetArena() == from.GetArena()
0087 #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
0088 && GetArena() != nullptr
0089 #endif
0090 ) {
0091 InternalSwap(&from);
0092 } else {
0093 CopyFrom(from);
0094 }
0095 return *this;
0096 }
0097
0098 inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
0099 ABSL_ATTRIBUTE_LIFETIME_BOUND {
0100 return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
0101 }
0102 inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields()
0103 ABSL_ATTRIBUTE_LIFETIME_BOUND {
0104 return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
0105 }
0106
0107 static const ::google::protobuf::Descriptor* descriptor() {
0108 return GetDescriptor();
0109 }
0110 static const ::google::protobuf::Descriptor* GetDescriptor() {
0111 return default_instance().GetMetadata().descriptor;
0112 }
0113 static const ::google::protobuf::Reflection* GetReflection() {
0114 return default_instance().GetMetadata().reflection;
0115 }
0116 static const Any& default_instance() {
0117 return *internal_default_instance();
0118 }
0119 static inline const Any* internal_default_instance() {
0120 return reinterpret_cast<const Any*>(
0121 &_Any_default_instance_);
0122 }
0123 static constexpr int kIndexInFileMessages = 0;
0124
0125
0126
0127 bool PackFrom(const ::google::protobuf::Message& message) {
0128 ABSL_DCHECK_NE(&message, this);
0129 return _impl_._any_metadata_.PackFrom(GetArena(), message);
0130 }
0131 bool PackFrom(const ::google::protobuf::Message& message,
0132 ::absl::string_view type_url_prefix) {
0133 ABSL_DCHECK_NE(&message, this);
0134 return _impl_._any_metadata_.PackFrom(GetArena(), message, type_url_prefix);
0135 }
0136 bool UnpackTo(::google::protobuf::Message* message) const {
0137 return _impl_._any_metadata_.UnpackTo(message);
0138 }
0139 static bool GetAnyFieldDescriptors(
0140 const ::google::protobuf::Message& message,
0141 const ::google::protobuf::FieldDescriptor** type_url_field,
0142 const ::google::protobuf::FieldDescriptor** value_field);
0143 template <
0144 typename T,
0145 class = typename std::enable_if<!std::is_convertible<
0146 T, const ::google::protobuf::Message&>::value>::type>
0147 bool PackFrom(const T& message) {
0148 return _impl_._any_metadata_.PackFrom<T>(GetArena(), message);
0149 }
0150 template <
0151 typename T,
0152 class = typename std::enable_if<!std::is_convertible<
0153 T, const ::google::protobuf::Message&>::value>::type>
0154 bool PackFrom(const T& message,
0155 ::absl::string_view type_url_prefix) {
0156 return _impl_._any_metadata_.PackFrom<T>(GetArena(), message, type_url_prefix);
0157 }
0158 template <
0159 typename T,
0160 class = typename std::enable_if<!std::is_convertible<
0161 T, const ::google::protobuf::Message&>::value>::type>
0162 bool UnpackTo(T* message) const {
0163 return _impl_._any_metadata_.UnpackTo<T>(message);
0164 }
0165
0166 template <typename T>
0167 bool Is() const {
0168 return _impl_._any_metadata_.Is<T>();
0169 }
0170 static bool ParseAnyTypeUrl(::absl::string_view type_url,
0171 std::string* full_type_name);
0172 friend void swap(Any& a, Any& b) { a.Swap(&b); }
0173 inline void Swap(Any* other) {
0174 if (other == this) return;
0175 #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
0176 if (GetArena() != nullptr && GetArena() == other->GetArena()) {
0177 #else
0178 if (GetArena() == other->GetArena()) {
0179 #endif
0180 InternalSwap(other);
0181 } else {
0182 ::google::protobuf::internal::GenericSwap(this, other);
0183 }
0184 }
0185 void UnsafeArenaSwap(Any* other) {
0186 if (other == this) return;
0187 ABSL_DCHECK(GetArena() == other->GetArena());
0188 InternalSwap(other);
0189 }
0190
0191
0192
0193 Any* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL {
0194 return ::google::protobuf::Message::DefaultConstruct<Any>(arena);
0195 }
0196 using ::google::protobuf::Message::CopyFrom;
0197 void CopyFrom(const Any& from);
0198 using ::google::protobuf::Message::MergeFrom;
0199 void MergeFrom(const Any& from) { Any::MergeImpl(*this, from); }
0200
0201 private:
0202 static void MergeImpl(
0203 ::google::protobuf::MessageLite& to_msg,
0204 const ::google::protobuf::MessageLite& from_msg);
0205
0206 public:
0207 bool IsInitialized() const {
0208 return true;
0209 }
0210 ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
0211 #if defined(PROTOBUF_CUSTOM_VTABLE)
0212 private:
0213 static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
0214 static ::uint8_t* _InternalSerialize(
0215 const MessageLite& msg, ::uint8_t* target,
0216 ::google::protobuf::io::EpsCopyOutputStream* stream);
0217
0218 public:
0219 ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
0220 ::uint8_t* _InternalSerialize(
0221 ::uint8_t* target,
0222 ::google::protobuf::io::EpsCopyOutputStream* stream) const {
0223 return _InternalSerialize(*this, target, stream);
0224 }
0225 #else
0226 ::size_t ByteSizeLong() const final;
0227 ::uint8_t* _InternalSerialize(
0228 ::uint8_t* target,
0229 ::google::protobuf::io::EpsCopyOutputStream* stream) const final;
0230 #endif
0231 int GetCachedSize() const { return _impl_._cached_size_.Get(); }
0232
0233 private:
0234 void SharedCtor(::google::protobuf::Arena* arena);
0235 void SharedDtor();
0236 void InternalSwap(Any* other);
0237 private:
0238 friend class ::google::protobuf::internal::AnyMetadata;
0239 static ::absl::string_view FullMessageName() { return "google.protobuf.Any"; }
0240
0241 protected:
0242 explicit Any(::google::protobuf::Arena* arena);
0243 Any(::google::protobuf::Arena* arena, const Any& from);
0244 Any(::google::protobuf::Arena* arena, Any&& from) noexcept
0245 : Any(arena) {
0246 *this = ::std::move(from);
0247 }
0248 const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL;
0249 static const ::google::protobuf::Message::ClassDataFull _class_data_;
0250
0251 public:
0252 ::google::protobuf::Metadata GetMetadata() const;
0253
0254
0255
0256 enum : int {
0257 kTypeUrlFieldNumber = 1,
0258 kValueFieldNumber = 2,
0259 };
0260
0261 void clear_type_url() ;
0262 const std::string& type_url() const;
0263 template <typename Arg_ = const std::string&, typename... Args_>
0264 void set_type_url(Arg_&& arg, Args_... args);
0265 std::string* mutable_type_url();
0266 PROTOBUF_NODISCARD std::string* release_type_url();
0267 void set_allocated_type_url(std::string* value);
0268
0269 private:
0270 const std::string& _internal_type_url() const;
0271 inline PROTOBUF_ALWAYS_INLINE void _internal_set_type_url(
0272 const std::string& value);
0273 std::string* _internal_mutable_type_url();
0274
0275 public:
0276
0277 void clear_value() ;
0278 const std::string& value() const;
0279 template <typename Arg_ = const std::string&, typename... Args_>
0280 void set_value(Arg_&& arg, Args_... args);
0281 std::string* mutable_value();
0282 PROTOBUF_NODISCARD std::string* release_value();
0283 void set_allocated_value(std::string* value);
0284
0285 private:
0286 const std::string& _internal_value() const;
0287 inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(
0288 const std::string& value);
0289 std::string* _internal_mutable_value();
0290
0291 public:
0292
0293 private:
0294 class _Internal;
0295 friend class ::google::protobuf::internal::TcParser;
0296 static const ::google::protobuf::internal::TcParseTable<
0297 1, 2, 0,
0298 36, 2>
0299 _table_;
0300
0301
0302 friend class ::google::protobuf::MessageLite;
0303 friend class ::google::protobuf::Arena;
0304 template <typename T>
0305 friend class ::google::protobuf::Arena::InternalHelper;
0306 using InternalArenaConstructable_ = void;
0307 using DestructorSkippable_ = void;
0308 struct Impl_ {
0309 inline explicit constexpr Impl_(
0310 ::google::protobuf::internal::ConstantInitialized) noexcept;
0311 inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
0312 ::google::protobuf::Arena* arena);
0313 inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
0314 ::google::protobuf::Arena* arena, const Impl_& from,
0315 const Any& from_msg);
0316 ::google::protobuf::internal::ArenaStringPtr type_url_;
0317 ::google::protobuf::internal::ArenaStringPtr value_;
0318 mutable ::google::protobuf::internal::CachedSize _cached_size_;
0319 ::google::protobuf::internal::AnyMetadata _any_metadata_;
0320 PROTOBUF_TSAN_DECLARE_MEMBER
0321 };
0322 union { Impl_ _impl_; };
0323 friend struct ::TableStruct_google_2fprotobuf_2fany_2eproto;
0324 };
0325
0326
0327
0328
0329
0330
0331
0332
0333
0334 #ifdef __GNUC__
0335 #pragma GCC diagnostic push
0336 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
0337 #endif
0338
0339
0340
0341
0342
0343 inline void Any::clear_type_url() {
0344 ::google::protobuf::internal::TSanWrite(&_impl_);
0345 _impl_.type_url_.ClearToEmpty();
0346 }
0347 inline const std::string& Any::type_url() const
0348 ABSL_ATTRIBUTE_LIFETIME_BOUND {
0349
0350 return _internal_type_url();
0351 }
0352 template <typename Arg_, typename... Args_>
0353 inline PROTOBUF_ALWAYS_INLINE void Any::set_type_url(Arg_&& arg,
0354 Args_... args) {
0355 ::google::protobuf::internal::TSanWrite(&_impl_);
0356 _impl_.type_url_.Set(static_cast<Arg_&&>(arg), args..., GetArena());
0357
0358 }
0359 inline std::string* Any::mutable_type_url() ABSL_ATTRIBUTE_LIFETIME_BOUND {
0360 std::string* _s = _internal_mutable_type_url();
0361
0362 return _s;
0363 }
0364 inline const std::string& Any::_internal_type_url() const {
0365 ::google::protobuf::internal::TSanRead(&_impl_);
0366 return _impl_.type_url_.Get();
0367 }
0368 inline void Any::_internal_set_type_url(const std::string& value) {
0369 ::google::protobuf::internal::TSanWrite(&_impl_);
0370 _impl_.type_url_.Set(value, GetArena());
0371 }
0372 inline std::string* Any::_internal_mutable_type_url() {
0373 ::google::protobuf::internal::TSanWrite(&_impl_);
0374 return _impl_.type_url_.Mutable( GetArena());
0375 }
0376 inline std::string* Any::release_type_url() {
0377 ::google::protobuf::internal::TSanWrite(&_impl_);
0378
0379 return _impl_.type_url_.Release();
0380 }
0381 inline void Any::set_allocated_type_url(std::string* value) {
0382 ::google::protobuf::internal::TSanWrite(&_impl_);
0383 _impl_.type_url_.SetAllocated(value, GetArena());
0384 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
0385 if (_impl_.type_url_.IsDefault()) {
0386 _impl_.type_url_.Set("", GetArena());
0387 }
0388 #endif
0389
0390 }
0391
0392
0393 inline void Any::clear_value() {
0394 ::google::protobuf::internal::TSanWrite(&_impl_);
0395 _impl_.value_.ClearToEmpty();
0396 }
0397 inline const std::string& Any::value() const
0398 ABSL_ATTRIBUTE_LIFETIME_BOUND {
0399
0400 return _internal_value();
0401 }
0402 template <typename Arg_, typename... Args_>
0403 inline PROTOBUF_ALWAYS_INLINE void Any::set_value(Arg_&& arg,
0404 Args_... args) {
0405 ::google::protobuf::internal::TSanWrite(&_impl_);
0406 _impl_.value_.SetBytes(static_cast<Arg_&&>(arg), args..., GetArena());
0407
0408 }
0409 inline std::string* Any::mutable_value() ABSL_ATTRIBUTE_LIFETIME_BOUND {
0410 std::string* _s = _internal_mutable_value();
0411
0412 return _s;
0413 }
0414 inline const std::string& Any::_internal_value() const {
0415 ::google::protobuf::internal::TSanRead(&_impl_);
0416 return _impl_.value_.Get();
0417 }
0418 inline void Any::_internal_set_value(const std::string& value) {
0419 ::google::protobuf::internal::TSanWrite(&_impl_);
0420 _impl_.value_.Set(value, GetArena());
0421 }
0422 inline std::string* Any::_internal_mutable_value() {
0423 ::google::protobuf::internal::TSanWrite(&_impl_);
0424 return _impl_.value_.Mutable( GetArena());
0425 }
0426 inline std::string* Any::release_value() {
0427 ::google::protobuf::internal::TSanWrite(&_impl_);
0428
0429 return _impl_.value_.Release();
0430 }
0431 inline void Any::set_allocated_value(std::string* value) {
0432 ::google::protobuf::internal::TSanWrite(&_impl_);
0433 _impl_.value_.SetAllocated(value, GetArena());
0434 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
0435 if (_impl_.value_.IsDefault()) {
0436 _impl_.value_.Set("", GetArena());
0437 }
0438 #endif
0439
0440 }
0441
0442 #ifdef __GNUC__
0443 #pragma GCC diagnostic pop
0444 #endif
0445
0446
0447 }
0448 }
0449
0450
0451
0452
0453 #include "google/protobuf/port_undef.inc"
0454
0455 #endif