diff --git a/src/protobuf/echo_test.pb.cc b/src/protobuf/echo_test.pb.cc deleted file mode 100644 index a550cd66a..000000000 --- a/src/protobuf/echo_test.pb.cc +++ /dev/null @@ -1,595 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: src/protobuf/echo_test.proto - -#include "protobuf/echo_test.pb.h" - -#include - -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) -#include -namespace memgraph { -namespace protobuf { -class TestRequestDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _TestRequest_default_instance_; -class TestResponseDefaultTypeInternal { - public: - ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; -} _TestResponse_default_instance_; -} // namespace protobuf -} // namespace memgraph -static void InitDefaultsscc_info_TestRequest_src_2fprotobuf_2fecho_5ftest_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void *ptr = &::memgraph::protobuf::_TestRequest_default_instance_; - new (ptr)::memgraph::protobuf::TestRequest(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::memgraph::protobuf::TestRequest::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TestRequest_src_2fprotobuf_2fecho_5ftest_2eproto = { - {ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, - InitDefaultsscc_info_TestRequest_src_2fprotobuf_2fecho_5ftest_2eproto}, - {}}; - -static void InitDefaultsscc_info_TestResponse_src_2fprotobuf_2fecho_5ftest_2eproto() { - GOOGLE_PROTOBUF_VERIFY_VERSION; - - { - void *ptr = &::memgraph::protobuf::_TestResponse_default_instance_; - new (ptr)::memgraph::protobuf::TestResponse(); - ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); - } - ::memgraph::protobuf::TestResponse::InitAsDefaultInstance(); -} - -::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TestResponse_src_2fprotobuf_2fecho_5ftest_2eproto = { - {ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, - InitDefaultsscc_info_TestResponse_src_2fprotobuf_2fecho_5ftest_2eproto}, - {}}; - -static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_src_2fprotobuf_2fecho_5ftest_2eproto[2]; -static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const * - *file_level_enum_descriptors_src_2fprotobuf_2fecho_5ftest_2eproto = nullptr; -static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const * - *file_level_service_descriptors_src_2fprotobuf_2fecho_5ftest_2eproto = nullptr; - -const ::PROTOBUF_NAMESPACE_ID::uint32 - TableStruct_src_2fprotobuf_2fecho_5ftest_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::TestRequest, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::TestRequest, request_id_), - PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::TestRequest, content_), - ~0u, // no _has_bits_ - PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::TestResponse, _internal_metadata_), - ~0u, // no _extensions_ - ~0u, // no _oneof_case_ - ~0u, // no _weak_field_map_ - PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::TestResponse, request_id_), - PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::TestResponse, content_), -}; -static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { - {0, -1, sizeof(::memgraph::protobuf::TestRequest)}, - {7, -1, sizeof(::memgraph::protobuf::TestResponse)}, -}; - -static ::PROTOBUF_NAMESPACE_ID::Message const *const file_default_instances[] = { - reinterpret_cast(&::memgraph::protobuf::_TestRequest_default_instance_), - reinterpret_cast(&::memgraph::protobuf::_TestResponse_default_instance_), -}; - -const char descriptor_table_protodef_src_2fprotobuf_2fecho_5ftest_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = - "\n\034src/protobuf/echo_test.proto\022\021memgraph" - ".protobuf\"2\n\013TestRequest\022\022\n\nrequest_id\030\001" - " \001(\004\022\017\n\007content\030\002 \001(\t\"3\n\014TestResponse\022\022\n" - "\nrequest_id\030\001 \001(\004\022\017\n\007content\030\002 \001(\tb\006prot" - "o3"; -static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable - *const descriptor_table_src_2fprotobuf_2fecho_5ftest_2eproto_deps[1] = {}; -static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase - *const descriptor_table_src_2fprotobuf_2fecho_5ftest_2eproto_sccs[2] = { - &scc_info_TestRequest_src_2fprotobuf_2fecho_5ftest_2eproto.base, - &scc_info_TestResponse_src_2fprotobuf_2fecho_5ftest_2eproto.base, -}; -static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_src_2fprotobuf_2fecho_5ftest_2eproto_once; -const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_src_2fprotobuf_2fecho_5ftest_2eproto = { - false, - false, - descriptor_table_protodef_src_2fprotobuf_2fecho_5ftest_2eproto, - "src/protobuf/echo_test.proto", - 162, - &descriptor_table_src_2fprotobuf_2fecho_5ftest_2eproto_once, - descriptor_table_src_2fprotobuf_2fecho_5ftest_2eproto_sccs, - descriptor_table_src_2fprotobuf_2fecho_5ftest_2eproto_deps, - 2, - 0, - schemas, - file_default_instances, - TableStruct_src_2fprotobuf_2fecho_5ftest_2eproto::offsets, - file_level_metadata_src_2fprotobuf_2fecho_5ftest_2eproto, - 2, - file_level_enum_descriptors_src_2fprotobuf_2fecho_5ftest_2eproto, - file_level_service_descriptors_src_2fprotobuf_2fecho_5ftest_2eproto, -}; - -// Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_src_2fprotobuf_2fecho_5ftest_2eproto = - (static_cast( - ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_src_2fprotobuf_2fecho_5ftest_2eproto)), - true); -namespace memgraph { -namespace protobuf { - -// =================================================================== - -void TestRequest::InitAsDefaultInstance() {} -class TestRequest::_Internal { - public: -}; - -TestRequest::TestRequest(::PROTOBUF_NAMESPACE_ID::Arena *arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:memgraph.protobuf.TestRequest) -} -TestRequest::TestRequest(const TestRequest &from) : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_content().empty()) { - content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_content(), - GetArena()); - } - request_id_ = from.request_id_; - // @@protoc_insertion_point(copy_constructor:memgraph.protobuf.TestRequest) -} - -void TestRequest::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TestRequest_src_2fprotobuf_2fecho_5ftest_2eproto.base); - content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - request_id_ = PROTOBUF_ULONGLONG(0); -} - -TestRequest::~TestRequest() { - // @@protoc_insertion_point(destructor:memgraph.protobuf.TestRequest) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void TestRequest::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - content_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void TestRequest::ArenaDtor(void *object) { - TestRequest *_this = reinterpret_cast(object); - (void)_this; -} -void TestRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *) {} -void TestRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } -const TestRequest &TestRequest::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TestRequest_src_2fprotobuf_2fecho_5ftest_2eproto.base); - return *internal_default_instance(); -} - -void TestRequest::Clear() { - // @@protoc_insertion_point(message_clear_start:memgraph.protobuf.TestRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - content_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - request_id_ = PROTOBUF_ULONGLONG(0); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char *TestRequest::_InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) { -#define CHK_(x) \ - if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena *arena = GetArena(); - (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // uint64 request_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - request_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string content = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_content(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "memgraph.protobuf.TestRequest.content")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse( - tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8 *TestRequest::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const { - // @@protoc_insertion_point(serialize_to_array_start:memgraph.protobuf.TestRequest) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void)cached_has_bits; - - // uint64 request_id = 1; - if (this->request_id() != 0) { - target = stream->EnsureSpace(target); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->_internal_request_id(), target); - } - - // string content = 2; - if (this->content().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_content().data(), static_cast(this->_internal_content().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "memgraph.protobuf.TestRequest.content"); - target = stream->WriteStringMaybeAliased(2, this->_internal_content(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>( - ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), - target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:memgraph.protobuf.TestRequest) - return target; -} - -size_t TestRequest::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:memgraph.protobuf.TestRequest) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - // string content = 2; - if (this->content().size() > 0) { - total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(this->_internal_content()); - } - - // uint64 request_id = 1; - if (this->request_id() != 0) { - total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(this->_internal_request_id()); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(_internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void TestRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) { - // @@protoc_insertion_point(generalized_merge_from_start:memgraph.protobuf.TestRequest) - GOOGLE_DCHECK_NE(&from, this); - const TestRequest *source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated(&from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:memgraph.protobuf.TestRequest) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:memgraph.protobuf.TestRequest) - MergeFrom(*source); - } -} - -void TestRequest::MergeFrom(const TestRequest &from) { - // @@protoc_insertion_point(class_specific_merge_from_start:memgraph.protobuf.TestRequest) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void)cached_has_bits; - - if (from.content().size() > 0) { - _internal_set_content(from._internal_content()); - } - if (from.request_id() != 0) { - _internal_set_request_id(from._internal_request_id()); - } -} - -void TestRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) { - // @@protoc_insertion_point(generalized_copy_from_start:memgraph.protobuf.TestRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void TestRequest::CopyFrom(const TestRequest &from) { - // @@protoc_insertion_point(class_specific_copy_from_start:memgraph.protobuf.TestRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool TestRequest::IsInitialized() const { return true; } - -void TestRequest::InternalSwap(TestRequest *other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - content_.Swap(&other->content_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - swap(request_id_, other->request_id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata TestRequest::GetMetadata() const { return GetMetadataStatic(); } - -// =================================================================== - -void TestResponse::InitAsDefaultInstance() {} -class TestResponse::_Internal { - public: -}; - -TestResponse::TestResponse(::PROTOBUF_NAMESPACE_ID::Arena *arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { - SharedCtor(); - RegisterArenaDtor(arena); - // @@protoc_insertion_point(arena_constructor:memgraph.protobuf.TestResponse) -} -TestResponse::TestResponse(const TestResponse &from) : ::PROTOBUF_NAMESPACE_ID::Message() { - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - if (!from._internal_content().empty()) { - content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_content(), - GetArena()); - } - request_id_ = from.request_id_; - // @@protoc_insertion_point(copy_constructor:memgraph.protobuf.TestResponse) -} - -void TestResponse::SharedCtor() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TestResponse_src_2fprotobuf_2fecho_5ftest_2eproto.base); - content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); - request_id_ = PROTOBUF_ULONGLONG(0); -} - -TestResponse::~TestResponse() { - // @@protoc_insertion_point(destructor:memgraph.protobuf.TestResponse) - SharedDtor(); - _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -void TestResponse::SharedDtor() { - GOOGLE_DCHECK(GetArena() == nullptr); - content_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); -} - -void TestResponse::ArenaDtor(void *object) { - TestResponse *_this = reinterpret_cast(object); - (void)_this; -} -void TestResponse::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *) {} -void TestResponse::SetCachedSize(int size) const { _cached_size_.Set(size); } -const TestResponse &TestResponse::default_instance() { - ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TestResponse_src_2fprotobuf_2fecho_5ftest_2eproto.base); - return *internal_default_instance(); -} - -void TestResponse::Clear() { - // @@protoc_insertion_point(message_clear_start:memgraph.protobuf.TestResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - content_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - request_id_ = PROTOBUF_ULONGLONG(0); - _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); -} - -const char *TestResponse::_InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) { -#define CHK_(x) \ - if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure - ::PROTOBUF_NAMESPACE_ID::Arena *arena = GetArena(); - (void)arena; - while (!ctx->Done(&ptr)) { - ::PROTOBUF_NAMESPACE_ID::uint32 tag; - ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); - CHK_(ptr); - switch (tag >> 3) { - // uint64 request_id = 1; - case 1: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { - request_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } else - goto handle_unusual; - continue; - // string content = 2; - case 2: - if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { - auto str = _internal_mutable_content(); - ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); - CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "memgraph.protobuf.TestResponse.content")); - CHK_(ptr); - } else - goto handle_unusual; - continue; - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->SetLastTag(tag); - goto success; - } - ptr = UnknownFieldParse( - tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); - CHK_(ptr != nullptr); - continue; - } - } // switch - } // while -success: - return ptr; -failure: - ptr = nullptr; - goto success; -#undef CHK_ -} - -::PROTOBUF_NAMESPACE_ID::uint8 *TestResponse::_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const { - // @@protoc_insertion_point(serialize_to_array_start:memgraph.protobuf.TestResponse) - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void)cached_has_bits; - - // uint64 request_id = 1; - if (this->request_id() != 0) { - target = stream->EnsureSpace(target); - target = - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->_internal_request_id(), target); - } - - // string content = 2; - if (this->content().size() > 0) { - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( - this->_internal_content().data(), static_cast(this->_internal_content().length()), - ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "memgraph.protobuf.TestResponse.content"); - target = stream->WriteStringMaybeAliased(2, this->_internal_content(), target); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>( - ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), - target, stream); - } - // @@protoc_insertion_point(serialize_to_array_end:memgraph.protobuf.TestResponse) - return target; -} - -size_t TestResponse::ByteSizeLong() const { - // @@protoc_insertion_point(message_byte_size_start:memgraph.protobuf.TestResponse) - size_t total_size = 0; - - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - // Prevent compiler warnings about cached_has_bits being unused - (void)cached_has_bits; - - // string content = 2; - if (this->content().size() > 0) { - total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(this->_internal_content()); - } - - // uint64 request_id = 1; - if (this->request_id() != 0) { - total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(this->_internal_request_id()); - } - - if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { - return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(_internal_metadata_, total_size, &_cached_size_); - } - int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); - SetCachedSize(cached_size); - return total_size; -} - -void TestResponse::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) { - // @@protoc_insertion_point(generalized_merge_from_start:memgraph.protobuf.TestResponse) - GOOGLE_DCHECK_NE(&from, this); - const TestResponse *source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated(&from); - if (source == nullptr) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:memgraph.protobuf.TestResponse) - ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:memgraph.protobuf.TestResponse) - MergeFrom(*source); - } -} - -void TestResponse::MergeFrom(const TestResponse &from) { - // @@protoc_insertion_point(class_specific_merge_from_start:memgraph.protobuf.TestResponse) - GOOGLE_DCHECK_NE(&from, this); - _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); - ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; - (void)cached_has_bits; - - if (from.content().size() > 0) { - _internal_set_content(from._internal_content()); - } - if (from.request_id() != 0) { - _internal_set_request_id(from._internal_request_id()); - } -} - -void TestResponse::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) { - // @@protoc_insertion_point(generalized_copy_from_start:memgraph.protobuf.TestResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void TestResponse::CopyFrom(const TestResponse &from) { - // @@protoc_insertion_point(class_specific_copy_from_start:memgraph.protobuf.TestResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool TestResponse::IsInitialized() const { return true; } - -void TestResponse::InternalSwap(TestResponse *other) { - using std::swap; - _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); - content_.Swap(&other->content_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); - swap(request_id_, other->request_id_); -} - -::PROTOBUF_NAMESPACE_ID::Metadata TestResponse::GetMetadata() const { return GetMetadataStatic(); } - -// @@protoc_insertion_point(namespace_scope) -} // namespace protobuf -} // namespace memgraph -PROTOBUF_NAMESPACE_OPEN -template <> -PROTOBUF_NOINLINE ::memgraph::protobuf::TestRequest *Arena::CreateMaybeMessage<::memgraph::protobuf::TestRequest>( - Arena *arena) { - return Arena::CreateMessageInternal<::memgraph::protobuf::TestRequest>(arena); -} -template <> -PROTOBUF_NOINLINE ::memgraph::protobuf::TestResponse *Arena::CreateMaybeMessage<::memgraph::protobuf::TestResponse>( - Arena *arena) { - return Arena::CreateMessageInternal<::memgraph::protobuf::TestResponse>(arena); -} -PROTOBUF_NAMESPACE_CLOSE - -// @@protoc_insertion_point(global_scope) -#include diff --git a/src/protobuf/echo_test.pb.h b/src/protobuf/echo_test.pb.h deleted file mode 100644 index 53f7598e3..000000000 --- a/src/protobuf/echo_test.pb.h +++ /dev/null @@ -1,563 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: src/protobuf/echo_test.proto - -#ifndef GOOGLE_PROTOBUF_INCLUDED_src_2fprotobuf_2fecho_5ftest_2eproto -#define GOOGLE_PROTOBUF_INCLUDED_src_2fprotobuf_2fecho_5ftest_2eproto - -#include -#include - -#include -#if PROTOBUF_VERSION < 3012000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 3012004 < PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include -#include -#include // IWYU pragma: export -#include -#include -#include -#include -#include -#include -#include -#include // IWYU pragma: export -#include -#include -// @@protoc_insertion_point(includes) -#include -#define PROTOBUF_INTERNAL_EXPORT_src_2fprotobuf_2fecho_5ftest_2eproto -PROTOBUF_NAMESPACE_OPEN -namespace internal { -class AnyMetadata; -} // namespace internal -PROTOBUF_NAMESPACE_CLOSE - -// Internal implementation detail -- do not use these members. -struct TableStruct_src_2fprotobuf_2fecho_5ftest_2eproto { - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE( - protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[2] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; - static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; - static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; -}; -extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_src_2fprotobuf_2fecho_5ftest_2eproto; -namespace memgraph { -namespace protobuf { -class TestRequest; -class TestRequestDefaultTypeInternal; -extern TestRequestDefaultTypeInternal _TestRequest_default_instance_; -class TestResponse; -class TestResponseDefaultTypeInternal; -extern TestResponseDefaultTypeInternal _TestResponse_default_instance_; -} // namespace protobuf -} // namespace memgraph -PROTOBUF_NAMESPACE_OPEN -template <> -::memgraph::protobuf::TestRequest *Arena::CreateMaybeMessage<::memgraph::protobuf::TestRequest>(Arena *); -template <> -::memgraph::protobuf::TestResponse *Arena::CreateMaybeMessage<::memgraph::protobuf::TestResponse>(Arena *); -PROTOBUF_NAMESPACE_CLOSE -namespace memgraph { -namespace protobuf { - -// =================================================================== - -class TestRequest PROTOBUF_FINAL - : public ::PROTOBUF_NAMESPACE_ID:: - Message /* @@protoc_insertion_point(class_definition:memgraph.protobuf.TestRequest) */ { - public: - inline TestRequest() : TestRequest(nullptr){}; - virtual ~TestRequest(); - - TestRequest(const TestRequest &from); - TestRequest(TestRequest &&from) noexcept : TestRequest() { *this = ::std::move(from); } - - inline TestRequest &operator=(const TestRequest &from) { - CopyFrom(from); - return *this; - } - inline TestRequest &operator=(TestRequest &&from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor *descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor *GetDescriptor() { return GetMetadataStatic().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection *GetReflection() { return GetMetadataStatic().reflection; } - static const TestRequest &default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const TestRequest *internal_default_instance() { - return reinterpret_cast(&_TestRequest_default_instance_); - } - static constexpr int kIndexInFileMessages = 0; - - friend void swap(TestRequest &a, TestRequest &b) { a.Swap(&b); } - inline void Swap(TestRequest *other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TestRequest *other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline TestRequest *New() const final { return CreateMaybeMessage(nullptr); } - - TestRequest *New(::PROTOBUF_NAMESPACE_ID::Arena *arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final; - void CopyFrom(const TestRequest &from); - void MergeFrom(const TestRequest &from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char *_InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8 *_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(TestRequest *other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "memgraph.protobuf.TestRequest"; } - - protected: - explicit TestRequest(::PROTOBUF_NAMESPACE_ID::Arena *arena); - - private: - static void ArenaDtor(void *object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *arena); - - public: - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_src_2fprotobuf_2fecho_5ftest_2eproto); - return ::descriptor_table_src_2fprotobuf_2fecho_5ftest_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kContentFieldNumber = 2, - kRequestIdFieldNumber = 1, - }; - // string content = 2; - void clear_content(); - const std::string &content() const; - void set_content(const std::string &value); - void set_content(std::string &&value); - void set_content(const char *value); - void set_content(const char *value, size_t size); - std::string *mutable_content(); - std::string *release_content(); - void set_allocated_content(std::string *content); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED( - "The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string *unsafe_arena_release_content(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED( - "The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_content(std::string *content); - - private: - const std::string &_internal_content() const; - void _internal_set_content(const std::string &value); - std::string *_internal_mutable_content(); - - public: - // uint64 request_id = 1; - void clear_request_id(); - ::PROTOBUF_NAMESPACE_ID::uint64 request_id() const; - void set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value); - - private: - ::PROTOBUF_NAMESPACE_ID::uint64 _internal_request_id() const; - void _internal_set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value); - - public: - // @@protoc_insertion_point(class_scope:memgraph.protobuf.TestRequest) - private: - class _Internal; - - template - friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr content_; - ::PROTOBUF_NAMESPACE_ID::uint64 request_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_src_2fprotobuf_2fecho_5ftest_2eproto; -}; -// ------------------------------------------------------------------- - -class TestResponse PROTOBUF_FINAL - : public ::PROTOBUF_NAMESPACE_ID:: - Message /* @@protoc_insertion_point(class_definition:memgraph.protobuf.TestResponse) */ { - public: - inline TestResponse() : TestResponse(nullptr){}; - virtual ~TestResponse(); - - TestResponse(const TestResponse &from); - TestResponse(TestResponse &&from) noexcept : TestResponse() { *this = ::std::move(from); } - - inline TestResponse &operator=(const TestResponse &from) { - CopyFrom(from); - return *this; - } - inline TestResponse &operator=(TestResponse &&from) noexcept { - if (GetArena() == from.GetArena()) { - if (this != &from) InternalSwap(&from); - } else { - CopyFrom(from); - } - return *this; - } - - static const ::PROTOBUF_NAMESPACE_ID::Descriptor *descriptor() { return GetDescriptor(); } - static const ::PROTOBUF_NAMESPACE_ID::Descriptor *GetDescriptor() { return GetMetadataStatic().descriptor; } - static const ::PROTOBUF_NAMESPACE_ID::Reflection *GetReflection() { return GetMetadataStatic().reflection; } - static const TestResponse &default_instance(); - - static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY - static inline const TestResponse *internal_default_instance() { - return reinterpret_cast(&_TestResponse_default_instance_); - } - static constexpr int kIndexInFileMessages = 1; - - friend void swap(TestResponse &a, TestResponse &b) { a.Swap(&b); } - inline void Swap(TestResponse *other) { - if (other == this) return; - if (GetArena() == other->GetArena()) { - InternalSwap(other); - } else { - ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); - } - } - void UnsafeArenaSwap(TestResponse *other) { - if (other == this) return; - GOOGLE_DCHECK(GetArena() == other->GetArena()); - InternalSwap(other); - } - - // implements Message ---------------------------------------------- - - inline TestResponse *New() const final { return CreateMaybeMessage(nullptr); } - - TestResponse *New(::PROTOBUF_NAMESPACE_ID::Arena *arena) const final { - return CreateMaybeMessage(arena); - } - void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final; - void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final; - void CopyFrom(const TestResponse &from); - void MergeFrom(const TestResponse &from); - PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; - bool IsInitialized() const final; - - size_t ByteSizeLong() const final; - const char *_InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final; - ::PROTOBUF_NAMESPACE_ID::uint8 *_InternalSerialize( - ::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final; - int GetCachedSize() const final { return _cached_size_.Get(); } - - private: - inline void SharedCtor(); - inline void SharedDtor(); - void SetCachedSize(int size) const final; - void InternalSwap(TestResponse *other); - friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; - static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "memgraph.protobuf.TestResponse"; } - - protected: - explicit TestResponse(::PROTOBUF_NAMESPACE_ID::Arena *arena); - - private: - static void ArenaDtor(void *object); - inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *arena); - - public: - ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; - - private: - static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { - ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_src_2fprotobuf_2fecho_5ftest_2eproto); - return ::descriptor_table_src_2fprotobuf_2fecho_5ftest_2eproto.file_level_metadata[kIndexInFileMessages]; - } - - public: - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - enum : int { - kContentFieldNumber = 2, - kRequestIdFieldNumber = 1, - }; - // string content = 2; - void clear_content(); - const std::string &content() const; - void set_content(const std::string &value); - void set_content(std::string &&value); - void set_content(const char *value); - void set_content(const char *value, size_t size); - std::string *mutable_content(); - std::string *release_content(); - void set_allocated_content(std::string *content); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED( - "The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - std::string *unsafe_arena_release_content(); - GOOGLE_PROTOBUF_RUNTIME_DEPRECATED( - "The unsafe_arena_ accessors for" - " string fields are deprecated and will be removed in a" - " future release.") - void unsafe_arena_set_allocated_content(std::string *content); - - private: - const std::string &_internal_content() const; - void _internal_set_content(const std::string &value); - std::string *_internal_mutable_content(); - - public: - // uint64 request_id = 1; - void clear_request_id(); - ::PROTOBUF_NAMESPACE_ID::uint64 request_id() const; - void set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value); - - private: - ::PROTOBUF_NAMESPACE_ID::uint64 _internal_request_id() const; - void _internal_set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value); - - public: - // @@protoc_insertion_point(class_scope:memgraph.protobuf.TestResponse) - private: - class _Internal; - - template - friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; - typedef void InternalArenaConstructable_; - typedef void DestructorSkippable_; - ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr content_; - ::PROTOBUF_NAMESPACE_ID::uint64 request_id_; - mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; - friend struct ::TableStruct_src_2fprotobuf_2fecho_5ftest_2eproto; -}; -// =================================================================== - -// =================================================================== - -#ifdef __GNUC__ -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wstrict-aliasing" -#endif // __GNUC__ -// TestRequest - -// uint64 request_id = 1; -inline void TestRequest::clear_request_id() { request_id_ = PROTOBUF_ULONGLONG(0); } -inline ::PROTOBUF_NAMESPACE_ID::uint64 TestRequest::_internal_request_id() const { return request_id_; } -inline ::PROTOBUF_NAMESPACE_ID::uint64 TestRequest::request_id() const { - // @@protoc_insertion_point(field_get:memgraph.protobuf.TestRequest.request_id) - return _internal_request_id(); -} -inline void TestRequest::_internal_set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value) { request_id_ = value; } -inline void TestRequest::set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value) { - _internal_set_request_id(value); - // @@protoc_insertion_point(field_set:memgraph.protobuf.TestRequest.request_id) -} - -// string content = 2; -inline void TestRequest::clear_content() { - content_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string &TestRequest::content() const { - // @@protoc_insertion_point(field_get:memgraph.protobuf.TestRequest.content) - return _internal_content(); -} -inline void TestRequest::set_content(const std::string &value) { - _internal_set_content(value); - // @@protoc_insertion_point(field_set:memgraph.protobuf.TestRequest.content) -} -inline std::string *TestRequest::mutable_content() { - // @@protoc_insertion_point(field_mutable:memgraph.protobuf.TestRequest.content) - return _internal_mutable_content(); -} -inline const std::string &TestRequest::_internal_content() const { return content_.Get(); } -inline void TestRequest::_internal_set_content(const std::string &value) { - content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void TestRequest::set_content(std::string &&value) { - content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:memgraph.protobuf.TestRequest.content) -} -inline void TestRequest::set_content(const char *value) { - GOOGLE_DCHECK(value != nullptr); - - content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:memgraph.protobuf.TestRequest.content) -} -inline void TestRequest::set_content(const char *value, size_t size) { - content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:memgraph.protobuf.TestRequest.content) -} -inline std::string *TestRequest::_internal_mutable_content() { - return content_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string *TestRequest::release_content() { - // @@protoc_insertion_point(field_release:memgraph.protobuf.TestRequest.content) - return content_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void TestRequest::set_allocated_content(std::string *content) { - if (content != nullptr) { - } else { - } - content_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), content, GetArena()); - // @@protoc_insertion_point(field_set_allocated:memgraph.protobuf.TestRequest.content) -} -inline std::string *TestRequest::unsafe_arena_release_content() { - // @@protoc_insertion_point(field_unsafe_arena_release:memgraph.protobuf.TestRequest.content) - GOOGLE_DCHECK(GetArena() != nullptr); - - return content_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void TestRequest::unsafe_arena_set_allocated_content(std::string *content) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (content != nullptr) { - } else { - } - content_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), content, - GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:memgraph.protobuf.TestRequest.content) -} - -// ------------------------------------------------------------------- - -// TestResponse - -// uint64 request_id = 1; -inline void TestResponse::clear_request_id() { request_id_ = PROTOBUF_ULONGLONG(0); } -inline ::PROTOBUF_NAMESPACE_ID::uint64 TestResponse::_internal_request_id() const { return request_id_; } -inline ::PROTOBUF_NAMESPACE_ID::uint64 TestResponse::request_id() const { - // @@protoc_insertion_point(field_get:memgraph.protobuf.TestResponse.request_id) - return _internal_request_id(); -} -inline void TestResponse::_internal_set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value) { request_id_ = value; } -inline void TestResponse::set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value) { - _internal_set_request_id(value); - // @@protoc_insertion_point(field_set:memgraph.protobuf.TestResponse.request_id) -} - -// string content = 2; -inline void TestResponse::clear_content() { - content_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline const std::string &TestResponse::content() const { - // @@protoc_insertion_point(field_get:memgraph.protobuf.TestResponse.content) - return _internal_content(); -} -inline void TestResponse::set_content(const std::string &value) { - _internal_set_content(value); - // @@protoc_insertion_point(field_set:memgraph.protobuf.TestResponse.content) -} -inline std::string *TestResponse::mutable_content() { - // @@protoc_insertion_point(field_mutable:memgraph.protobuf.TestResponse.content) - return _internal_mutable_content(); -} -inline const std::string &TestResponse::_internal_content() const { return content_.Get(); } -inline void TestResponse::_internal_set_content(const std::string &value) { - content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); -} -inline void TestResponse::set_content(std::string &&value) { - content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); - // @@protoc_insertion_point(field_set_rvalue:memgraph.protobuf.TestResponse.content) -} -inline void TestResponse::set_content(const char *value) { - GOOGLE_DCHECK(value != nullptr); - - content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); - // @@protoc_insertion_point(field_set_char:memgraph.protobuf.TestResponse.content) -} -inline void TestResponse::set_content(const char *value, size_t size) { - content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size), GetArena()); - // @@protoc_insertion_point(field_set_pointer:memgraph.protobuf.TestResponse.content) -} -inline std::string *TestResponse::_internal_mutable_content() { - return content_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline std::string *TestResponse::release_content() { - // @@protoc_insertion_point(field_release:memgraph.protobuf.TestResponse.content) - return content_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void TestResponse::set_allocated_content(std::string *content) { - if (content != nullptr) { - } else { - } - content_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), content, GetArena()); - // @@protoc_insertion_point(field_set_allocated:memgraph.protobuf.TestResponse.content) -} -inline std::string *TestResponse::unsafe_arena_release_content() { - // @@protoc_insertion_point(field_unsafe_arena_release:memgraph.protobuf.TestResponse.content) - GOOGLE_DCHECK(GetArena() != nullptr); - - return content_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); -} -inline void TestResponse::unsafe_arena_set_allocated_content(std::string *content) { - GOOGLE_DCHECK(GetArena() != nullptr); - if (content != nullptr) { - } else { - } - content_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), content, - GetArena()); - // @@protoc_insertion_point(field_unsafe_arena_set_allocated:memgraph.protobuf.TestResponse.content) -} - -#ifdef __GNUC__ -#pragma GCC diagnostic pop -#endif // __GNUC__ -// ------------------------------------------------------------------- - -// @@protoc_insertion_point(namespace_scope) - -} // namespace protobuf -} // namespace memgraph - -// @@protoc_insertion_point(global_scope) - -#include -#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_src_2fprotobuf_2fecho_5ftest_2eproto diff --git a/src/protobuf/echo_test.proto b/src/protobuf/echo_test.proto deleted file mode 100644 index 61ff33d5e..000000000 --- a/src/protobuf/echo_test.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; - -package memgraph.protobuf; - -message TestRequest { - // option optimize_for = LITE_RUNTIME; - // option cc_enable_arenas = true; - - uint64 request_id = 1; - string content = 2; -} - -message TestResponse { - // option optimize_for = LITE_RUNTIME; - // option cc_enable_arenas = true; - - uint64 request_id = 1; - string content = 2; -} diff --git a/src/protobuf/messages.pb.cc b/src/protobuf/messages.pb.cc new file mode 100644 index 000000000..fd9575b50 --- /dev/null +++ b/src/protobuf/messages.pb.cc @@ -0,0 +1,1268 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: src/protobuf/messages.proto + +#include "protobuf/messages.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +extern PROTOBUF_INTERNAL_EXPORT_src_2fprotobuf_2fmessages_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> + scc_info_Address_src_2fprotobuf_2fmessages_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_src_2fprotobuf_2fmessages_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> + scc_info_Content_src_2fprotobuf_2fmessages_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_src_2fprotobuf_2fmessages_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> + scc_info_TestRequest_src_2fprotobuf_2fmessages_2eproto; +namespace memgraph { +namespace protobuf { +class AddressDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed
_instance; +} _Address_default_instance_; +class TestRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _TestRequest_default_instance_; +class ContentDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; + const ::memgraph::protobuf::TestRequest *test_request_; +} _Content_default_instance_; +class UberMessageDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _UberMessage_default_instance_; +} // namespace protobuf +} // namespace memgraph +static void InitDefaultsscc_info_Address_src_2fprotobuf_2fmessages_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void *ptr = &::memgraph::protobuf::_Address_default_instance_; + new (ptr)::memgraph::protobuf::Address(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::memgraph::protobuf::Address::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Address_src_2fprotobuf_2fmessages_2eproto = { + {ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, + InitDefaultsscc_info_Address_src_2fprotobuf_2fmessages_2eproto}, + {}}; + +static void InitDefaultsscc_info_Content_src_2fprotobuf_2fmessages_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void *ptr = &::memgraph::protobuf::_Content_default_instance_; + new (ptr)::memgraph::protobuf::Content(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::memgraph::protobuf::Content::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Content_src_2fprotobuf_2fmessages_2eproto = { + {ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, + InitDefaultsscc_info_Content_src_2fprotobuf_2fmessages_2eproto}, + { + &scc_info_TestRequest_src_2fprotobuf_2fmessages_2eproto.base, + }}; + +static void InitDefaultsscc_info_TestRequest_src_2fprotobuf_2fmessages_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void *ptr = &::memgraph::protobuf::_TestRequest_default_instance_; + new (ptr)::memgraph::protobuf::TestRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::memgraph::protobuf::TestRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_TestRequest_src_2fprotobuf_2fmessages_2eproto = { + {ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, + InitDefaultsscc_info_TestRequest_src_2fprotobuf_2fmessages_2eproto}, + {}}; + +static void InitDefaultsscc_info_UberMessage_src_2fprotobuf_2fmessages_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void *ptr = &::memgraph::protobuf::_UberMessage_default_instance_; + new (ptr)::memgraph::protobuf::UberMessage(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::memgraph::protobuf::UberMessage::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_UberMessage_src_2fprotobuf_2fmessages_2eproto = { + {ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, + InitDefaultsscc_info_UberMessage_src_2fprotobuf_2fmessages_2eproto}, + { + &scc_info_Address_src_2fprotobuf_2fmessages_2eproto.base, + &scc_info_Content_src_2fprotobuf_2fmessages_2eproto.base, + }}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_src_2fprotobuf_2fmessages_2eproto[4]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const * + *file_level_enum_descriptors_src_2fprotobuf_2fmessages_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const * + *file_level_service_descriptors_src_2fprotobuf_2fmessages_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 + TableStruct_src_2fprotobuf_2fmessages_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::Address, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::Address, unique_id_), + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::Address, last_known_ip_), + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::Address, last_known_port_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::TestRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::TestRequest, request_id_), + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::TestRequest, content_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::Content, _internal_metadata_), + ~0u, // no _extensions_ + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::Content, _oneof_case_[0]), + ~0u, // no _weak_field_map_ + offsetof(::memgraph::protobuf::ContentDefaultTypeInternal, test_request_), + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::Content, content_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::UberMessage, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::UberMessage, request_id_), + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::UberMessage, to_address_), + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::UberMessage, from_address_), + PROTOBUF_FIELD_OFFSET(::memgraph::protobuf::UberMessage, content_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + {0, -1, sizeof(::memgraph::protobuf::Address)}, + {8, -1, sizeof(::memgraph::protobuf::TestRequest)}, + {15, -1, sizeof(::memgraph::protobuf::Content)}, + {22, -1, sizeof(::memgraph::protobuf::UberMessage)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const *const file_default_instances[] = { + reinterpret_cast(&::memgraph::protobuf::_Address_default_instance_), + reinterpret_cast(&::memgraph::protobuf::_TestRequest_default_instance_), + reinterpret_cast(&::memgraph::protobuf::_Content_default_instance_), + reinterpret_cast(&::memgraph::protobuf::_UberMessage_default_instance_), +}; + +const char descriptor_table_protodef_src_2fprotobuf_2fmessages_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\033src/protobuf/messages.proto\022\021memgraph." + "protobuf\"L\n\007Address\022\021\n\tunique_id\030\001 \001(\014\022\025" + "\n\rlast_known_ip\030\002 \001(\014\022\027\n\017last_known_port" + "\030\003 \001(\r\"2\n\013TestRequest\022\022\n\nrequest_id\030\001 \001(" + "\004\022\017\n\007content\030\002 \001(\t\"L\n\007Content\0226\n\014test_re" + "quest\030\001 \001(\0132\036.memgraph.protobuf.TestRequ" + "estH\000B\t\n\007content\"\260\001\n\013UberMessage\022\022\n\nrequ" + "est_id\030\001 \001(\004\022.\n\nto_address\030\002 \001(\0132\032.memgr" + "aph.protobuf.Address\0220\n\014from_address\030\003 \001" + "(\0132\032.memgraph.protobuf.Address\022+\n\007conten" + "t\030\004 \001(\0132\032.memgraph.protobuf.Contentb\006pro" + "to3"; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable + *const descriptor_table_src_2fprotobuf_2fmessages_2eproto_deps[1] = {}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase + *const descriptor_table_src_2fprotobuf_2fmessages_2eproto_sccs[4] = { + &scc_info_Address_src_2fprotobuf_2fmessages_2eproto.base, + &scc_info_Content_src_2fprotobuf_2fmessages_2eproto.base, + &scc_info_TestRequest_src_2fprotobuf_2fmessages_2eproto.base, + &scc_info_UberMessage_src_2fprotobuf_2fmessages_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_src_2fprotobuf_2fmessages_2eproto_once; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_src_2fprotobuf_2fmessages_2eproto = { + false, + false, + descriptor_table_protodef_src_2fprotobuf_2fmessages_2eproto, + "src/protobuf/messages.proto", + 443, + &descriptor_table_src_2fprotobuf_2fmessages_2eproto_once, + descriptor_table_src_2fprotobuf_2fmessages_2eproto_sccs, + descriptor_table_src_2fprotobuf_2fmessages_2eproto_deps, + 4, + 0, + schemas, + file_default_instances, + TableStruct_src_2fprotobuf_2fmessages_2eproto::offsets, + file_level_metadata_src_2fprotobuf_2fmessages_2eproto, + 4, + file_level_enum_descriptors_src_2fprotobuf_2fmessages_2eproto, + file_level_service_descriptors_src_2fprotobuf_2fmessages_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_src_2fprotobuf_2fmessages_2eproto = + (static_cast( + ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_src_2fprotobuf_2fmessages_2eproto)), + true); +namespace memgraph { +namespace protobuf { + +// =================================================================== + +void Address::InitAsDefaultInstance() {} +class Address::_Internal { + public: +}; + +Address::Address(::PROTOBUF_NAMESPACE_ID::Arena *arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:memgraph.protobuf.Address) +} +Address::Address(const Address &from) : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + unique_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_unique_id().empty()) { + unique_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_unique_id(), + GetArena()); + } + last_known_ip_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_last_known_ip().empty()) { + last_known_ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + from._internal_last_known_ip(), GetArena()); + } + last_known_port_ = from.last_known_port_; + // @@protoc_insertion_point(copy_constructor:memgraph.protobuf.Address) +} + +void Address::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Address_src_2fprotobuf_2fmessages_2eproto.base); + unique_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + last_known_ip_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + last_known_port_ = 0u; +} + +Address::~Address() { + // @@protoc_insertion_point(destructor:memgraph.protobuf.Address) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Address::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + unique_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + last_known_ip_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void Address::ArenaDtor(void *object) { + Address *_this = reinterpret_cast
(object); + (void)_this; +} +void Address::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *) {} +void Address::SetCachedSize(int size) const { _cached_size_.Set(size); } +const Address &Address::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Address_src_2fprotobuf_2fmessages_2eproto.base); + return *internal_default_instance(); +} + +void Address::Clear() { + // @@protoc_insertion_point(message_clear_start:memgraph.protobuf.Address) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + unique_id_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + last_known_ip_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + last_known_port_ = 0u; + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char *Address::_InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) { +#define CHK_(x) \ + if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena *arena = GetArena(); + (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // bytes unique_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_unique_id(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // bytes last_known_ip = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_last_known_ip(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // uint32 last_known_port = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) { + last_known_port_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse( + tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8 *Address::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const { + // @@protoc_insertion_point(serialize_to_array_start:memgraph.protobuf.Address) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void)cached_has_bits; + + // bytes unique_id = 1; + if (this->unique_id().size() > 0) { + target = stream->WriteBytesMaybeAliased(1, this->_internal_unique_id(), target); + } + + // bytes last_known_ip = 2; + if (this->last_known_ip().size() > 0) { + target = stream->WriteBytesMaybeAliased(2, this->_internal_last_known_ip(), target); + } + + // uint32 last_known_port = 3; + if (this->last_known_port() != 0) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt32ToArray(3, this->_internal_last_known_port(), + target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>( + ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), + target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:memgraph.protobuf.Address) + return target; +} + +size_t Address::ByteSizeLong() const { + // @@protoc_insertion_point(message_byte_size_start:memgraph.protobuf.Address) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + // bytes unique_id = 1; + if (this->unique_id().size() > 0) { + total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(this->_internal_unique_id()); + } + + // bytes last_known_ip = 2; + if (this->last_known_ip().size() > 0) { + total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(this->_internal_last_known_ip()); + } + + // uint32 last_known_port = 3; + if (this->last_known_port() != 0) { + total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt32Size(this->_internal_last_known_port()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(_internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Address::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) { + // @@protoc_insertion_point(generalized_merge_from_start:memgraph.protobuf.Address) + GOOGLE_DCHECK_NE(&from, this); + const Address *source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated
(&from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:memgraph.protobuf.Address) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:memgraph.protobuf.Address) + MergeFrom(*source); + } +} + +void Address::MergeFrom(const Address &from) { + // @@protoc_insertion_point(class_specific_merge_from_start:memgraph.protobuf.Address) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void)cached_has_bits; + + if (from.unique_id().size() > 0) { + _internal_set_unique_id(from._internal_unique_id()); + } + if (from.last_known_ip().size() > 0) { + _internal_set_last_known_ip(from._internal_last_known_ip()); + } + if (from.last_known_port() != 0) { + _internal_set_last_known_port(from._internal_last_known_port()); + } +} + +void Address::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) { + // @@protoc_insertion_point(generalized_copy_from_start:memgraph.protobuf.Address) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Address::CopyFrom(const Address &from) { + // @@protoc_insertion_point(class_specific_copy_from_start:memgraph.protobuf.Address) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Address::IsInitialized() const { return true; } + +void Address::InternalSwap(Address *other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + unique_id_.Swap(&other->unique_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + last_known_ip_.Swap(&other->last_known_ip_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); + swap(last_known_port_, other->last_known_port_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Address::GetMetadata() const { return GetMetadataStatic(); } + +// =================================================================== + +void TestRequest::InitAsDefaultInstance() {} +class TestRequest::_Internal { + public: +}; + +TestRequest::TestRequest(::PROTOBUF_NAMESPACE_ID::Arena *arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:memgraph.protobuf.TestRequest) +} +TestRequest::TestRequest(const TestRequest &from) : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_content().empty()) { + content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_content(), + GetArena()); + } + request_id_ = from.request_id_; + // @@protoc_insertion_point(copy_constructor:memgraph.protobuf.TestRequest) +} + +void TestRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_TestRequest_src_2fprotobuf_2fmessages_2eproto.base); + content_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + request_id_ = PROTOBUF_ULONGLONG(0); +} + +TestRequest::~TestRequest() { + // @@protoc_insertion_point(destructor:memgraph.protobuf.TestRequest) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void TestRequest::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + content_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void TestRequest::ArenaDtor(void *object) { + TestRequest *_this = reinterpret_cast(object); + (void)_this; +} +void TestRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *) {} +void TestRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } +const TestRequest &TestRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_TestRequest_src_2fprotobuf_2fmessages_2eproto.base); + return *internal_default_instance(); +} + +void TestRequest::Clear() { + // @@protoc_insertion_point(message_clear_start:memgraph.protobuf.TestRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + content_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + request_id_ = PROTOBUF_ULONGLONG(0); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char *TestRequest::_InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) { +#define CHK_(x) \ + if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena *arena = GetArena(); + (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // uint64 request_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + request_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // string content = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + auto str = _internal_mutable_content(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "memgraph.protobuf.TestRequest.content")); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse( + tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8 *TestRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const { + // @@protoc_insertion_point(serialize_to_array_start:memgraph.protobuf.TestRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void)cached_has_bits; + + // uint64 request_id = 1; + if (this->request_id() != 0) { + target = stream->EnsureSpace(target); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->_internal_request_id(), target); + } + + // string content = 2; + if (this->content().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_content().data(), static_cast(this->_internal_content().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "memgraph.protobuf.TestRequest.content"); + target = stream->WriteStringMaybeAliased(2, this->_internal_content(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>( + ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), + target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:memgraph.protobuf.TestRequest) + return target; +} + +size_t TestRequest::ByteSizeLong() const { + // @@protoc_insertion_point(message_byte_size_start:memgraph.protobuf.TestRequest) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + // string content = 2; + if (this->content().size() > 0) { + total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(this->_internal_content()); + } + + // uint64 request_id = 1; + if (this->request_id() != 0) { + total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(this->_internal_request_id()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(_internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void TestRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) { + // @@protoc_insertion_point(generalized_merge_from_start:memgraph.protobuf.TestRequest) + GOOGLE_DCHECK_NE(&from, this); + const TestRequest *source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated(&from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:memgraph.protobuf.TestRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:memgraph.protobuf.TestRequest) + MergeFrom(*source); + } +} + +void TestRequest::MergeFrom(const TestRequest &from) { + // @@protoc_insertion_point(class_specific_merge_from_start:memgraph.protobuf.TestRequest) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void)cached_has_bits; + + if (from.content().size() > 0) { + _internal_set_content(from._internal_content()); + } + if (from.request_id() != 0) { + _internal_set_request_id(from._internal_request_id()); + } +} + +void TestRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) { + // @@protoc_insertion_point(generalized_copy_from_start:memgraph.protobuf.TestRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TestRequest::CopyFrom(const TestRequest &from) { + // @@protoc_insertion_point(class_specific_copy_from_start:memgraph.protobuf.TestRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TestRequest::IsInitialized() const { return true; } + +void TestRequest::InternalSwap(TestRequest *other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + content_.Swap(&other->content_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + swap(request_id_, other->request_id_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata TestRequest::GetMetadata() const { return GetMetadataStatic(); } + +// =================================================================== + +void Content::InitAsDefaultInstance() { + ::memgraph::protobuf::_Content_default_instance_.test_request_ = + const_cast<::memgraph::protobuf::TestRequest *>(::memgraph::protobuf::TestRequest::internal_default_instance()); +} +class Content::_Internal { + public: + static const ::memgraph::protobuf::TestRequest &test_request(const Content *msg); +}; + +const ::memgraph::protobuf::TestRequest &Content::_Internal::test_request(const Content *msg) { + return *msg->content_.test_request_; +} +void Content::set_allocated_test_request(::memgraph::protobuf::TestRequest *test_request) { + ::PROTOBUF_NAMESPACE_ID::Arena *message_arena = GetArena(); + clear_content(); + if (test_request) { + ::PROTOBUF_NAMESPACE_ID::Arena *submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(test_request); + if (message_arena != submessage_arena) { + test_request = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(message_arena, test_request, submessage_arena); + } + set_has_test_request(); + content_.test_request_ = test_request; + } + // @@protoc_insertion_point(field_set_allocated:memgraph.protobuf.Content.test_request) +} +Content::Content(::PROTOBUF_NAMESPACE_ID::Arena *arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:memgraph.protobuf.Content) +} +Content::Content(const Content &from) : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + clear_has_content(); + switch (from.content_case()) { + case kTestRequest: { + _internal_mutable_test_request()->::memgraph::protobuf::TestRequest::MergeFrom(from._internal_test_request()); + break; + } + case CONTENT_NOT_SET: { + break; + } + } + // @@protoc_insertion_point(copy_constructor:memgraph.protobuf.Content) +} + +void Content::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Content_src_2fprotobuf_2fmessages_2eproto.base); + clear_has_content(); +} + +Content::~Content() { + // @@protoc_insertion_point(destructor:memgraph.protobuf.Content) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void Content::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + if (has_content()) { + clear_content(); + } +} + +void Content::ArenaDtor(void *object) { + Content *_this = reinterpret_cast(object); + (void)_this; +} +void Content::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *) {} +void Content::SetCachedSize(int size) const { _cached_size_.Set(size); } +const Content &Content::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Content_src_2fprotobuf_2fmessages_2eproto.base); + return *internal_default_instance(); +} + +void Content::clear_content() { + // @@protoc_insertion_point(one_of_clear_start:memgraph.protobuf.Content) + switch (content_case()) { + case kTestRequest: { + if (GetArena() == nullptr) { + delete content_.test_request_; + } + break; + } + case CONTENT_NOT_SET: { + break; + } + } + _oneof_case_[0] = CONTENT_NOT_SET; +} + +void Content::Clear() { + // @@protoc_insertion_point(message_clear_start:memgraph.protobuf.Content) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + clear_content(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char *Content::_InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) { +#define CHK_(x) \ + if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena *arena = GetArena(); + (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // .memgraph.protobuf.TestRequest test_request = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_test_request(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse( + tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8 *Content::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const { + // @@protoc_insertion_point(serialize_to_array_start:memgraph.protobuf.Content) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void)cached_has_bits; + + // .memgraph.protobuf.TestRequest test_request = 1; + if (_internal_has_test_request()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::InternalWriteMessage(1, _Internal::test_request(this), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>( + ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), + target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:memgraph.protobuf.Content) + return target; +} + +size_t Content::ByteSizeLong() const { + // @@protoc_insertion_point(message_byte_size_start:memgraph.protobuf.Content) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + switch (content_case()) { + // .memgraph.protobuf.TestRequest test_request = 1; + case kTestRequest: { + total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(*content_.test_request_); + break; + } + case CONTENT_NOT_SET: { + break; + } + } + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(_internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void Content::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) { + // @@protoc_insertion_point(generalized_merge_from_start:memgraph.protobuf.Content) + GOOGLE_DCHECK_NE(&from, this); + const Content *source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated(&from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:memgraph.protobuf.Content) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:memgraph.protobuf.Content) + MergeFrom(*source); + } +} + +void Content::MergeFrom(const Content &from) { + // @@protoc_insertion_point(class_specific_merge_from_start:memgraph.protobuf.Content) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void)cached_has_bits; + + switch (from.content_case()) { + case kTestRequest: { + _internal_mutable_test_request()->::memgraph::protobuf::TestRequest::MergeFrom(from._internal_test_request()); + break; + } + case CONTENT_NOT_SET: { + break; + } + } +} + +void Content::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) { + // @@protoc_insertion_point(generalized_copy_from_start:memgraph.protobuf.Content) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void Content::CopyFrom(const Content &from) { + // @@protoc_insertion_point(class_specific_copy_from_start:memgraph.protobuf.Content) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool Content::IsInitialized() const { return true; } + +void Content::InternalSwap(Content *other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + swap(content_, other->content_); + swap(_oneof_case_[0], other->_oneof_case_[0]); +} + +::PROTOBUF_NAMESPACE_ID::Metadata Content::GetMetadata() const { return GetMetadataStatic(); } + +// =================================================================== + +void UberMessage::InitAsDefaultInstance() { + ::memgraph::protobuf::_UberMessage_default_instance_._instance.get_mutable()->to_address_ = + const_cast<::memgraph::protobuf::Address *>(::memgraph::protobuf::Address::internal_default_instance()); + ::memgraph::protobuf::_UberMessage_default_instance_._instance.get_mutable()->from_address_ = + const_cast<::memgraph::protobuf::Address *>(::memgraph::protobuf::Address::internal_default_instance()); + ::memgraph::protobuf::_UberMessage_default_instance_._instance.get_mutable()->content_ = + const_cast<::memgraph::protobuf::Content *>(::memgraph::protobuf::Content::internal_default_instance()); +} +class UberMessage::_Internal { + public: + static const ::memgraph::protobuf::Address &to_address(const UberMessage *msg); + static const ::memgraph::protobuf::Address &from_address(const UberMessage *msg); + static const ::memgraph::protobuf::Content &content(const UberMessage *msg); +}; + +const ::memgraph::protobuf::Address &UberMessage::_Internal::to_address(const UberMessage *msg) { + return *msg->to_address_; +} +const ::memgraph::protobuf::Address &UberMessage::_Internal::from_address(const UberMessage *msg) { + return *msg->from_address_; +} +const ::memgraph::protobuf::Content &UberMessage::_Internal::content(const UberMessage *msg) { return *msg->content_; } +UberMessage::UberMessage(::PROTOBUF_NAMESPACE_ID::Arena *arena) : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:memgraph.protobuf.UberMessage) +} +UberMessage::UberMessage(const UberMessage &from) : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_to_address()) { + to_address_ = new ::memgraph::protobuf::Address(*from.to_address_); + } else { + to_address_ = nullptr; + } + if (from._internal_has_from_address()) { + from_address_ = new ::memgraph::protobuf::Address(*from.from_address_); + } else { + from_address_ = nullptr; + } + if (from._internal_has_content()) { + content_ = new ::memgraph::protobuf::Content(*from.content_); + } else { + content_ = nullptr; + } + request_id_ = from.request_id_; + // @@protoc_insertion_point(copy_constructor:memgraph.protobuf.UberMessage) +} + +void UberMessage::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_UberMessage_src_2fprotobuf_2fmessages_2eproto.base); + ::memset(&to_address_, 0, + static_cast(reinterpret_cast(&request_id_) - reinterpret_cast(&to_address_)) + + sizeof(request_id_)); +} + +UberMessage::~UberMessage() { + // @@protoc_insertion_point(destructor:memgraph.protobuf.UberMessage) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void UberMessage::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + if (this != internal_default_instance()) delete to_address_; + if (this != internal_default_instance()) delete from_address_; + if (this != internal_default_instance()) delete content_; +} + +void UberMessage::ArenaDtor(void *object) { + UberMessage *_this = reinterpret_cast(object); + (void)_this; +} +void UberMessage::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *) {} +void UberMessage::SetCachedSize(int size) const { _cached_size_.Set(size); } +const UberMessage &UberMessage::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_UberMessage_src_2fprotobuf_2fmessages_2eproto.base); + return *internal_default_instance(); +} + +void UberMessage::Clear() { + // @@protoc_insertion_point(message_clear_start:memgraph.protobuf.UberMessage) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + if (GetArena() == nullptr && to_address_ != nullptr) { + delete to_address_; + } + to_address_ = nullptr; + if (GetArena() == nullptr && from_address_ != nullptr) { + delete from_address_; + } + from_address_ = nullptr; + if (GetArena() == nullptr && content_ != nullptr) { + delete content_; + } + content_ = nullptr; + request_id_ = PROTOBUF_ULONGLONG(0); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char *UberMessage::_InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) { +#define CHK_(x) \ + if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + ::PROTOBUF_NAMESPACE_ID::Arena *arena = GetArena(); + (void)arena; + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // uint64 request_id = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + request_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .memgraph.protobuf.Address to_address = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_to_address(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .memgraph.protobuf.Address from_address = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_from_address(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // .memgraph.protobuf.Content content = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_content(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: { + handle_unusual: + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); + goto success; + } + ptr = UnknownFieldParse( + tag, _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), ptr, ctx); + CHK_(ptr != nullptr); + continue; + } + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} + +::PROTOBUF_NAMESPACE_ID::uint8 *UberMessage::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const { + // @@protoc_insertion_point(serialize_to_array_start:memgraph.protobuf.UberMessage) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void)cached_has_bits; + + // uint64 request_id = 1; + if (this->request_id() != 0) { + target = stream->EnsureSpace(target); + target = + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(1, this->_internal_request_id(), target); + } + + // .memgraph.protobuf.Address to_address = 2; + if (this->has_to_address()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::InternalWriteMessage(2, _Internal::to_address(this), + target, stream); + } + + // .memgraph.protobuf.Address from_address = 3; + if (this->has_from_address()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::InternalWriteMessage(3, _Internal::from_address(this), + target, stream); + } + + // .memgraph.protobuf.Content content = 4; + if (this->has_content()) { + target = stream->EnsureSpace(target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::InternalWriteMessage(4, _Internal::content(this), + target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>( + ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), + target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:memgraph.protobuf.UberMessage) + return target; +} + +size_t UberMessage::ByteSizeLong() const { + // @@protoc_insertion_point(message_byte_size_start:memgraph.protobuf.UberMessage) + size_t total_size = 0; + + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void)cached_has_bits; + + // .memgraph.protobuf.Address to_address = 2; + if (this->has_to_address()) { + total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(*to_address_); + } + + // .memgraph.protobuf.Address from_address = 3; + if (this->has_from_address()) { + total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(*from_address_); + } + + // .memgraph.protobuf.Content content = 4; + if (this->has_content()) { + total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(*content_); + } + + // uint64 request_id = 1; + if (this->request_id() != 0) { + total_size += 1 + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(this->_internal_request_id()); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(_internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); + SetCachedSize(cached_size); + return total_size; +} + +void UberMessage::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) { + // @@protoc_insertion_point(generalized_merge_from_start:memgraph.protobuf.UberMessage) + GOOGLE_DCHECK_NE(&from, this); + const UberMessage *source = ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated(&from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:memgraph.protobuf.UberMessage) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:memgraph.protobuf.UberMessage) + MergeFrom(*source); + } +} + +void UberMessage::MergeFrom(const UberMessage &from) { + // @@protoc_insertion_point(class_specific_merge_from_start:memgraph.protobuf.UberMessage) + GOOGLE_DCHECK_NE(&from, this); + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void)cached_has_bits; + + if (from.has_to_address()) { + _internal_mutable_to_address()->::memgraph::protobuf::Address::MergeFrom(from._internal_to_address()); + } + if (from.has_from_address()) { + _internal_mutable_from_address()->::memgraph::protobuf::Address::MergeFrom(from._internal_from_address()); + } + if (from.has_content()) { + _internal_mutable_content()->::memgraph::protobuf::Content::MergeFrom(from._internal_content()); + } + if (from.request_id() != 0) { + _internal_set_request_id(from._internal_request_id()); + } +} + +void UberMessage::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) { + // @@protoc_insertion_point(generalized_copy_from_start:memgraph.protobuf.UberMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void UberMessage::CopyFrom(const UberMessage &from) { + // @@protoc_insertion_point(class_specific_copy_from_start:memgraph.protobuf.UberMessage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool UberMessage::IsInitialized() const { return true; } + +void UberMessage::InternalSwap(UberMessage *other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap( + reinterpret_cast(&to_address_), reinterpret_cast(&other->to_address_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata UberMessage::GetMetadata() const { return GetMetadataStatic(); } + +// @@protoc_insertion_point(namespace_scope) +} // namespace protobuf +} // namespace memgraph +PROTOBUF_NAMESPACE_OPEN +template <> +PROTOBUF_NOINLINE ::memgraph::protobuf::Address *Arena::CreateMaybeMessage<::memgraph::protobuf::Address>( + Arena *arena) { + return Arena::CreateMessageInternal<::memgraph::protobuf::Address>(arena); +} +template <> +PROTOBUF_NOINLINE ::memgraph::protobuf::TestRequest *Arena::CreateMaybeMessage<::memgraph::protobuf::TestRequest>( + Arena *arena) { + return Arena::CreateMessageInternal<::memgraph::protobuf::TestRequest>(arena); +} +template <> +PROTOBUF_NOINLINE ::memgraph::protobuf::Content *Arena::CreateMaybeMessage<::memgraph::protobuf::Content>( + Arena *arena) { + return Arena::CreateMessageInternal<::memgraph::protobuf::Content>(arena); +} +template <> +PROTOBUF_NOINLINE ::memgraph::protobuf::UberMessage *Arena::CreateMaybeMessage<::memgraph::protobuf::UberMessage>( + Arena *arena) { + return Arena::CreateMessageInternal<::memgraph::protobuf::UberMessage>(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/src/protobuf/messages.pb.h b/src/protobuf/messages.pb.h new file mode 100644 index 000000000..d407fd737 --- /dev/null +++ b/src/protobuf/messages.pb.h @@ -0,0 +1,1322 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: src/protobuf/messages.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_src_2fprotobuf_2fmessages_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_src_2fprotobuf_2fmessages_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3012000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3012004 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include // IWYU pragma: export +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_src_2fprotobuf_2fmessages_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_src_2fprotobuf_2fmessages_2eproto { + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE( + protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[4] PROTOBUF_SECTION_VARIABLE(protodesc_cold); + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_src_2fprotobuf_2fmessages_2eproto; +namespace memgraph { +namespace protobuf { +class Address; +class AddressDefaultTypeInternal; +extern AddressDefaultTypeInternal _Address_default_instance_; +class Content; +class ContentDefaultTypeInternal; +extern ContentDefaultTypeInternal _Content_default_instance_; +class TestRequest; +class TestRequestDefaultTypeInternal; +extern TestRequestDefaultTypeInternal _TestRequest_default_instance_; +class UberMessage; +class UberMessageDefaultTypeInternal; +extern UberMessageDefaultTypeInternal _UberMessage_default_instance_; +} // namespace protobuf +} // namespace memgraph +PROTOBUF_NAMESPACE_OPEN +template <> +::memgraph::protobuf::Address *Arena::CreateMaybeMessage<::memgraph::protobuf::Address>(Arena *); +template <> +::memgraph::protobuf::Content *Arena::CreateMaybeMessage<::memgraph::protobuf::Content>(Arena *); +template <> +::memgraph::protobuf::TestRequest *Arena::CreateMaybeMessage<::memgraph::protobuf::TestRequest>(Arena *); +template <> +::memgraph::protobuf::UberMessage *Arena::CreateMaybeMessage<::memgraph::protobuf::UberMessage>(Arena *); +PROTOBUF_NAMESPACE_CLOSE +namespace memgraph { +namespace protobuf { + +// =================================================================== + +class Address PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID:: + Message /* @@protoc_insertion_point(class_definition:memgraph.protobuf.Address) */ { + public: + inline Address() : Address(nullptr){}; + virtual ~Address(); + + Address(const Address &from); + Address(Address &&from) noexcept : Address() { *this = ::std::move(from); } + + inline Address &operator=(const Address &from) { + CopyFrom(from); + return *this; + } + inline Address &operator=(Address &&from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor *descriptor() { return GetDescriptor(); } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor *GetDescriptor() { return GetMetadataStatic().descriptor; } + static const ::PROTOBUF_NAMESPACE_ID::Reflection *GetReflection() { return GetMetadataStatic().reflection; } + static const Address &default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Address *internal_default_instance() { + return reinterpret_cast(&_Address_default_instance_); + } + static constexpr int kIndexInFileMessages = 0; + + friend void swap(Address &a, Address &b) { a.Swap(&b); } + inline void Swap(Address *other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Address *other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Address *New() const final { return CreateMaybeMessage
(nullptr); } + + Address *New(::PROTOBUF_NAMESPACE_ID::Arena *arena) const final { return CreateMaybeMessage
(arena); } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final; + void CopyFrom(const Address &from); + void MergeFrom(const Address &from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char *_InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8 *_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Address *other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "memgraph.protobuf.Address"; } + + protected: + explicit Address(::PROTOBUF_NAMESPACE_ID::Arena *arena); + + private: + static void ArenaDtor(void *object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *arena); + + public: + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_src_2fprotobuf_2fmessages_2eproto); + return ::descriptor_table_src_2fprotobuf_2fmessages_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kUniqueIdFieldNumber = 1, + kLastKnownIpFieldNumber = 2, + kLastKnownPortFieldNumber = 3, + }; + // bytes unique_id = 1; + void clear_unique_id(); + const std::string &unique_id() const; + void set_unique_id(const std::string &value); + void set_unique_id(std::string &&value); + void set_unique_id(const char *value); + void set_unique_id(const void *value, size_t size); + std::string *mutable_unique_id(); + std::string *release_unique_id(); + void set_allocated_unique_id(std::string *unique_id); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED( + "The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string *unsafe_arena_release_unique_id(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED( + "The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_unique_id(std::string *unique_id); + + private: + const std::string &_internal_unique_id() const; + void _internal_set_unique_id(const std::string &value); + std::string *_internal_mutable_unique_id(); + + public: + // bytes last_known_ip = 2; + void clear_last_known_ip(); + const std::string &last_known_ip() const; + void set_last_known_ip(const std::string &value); + void set_last_known_ip(std::string &&value); + void set_last_known_ip(const char *value); + void set_last_known_ip(const void *value, size_t size); + std::string *mutable_last_known_ip(); + std::string *release_last_known_ip(); + void set_allocated_last_known_ip(std::string *last_known_ip); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED( + "The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string *unsafe_arena_release_last_known_ip(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED( + "The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_last_known_ip(std::string *last_known_ip); + + private: + const std::string &_internal_last_known_ip() const; + void _internal_set_last_known_ip(const std::string &value); + std::string *_internal_mutable_last_known_ip(); + + public: + // uint32 last_known_port = 3; + void clear_last_known_port(); + ::PROTOBUF_NAMESPACE_ID::uint32 last_known_port() const; + void set_last_known_port(::PROTOBUF_NAMESPACE_ID::uint32 value); + + private: + ::PROTOBUF_NAMESPACE_ID::uint32 _internal_last_known_port() const; + void _internal_set_last_known_port(::PROTOBUF_NAMESPACE_ID::uint32 value); + + public: + // @@protoc_insertion_point(class_scope:memgraph.protobuf.Address) + private: + class _Internal; + + template + friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr unique_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr last_known_ip_; + ::PROTOBUF_NAMESPACE_ID::uint32 last_known_port_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_src_2fprotobuf_2fmessages_2eproto; +}; +// ------------------------------------------------------------------- + +class TestRequest PROTOBUF_FINAL + : public ::PROTOBUF_NAMESPACE_ID:: + Message /* @@protoc_insertion_point(class_definition:memgraph.protobuf.TestRequest) */ { + public: + inline TestRequest() : TestRequest(nullptr){}; + virtual ~TestRequest(); + + TestRequest(const TestRequest &from); + TestRequest(TestRequest &&from) noexcept : TestRequest() { *this = ::std::move(from); } + + inline TestRequest &operator=(const TestRequest &from) { + CopyFrom(from); + return *this; + } + inline TestRequest &operator=(TestRequest &&from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor *descriptor() { return GetDescriptor(); } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor *GetDescriptor() { return GetMetadataStatic().descriptor; } + static const ::PROTOBUF_NAMESPACE_ID::Reflection *GetReflection() { return GetMetadataStatic().reflection; } + static const TestRequest &default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const TestRequest *internal_default_instance() { + return reinterpret_cast(&_TestRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = 1; + + friend void swap(TestRequest &a, TestRequest &b) { a.Swap(&b); } + inline void Swap(TestRequest *other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TestRequest *other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline TestRequest *New() const final { return CreateMaybeMessage(nullptr); } + + TestRequest *New(::PROTOBUF_NAMESPACE_ID::Arena *arena) const final { return CreateMaybeMessage(arena); } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final; + void CopyFrom(const TestRequest &from); + void MergeFrom(const TestRequest &from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char *_InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8 *_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TestRequest *other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "memgraph.protobuf.TestRequest"; } + + protected: + explicit TestRequest(::PROTOBUF_NAMESPACE_ID::Arena *arena); + + private: + static void ArenaDtor(void *object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *arena); + + public: + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_src_2fprotobuf_2fmessages_2eproto); + return ::descriptor_table_src_2fprotobuf_2fmessages_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kContentFieldNumber = 2, + kRequestIdFieldNumber = 1, + }; + // string content = 2; + void clear_content(); + const std::string &content() const; + void set_content(const std::string &value); + void set_content(std::string &&value); + void set_content(const char *value); + void set_content(const char *value, size_t size); + std::string *mutable_content(); + std::string *release_content(); + void set_allocated_content(std::string *content); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED( + "The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + std::string *unsafe_arena_release_content(); + GOOGLE_PROTOBUF_RUNTIME_DEPRECATED( + "The unsafe_arena_ accessors for" + " string fields are deprecated and will be removed in a" + " future release.") + void unsafe_arena_set_allocated_content(std::string *content); + + private: + const std::string &_internal_content() const; + void _internal_set_content(const std::string &value); + std::string *_internal_mutable_content(); + + public: + // uint64 request_id = 1; + void clear_request_id(); + ::PROTOBUF_NAMESPACE_ID::uint64 request_id() const; + void set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value); + + private: + ::PROTOBUF_NAMESPACE_ID::uint64 _internal_request_id() const; + void _internal_set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value); + + public: + // @@protoc_insertion_point(class_scope:memgraph.protobuf.TestRequest) + private: + class _Internal; + + template + friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr content_; + ::PROTOBUF_NAMESPACE_ID::uint64 request_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_src_2fprotobuf_2fmessages_2eproto; +}; +// ------------------------------------------------------------------- + +class Content PROTOBUF_FINAL : public ::PROTOBUF_NAMESPACE_ID:: + Message /* @@protoc_insertion_point(class_definition:memgraph.protobuf.Content) */ { + public: + inline Content() : Content(nullptr){}; + virtual ~Content(); + + Content(const Content &from); + Content(Content &&from) noexcept : Content() { *this = ::std::move(from); } + + inline Content &operator=(const Content &from) { + CopyFrom(from); + return *this; + } + inline Content &operator=(Content &&from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor *descriptor() { return GetDescriptor(); } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor *GetDescriptor() { return GetMetadataStatic().descriptor; } + static const ::PROTOBUF_NAMESPACE_ID::Reflection *GetReflection() { return GetMetadataStatic().reflection; } + static const Content &default_instance(); + + enum ContentCase { + kTestRequest = 1, + CONTENT_NOT_SET = 0, + }; + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const Content *internal_default_instance() { + return reinterpret_cast(&_Content_default_instance_); + } + static constexpr int kIndexInFileMessages = 2; + + friend void swap(Content &a, Content &b) { a.Swap(&b); } + inline void Swap(Content *other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(Content *other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline Content *New() const final { return CreateMaybeMessage(nullptr); } + + Content *New(::PROTOBUF_NAMESPACE_ID::Arena *arena) const final { return CreateMaybeMessage(arena); } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final; + void CopyFrom(const Content &from); + void MergeFrom(const Content &from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char *_InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8 *_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(Content *other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "memgraph.protobuf.Content"; } + + protected: + explicit Content(::PROTOBUF_NAMESPACE_ID::Arena *arena); + + private: + static void ArenaDtor(void *object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *arena); + + public: + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_src_2fprotobuf_2fmessages_2eproto); + return ::descriptor_table_src_2fprotobuf_2fmessages_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTestRequestFieldNumber = 1, + }; + // .memgraph.protobuf.TestRequest test_request = 1; + bool has_test_request() const; + + private: + bool _internal_has_test_request() const; + + public: + void clear_test_request(); + const ::memgraph::protobuf::TestRequest &test_request() const; + ::memgraph::protobuf::TestRequest *release_test_request(); + ::memgraph::protobuf::TestRequest *mutable_test_request(); + void set_allocated_test_request(::memgraph::protobuf::TestRequest *test_request); + + private: + const ::memgraph::protobuf::TestRequest &_internal_test_request() const; + ::memgraph::protobuf::TestRequest *_internal_mutable_test_request(); + + public: + void unsafe_arena_set_allocated_test_request(::memgraph::protobuf::TestRequest *test_request); + ::memgraph::protobuf::TestRequest *unsafe_arena_release_test_request(); + + void clear_content(); + ContentCase content_case() const; + // @@protoc_insertion_point(class_scope:memgraph.protobuf.Content) + private: + class _Internal; + void set_has_test_request(); + + inline bool has_content() const; + inline void clear_has_content(); + + template + friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + union ContentUnion { + ContentUnion() {} + ::memgraph::protobuf::TestRequest *test_request_; + } content_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::uint32 _oneof_case_[1]; + + friend struct ::TableStruct_src_2fprotobuf_2fmessages_2eproto; +}; +// ------------------------------------------------------------------- + +class UberMessage PROTOBUF_FINAL + : public ::PROTOBUF_NAMESPACE_ID:: + Message /* @@protoc_insertion_point(class_definition:memgraph.protobuf.UberMessage) */ { + public: + inline UberMessage() : UberMessage(nullptr){}; + virtual ~UberMessage(); + + UberMessage(const UberMessage &from); + UberMessage(UberMessage &&from) noexcept : UberMessage() { *this = ::std::move(from); } + + inline UberMessage &operator=(const UberMessage &from) { + CopyFrom(from); + return *this; + } + inline UberMessage &operator=(UberMessage &&from) noexcept { + if (GetArena() == from.GetArena()) { + if (this != &from) InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor *descriptor() { return GetDescriptor(); } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor *GetDescriptor() { return GetMetadataStatic().descriptor; } + static const ::PROTOBUF_NAMESPACE_ID::Reflection *GetReflection() { return GetMetadataStatic().reflection; } + static const UberMessage &default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const UberMessage *internal_default_instance() { + return reinterpret_cast(&_UberMessage_default_instance_); + } + static constexpr int kIndexInFileMessages = 3; + + friend void swap(UberMessage &a, UberMessage &b) { a.Swap(&b); } + inline void Swap(UberMessage *other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(UberMessage *other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline UberMessage *New() const final { return CreateMaybeMessage(nullptr); } + + UberMessage *New(::PROTOBUF_NAMESPACE_ID::Arena *arena) const final { return CreateMaybeMessage(arena); } + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message &from) final; + void CopyFrom(const UberMessage &from); + void MergeFrom(const UberMessage &from); + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char *_InternalParse(const char *ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext *ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8 *_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8 *target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream *stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + inline void SharedCtor(); + inline void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(UberMessage *other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { return "memgraph.protobuf.UberMessage"; } + + protected: + explicit UberMessage(::PROTOBUF_NAMESPACE_ID::Arena *arena); + + private: + static void ArenaDtor(void *object); + inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena *arena); + + public: + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_src_2fprotobuf_2fmessages_2eproto); + return ::descriptor_table_src_2fprotobuf_2fmessages_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kToAddressFieldNumber = 2, + kFromAddressFieldNumber = 3, + kContentFieldNumber = 4, + kRequestIdFieldNumber = 1, + }; + // .memgraph.protobuf.Address to_address = 2; + bool has_to_address() const; + + private: + bool _internal_has_to_address() const; + + public: + void clear_to_address(); + const ::memgraph::protobuf::Address &to_address() const; + ::memgraph::protobuf::Address *release_to_address(); + ::memgraph::protobuf::Address *mutable_to_address(); + void set_allocated_to_address(::memgraph::protobuf::Address *to_address); + + private: + const ::memgraph::protobuf::Address &_internal_to_address() const; + ::memgraph::protobuf::Address *_internal_mutable_to_address(); + + public: + void unsafe_arena_set_allocated_to_address(::memgraph::protobuf::Address *to_address); + ::memgraph::protobuf::Address *unsafe_arena_release_to_address(); + + // .memgraph.protobuf.Address from_address = 3; + bool has_from_address() const; + + private: + bool _internal_has_from_address() const; + + public: + void clear_from_address(); + const ::memgraph::protobuf::Address &from_address() const; + ::memgraph::protobuf::Address *release_from_address(); + ::memgraph::protobuf::Address *mutable_from_address(); + void set_allocated_from_address(::memgraph::protobuf::Address *from_address); + + private: + const ::memgraph::protobuf::Address &_internal_from_address() const; + ::memgraph::protobuf::Address *_internal_mutable_from_address(); + + public: + void unsafe_arena_set_allocated_from_address(::memgraph::protobuf::Address *from_address); + ::memgraph::protobuf::Address *unsafe_arena_release_from_address(); + + // .memgraph.protobuf.Content content = 4; + bool has_content() const; + + private: + bool _internal_has_content() const; + + public: + void clear_content(); + const ::memgraph::protobuf::Content &content() const; + ::memgraph::protobuf::Content *release_content(); + ::memgraph::protobuf::Content *mutable_content(); + void set_allocated_content(::memgraph::protobuf::Content *content); + + private: + const ::memgraph::protobuf::Content &_internal_content() const; + ::memgraph::protobuf::Content *_internal_mutable_content(); + + public: + void unsafe_arena_set_allocated_content(::memgraph::protobuf::Content *content); + ::memgraph::protobuf::Content *unsafe_arena_release_content(); + + // uint64 request_id = 1; + void clear_request_id(); + ::PROTOBUF_NAMESPACE_ID::uint64 request_id() const; + void set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value); + + private: + ::PROTOBUF_NAMESPACE_ID::uint64 _internal_request_id() const; + void _internal_set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value); + + public: + // @@protoc_insertion_point(class_scope:memgraph.protobuf.UberMessage) + private: + class _Internal; + + template + friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::memgraph::protobuf::Address *to_address_; + ::memgraph::protobuf::Address *from_address_; + ::memgraph::protobuf::Content *content_; + ::PROTOBUF_NAMESPACE_ID::uint64 request_id_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_src_2fprotobuf_2fmessages_2eproto; +}; +// =================================================================== + +// =================================================================== + +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// Address + +// bytes unique_id = 1; +inline void Address::clear_unique_id() { + unique_id_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string &Address::unique_id() const { + // @@protoc_insertion_point(field_get:memgraph.protobuf.Address.unique_id) + return _internal_unique_id(); +} +inline void Address::set_unique_id(const std::string &value) { + _internal_set_unique_id(value); + // @@protoc_insertion_point(field_set:memgraph.protobuf.Address.unique_id) +} +inline std::string *Address::mutable_unique_id() { + // @@protoc_insertion_point(field_mutable:memgraph.protobuf.Address.unique_id) + return _internal_mutable_unique_id(); +} +inline const std::string &Address::_internal_unique_id() const { return unique_id_.Get(); } +inline void Address::_internal_set_unique_id(const std::string &value) { + unique_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Address::set_unique_id(std::string &&value) { + unique_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:memgraph.protobuf.Address.unique_id) +} +inline void Address::set_unique_id(const char *value) { + GOOGLE_DCHECK(value != nullptr); + + unique_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:memgraph.protobuf.Address.unique_id) +} +inline void Address::set_unique_id(const void *value, size_t size) { + unique_id_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:memgraph.protobuf.Address.unique_id) +} +inline std::string *Address::_internal_mutable_unique_id() { + return unique_id_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string *Address::release_unique_id() { + // @@protoc_insertion_point(field_release:memgraph.protobuf.Address.unique_id) + return unique_id_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Address::set_allocated_unique_id(std::string *unique_id) { + if (unique_id != nullptr) { + } else { + } + unique_id_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), unique_id, GetArena()); + // @@protoc_insertion_point(field_set_allocated:memgraph.protobuf.Address.unique_id) +} +inline std::string *Address::unsafe_arena_release_unique_id() { + // @@protoc_insertion_point(field_unsafe_arena_release:memgraph.protobuf.Address.unique_id) + GOOGLE_DCHECK(GetArena() != nullptr); + + return unique_id_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Address::unsafe_arena_set_allocated_unique_id(std::string *unique_id) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (unique_id != nullptr) { + } else { + } + unique_id_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), unique_id, + GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:memgraph.protobuf.Address.unique_id) +} + +// bytes last_known_ip = 2; +inline void Address::clear_last_known_ip() { + last_known_ip_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string &Address::last_known_ip() const { + // @@protoc_insertion_point(field_get:memgraph.protobuf.Address.last_known_ip) + return _internal_last_known_ip(); +} +inline void Address::set_last_known_ip(const std::string &value) { + _internal_set_last_known_ip(value); + // @@protoc_insertion_point(field_set:memgraph.protobuf.Address.last_known_ip) +} +inline std::string *Address::mutable_last_known_ip() { + // @@protoc_insertion_point(field_mutable:memgraph.protobuf.Address.last_known_ip) + return _internal_mutable_last_known_ip(); +} +inline const std::string &Address::_internal_last_known_ip() const { return last_known_ip_.Get(); } +inline void Address::_internal_set_last_known_ip(const std::string &value) { + last_known_ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void Address::set_last_known_ip(std::string &&value) { + last_known_ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:memgraph.protobuf.Address.last_known_ip) +} +inline void Address::set_last_known_ip(const char *value) { + GOOGLE_DCHECK(value != nullptr); + + last_known_ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:memgraph.protobuf.Address.last_known_ip) +} +inline void Address::set_last_known_ip(const void *value, size_t size) { + last_known_ip_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:memgraph.protobuf.Address.last_known_ip) +} +inline std::string *Address::_internal_mutable_last_known_ip() { + return last_known_ip_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string *Address::release_last_known_ip() { + // @@protoc_insertion_point(field_release:memgraph.protobuf.Address.last_known_ip) + return last_known_ip_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void Address::set_allocated_last_known_ip(std::string *last_known_ip) { + if (last_known_ip != nullptr) { + } else { + } + last_known_ip_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), last_known_ip, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:memgraph.protobuf.Address.last_known_ip) +} +inline std::string *Address::unsafe_arena_release_last_known_ip() { + // @@protoc_insertion_point(field_unsafe_arena_release:memgraph.protobuf.Address.last_known_ip) + GOOGLE_DCHECK(GetArena() != nullptr); + + return last_known_ip_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void Address::unsafe_arena_set_allocated_last_known_ip(std::string *last_known_ip) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (last_known_ip != nullptr) { + } else { + } + last_known_ip_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + last_known_ip, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:memgraph.protobuf.Address.last_known_ip) +} + +// uint32 last_known_port = 3; +inline void Address::clear_last_known_port() { last_known_port_ = 0u; } +inline ::PROTOBUF_NAMESPACE_ID::uint32 Address::_internal_last_known_port() const { return last_known_port_; } +inline ::PROTOBUF_NAMESPACE_ID::uint32 Address::last_known_port() const { + // @@protoc_insertion_point(field_get:memgraph.protobuf.Address.last_known_port) + return _internal_last_known_port(); +} +inline void Address::_internal_set_last_known_port(::PROTOBUF_NAMESPACE_ID::uint32 value) { last_known_port_ = value; } +inline void Address::set_last_known_port(::PROTOBUF_NAMESPACE_ID::uint32 value) { + _internal_set_last_known_port(value); + // @@protoc_insertion_point(field_set:memgraph.protobuf.Address.last_known_port) +} + +// ------------------------------------------------------------------- + +// TestRequest + +// uint64 request_id = 1; +inline void TestRequest::clear_request_id() { request_id_ = PROTOBUF_ULONGLONG(0); } +inline ::PROTOBUF_NAMESPACE_ID::uint64 TestRequest::_internal_request_id() const { return request_id_; } +inline ::PROTOBUF_NAMESPACE_ID::uint64 TestRequest::request_id() const { + // @@protoc_insertion_point(field_get:memgraph.protobuf.TestRequest.request_id) + return _internal_request_id(); +} +inline void TestRequest::_internal_set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value) { request_id_ = value; } +inline void TestRequest::set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value) { + _internal_set_request_id(value); + // @@protoc_insertion_point(field_set:memgraph.protobuf.TestRequest.request_id) +} + +// string content = 2; +inline void TestRequest::clear_content() { + content_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string &TestRequest::content() const { + // @@protoc_insertion_point(field_get:memgraph.protobuf.TestRequest.content) + return _internal_content(); +} +inline void TestRequest::set_content(const std::string &value) { + _internal_set_content(value); + // @@protoc_insertion_point(field_set:memgraph.protobuf.TestRequest.content) +} +inline std::string *TestRequest::mutable_content() { + // @@protoc_insertion_point(field_mutable:memgraph.protobuf.TestRequest.content) + return _internal_mutable_content(); +} +inline const std::string &TestRequest::_internal_content() const { return content_.Get(); } +inline void TestRequest::_internal_set_content(const std::string &value) { + content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void TestRequest::set_content(std::string &&value) { + content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:memgraph.protobuf.TestRequest.content) +} +inline void TestRequest::set_content(const char *value) { + GOOGLE_DCHECK(value != nullptr); + + content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), GetArena()); + // @@protoc_insertion_point(field_set_char:memgraph.protobuf.TestRequest.content) +} +inline void TestRequest::set_content(const char *value, size_t size) { + content_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:memgraph.protobuf.TestRequest.content) +} +inline std::string *TestRequest::_internal_mutable_content() { + return content_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string *TestRequest::release_content() { + // @@protoc_insertion_point(field_release:memgraph.protobuf.TestRequest.content) + return content_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void TestRequest::set_allocated_content(std::string *content) { + if (content != nullptr) { + } else { + } + content_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), content, GetArena()); + // @@protoc_insertion_point(field_set_allocated:memgraph.protobuf.TestRequest.content) +} +inline std::string *TestRequest::unsafe_arena_release_content() { + // @@protoc_insertion_point(field_unsafe_arena_release:memgraph.protobuf.TestRequest.content) + GOOGLE_DCHECK(GetArena() != nullptr); + + return content_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void TestRequest::unsafe_arena_set_allocated_content(std::string *content) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (content != nullptr) { + } else { + } + content_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), content, + GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:memgraph.protobuf.TestRequest.content) +} + +// ------------------------------------------------------------------- + +// Content + +// .memgraph.protobuf.TestRequest test_request = 1; +inline bool Content::_internal_has_test_request() const { return content_case() == kTestRequest; } +inline bool Content::has_test_request() const { return _internal_has_test_request(); } +inline void Content::set_has_test_request() { _oneof_case_[0] = kTestRequest; } +inline void Content::clear_test_request() { + if (_internal_has_test_request()) { + if (GetArena() == nullptr) { + delete content_.test_request_; + } + clear_has_content(); + } +} +inline ::memgraph::protobuf::TestRequest *Content::release_test_request() { + // @@protoc_insertion_point(field_release:memgraph.protobuf.Content.test_request) + if (_internal_has_test_request()) { + clear_has_content(); + ::memgraph::protobuf::TestRequest *temp = content_.test_request_; + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + content_.test_request_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline const ::memgraph::protobuf::TestRequest &Content::_internal_test_request() const { + return _internal_has_test_request() ? *content_.test_request_ + : *reinterpret_cast<::memgraph::protobuf::TestRequest *>( + &::memgraph::protobuf::_TestRequest_default_instance_); +} +inline const ::memgraph::protobuf::TestRequest &Content::test_request() const { + // @@protoc_insertion_point(field_get:memgraph.protobuf.Content.test_request) + return _internal_test_request(); +} +inline ::memgraph::protobuf::TestRequest *Content::unsafe_arena_release_test_request() { + // @@protoc_insertion_point(field_unsafe_arena_release:memgraph.protobuf.Content.test_request) + if (_internal_has_test_request()) { + clear_has_content(); + ::memgraph::protobuf::TestRequest *temp = content_.test_request_; + content_.test_request_ = nullptr; + return temp; + } else { + return nullptr; + } +} +inline void Content::unsafe_arena_set_allocated_test_request(::memgraph::protobuf::TestRequest *test_request) { + clear_content(); + if (test_request) { + set_has_test_request(); + content_.test_request_ = test_request; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:memgraph.protobuf.Content.test_request) +} +inline ::memgraph::protobuf::TestRequest *Content::_internal_mutable_test_request() { + if (!_internal_has_test_request()) { + clear_content(); + set_has_test_request(); + content_.test_request_ = CreateMaybeMessage<::memgraph::protobuf::TestRequest>(GetArena()); + } + return content_.test_request_; +} +inline ::memgraph::protobuf::TestRequest *Content::mutable_test_request() { + // @@protoc_insertion_point(field_mutable:memgraph.protobuf.Content.test_request) + return _internal_mutable_test_request(); +} + +inline bool Content::has_content() const { return content_case() != CONTENT_NOT_SET; } +inline void Content::clear_has_content() { _oneof_case_[0] = CONTENT_NOT_SET; } +inline Content::ContentCase Content::content_case() const { return Content::ContentCase(_oneof_case_[0]); } +// ------------------------------------------------------------------- + +// UberMessage + +// uint64 request_id = 1; +inline void UberMessage::clear_request_id() { request_id_ = PROTOBUF_ULONGLONG(0); } +inline ::PROTOBUF_NAMESPACE_ID::uint64 UberMessage::_internal_request_id() const { return request_id_; } +inline ::PROTOBUF_NAMESPACE_ID::uint64 UberMessage::request_id() const { + // @@protoc_insertion_point(field_get:memgraph.protobuf.UberMessage.request_id) + return _internal_request_id(); +} +inline void UberMessage::_internal_set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value) { request_id_ = value; } +inline void UberMessage::set_request_id(::PROTOBUF_NAMESPACE_ID::uint64 value) { + _internal_set_request_id(value); + // @@protoc_insertion_point(field_set:memgraph.protobuf.UberMessage.request_id) +} + +// .memgraph.protobuf.Address to_address = 2; +inline bool UberMessage::_internal_has_to_address() const { + return this != internal_default_instance() && to_address_ != nullptr; +} +inline bool UberMessage::has_to_address() const { return _internal_has_to_address(); } +inline void UberMessage::clear_to_address() { + if (GetArena() == nullptr && to_address_ != nullptr) { + delete to_address_; + } + to_address_ = nullptr; +} +inline const ::memgraph::protobuf::Address &UberMessage::_internal_to_address() const { + const ::memgraph::protobuf::Address *p = to_address_; + return p != nullptr ? *p + : *reinterpret_cast( + &::memgraph::protobuf::_Address_default_instance_); +} +inline const ::memgraph::protobuf::Address &UberMessage::to_address() const { + // @@protoc_insertion_point(field_get:memgraph.protobuf.UberMessage.to_address) + return _internal_to_address(); +} +inline void UberMessage::unsafe_arena_set_allocated_to_address(::memgraph::protobuf::Address *to_address) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite *>(to_address_); + } + to_address_ = to_address; + if (to_address) { + } else { + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:memgraph.protobuf.UberMessage.to_address) +} +inline ::memgraph::protobuf::Address *UberMessage::release_to_address() { + auto temp = unsafe_arena_release_to_address(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::memgraph::protobuf::Address *UberMessage::unsafe_arena_release_to_address() { + // @@protoc_insertion_point(field_release:memgraph.protobuf.UberMessage.to_address) + + ::memgraph::protobuf::Address *temp = to_address_; + to_address_ = nullptr; + return temp; +} +inline ::memgraph::protobuf::Address *UberMessage::_internal_mutable_to_address() { + if (to_address_ == nullptr) { + auto *p = CreateMaybeMessage<::memgraph::protobuf::Address>(GetArena()); + to_address_ = p; + } + return to_address_; +} +inline ::memgraph::protobuf::Address *UberMessage::mutable_to_address() { + // @@protoc_insertion_point(field_mutable:memgraph.protobuf.UberMessage.to_address) + return _internal_mutable_to_address(); +} +inline void UberMessage::set_allocated_to_address(::memgraph::protobuf::Address *to_address) { + ::PROTOBUF_NAMESPACE_ID::Arena *message_arena = GetArena(); + if (message_arena == nullptr) { + delete to_address_; + } + if (to_address) { + ::PROTOBUF_NAMESPACE_ID::Arena *submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(to_address); + if (message_arena != submessage_arena) { + to_address = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(message_arena, to_address, submessage_arena); + } + + } else { + } + to_address_ = to_address; + // @@protoc_insertion_point(field_set_allocated:memgraph.protobuf.UberMessage.to_address) +} + +// .memgraph.protobuf.Address from_address = 3; +inline bool UberMessage::_internal_has_from_address() const { + return this != internal_default_instance() && from_address_ != nullptr; +} +inline bool UberMessage::has_from_address() const { return _internal_has_from_address(); } +inline void UberMessage::clear_from_address() { + if (GetArena() == nullptr && from_address_ != nullptr) { + delete from_address_; + } + from_address_ = nullptr; +} +inline const ::memgraph::protobuf::Address &UberMessage::_internal_from_address() const { + const ::memgraph::protobuf::Address *p = from_address_; + return p != nullptr ? *p + : *reinterpret_cast( + &::memgraph::protobuf::_Address_default_instance_); +} +inline const ::memgraph::protobuf::Address &UberMessage::from_address() const { + // @@protoc_insertion_point(field_get:memgraph.protobuf.UberMessage.from_address) + return _internal_from_address(); +} +inline void UberMessage::unsafe_arena_set_allocated_from_address(::memgraph::protobuf::Address *from_address) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite *>(from_address_); + } + from_address_ = from_address; + if (from_address) { + } else { + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:memgraph.protobuf.UberMessage.from_address) +} +inline ::memgraph::protobuf::Address *UberMessage::release_from_address() { + auto temp = unsafe_arena_release_from_address(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::memgraph::protobuf::Address *UberMessage::unsafe_arena_release_from_address() { + // @@protoc_insertion_point(field_release:memgraph.protobuf.UberMessage.from_address) + + ::memgraph::protobuf::Address *temp = from_address_; + from_address_ = nullptr; + return temp; +} +inline ::memgraph::protobuf::Address *UberMessage::_internal_mutable_from_address() { + if (from_address_ == nullptr) { + auto *p = CreateMaybeMessage<::memgraph::protobuf::Address>(GetArena()); + from_address_ = p; + } + return from_address_; +} +inline ::memgraph::protobuf::Address *UberMessage::mutable_from_address() { + // @@protoc_insertion_point(field_mutable:memgraph.protobuf.UberMessage.from_address) + return _internal_mutable_from_address(); +} +inline void UberMessage::set_allocated_from_address(::memgraph::protobuf::Address *from_address) { + ::PROTOBUF_NAMESPACE_ID::Arena *message_arena = GetArena(); + if (message_arena == nullptr) { + delete from_address_; + } + if (from_address) { + ::PROTOBUF_NAMESPACE_ID::Arena *submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(from_address); + if (message_arena != submessage_arena) { + from_address = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(message_arena, from_address, submessage_arena); + } + + } else { + } + from_address_ = from_address; + // @@protoc_insertion_point(field_set_allocated:memgraph.protobuf.UberMessage.from_address) +} + +// .memgraph.protobuf.Content content = 4; +inline bool UberMessage::_internal_has_content() const { + return this != internal_default_instance() && content_ != nullptr; +} +inline bool UberMessage::has_content() const { return _internal_has_content(); } +inline void UberMessage::clear_content() { + if (GetArena() == nullptr && content_ != nullptr) { + delete content_; + } + content_ = nullptr; +} +inline const ::memgraph::protobuf::Content &UberMessage::_internal_content() const { + const ::memgraph::protobuf::Content *p = content_; + return p != nullptr ? *p + : *reinterpret_cast( + &::memgraph::protobuf::_Content_default_instance_); +} +inline const ::memgraph::protobuf::Content &UberMessage::content() const { + // @@protoc_insertion_point(field_get:memgraph.protobuf.UberMessage.content) + return _internal_content(); +} +inline void UberMessage::unsafe_arena_set_allocated_content(::memgraph::protobuf::Content *content) { + if (GetArena() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite *>(content_); + } + content_ = content; + if (content) { + } else { + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:memgraph.protobuf.UberMessage.content) +} +inline ::memgraph::protobuf::Content *UberMessage::release_content() { + auto temp = unsafe_arena_release_content(); + if (GetArena() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } + return temp; +} +inline ::memgraph::protobuf::Content *UberMessage::unsafe_arena_release_content() { + // @@protoc_insertion_point(field_release:memgraph.protobuf.UberMessage.content) + + ::memgraph::protobuf::Content *temp = content_; + content_ = nullptr; + return temp; +} +inline ::memgraph::protobuf::Content *UberMessage::_internal_mutable_content() { + if (content_ == nullptr) { + auto *p = CreateMaybeMessage<::memgraph::protobuf::Content>(GetArena()); + content_ = p; + } + return content_; +} +inline ::memgraph::protobuf::Content *UberMessage::mutable_content() { + // @@protoc_insertion_point(field_mutable:memgraph.protobuf.UberMessage.content) + return _internal_mutable_content(); +} +inline void UberMessage::set_allocated_content(::memgraph::protobuf::Content *content) { + ::PROTOBUF_NAMESPACE_ID::Arena *message_arena = GetArena(); + if (message_arena == nullptr) { + delete content_; + } + if (content) { + ::PROTOBUF_NAMESPACE_ID::Arena *submessage_arena = ::PROTOBUF_NAMESPACE_ID::Arena::GetArena(content); + if (message_arena != submessage_arena) { + content = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage(message_arena, content, submessage_arena); + } + + } else { + } + content_ = content; + // @@protoc_insertion_point(field_set_allocated:memgraph.protobuf.UberMessage.content) +} + +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// @@protoc_insertion_point(namespace_scope) + +} // namespace protobuf +} // namespace memgraph + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_src_2fprotobuf_2fmessages_2eproto diff --git a/src/protobuf/messages.proto b/src/protobuf/messages.proto new file mode 100644 index 000000000..0dd6c689a --- /dev/null +++ b/src/protobuf/messages.proto @@ -0,0 +1,29 @@ +syntax = "proto3"; + +package memgraph.protobuf; + +message Address { + bytes unique_id = 1; + // this is either 4 bytes for ipv4 or 16 bytes for ipv6 + bytes last_known_ip = 2; + uint32 last_known_port = 3; +} + +message TestRequest { + uint64 request_id = 1; + string content = 2; +} + + +message Content { + oneof content { + TestRequest test_request = 1; + } +} + +message UberMessage { + uint64 request_id = 1; + Address to_address = 2; + Address from_address = 3; + Content content = 4; +} diff --git a/tests/unit/protobuf_transport.cpp b/tests/unit/protobuf_transport.cpp index 249e0a75d..51e22f565 100644 --- a/tests/unit/protobuf_transport.cpp +++ b/tests/unit/protobuf_transport.cpp @@ -17,13 +17,15 @@ #include #include "io/protobuf_transport/protobuf_transport.hpp" -#include "protobuf/echo_test.pb.cc" -#include "protobuf/echo_test.pb.h" +#include "protobuf/messages.pb.cc" +#include "protobuf/messages.pb.h" namespace memgraph::io::tests { +using memgraph::protobuf::Address; +using memgraph::protobuf::Content; using memgraph::protobuf::TestRequest; -using memgraph::protobuf::TestResponse; +using memgraph::protobuf::UberMessage; TEST(ProtobufTransport, Echo) { spdlog::error("ayo");