Go to the documentation of this file.
4 #include <google/protobuf/any.pb.h>
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 #include <google/protobuf/descriptor.h>
12 #include <google/protobuf/generated_message_reflection.h>
13 #include <google/protobuf/reflection_ops.h>
14 #include <google/protobuf/wire_format.h>
16 #include <google/protobuf/port_def.inc>
18 PROTOBUF_PRAGMA_INIT_SEG
19 PROTOBUF_NAMESPACE_OPEN
21 ::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized)
24 , _any_metadata_(&type_url_, &
value_){}
34 PROTOBUF_NAMESPACE_CLOSE
58 "\n\031google/protobuf/any.proto\022\017google.prot"
59 "obuf\"&\n\003Any\022\020\n\010type_url\030\001 \001(\t\022\r\n\005value\030\002"
60 " \001(\014Bv\n\023com.google.protobufB\010AnyProtoP\001Z"
61 ",google.golang.org/protobuf/types/known/"
62 "anypb\242\002\003GPB\252\002\036Google.Protobuf.WellKnownT"
67 false,
false, 212, descriptor_table_protodef_google_2fprotobuf_2fany_2eproto,
"google/protobuf/any.proto",
78 PROTOBUF_NAMESPACE_OPEN
87 message, type_url_field, value_field);
101 bool is_message_owned)
102 : ::PROTOBUF_NAMESPACE_ID::
Message(
arena, is_message_owned),
103 _any_metadata_(&type_url_, &
value_) {
105 if (!is_message_owned) {
111 : ::PROTOBUF_NAMESPACE_ID::
Message(),
112 _any_metadata_(&type_url_, &
value_) {
115 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
117 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
118 if (!
from._internal_type_url().empty()) {
120 GetArenaForAllocation());
123 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
125 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
126 if (!
from._internal_value().empty()) {
128 GetArenaForAllocation());
135 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
137 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
139 #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
141 #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
146 if (GetArenaForAllocation() !=
nullptr)
return;
158 Any* _this =
reinterpret_cast< Any*
>(object);
171 (void) cached_has_bits;
179 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
180 while (!
ctx->Done(&
ptr)) {
186 if (PROTOBUF_PREDICT_TRUE(
static_cast<uint8_t>(
tag) == 10)) {
196 if (PROTOBUF_PREDICT_TRUE(
static_cast<uint8_t>(
tag) == 18)) {
207 if ((
tag == 0) || ((
tag & 7) == 4)) {
230 (void) cached_has_bits;
234 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
236 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
237 "google.protobuf.Any.type_url");
244 target =
stream->WriteBytesMaybeAliased(
249 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray(
258 size_t total_size = 0;
262 (void) cached_has_bits;
267 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
274 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
278 return MaybeComputeUnknownFieldsSize(total_size, &
_cached_size_);
282 ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck,
290 static_cast<const Any &
>(
from));
298 (void) cached_has_bits;
300 if (!
from._internal_type_url().empty()) {
303 if (!
from._internal_value().empty()) {
311 if (&
from ==
this)
return;
322 auto* lhs_arena = GetArenaForAllocation();
323 auto* rhs_arena = other->GetArenaForAllocation();
325 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
330 ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
344 PROTOBUF_NAMESPACE_CLOSE
345 PROTOBUF_NAMESPACE_OPEN
347 return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Any >(
arena);
349 PROTOBUF_NAMESPACE_CLOSE
352 #include <google/protobuf/port_undef.inc>
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_
struct EnumDescriptor EnumDescriptor
ArenaStringPtr::EmptyDefault EmptyDefault
static bool GetAnyFieldDescriptors(const ::PROTOBUF_NAMESPACE_ID::Message &message, const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor **type_url_field, const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor **value_field)
static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]
PROTOBUF_NAMESPACE_CLOSE PROTOBUF_NAMESPACE_OPEN PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Any * Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Any >(Arena *arena)
bool ParseAnyTypeUrl(const std::string &type_url, std::string *full_type_name)
const char * UnknownFieldParse(uint32 tag, std::string *unknown, const char *ptr, ParseContext *ctx)
GRPC_CUSTOM_MESSAGE Message
GRPC_CUSTOM_FIELDDESCRIPTOR FieldDescriptor
void SetCachedSize(int size) const final
const ::PROTOBUF_NAMESPACE_ID::Message *const file_default_instances[]
OPENSSL_EXPORT pem_password_cb void * u
static const ClassData _class_data_
PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final
static PyObject * UnknownFieldSet(CMessage *self)
size_t ByteSizeLong() const final
grpc_core::ScopedArenaPtr arena
const PROTOBUF_ATTRIBUTE_WEAK ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable * descriptor_table_google_2fprotobuf_2fany_2eproto_getter()
const char * _InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final
static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message *to, const ::PROTOBUF_NAMESPACE_ID::Message &from)
constexpr AnyDefaultTypeInternal()
static bool ParseAnyTypeUrl(const string &type_url, std::string *full_type_name)
const std::string & ConstStringParam
::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final
~AnyDefaultTypeInternal()
static bool dynamic_init_dummy_google_2fprotobuf_2fany_2eproto
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fany_2eproto
static void * tag(intptr_t t)
const PROTOBUF_EXPORT std::string & GetEmptyStringAlreadyInited()
mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_
::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed< Any > _instance
void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *arena)
bool GetAnyFieldDescriptors(const Message &message, const FieldDescriptor **type_url_field, const FieldDescriptor **value_field)
void swap(Json::Value &a, Json::Value &b)
Specialize std::swap() for Json::Value.
void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final
std::string * _internal_mutable_value()
const std::string & _internal_value() const
::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2fprotobuf_2fany_2eproto_once
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData * GetClassData() const final
const uint32_t TableStruct_google_2fprotobuf_2fany_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold)
const char * InlineGreedyStringParser(std::string *s, const char *ptr, ParseContext *ctx)
bool VerifyUTF8(StringPiece str, const char *field_name)
std::string * _internal_mutable_type_url()
bool IsInitialized() const final
uint8_t * _InternalSerialize(uint8_t *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const ** file_level_service_descriptors_google_2fprotobuf_2fany_2eproto
void _internal_set_type_url(const std::string &value)
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const ** file_level_enum_descriptors_google_2fprotobuf_2fany_2eproto
void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final
const std::string & _internal_type_url() const
static void ArenaDtor(void *object)
ExplicitlyConstructed< std::string > fixed_address_empty_string
::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_
void _internal_set_value(const std::string &value)
PROTOBUF_NAMESPACE_CLOSE ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2fprotobuf_2fany_2eproto[1]
void AssignDescriptors(const DescriptorTable *table)
std::vector< std::pair< std::string, std::string > > Metadata
void InternalSwap(Any *other)
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT AnyDefaultTypeInternal _Any_default_instance_
::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_
const std::string & type_url() const
GRPC_CUSTOM_SERVICEDESCRIPTOR ServiceDescriptor
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:41