From 382f5801dae4cecb13a0711cfa61a91edb79628c Mon Sep 17 00:00:00 2001 From: yankai14 Date: Sun, 31 Mar 2024 04:25:16 -0500 Subject: [PATCH] Added proto files and client for gaminganywhere Signed-off-by: yankai14 --- grpcclient/gaminganywhere_client.go | 52 +++ proto/helloworld/helloworld.pb.cc | 574 +++++++++++++++++++++++ proto/helloworld/helloworld.pb.h | 675 ++++++++++++++++++++++++++++ 3 files changed, 1301 insertions(+) create mode 100644 grpcclient/gaminganywhere_client.go create mode 100644 proto/helloworld/helloworld.pb.cc create mode 100644 proto/helloworld/helloworld.pb.h diff --git a/grpcclient/gaminganywhere_client.go b/grpcclient/gaminganywhere_client.go new file mode 100644 index 0000000..c1ce3d1 --- /dev/null +++ b/grpcclient/gaminganywhere_client.go @@ -0,0 +1,52 @@ +package grpcclient + +import ( + "context" + "fmt" + "math/rand" + + pb "github.com/vhive-serverless/vSwarm-proto/proto/helloworld" + log "github.com/sirupsen/logrus" +) + +type GamingAnywhereGenerator struct { + GeneratorBase +} + +func (g *GamingAnywhereGenerator) Next() Input { + var pkt = g.defaultInput + switch g.GeneratorBase.generator { + case Unique: + pkt.Value = "A unique message" + case Linear: + // g.count = g.count + 1 + // pkt.Value = fmt.Sprintf("%d", g.count) + pkt.Value = "A linear message" + case Random: + pkt.Value = "A random message" + } + return pkt +} + +func (c *GamingAnywhereClient) GetGenerator() Generator { + return new(GamingAnywhereGenerator) +} + +type GamingAnywhereClient struct { + ClientBase + client pb.GreeterClient +} + +func (c *GamingAnywhereClient) Init(ctx context.Context, ip, port string) { + c.Connect(ctx, ip, port) + c.client = pb.NewGreeterClient(c.conn) +} + +func (c *GamingAnywhereClient) Request(ctx context.Context, req Input) string { + var message = req.Value + r, err := c.client.SayHello(ctx, &pb.HelloRequest{Name: message}) + if err != nil { + log.Fatalf("could not greet: %v", err) + } + return r.GetMessage() +} diff --git a/proto/helloworld/helloworld.pb.cc b/proto/helloworld/helloworld.pb.cc new file mode 100644 index 0000000..78de683 --- /dev/null +++ b/proto/helloworld/helloworld.pb.cc @@ -0,0 +1,574 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: helloworld.proto + +#include "helloworld.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include +namespace helloworld { +class HelloRequestDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _HelloRequest_default_instance_; +class HelloReplyDefaultTypeInternal { + public: + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; +} _HelloReply_default_instance_; +} // namespace helloworld +static void InitDefaultsscc_info_HelloReply_helloworld_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::helloworld::_HelloReply_default_instance_; + new (ptr) ::helloworld::HelloReply(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::helloworld::HelloReply::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_HelloReply_helloworld_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_HelloReply_helloworld_2eproto}, {}}; + +static void InitDefaultsscc_info_HelloRequest_helloworld_2eproto() { + GOOGLE_PROTOBUF_VERIFY_VERSION; + + { + void* ptr = &::helloworld::_HelloRequest_default_instance_; + new (ptr) ::helloworld::HelloRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); + } + ::helloworld::HelloRequest::InitAsDefaultInstance(); +} + +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_HelloRequest_helloworld_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_HelloRequest_helloworld_2eproto}, {}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_helloworld_2eproto[2]; +static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_helloworld_2eproto = nullptr; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_helloworld_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_helloworld_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::helloworld::HelloRequest, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::helloworld::HelloRequest, name_), + PROTOBUF_FIELD_OFFSET(::helloworld::HelloRequest, vhivemetadata_), + ~0u, // no _has_bits_ + PROTOBUF_FIELD_OFFSET(::helloworld::HelloReply, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + PROTOBUF_FIELD_OFFSET(::helloworld::HelloReply, message_), +}; +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, -1, sizeof(::helloworld::HelloRequest)}, + { 7, -1, sizeof(::helloworld::HelloReply)}, +}; + +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::helloworld::_HelloRequest_default_instance_), + reinterpret_cast(&::helloworld::_HelloReply_default_instance_), +}; + +const char descriptor_table_protodef_helloworld_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n\020helloworld.proto\022\nhelloworld\"3\n\014HelloR" + "equest\022\014\n\004name\030\001 \001(\t\022\025\n\rvHiveMetadata\030\017 " + "\001(\014\"\035\n\nHelloReply\022\017\n\007message\030\001 \001(\t2I\n\007Gr" + "eeter\022>\n\010SayHello\022\030.helloworld.HelloRequ" + "est\032\026.helloworld.HelloReply\"\000B;Z9github." + "com/vhive-serverless/vSwarm-proto/proto/" + "helloworldb\006proto3" + ; +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_helloworld_2eproto_deps[1] = { +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_helloworld_2eproto_sccs[2] = { + &scc_info_HelloReply_helloworld_2eproto.base, + &scc_info_HelloRequest_helloworld_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_helloworld_2eproto_once; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_helloworld_2eproto = { + false, false, descriptor_table_protodef_helloworld_2eproto, "helloworld.proto", 258, + &descriptor_table_helloworld_2eproto_once, descriptor_table_helloworld_2eproto_sccs, descriptor_table_helloworld_2eproto_deps, 2, 0, + schemas, file_default_instances, TableStruct_helloworld_2eproto::offsets, + file_level_metadata_helloworld_2eproto, 2, file_level_enum_descriptors_helloworld_2eproto, file_level_service_descriptors_helloworld_2eproto, +}; + +// Force running AddDescriptors() at dynamic initialization time. +static bool dynamic_init_dummy_helloworld_2eproto = (static_cast(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_helloworld_2eproto)), true); +namespace helloworld { + +// =================================================================== + +void HelloRequest::InitAsDefaultInstance() { +} +class HelloRequest::_Internal { + public: +}; + +HelloRequest::HelloRequest(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:helloworld.HelloRequest) +} +HelloRequest::HelloRequest(const HelloRequest& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_name().empty()) { + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_name(), + GetArena()); + } + vhivemetadata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_vhivemetadata().empty()) { + vhivemetadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_vhivemetadata(), + GetArena()); + } + // @@protoc_insertion_point(copy_constructor:helloworld.HelloRequest) +} + +void HelloRequest::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_HelloRequest_helloworld_2eproto.base); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + vhivemetadata_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +HelloRequest::~HelloRequest() { + // @@protoc_insertion_point(destructor:helloworld.HelloRequest) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void HelloRequest::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + vhivemetadata_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void HelloRequest::ArenaDtor(void* object) { + HelloRequest* _this = reinterpret_cast< HelloRequest* >(object); + (void)_this; +} +void HelloRequest::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void HelloRequest::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const HelloRequest& HelloRequest::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_HelloRequest_helloworld_2eproto.base); + return *internal_default_instance(); +} + + +void HelloRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:helloworld.HelloRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + vhivemetadata_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* HelloRequest::_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) { + // string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "helloworld.HelloRequest.name")); + CHK_(ptr); + } else goto handle_unusual; + continue; + // bytes vHiveMetadata = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 122)) { + auto str = _internal_mutable_vhivemetadata(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + 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* HelloRequest::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:helloworld.HelloRequest) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string name = 1; + if (this->name().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "helloworld.HelloRequest.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // bytes vHiveMetadata = 15; + if (this->vhivemetadata().size() > 0) { + target = stream->WriteBytesMaybeAliased( + 15, this->_internal_vhivemetadata(), 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:helloworld.HelloRequest) + return target; +} + +size_t HelloRequest::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:helloworld.HelloRequest) + 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 name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + // bytes vHiveMetadata = 15; + if (this->vhivemetadata().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_vhivemetadata()); + } + + 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 HelloRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:helloworld.HelloRequest) + GOOGLE_DCHECK_NE(&from, this); + const HelloRequest* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:helloworld.HelloRequest) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:helloworld.HelloRequest) + MergeFrom(*source); + } +} + +void HelloRequest::MergeFrom(const HelloRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:helloworld.HelloRequest) + 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.name().size() > 0) { + _internal_set_name(from._internal_name()); + } + if (from.vhivemetadata().size() > 0) { + _internal_set_vhivemetadata(from._internal_vhivemetadata()); + } +} + +void HelloRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:helloworld.HelloRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void HelloRequest::CopyFrom(const HelloRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:helloworld.HelloRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HelloRequest::IsInitialized() const { + return true; +} + +void HelloRequest::InternalSwap(HelloRequest* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + vhivemetadata_.Swap(&other->vhivemetadata_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata HelloRequest::GetMetadata() const { + return GetMetadataStatic(); +} + + +// =================================================================== + +void HelloReply::InitAsDefaultInstance() { +} +class HelloReply::_Internal { + public: +}; + +HelloReply::HelloReply(::PROTOBUF_NAMESPACE_ID::Arena* arena) + : ::PROTOBUF_NAMESPACE_ID::Message(arena) { + SharedCtor(); + RegisterArenaDtor(arena); + // @@protoc_insertion_point(arena_constructor:helloworld.HelloReply) +} +HelloReply::HelloReply(const HelloReply& from) + : ::PROTOBUF_NAMESPACE_ID::Message() { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_message().empty()) { + message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from._internal_message(), + GetArena()); + } + // @@protoc_insertion_point(copy_constructor:helloworld.HelloReply) +} + +void HelloReply::SharedCtor() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_HelloReply_helloworld_2eproto.base); + message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +HelloReply::~HelloReply() { + // @@protoc_insertion_point(destructor:helloworld.HelloReply) + SharedDtor(); + _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +void HelloReply::SharedDtor() { + GOOGLE_DCHECK(GetArena() == nullptr); + message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); +} + +void HelloReply::ArenaDtor(void* object) { + HelloReply* _this = reinterpret_cast< HelloReply* >(object); + (void)_this; +} +void HelloReply::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) { +} +void HelloReply::SetCachedSize(int size) const { + _cached_size_.Set(size); +} +const HelloReply& HelloReply::default_instance() { + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_HelloReply_helloworld_2eproto.base); + return *internal_default_instance(); +} + + +void HelloReply::Clear() { +// @@protoc_insertion_point(message_clear_start:helloworld.HelloReply) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* HelloReply::_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) { + // string message = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + auto str = _internal_mutable_message(); + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx); + CHK_(::PROTOBUF_NAMESPACE_ID::internal::VerifyUTF8(str, "helloworld.HelloReply.message")); + 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* HelloReply::_InternalSerialize( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:helloworld.HelloReply) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; + + // string message = 1; + if (this->message().size() > 0) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_message().data(), static_cast(this->_internal_message().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, + "helloworld.HelloReply.message"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_message(), 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:helloworld.HelloReply) + return target; +} + +size_t HelloReply::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:helloworld.HelloReply) + 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 message = 1; + if (this->message().size() > 0) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_message()); + } + + 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 HelloReply::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:helloworld.HelloReply) + GOOGLE_DCHECK_NE(&from, this); + const HelloReply* source = + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( + &from); + if (source == nullptr) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:helloworld.HelloReply) + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:helloworld.HelloReply) + MergeFrom(*source); + } +} + +void HelloReply::MergeFrom(const HelloReply& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:helloworld.HelloReply) + 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.message().size() > 0) { + _internal_set_message(from._internal_message()); + } +} + +void HelloReply::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:helloworld.HelloReply) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void HelloReply::CopyFrom(const HelloReply& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:helloworld.HelloReply) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HelloReply::IsInitialized() const { + return true; +} + +void HelloReply::InternalSwap(HelloReply* other) { + using std::swap; + _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_); + message_.Swap(&other->message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} + +::PROTOBUF_NAMESPACE_ID::Metadata HelloReply::GetMetadata() const { + return GetMetadataStatic(); +} + + +// @@protoc_insertion_point(namespace_scope) +} // namespace helloworld +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::helloworld::HelloRequest* Arena::CreateMaybeMessage< ::helloworld::HelloRequest >(Arena* arena) { + return Arena::CreateMessageInternal< ::helloworld::HelloRequest >(arena); +} +template<> PROTOBUF_NOINLINE ::helloworld::HelloReply* Arena::CreateMaybeMessage< ::helloworld::HelloReply >(Arena* arena) { + return Arena::CreateMessageInternal< ::helloworld::HelloReply >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/proto/helloworld/helloworld.pb.h b/proto/helloworld/helloworld.pb.h new file mode 100644 index 0000000..1ac6e38 --- /dev/null +++ b/proto/helloworld/helloworld.pb.h @@ -0,0 +1,675 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: helloworld.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_helloworld_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_helloworld_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 +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_helloworld_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_helloworld_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_helloworld_2eproto; +namespace helloworld { +class HelloReply; +class HelloReplyDefaultTypeInternal; +extern HelloReplyDefaultTypeInternal _HelloReply_default_instance_; +class HelloRequest; +class HelloRequestDefaultTypeInternal; +extern HelloRequestDefaultTypeInternal _HelloRequest_default_instance_; +} // namespace helloworld +PROTOBUF_NAMESPACE_OPEN +template<> ::helloworld::HelloReply* Arena::CreateMaybeMessage<::helloworld::HelloReply>(Arena*); +template<> ::helloworld::HelloRequest* Arena::CreateMaybeMessage<::helloworld::HelloRequest>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace helloworld { + +// =================================================================== + +class HelloRequest PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:helloworld.HelloRequest) */ { + public: + inline HelloRequest() : HelloRequest(nullptr) {}; + virtual ~HelloRequest(); + + HelloRequest(const HelloRequest& from); + HelloRequest(HelloRequest&& from) noexcept + : HelloRequest() { + *this = ::std::move(from); + } + + inline HelloRequest& operator=(const HelloRequest& from) { + CopyFrom(from); + return *this; + } + inline HelloRequest& operator=(HelloRequest&& 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 HelloRequest& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const HelloRequest* internal_default_instance() { + return reinterpret_cast( + &_HelloRequest_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(HelloRequest& a, HelloRequest& b) { + a.Swap(&b); + } + inline void Swap(HelloRequest* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(HelloRequest* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline HelloRequest* New() const final { + return CreateMaybeMessage(nullptr); + } + + HelloRequest* 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 HelloRequest& from); + void MergeFrom(const HelloRequest& 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(HelloRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "helloworld.HelloRequest"; + } + protected: + explicit HelloRequest(::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_helloworld_2eproto); + return ::descriptor_table_helloworld_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNameFieldNumber = 1, + kVHiveMetadataFieldNumber = 15, + }; + // string name = 1; + void clear_name(); + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); + void set_name(const char* value); + void set_name(const char* value, size_t size); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); + 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_name(); + 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_name( + std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // bytes vHiveMetadata = 15; + void clear_vhivemetadata(); + const std::string& vhivemetadata() const; + void set_vhivemetadata(const std::string& value); + void set_vhivemetadata(std::string&& value); + void set_vhivemetadata(const char* value); + void set_vhivemetadata(const void* value, size_t size); + std::string* mutable_vhivemetadata(); + std::string* release_vhivemetadata(); + void set_allocated_vhivemetadata(std::string* vhivemetadata); + 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_vhivemetadata(); + 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_vhivemetadata( + std::string* vhivemetadata); + private: + const std::string& _internal_vhivemetadata() const; + void _internal_set_vhivemetadata(const std::string& value); + std::string* _internal_mutable_vhivemetadata(); + public: + + // @@protoc_insertion_point(class_scope:helloworld.HelloRequest) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr vhivemetadata_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_helloworld_2eproto; +}; +// ------------------------------------------------------------------- + +class HelloReply PROTOBUF_FINAL : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:helloworld.HelloReply) */ { + public: + inline HelloReply() : HelloReply(nullptr) {}; + virtual ~HelloReply(); + + HelloReply(const HelloReply& from); + HelloReply(HelloReply&& from) noexcept + : HelloReply() { + *this = ::std::move(from); + } + + inline HelloReply& operator=(const HelloReply& from) { + CopyFrom(from); + return *this; + } + inline HelloReply& operator=(HelloReply&& 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 HelloReply& default_instance(); + + static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY + static inline const HelloReply* internal_default_instance() { + return reinterpret_cast( + &_HelloReply_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(HelloReply& a, HelloReply& b) { + a.Swap(&b); + } + inline void Swap(HelloReply* other) { + if (other == this) return; + if (GetArena() == other->GetArena()) { + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(HelloReply* other) { + if (other == this) return; + GOOGLE_DCHECK(GetArena() == other->GetArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + inline HelloReply* New() const final { + return CreateMaybeMessage(nullptr); + } + + HelloReply* 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 HelloReply& from); + void MergeFrom(const HelloReply& 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(HelloReply* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "helloworld.HelloReply"; + } + protected: + explicit HelloReply(::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_helloworld_2eproto); + return ::descriptor_table_helloworld_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMessageFieldNumber = 1, + }; + // string message = 1; + void clear_message(); + const std::string& message() const; + void set_message(const std::string& value); + void set_message(std::string&& value); + void set_message(const char* value); + void set_message(const char* value, size_t size); + std::string* mutable_message(); + std::string* release_message(); + void set_allocated_message(std::string* message); + 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_message(); + 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_message( + std::string* message); + private: + const std::string& _internal_message() const; + void _internal_set_message(const std::string& value); + std::string* _internal_mutable_message(); + public: + + // @@protoc_insertion_point(class_scope:helloworld.HelloReply) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + friend struct ::TableStruct_helloworld_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// HelloRequest + +// string name = 1; +inline void HelloRequest::clear_name() { + name_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& HelloRequest::name() const { + // @@protoc_insertion_point(field_get:helloworld.HelloRequest.name) + return _internal_name(); +} +inline void HelloRequest::set_name(const std::string& value) { + _internal_set_name(value); + // @@protoc_insertion_point(field_set:helloworld.HelloRequest.name) +} +inline std::string* HelloRequest::mutable_name() { + // @@protoc_insertion_point(field_mutable:helloworld.HelloRequest.name) + return _internal_mutable_name(); +} +inline const std::string& HelloRequest::_internal_name() const { + return name_.Get(); +} +inline void HelloRequest::_internal_set_name(const std::string& value) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void HelloRequest::set_name(std::string&& value) { + + name_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:helloworld.HelloRequest.name) +} +inline void HelloRequest::set_name(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:helloworld.HelloRequest.name) +} +inline void HelloRequest::set_name(const char* value, + size_t size) { + + name_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:helloworld.HelloRequest.name) +} +inline std::string* HelloRequest::_internal_mutable_name() { + + return name_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* HelloRequest::release_name() { + // @@protoc_insertion_point(field_release:helloworld.HelloRequest.name) + return name_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void HelloRequest::set_allocated_name(std::string* name) { + if (name != nullptr) { + + } else { + + } + name_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:helloworld.HelloRequest.name) +} +inline std::string* HelloRequest::unsafe_arena_release_name() { + // @@protoc_insertion_point(field_unsafe_arena_release:helloworld.HelloRequest.name) + GOOGLE_DCHECK(GetArena() != nullptr); + + return name_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void HelloRequest::unsafe_arena_set_allocated_name( + std::string* name) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (name != nullptr) { + + } else { + + } + name_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + name, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:helloworld.HelloRequest.name) +} + +// bytes vHiveMetadata = 15; +inline void HelloRequest::clear_vhivemetadata() { + vhivemetadata_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& HelloRequest::vhivemetadata() const { + // @@protoc_insertion_point(field_get:helloworld.HelloRequest.vHiveMetadata) + return _internal_vhivemetadata(); +} +inline void HelloRequest::set_vhivemetadata(const std::string& value) { + _internal_set_vhivemetadata(value); + // @@protoc_insertion_point(field_set:helloworld.HelloRequest.vHiveMetadata) +} +inline std::string* HelloRequest::mutable_vhivemetadata() { + // @@protoc_insertion_point(field_mutable:helloworld.HelloRequest.vHiveMetadata) + return _internal_mutable_vhivemetadata(); +} +inline const std::string& HelloRequest::_internal_vhivemetadata() const { + return vhivemetadata_.Get(); +} +inline void HelloRequest::_internal_set_vhivemetadata(const std::string& value) { + + vhivemetadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void HelloRequest::set_vhivemetadata(std::string&& value) { + + vhivemetadata_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:helloworld.HelloRequest.vHiveMetadata) +} +inline void HelloRequest::set_vhivemetadata(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + vhivemetadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:helloworld.HelloRequest.vHiveMetadata) +} +inline void HelloRequest::set_vhivemetadata(const void* value, + size_t size) { + + vhivemetadata_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:helloworld.HelloRequest.vHiveMetadata) +} +inline std::string* HelloRequest::_internal_mutable_vhivemetadata() { + + return vhivemetadata_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* HelloRequest::release_vhivemetadata() { + // @@protoc_insertion_point(field_release:helloworld.HelloRequest.vHiveMetadata) + return vhivemetadata_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void HelloRequest::set_allocated_vhivemetadata(std::string* vhivemetadata) { + if (vhivemetadata != nullptr) { + + } else { + + } + vhivemetadata_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), vhivemetadata, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:helloworld.HelloRequest.vHiveMetadata) +} +inline std::string* HelloRequest::unsafe_arena_release_vhivemetadata() { + // @@protoc_insertion_point(field_unsafe_arena_release:helloworld.HelloRequest.vHiveMetadata) + GOOGLE_DCHECK(GetArena() != nullptr); + + return vhivemetadata_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void HelloRequest::unsafe_arena_set_allocated_vhivemetadata( + std::string* vhivemetadata) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (vhivemetadata != nullptr) { + + } else { + + } + vhivemetadata_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + vhivemetadata, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:helloworld.HelloRequest.vHiveMetadata) +} + +// ------------------------------------------------------------------- + +// HelloReply + +// string message = 1; +inline void HelloReply::clear_message() { + message_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline const std::string& HelloReply::message() const { + // @@protoc_insertion_point(field_get:helloworld.HelloReply.message) + return _internal_message(); +} +inline void HelloReply::set_message(const std::string& value) { + _internal_set_message(value); + // @@protoc_insertion_point(field_set:helloworld.HelloReply.message) +} +inline std::string* HelloReply::mutable_message() { + // @@protoc_insertion_point(field_mutable:helloworld.HelloReply.message) + return _internal_mutable_message(); +} +inline const std::string& HelloReply::_internal_message() const { + return message_.Get(); +} +inline void HelloReply::_internal_set_message(const std::string& value) { + + message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena()); +} +inline void HelloReply::set_message(std::string&& value) { + + message_.Set( + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena()); + // @@protoc_insertion_point(field_set_rvalue:helloworld.HelloReply.message) +} +inline void HelloReply::set_message(const char* value) { + GOOGLE_DCHECK(value != nullptr); + + message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value), + GetArena()); + // @@protoc_insertion_point(field_set_char:helloworld.HelloReply.message) +} +inline void HelloReply::set_message(const char* value, + size_t size) { + + message_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size), GetArena()); + // @@protoc_insertion_point(field_set_pointer:helloworld.HelloReply.message) +} +inline std::string* HelloReply::_internal_mutable_message() { + + return message_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline std::string* HelloReply::release_message() { + // @@protoc_insertion_point(field_release:helloworld.HelloReply.message) + return message_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena()); +} +inline void HelloReply::set_allocated_message(std::string* message) { + if (message != nullptr) { + + } else { + + } + message_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), message, + GetArena()); + // @@protoc_insertion_point(field_set_allocated:helloworld.HelloReply.message) +} +inline std::string* HelloReply::unsafe_arena_release_message() { + // @@protoc_insertion_point(field_unsafe_arena_release:helloworld.HelloReply.message) + GOOGLE_DCHECK(GetArena() != nullptr); + + return message_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + GetArena()); +} +inline void HelloReply::unsafe_arena_set_allocated_message( + std::string* message) { + GOOGLE_DCHECK(GetArena() != nullptr); + if (message != nullptr) { + + } else { + + } + message_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), + message, GetArena()); + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:helloworld.HelloReply.message) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace helloworld + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_helloworld_2eproto