From c84ed6813e24b6d64d2eea7e39188ddae11528c6 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 4 May 2016 16:30:11 -0700 Subject: Proto server reflection --- .../util/proto_reflection_descriptor_database.cc | 238 +++++++++++++++++++++ .../util/proto_reflection_descriptor_database.h | 95 ++++++++ test/cpp/util/reflection_debug/Makefile | 50 +++++ .../cpp/util/reflection_debug/reflection_client.cc | 216 +++++++++++++++++++ 4 files changed, 599 insertions(+) create mode 100644 test/cpp/util/proto_reflection_descriptor_database.cc create mode 100644 test/cpp/util/proto_reflection_descriptor_database.h create mode 100644 test/cpp/util/reflection_debug/Makefile create mode 100644 test/cpp/util/reflection_debug/reflection_client.cc (limited to 'test/cpp') diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc new file mode 100644 index 0000000000..c2ed93c12b --- /dev/null +++ b/test/cpp/util/proto_reflection_descriptor_database.cc @@ -0,0 +1,238 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "proto_reflection_descriptor_database.h" + +#include + +#include + +namespace grpc { + +ProtoReflectionDescriptorDatabase::ProtoReflectionDescriptorDatabase( + std::unique_ptr stub) + : stub_(std::move(stub)) {} + +ProtoReflectionDescriptorDatabase::ProtoReflectionDescriptorDatabase( + std::shared_ptr channel) + : stub_(reflection::v1alpha::ServerReflection::NewStub(channel)) {} + +ProtoReflectionDescriptorDatabase::~ProtoReflectionDescriptorDatabase() {} + +bool ProtoReflectionDescriptorDatabase::FindFileByName( + const string& filename, google::protobuf::FileDescriptorProto* output) { + if (cached_db_.FindFileByName(filename, output)) { + return true; + } + + if (known_files_.find(filename) != known_files_.end()) { + return false; + } + + ClientContext ctx; + reflection::v1alpha::FileNameRequest request; + request.set_filename(filename); + reflection::v1alpha::FileDescriptorProtoResponse response; + + Status status = stub_->GetFileByName(&ctx, request, &response); + if (status.ok()) { + // const google::protobuf::FileDescriptorProto* file_proto = + // response.mutable_file_descriptor_proto(); + const google::protobuf::FileDescriptorProto file_proto = + ParseFileDescriptorProtoResponse(&response); + known_files_.insert(file_proto.name()); + cached_db_.Add(file_proto); + } else if (status.error_code() == StatusCode::NOT_FOUND) { + gpr_log(GPR_INFO, "NOT_FOUND from server for FindFileByName(%s)", + filename.c_str()); + } else { + gpr_log(GPR_INFO, + "Error on FindFileByName(%s)\n\tError code: %d\n" + "\tError Message: %s", + filename.c_str(), status.error_code(), + status.error_message().c_str()); + } + + return cached_db_.FindFileByName(filename, output); +} + +bool ProtoReflectionDescriptorDatabase::FindFileContainingSymbol( + const string& symbol_name, google::protobuf::FileDescriptorProto* output) { + if (cached_db_.FindFileContainingSymbol(symbol_name, output)) { + return true; + } + + if (missing_symbols_.find(symbol_name) != missing_symbols_.end()) { + return false; + } + + ClientContext ctx; + reflection::v1alpha::SymbolRequest request; + request.set_symbol(symbol_name); + reflection::v1alpha::FileDescriptorProtoResponse response; + + Status status = stub_->GetFileContainingSymbol(&ctx, request, &response); + if (status.ok()) { + const google::protobuf::FileDescriptorProto file_proto = + ParseFileDescriptorProtoResponse(&response); + if (known_files_.find(file_proto.name()) == known_files_.end()) { + known_files_.insert(file_proto.name()); + cached_db_.Add(file_proto); + } + } else if (status.error_code() == StatusCode::NOT_FOUND) { + missing_symbols_.insert(symbol_name); + gpr_log(GPR_INFO, "NOT_FOUND from server for FindFileContainingSymbol(%s)", + symbol_name.c_str()); + } else { + gpr_log(GPR_INFO, + "Error on FindFileContainingSymbol(%s)\n" + "\tError code: %d\n\tError Message: %s", + symbol_name.c_str(), status.error_code(), + status.error_message().c_str()); + } + + return cached_db_.FindFileContainingSymbol(symbol_name, output); +} + +bool ProtoReflectionDescriptorDatabase::FindFileContainingExtension( + const string& containing_type, int field_number, + google::protobuf::FileDescriptorProto* output) { + if (cached_db_.FindFileContainingExtension(containing_type, field_number, + output)) { + return true; + } + + if (missing_extensions_.find(containing_type) != missing_extensions_.end() && + missing_extensions_[containing_type].find(field_number) != + missing_extensions_[containing_type].end()) { + gpr_log(GPR_INFO, "nested map."); + return false; + } + + ClientContext ctx; + reflection::v1alpha::ExtensionRequest request; + request.set_containing_type(containing_type); + request.set_extension_number(field_number); + reflection::v1alpha::FileDescriptorProtoResponse response; + + Status status = stub_->GetFileContainingExtension(&ctx, request, &response); + if (status.ok()) { + const google::protobuf::FileDescriptorProto file_proto = + ParseFileDescriptorProtoResponse(&response); + if (known_files_.find(file_proto.name()) == known_files_.end()) { + known_files_.insert(file_proto.name()); + cached_db_.Add(file_proto); + } + } else if (status.error_code() == StatusCode::NOT_FOUND) { + if (missing_extensions_.find(containing_type) == + missing_extensions_.end()) { + missing_extensions_[containing_type] = {}; + } + missing_extensions_[containing_type].insert(field_number); + gpr_log(GPR_INFO, + "NOT_FOUND from server for FindFileContainingExtension(%s, %d)", + containing_type.c_str(), field_number); + } else { + gpr_log(GPR_INFO, + "Error on FindFileContainingExtension(%s, %d)\n" + "\tError code: %d\n\tError Message: %s", + containing_type.c_str(), field_number, status.error_code(), + status.error_message().c_str()); + } + + return cached_db_.FindFileContainingExtension(containing_type, field_number, + output); +} + +bool ProtoReflectionDescriptorDatabase::FindAllExtensionNumbers( + const string& extendee_type, std::vector* output) { + if (cached_extension_numbers_.find(extendee_type) != + cached_extension_numbers_.end()) { + *output = cached_extension_numbers_[extendee_type]; + return true; + } + + ClientContext ctx; + reflection::v1alpha::TypeRequest request; + request.set_type(extendee_type); + reflection::v1alpha::ExtensionNumberResponse response; + + Status status = stub_->GetAllExtensionNumbers(&ctx, request, &response); + if (status.ok()) { + auto number = response.extension_number(); + *output = std::vector(number.begin(), number.end()); + cached_extension_numbers_[extendee_type] = *output; + return true; + } else if (status.error_code() == StatusCode::NOT_FOUND) { + gpr_log(GPR_INFO, "NOT_FOUND from server for FindAllExtensionNumbers(%s)", + extendee_type.c_str()); + } else { + gpr_log(GPR_INFO, + "Error on FindAllExtensionNumbersExtension(%s)\n" + "\tError code: %d\n\tError Message: %s", + extendee_type.c_str(), status.error_code(), + status.error_message().c_str()); + } + return false; +} + +bool ProtoReflectionDescriptorDatabase::GetServices( + std::vector* output) { + ClientContext ctx; + reflection::v1alpha::EmptyRequest request; + reflection::v1alpha::ListServiceResponse response; + + Status status = stub_->ListService(&ctx, request, &response); + if (status.ok()) { + for (int i = 0; i < response.services_size(); ++i) { + (*output).push_back(response.services(i)); + } + return true; + } else { + gpr_log(GPR_INFO, + "Error on GetServices()\n\tError code: %d\n" + "\tError Message: %s", + status.error_code(), status.error_message().c_str()); + } + return false; +} + +const google::protobuf::FileDescriptorProto +ProtoReflectionDescriptorDatabase::ParseFileDescriptorProtoResponse( + reflection::v1alpha::FileDescriptorProtoResponse* response) { + google::protobuf::FileDescriptorProto file_desc_proto; + file_desc_proto.ParseFromString(response->file_descriptor_proto()); + return file_desc_proto; +} + +} // namespace grpc diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h new file mode 100644 index 0000000000..bf94654c3d --- /dev/null +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -0,0 +1,95 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +// #include "reflection.grpc.pb.h" + +namespace grpc { + +class ProtoReflectionDescriptorDatabase + : public google::protobuf::DescriptorDatabase { + public: + explicit ProtoReflectionDescriptorDatabase( + std::unique_ptr stub); + + explicit ProtoReflectionDescriptorDatabase( + std::shared_ptr channel); + + virtual ~ProtoReflectionDescriptorDatabase(); + + // DescriptorDatabase methods + bool FindFileByName(const string& filename, + google::protobuf::FileDescriptorProto* output) + GRPC_OVERRIDE; + + bool FindFileContainingSymbol(const string& symbol_name, + google::protobuf::FileDescriptorProto* output) + GRPC_OVERRIDE; + + bool FindFileContainingExtension( + const string& containing_type, int field_number, + google::protobuf::FileDescriptorProto* output) GRPC_OVERRIDE; + + bool FindAllExtensionNumbers(const string& extendee_type, + std::vector* output) GRPC_OVERRIDE; + + bool GetServices(std::vector* output); + + grpc::reflection::v1alpha::ServerReflection::Stub* stub() { + return stub_.get(); + } + + private: + const google::protobuf::FileDescriptorProto ParseFileDescriptorProtoResponse( + reflection::v1alpha::FileDescriptorProtoResponse* response); + + std::unique_ptr stub_; + std::unordered_set known_files_; + std::unordered_set missing_symbols_; + std::unordered_map> missing_extensions_; + std::unordered_map> cached_extension_numbers_; + + google::protobuf::SimpleDescriptorDatabase cached_db_; +}; + +} // namespace grpc diff --git a/test/cpp/util/reflection_debug/Makefile b/test/cpp/util/reflection_debug/Makefile new file mode 100644 index 0000000000..9eea5ae734 --- /dev/null +++ b/test/cpp/util/reflection_debug/Makefile @@ -0,0 +1,50 @@ + +# Copyright 2015-2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +CXX = g++ +INCLUDES += -I. -I.. +CPPFLAGS += -I/usr/local/include -pthread +CXXFLAGS += -std=c++11 ${INCLUDES} +LDFLAGS += -L/usr/local/lib -lgrpc++_unsecure -lgrpc -lgrpc++_reflection -lprotobuf -lpthread -ldl +VPATH = .. + +# PROTOS_PATH = ../../../src/cpp/plugin/reflection + +vpath %.proto $(PROTOS_PATH) + +all: reflection_client + +reflection_client: proto_reflection_descriptor_database.o reflection_client.o + $(CXX) $(INCLUDES) $^ $(LDFLAGS) -o $@ + + +clean: + rm -f *.o reflection_client diff --git a/test/cpp/util/reflection_debug/reflection_client.cc b/test/cpp/util/reflection_debug/reflection_client.cc new file mode 100644 index 0000000000..fb40627514 --- /dev/null +++ b/test/cpp/util/reflection_debug/reflection_client.cc @@ -0,0 +1,216 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include + +#include +#include +#include + +#include "proto_reflection_descriptor_database.h" +// #include "reflection.grpc.pb.h" + +using grpc::Channel; +using grpc::ClientContext; +using grpc::Status; +using grpc::ProtoReflectionDescriptorDatabase; +using grpc::reflection::v1alpha::ServerReflection; +using grpc::reflection::v1alpha::EmptyRequest; +using grpc::reflection::v1alpha::ListServiceResponse; +using google::protobuf::FileDescriptorProto; +using google::protobuf::DescriptorPool; +using google::protobuf::ServiceDescriptor; +using google::protobuf::MethodDescriptor; +using google::protobuf::Descriptor; +using google::protobuf::FieldDescriptor; + +class ReflectionClient { + public: + ReflectionClient(std::shared_ptr channel) + : db_(new ProtoReflectionDescriptorDatabase( + ServerReflection::NewStub(channel))), + desc_pool_(new DescriptorPool(db_.get())) {} + + void PrintInfo() { + EmptyRequest request; + ListServiceResponse response; + ClientContext context; + Status status = db_->stub()->ListService(&context, request, &response); + if (status.ok()) { + std::string padding = ""; + std::cout << "Service amount:" << response.services_size() << std::endl; + for (int i = 0; i < response.services_size(); ++i) { + if (i != response.services_size() - 1) { + std::cout << padding << "│ " << std::endl; + std::cout << padding << "├─" << response.services(i) << std::endl; + PrintService(desc_pool_->FindServiceByName(response.services(i)), + padding + "│ "); + } else { + std::cout << padding << "│ " << std::endl; + std::cout << padding << "└─" << response.services(i) << std::endl; + PrintService(desc_pool_->FindServiceByName(response.services(i)), + padding + " "); + } + } + } else { + std::cout << status.error_message(); + } + } + + void PrintService(const ServiceDescriptor* service_desc, + const std::string padding) { + if (service_desc != nullptr) { + std::cout << padding << "│ Method amount:" << service_desc->method_count() + << std::endl; + for (int i = 0; i < service_desc->method_count(); ++i) { + if (i != service_desc->method_count() - 1) { + std::cout << padding << "├─" << service_desc->method(i)->name() + << std::endl; + PrintMethod(service_desc->method(i), padding + "│ "); + } else { + std::cout << padding << "└─" << service_desc->method(i)->name() + << std::endl; + PrintMethod(service_desc->method(i), padding + " "); + } + } + } + } + + void PrintMethod(const MethodDescriptor* method_desc, + const std::string padding) { + if (method_desc != nullptr) { + std::cout << padding + << "├─input type: " << method_desc->input_type()->name() + << std::endl; + PrintMessageType(method_desc->input_type(), padding + "│ "); + std::cout << padding + << "└─output type: " << method_desc->output_type()->name() + << std::endl; + PrintMessageType(method_desc->output_type(), padding + " "); + } + } + + void PrintMessageType(const Descriptor* type_desc, + const std::string padding) { + if (type_desc != nullptr) { + if (type_desc->field_count() > 0) { + std::cout << padding << "│ Field amount:" << type_desc->field_count() + << std::endl; + } + for (int i = 0; i < type_desc->field_count(); ++i) { + if (i != type_desc->field_count() - 1) { + const FieldDescriptor* field = type_desc->field(i); + std::cout << padding << "├─ " << std::left << std::setw(15) + << kLabelToName[field->label()] << std::setw(30) + << " name: " + field->name() << std::setw(50) + << " type: " + + (field->type() == FieldDescriptor::Type::TYPE_MESSAGE + ? field->message_type()->name() + : field->type_name()) + << std::endl; + } else { + const FieldDescriptor* field = type_desc->field(i); + std::cout << padding << "└─ " << std::left << std::setw(15) + << kLabelToName[field->label()] << std::setw(30) + << " name: " + field->name() << std::setw(50) + << " type: " + + (field->type() == FieldDescriptor::Type::TYPE_MESSAGE + ? field->message_type()->name() + : field->type_name()) + << std::endl; + } + } + } + } + + void Test() { + { + FileDescriptorProto output; + bool found = db_->FindFileByName("helloworld.proto", &output); + if (found) std::cout << output.name() << std::endl; + } + { + FileDescriptorProto output; + bool found = + db_->FindFileContainingSymbol("helloworld.Greeter.SayHello", &output); + if (found) std::cout << output.name() << std::endl; + } + { + FileDescriptorProto output; + bool found = db_->FindFileContainingExtension( + "helloworld.Greeter.HelloRequest", 1, &output); + found = db_->FindFileContainingExtension( + "helloworld.Greeter.HelloRequest", 1, &output); + if (found) std::cout << output.name() << std::endl; + } + DescriptorPool pool(db_.get()); + std::cout << pool.FindServiceByName("helloworld.Greeter")->name() + << std::endl; + } + + private: + const char* const kLabelToName[FieldDescriptor::Label::MAX_LABEL + 1] = { + "ERROR", // 0 is reserved for errors + + "optional", // LABEL_OPTIONAL + "required", // LABEL_REQUIRED + "repeated", // LABEL_REPEATED + }; + + std::unique_ptr db_; + std::unique_ptr desc_pool_; +}; + +int main(int argc, char** argv) { + int port = 50051; + if (argc == 2) { + try { + port = std::stoi(argv[1]); + if (port > 65535 || port < 1024) { + throw std::out_of_range("Port number out of range."); + } + } catch (std::invalid_argument&) { + } catch (std::out_of_range&) { + } + } + + ReflectionClient reflection_client(grpc::CreateChannel( + "localhost:" + std::to_string(port), grpc::InsecureChannelCredentials())); + + reflection_client.PrintInfo(); + + return 0; +} -- cgit v1.2.3 From 0333a49afa63e47eb66445243fe9d1e7d3fa68f4 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 4 May 2016 19:14:10 -0700 Subject: Use stream rpc to ensure all related requests go to a single server. --- .../include/grpc++/impl/reflection.grpc.pb.h | 579 +--- extensions/include/grpc++/impl/reflection.pb.h | 1834 ++++++---- extensions/reflection/proto_server_reflection.cc | 89 +- extensions/reflection/proto_server_reflection.h | 35 +- extensions/reflection/reflection.grpc.pb.cc | 256 +- extensions/reflection/reflection.pb.cc | 3535 ++++++++++++-------- src/proto/grpc/reflection/v1alpha/reflection.proto | 141 +- .../util/proto_reflection_descriptor_database.cc | 250 +- .../util/proto_reflection_descriptor_database.h | 11 +- .../cpp/util/reflection_debug/reflection_client.cc | 45 +- tools/codegen/extensions/gen_reflection_proto.sh | 42 +- 11 files changed, 4029 insertions(+), 2788 deletions(-) (limited to 'test/cpp') diff --git a/extensions/include/grpc++/impl/reflection.grpc.pb.h b/extensions/include/grpc++/impl/reflection.grpc.pb.h index f600929636..7c6e7b2b78 100644 --- a/extensions/include/grpc++/impl/reflection.grpc.pb.h +++ b/extensions/include/grpc++/impl/reflection.grpc.pb.h @@ -1,6 +1,72 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + // Generated by the gRPC protobuf plugin. // If you make any local change, they will be lost. // source: reflection.proto +// Original file comments: +// Copyright 2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Service exported by server reflection +// #ifndef GRPC_reflection_2eproto__INCLUDED #define GRPC_reflection_2eproto__INCLUDED @@ -32,516 +98,78 @@ class ServerReflection GRPC_FINAL { class StubInterface { public: virtual ~StubInterface() {} - virtual ::grpc::Status ListService( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::reflection::v1alpha::ListServiceResponse* response) = 0; - std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::ListServiceResponse>> - AsyncListService(::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::ListServiceResponse>>( - AsyncListServiceRaw(context, request, cq)); - } - virtual ::grpc::Status GetFileByName( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) = 0; - std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> - AsyncGetFileByName( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( - AsyncGetFileByNameRaw(context, request, cq)); - } - virtual ::grpc::Status GetFileContainingSymbol( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) = 0; - std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> - AsyncGetFileContainingSymbol( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( - AsyncGetFileContainingSymbolRaw(context, request, cq)); + // The reflection service is structured as a bidirectional stream, ensuring + // all related requests go to a single server. + std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>> DescriptorDatabaseInfo(::grpc::ClientContext* context) { + return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>>(DescriptorDatabaseInfoRaw(context)); } - virtual ::grpc::Status GetFileContainingExtension( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) = 0; - std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> - AsyncGetFileContainingExtension( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( - AsyncGetFileContainingExtensionRaw(context, request, cq)); + std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>> AsyncDescriptorDatabaseInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>>(AsyncDescriptorDatabaseInfoRaw(context, cq, tag)); } - virtual ::grpc::Status GetAllExtensionNumbers( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) = 0; - std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>> - AsyncGetAllExtensionNumbers( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>>( - AsyncGetAllExtensionNumbersRaw(context, request, cq)); - } - - private: - virtual ::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::ListServiceResponse>* - AsyncListServiceRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* - AsyncGetFileByNameRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* - AsyncGetFileContainingSymbolRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* - AsyncGetFileContainingExtensionRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>* - AsyncGetAllExtensionNumbersRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::CompletionQueue* cq) = 0; + private: + virtual ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>* DescriptorDatabaseInfoRaw(::grpc::ClientContext* context) = 0; + virtual ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>* AsyncDescriptorDatabaseInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; }; class Stub GRPC_FINAL : public StubInterface { public: - Stub(const std::shared_ptr<::grpc::ChannelInterface>& channel); - ::grpc::Status ListService( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::reflection::v1alpha::ListServiceResponse* response) - GRPC_OVERRIDE; - std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ListServiceResponse>> - AsyncListService(::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ListServiceResponse>>( - AsyncListServiceRaw(context, request, cq)); + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>> DescriptorDatabaseInfo(::grpc::ClientContext* context) { + return std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>>(DescriptorDatabaseInfoRaw(context)); } - ::grpc::Status GetFileByName( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_OVERRIDE; - std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> - AsyncGetFileByName( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( - AsyncGetFileByNameRaw(context, request, cq)); - } - ::grpc::Status GetFileContainingSymbol( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_OVERRIDE; - std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> - AsyncGetFileContainingSymbol( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( - AsyncGetFileContainingSymbolRaw(context, request, cq)); - } - ::grpc::Status GetFileContainingExtension( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_OVERRIDE; - std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> - AsyncGetFileContainingExtension( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( - AsyncGetFileContainingExtensionRaw(context, request, cq)); - } - ::grpc::Status GetAllExtensionNumbers( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) - GRPC_OVERRIDE; - std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>> - AsyncGetAllExtensionNumbers( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>>( - AsyncGetAllExtensionNumbersRaw(context, request, cq)); + std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>> AsyncDescriptorDatabaseInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>>(AsyncDescriptorDatabaseInfoRaw(context, cq, tag)); } private: - std::shared_ptr<::grpc::ChannelInterface> channel_; - ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ListServiceResponse>* - AsyncListServiceRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; - ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* - AsyncGetFileByNameRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; - ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* - AsyncGetFileContainingSymbolRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; - ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* - AsyncGetFileContainingExtensionRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; - ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>* - AsyncGetAllExtensionNumbersRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; - const ::grpc::RpcMethod rpcmethod_ListService_; - const ::grpc::RpcMethod rpcmethod_GetFileByName_; - const ::grpc::RpcMethod rpcmethod_GetFileContainingSymbol_; - const ::grpc::RpcMethod rpcmethod_GetFileContainingExtension_; - const ::grpc::RpcMethod rpcmethod_GetAllExtensionNumbers_; + std::shared_ptr< ::grpc::ChannelInterface> channel_; + ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>* DescriptorDatabaseInfoRaw(::grpc::ClientContext* context) GRPC_OVERRIDE; + ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>* AsyncDescriptorDatabaseInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE; + const ::grpc::RpcMethod rpcmethod_DescriptorDatabaseInfo_; }; - static std::unique_ptr NewStub( - const std::shared_ptr<::grpc::ChannelInterface>& channel, - const ::grpc::StubOptions& options = ::grpc::StubOptions()); + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); class Service : public ::grpc::Service { public: Service(); virtual ~Service(); - virtual ::grpc::Status ListService( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest* request, - ::grpc::reflection::v1alpha::ListServiceResponse* response); - virtual ::grpc::Status GetFileByName( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response); - virtual ::grpc::Status GetFileContainingSymbol( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response); - virtual ::grpc::Status GetFileContainingExtension( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response); - virtual ::grpc::Status GetAllExtensionNumbers( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::TypeRequest* request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response); + // The reflection service is structured as a bidirectional stream, ensuring + // all related requests go to a single server. + virtual ::grpc::Status DescriptorDatabaseInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseResponse, ::grpc::reflection::v1alpha::DescriptorDatabaseRequest>* stream); }; template - class WithAsyncMethod_ListService : public BaseClass { + class WithAsyncMethod_DescriptorDatabaseInfo : public BaseClass { private: - void BaseClassMustBeDerivedFromService(Service* service) {} - + void BaseClassMustBeDerivedFromService(const Service *service) {} public: - WithAsyncMethod_ListService() { ::grpc::Service::MarkMethodAsync(0); } - ~WithAsyncMethod_ListService() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status ListService( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest* request, - ::grpc::reflection::v1alpha::ListServiceResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + WithAsyncMethod_DescriptorDatabaseInfo() { + ::grpc::Service::MarkMethodAsync(0); } - void RequestListService( - ::grpc::ServerContext* context, - ::grpc::reflection::v1alpha::EmptyRequest* request, - ::grpc::ServerAsyncResponseWriter< - ::grpc::reflection::v1alpha::ListServiceResponse>* response, - ::grpc::CompletionQueue* new_call_cq, - ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(0, context, request, response, - new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_GetFileByName : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithAsyncMethod_GetFileByName() { ::grpc::Service::MarkMethodAsync(1); } - ~WithAsyncMethod_GetFileByName() GRPC_OVERRIDE { + ~WithAsyncMethod_DescriptorDatabaseInfo() GRPC_OVERRIDE { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status GetFileByName( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_FINAL GRPC_OVERRIDE { + ::grpc::Status DescriptorDatabaseInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseResponse, ::grpc::reflection::v1alpha::DescriptorDatabaseRequest>* stream) GRPC_FINAL GRPC_OVERRIDE { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestGetFileByName( - ::grpc::ServerContext* context, - ::grpc::reflection::v1alpha::FileNameRequest* request, - ::grpc::ServerAsyncResponseWriter< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* response, - ::grpc::CompletionQueue* new_call_cq, - ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(1, context, request, response, - new_call_cq, notification_cq, tag); + void RequestDescriptorDatabaseInfo(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseResponse, ::grpc::reflection::v1alpha::DescriptorDatabaseRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag); } }; + typedef WithAsyncMethod_DescriptorDatabaseInfo AsyncService; template - class WithAsyncMethod_GetFileContainingSymbol : public BaseClass { + class WithGenericMethod_DescriptorDatabaseInfo : public BaseClass { private: - void BaseClassMustBeDerivedFromService(Service* service) {} - + void BaseClassMustBeDerivedFromService(const Service *service) {} public: - WithAsyncMethod_GetFileContainingSymbol() { - ::grpc::Service::MarkMethodAsync(2); + WithGenericMethod_DescriptorDatabaseInfo() { + ::grpc::Service::MarkMethodGeneric(0); } - ~WithAsyncMethod_GetFileContainingSymbol() GRPC_OVERRIDE { + ~WithGenericMethod_DescriptorDatabaseInfo() GRPC_OVERRIDE { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status GetFileContainingSymbol( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGetFileContainingSymbol( - ::grpc::ServerContext* context, - ::grpc::reflection::v1alpha::SymbolRequest* request, - ::grpc::ServerAsyncResponseWriter< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* response, - ::grpc::CompletionQueue* new_call_cq, - ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(2, context, request, response, - new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_GetFileContainingExtension : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithAsyncMethod_GetFileContainingExtension() { - ::grpc::Service::MarkMethodAsync(3); - } - ~WithAsyncMethod_GetFileContainingExtension() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetFileContainingExtension( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGetFileContainingExtension( - ::grpc::ServerContext* context, - ::grpc::reflection::v1alpha::ExtensionRequest* request, - ::grpc::ServerAsyncResponseWriter< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* response, - ::grpc::CompletionQueue* new_call_cq, - ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(3, context, request, response, - new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_GetAllExtensionNumbers : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithAsyncMethod_GetAllExtensionNumbers() { - ::grpc::Service::MarkMethodAsync(4); - } - ~WithAsyncMethod_GetAllExtensionNumbers() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetAllExtensionNumbers( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::TypeRequest* request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGetAllExtensionNumbers( - ::grpc::ServerContext* context, - ::grpc::reflection::v1alpha::TypeRequest* request, - ::grpc::ServerAsyncResponseWriter< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>* response, - ::grpc::CompletionQueue* new_call_cq, - ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(4, context, request, response, - new_call_cq, notification_cq, tag); - } - }; - typedef WithAsyncMethod_ListService< - WithAsyncMethod_GetFileByName>>>> - AsyncService; - template - class WithGenericMethod_ListService : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithGenericMethod_ListService() { ::grpc::Service::MarkMethodGeneric(0); } - ~WithGenericMethod_ListService() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status ListService( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest* request, - ::grpc::reflection::v1alpha::ListServiceResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_GetFileByName : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithGenericMethod_GetFileByName() { ::grpc::Service::MarkMethodGeneric(1); } - ~WithGenericMethod_GetFileByName() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetFileByName( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_GetFileContainingSymbol : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithGenericMethod_GetFileContainingSymbol() { - ::grpc::Service::MarkMethodGeneric(2); - } - ~WithGenericMethod_GetFileContainingSymbol() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetFileContainingSymbol( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_GetFileContainingExtension : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithGenericMethod_GetFileContainingExtension() { - ::grpc::Service::MarkMethodGeneric(3); - } - ~WithGenericMethod_GetFileContainingExtension() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetFileContainingExtension( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_GetAllExtensionNumbers : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithGenericMethod_GetAllExtensionNumbers() { - ::grpc::Service::MarkMethodGeneric(4); - } - ~WithGenericMethod_GetAllExtensionNumbers() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetAllExtensionNumbers( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::TypeRequest* request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) - GRPC_FINAL GRPC_OVERRIDE { + ::grpc::Status DescriptorDatabaseInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseResponse, ::grpc::reflection::v1alpha::DescriptorDatabaseRequest>* stream) GRPC_FINAL GRPC_OVERRIDE { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -552,4 +180,5 @@ class ServerReflection GRPC_FINAL { } // namespace reflection } // namespace grpc + #endif // GRPC_reflection_2eproto__INCLUDED diff --git a/extensions/include/grpc++/impl/reflection.pb.h b/extensions/include/grpc++/impl/reflection.pb.h index b054e28de9..3b1f0a11a2 100644 --- a/extensions/include/grpc++/impl/reflection.pb.h +++ b/extensions/include/grpc++/impl/reflection.pb.h @@ -1,3 +1,37 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + // Generated by the protocol buffer compiler. DO NOT EDIT! // source: reflection.proto @@ -21,11 +55,11 @@ #include #include -#include #include -#include #include +#include #include +#include #include // @@protoc_insertion_point(includes) @@ -38,116 +72,50 @@ void protobuf_AddDesc_reflection_2eproto(); void protobuf_AssignDesc_reflection_2eproto(); void protobuf_ShutdownFile_reflection_2eproto(); -class EmptyRequest; +class DescriptorDatabaseRequest; +class DescriptorDatabaseResponse; +class ErrorResponse; class ExtensionNumberResponse; class ExtensionRequest; -class FileDescriptorProtoResponse; -class FileNameRequest; class ListServiceResponse; -class SymbolRequest; -class TypeRequest; // =================================================================== -class EmptyRequest : public ::google::protobuf::Message { +class DescriptorDatabaseRequest : public ::google::protobuf::Message { public: - EmptyRequest(); - virtual ~EmptyRequest(); + DescriptorDatabaseRequest(); + virtual ~DescriptorDatabaseRequest(); - EmptyRequest(const EmptyRequest& from); + DescriptorDatabaseRequest(const DescriptorDatabaseRequest& from); - inline EmptyRequest& operator=(const EmptyRequest& from) { + inline DescriptorDatabaseRequest& operator=(const DescriptorDatabaseRequest& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); - static const EmptyRequest& default_instance(); - - void Swap(EmptyRequest* other); - - // implements Message ---------------------------------------------- - - inline EmptyRequest* New() const { return New(NULL); } - - EmptyRequest* New(::google::protobuf::Arena* arena) const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const EmptyRequest& from); - void MergeFrom(const EmptyRequest& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(EmptyRequest* other); - - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } - - public: - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.EmptyRequest) - private: - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); - friend void protobuf_AssignDesc_reflection_2eproto(); - friend void protobuf_ShutdownFile_reflection_2eproto(); - - void InitAsDefaultInstance(); - static EmptyRequest* default_instance_; -}; -// ------------------------------------------------------------------- - -class FileNameRequest : public ::google::protobuf::Message { - public: - FileNameRequest(); - virtual ~FileNameRequest(); - - FileNameRequest(const FileNameRequest& from); + static const DescriptorDatabaseRequest& default_instance(); - inline FileNameRequest& operator=(const FileNameRequest& from) { - CopyFrom(from); - return *this; - } + enum MessageRequestCase { + kFileByFilename = 3, + kFileContainingSymbol = 4, + kFileContainingExtension = 5, + kAllExtensionNumbersOfType = 6, + kListServices = 7, + MESSAGE_REQUEST_NOT_SET = 0, + }; - static const ::google::protobuf::Descriptor* descriptor(); - static const FileNameRequest& default_instance(); - - void Swap(FileNameRequest* other); + void Swap(DescriptorDatabaseRequest* other); // implements Message ---------------------------------------------- - inline FileNameRequest* New() const { return New(NULL); } + inline DescriptorDatabaseRequest* New() const { return New(NULL); } - FileNameRequest* New(::google::protobuf::Arena* arena) const; + DescriptorDatabaseRequest* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const FileNameRequest& from); - void MergeFrom(const FileNameRequest& from); + void CopyFrom(const DescriptorDatabaseRequest& from); + void MergeFrom(const DescriptorDatabaseRequest& from); void Clear(); bool IsInitialized() const; @@ -156,139 +124,137 @@ class FileNameRequest : public ::google::protobuf::Message { ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; int GetCachedSize() const { return _cached_size_; } - - private: + private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(FileNameRequest* other); - - private: + void InternalSwap(DescriptorDatabaseRequest* other); + private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } + public: - public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- - // optional string filename = 1; - void clear_filename(); - static const int kFilenameFieldNumber = 1; - const ::std::string& filename() const; - void set_filename(const ::std::string& value); - void set_filename(const char* value); - void set_filename(const char* value, size_t size); - ::std::string* mutable_filename(); - ::std::string* release_filename(); - void set_allocated_filename(::std::string* filename); - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.FileNameRequest) - private: - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr filename_; - mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); - friend void protobuf_AssignDesc_reflection_2eproto(); - friend void protobuf_ShutdownFile_reflection_2eproto(); - - void InitAsDefaultInstance(); - static FileNameRequest* default_instance_; -}; -// ------------------------------------------------------------------- - -class SymbolRequest : public ::google::protobuf::Message { - public: - SymbolRequest(); - virtual ~SymbolRequest(); - - SymbolRequest(const SymbolRequest& from); - - inline SymbolRequest& operator=(const SymbolRequest& from) { - CopyFrom(from); - return *this; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const SymbolRequest& default_instance(); - - void Swap(SymbolRequest* other); - - // implements Message ---------------------------------------------- - - inline SymbolRequest* New() const { return New(NULL); } - - SymbolRequest* New(::google::protobuf::Arena* arena) const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const SymbolRequest& from); - void MergeFrom(const SymbolRequest& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - + // optional string host = 1; + void clear_host(); + static const int kHostFieldNumber = 1; + const ::std::string& host() const; + void set_host(const ::std::string& value); + void set_host(const char* value); + void set_host(const char* value, size_t size); + ::std::string* mutable_host(); + ::std::string* release_host(); + void set_allocated_host(::std::string* host); + + // optional string file_by_filename = 3; + private: + bool has_file_by_filename() const; + public: + void clear_file_by_filename(); + static const int kFileByFilenameFieldNumber = 3; + const ::std::string& file_by_filename() const; + void set_file_by_filename(const ::std::string& value); + void set_file_by_filename(const char* value); + void set_file_by_filename(const char* value, size_t size); + ::std::string* mutable_file_by_filename(); + ::std::string* release_file_by_filename(); + void set_allocated_file_by_filename(::std::string* file_by_filename); + + // optional string file_containing_symbol = 4; + private: + bool has_file_containing_symbol() const; + public: + void clear_file_containing_symbol(); + static const int kFileContainingSymbolFieldNumber = 4; + const ::std::string& file_containing_symbol() const; + void set_file_containing_symbol(const ::std::string& value); + void set_file_containing_symbol(const char* value); + void set_file_containing_symbol(const char* value, size_t size); + ::std::string* mutable_file_containing_symbol(); + ::std::string* release_file_containing_symbol(); + void set_allocated_file_containing_symbol(::std::string* file_containing_symbol); + + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + bool has_file_containing_extension() const; + void clear_file_containing_extension(); + static const int kFileContainingExtensionFieldNumber = 5; + const ::grpc::reflection::v1alpha::ExtensionRequest& file_containing_extension() const; + ::grpc::reflection::v1alpha::ExtensionRequest* mutable_file_containing_extension(); + ::grpc::reflection::v1alpha::ExtensionRequest* release_file_containing_extension(); + void set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension); + + // optional string all_extension_numbers_of_type = 6; + private: + bool has_all_extension_numbers_of_type() const; + public: + void clear_all_extension_numbers_of_type(); + static const int kAllExtensionNumbersOfTypeFieldNumber = 6; + const ::std::string& all_extension_numbers_of_type() const; + void set_all_extension_numbers_of_type(const ::std::string& value); + void set_all_extension_numbers_of_type(const char* value); + void set_all_extension_numbers_of_type(const char* value, size_t size); + ::std::string* mutable_all_extension_numbers_of_type(); + ::std::string* release_all_extension_numbers_of_type(); + void set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type); + + // optional string list_services = 7; + private: + bool has_list_services() const; + public: + void clear_list_services(); + static const int kListServicesFieldNumber = 7; + const ::std::string& list_services() const; + void set_list_services(const ::std::string& value); + void set_list_services(const char* value); + void set_list_services(const char* value, size_t size); + ::std::string* mutable_list_services(); + ::std::string* release_list_services(); + void set_allocated_list_services(::std::string* list_services); + + MessageRequestCase message_request_case() const; + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.DescriptorDatabaseRequest) private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(SymbolRequest* other); + inline void set_has_file_by_filename(); + inline void set_has_file_containing_symbol(); + inline void set_has_file_containing_extension(); + inline void set_has_all_extension_numbers_of_type(); + inline void set_has_list_services(); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } + inline bool has_message_request() const; + void clear_message_request(); + inline void clear_has_message_request(); - public: - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string symbol = 1; - void clear_symbol(); - static const int kSymbolFieldNumber = 1; - const ::std::string& symbol() const; - void set_symbol(const ::std::string& value); - void set_symbol(const char* value); - void set_symbol(const char* value, size_t size); - ::std::string* mutable_symbol(); - ::std::string* release_symbol(); - void set_allocated_symbol(::std::string* symbol); - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.SymbolRequest) - private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr symbol_; + ::google::protobuf::internal::ArenaStringPtr host_; + union MessageRequestUnion { + MessageRequestUnion() {} + ::google::protobuf::internal::ArenaStringPtr file_by_filename_; + ::google::protobuf::internal::ArenaStringPtr file_containing_symbol_; + ::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension_; + ::google::protobuf::internal::ArenaStringPtr all_extension_numbers_of_type_; + ::google::protobuf::internal::ArenaStringPtr list_services_; + } message_request_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + ::google::protobuf::uint32 _oneof_case_[1]; + + friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static SymbolRequest* default_instance_; + static DescriptorDatabaseRequest* default_instance_; }; // ------------------------------------------------------------------- @@ -326,25 +292,22 @@ class ExtensionRequest : public ::google::protobuf::Message { ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; int GetCachedSize() const { return _cached_size_; } - - private: + private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(ExtensionRequest* other); - - private: + private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } + public: - public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -370,12 +333,13 @@ class ExtensionRequest : public ::google::protobuf::Message { // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionRequest) private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; ::google::protobuf::internal::ArenaStringPtr containing_type_; ::google::protobuf::int32 extension_number_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); @@ -384,32 +348,40 @@ class ExtensionRequest : public ::google::protobuf::Message { }; // ------------------------------------------------------------------- -class TypeRequest : public ::google::protobuf::Message { +class DescriptorDatabaseResponse : public ::google::protobuf::Message { public: - TypeRequest(); - virtual ~TypeRequest(); + DescriptorDatabaseResponse(); + virtual ~DescriptorDatabaseResponse(); - TypeRequest(const TypeRequest& from); + DescriptorDatabaseResponse(const DescriptorDatabaseResponse& from); - inline TypeRequest& operator=(const TypeRequest& from) { + inline DescriptorDatabaseResponse& operator=(const DescriptorDatabaseResponse& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); - static const TypeRequest& default_instance(); + static const DescriptorDatabaseResponse& default_instance(); + + enum MessageResponseCase { + kFileDescriptorProto = 4, + kAllExtensionNumbersResponse = 5, + kListServicesResponse = 6, + kErrorResponse = 7, + MESSAGE_RESPONSE_NOT_SET = 0, + }; - void Swap(TypeRequest* other); + void Swap(DescriptorDatabaseResponse* other); // implements Message ---------------------------------------------- - inline TypeRequest* New() const { return New(NULL); } + inline DescriptorDatabaseResponse* New() const { return New(NULL); } - TypeRequest* New(::google::protobuf::Arena* arena) const; + DescriptorDatabaseResponse* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const TypeRequest& from); - void MergeFrom(const TypeRequest& from); + void CopyFrom(const DescriptorDatabaseResponse& from); + void MergeFrom(const DescriptorDatabaseResponse& from); void Clear(); bool IsInitialized() const; @@ -418,83 +390,150 @@ class TypeRequest : public ::google::protobuf::Message { ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; int GetCachedSize() const { return _cached_size_; } - - private: + private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(TypeRequest* other); - - private: + void InternalSwap(DescriptorDatabaseResponse* other); + private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } + public: - public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- - // optional string type = 1; - void clear_type(); - static const int kTypeFieldNumber = 1; - const ::std::string& type() const; - void set_type(const ::std::string& value); - void set_type(const char* value); - void set_type(const char* value, size_t size); - ::std::string* mutable_type(); - ::std::string* release_type(); - void set_allocated_type(::std::string* type); - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.TypeRequest) + // optional string valid_host = 1; + void clear_valid_host(); + static const int kValidHostFieldNumber = 1; + const ::std::string& valid_host() const; + void set_valid_host(const ::std::string& value); + void set_valid_host(const char* value); + void set_valid_host(const char* value, size_t size); + ::std::string* mutable_valid_host(); + ::std::string* release_valid_host(); + void set_allocated_valid_host(::std::string* valid_host); + + // optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; + bool has_original_request() const; + void clear_original_request(); + static const int kOriginalRequestFieldNumber = 2; + const ::grpc::reflection::v1alpha::DescriptorDatabaseRequest& original_request() const; + ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* mutable_original_request(); + ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* release_original_request(); + void set_allocated_original_request(::grpc::reflection::v1alpha::DescriptorDatabaseRequest* original_request); + + // optional bytes file_descriptor_proto = 4; + private: + bool has_file_descriptor_proto() const; + public: + void clear_file_descriptor_proto(); + static const int kFileDescriptorProtoFieldNumber = 4; + const ::std::string& file_descriptor_proto() const; + void set_file_descriptor_proto(const ::std::string& value); + void set_file_descriptor_proto(const char* value); + void set_file_descriptor_proto(const void* value, size_t size); + ::std::string* mutable_file_descriptor_proto(); + ::std::string* release_file_descriptor_proto(); + void set_allocated_file_descriptor_proto(::std::string* file_descriptor_proto); + + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + bool has_all_extension_numbers_response() const; + void clear_all_extension_numbers_response(); + static const int kAllExtensionNumbersResponseFieldNumber = 5; + const ::grpc::reflection::v1alpha::ExtensionNumberResponse& all_extension_numbers_response() const; + ::grpc::reflection::v1alpha::ExtensionNumberResponse* mutable_all_extension_numbers_response(); + ::grpc::reflection::v1alpha::ExtensionNumberResponse* release_all_extension_numbers_response(); + void set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response); + + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + bool has_list_services_response() const; + void clear_list_services_response(); + static const int kListServicesResponseFieldNumber = 6; + const ::grpc::reflection::v1alpha::ListServiceResponse& list_services_response() const; + ::grpc::reflection::v1alpha::ListServiceResponse* mutable_list_services_response(); + ::grpc::reflection::v1alpha::ListServiceResponse* release_list_services_response(); + void set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response); + + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + bool has_error_response() const; + void clear_error_response(); + static const int kErrorResponseFieldNumber = 7; + const ::grpc::reflection::v1alpha::ErrorResponse& error_response() const; + ::grpc::reflection::v1alpha::ErrorResponse* mutable_error_response(); + ::grpc::reflection::v1alpha::ErrorResponse* release_error_response(); + void set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response); + + MessageResponseCase message_response_case() const; + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.DescriptorDatabaseResponse) private: + inline void set_has_file_descriptor_proto(); + inline void set_has_all_extension_numbers_response(); + inline void set_has_list_services_response(); + inline void set_has_error_response(); + + inline bool has_message_response() const; + void clear_message_response(); + inline void clear_has_message_response(); + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr type_; + ::google::protobuf::internal::ArenaStringPtr valid_host_; + ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* original_request_; + union MessageResponseUnion { + MessageResponseUnion() {} + ::google::protobuf::internal::ArenaStringPtr file_descriptor_proto_; + ::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response_; + ::grpc::reflection::v1alpha::ListServiceResponse* list_services_response_; + ::grpc::reflection::v1alpha::ErrorResponse* error_response_; + } message_response_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + ::google::protobuf::uint32 _oneof_case_[1]; + + friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static TypeRequest* default_instance_; + static DescriptorDatabaseResponse* default_instance_; }; // ------------------------------------------------------------------- -class ListServiceResponse : public ::google::protobuf::Message { +class ExtensionNumberResponse : public ::google::protobuf::Message { public: - ListServiceResponse(); - virtual ~ListServiceResponse(); + ExtensionNumberResponse(); + virtual ~ExtensionNumberResponse(); - ListServiceResponse(const ListServiceResponse& from); + ExtensionNumberResponse(const ExtensionNumberResponse& from); - inline ListServiceResponse& operator=(const ListServiceResponse& from) { + inline ExtensionNumberResponse& operator=(const ExtensionNumberResponse& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); - static const ListServiceResponse& default_instance(); + static const ExtensionNumberResponse& default_instance(); - void Swap(ListServiceResponse* other); + void Swap(ExtensionNumberResponse* other); // implements Message ---------------------------------------------- - inline ListServiceResponse* New() const { return New(NULL); } + inline ExtensionNumberResponse* New() const { return New(NULL); } - ListServiceResponse* New(::google::protobuf::Arena* arena) const; + ExtensionNumberResponse* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const ListServiceResponse& from); - void MergeFrom(const ListServiceResponse& from); + void CopyFrom(const ExtensionNumberResponse& from); + void MergeFrom(const ExtensionNumberResponse& from); void Clear(); bool IsInitialized() const; @@ -503,89 +542,95 @@ class ListServiceResponse : public ::google::protobuf::Message { ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; int GetCachedSize() const { return _cached_size_; } - - private: + private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(ListServiceResponse* other); - - private: + void InternalSwap(ExtensionNumberResponse* other); + private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } + public: - public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- - // repeated string services = 1; - int services_size() const; - void clear_services(); - static const int kServicesFieldNumber = 1; - const ::std::string& services(int index) const; - ::std::string* mutable_services(int index); - void set_services(int index, const ::std::string& value); - void set_services(int index, const char* value); - void set_services(int index, const char* value, size_t size); - ::std::string* add_services(); - void add_services(const ::std::string& value); - void add_services(const char* value); - void add_services(const char* value, size_t size); - const ::google::protobuf::RepeatedPtrField< ::std::string>& services() const; - ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_services(); + // optional string base_type_name = 1; + void clear_base_type_name(); + static const int kBaseTypeNameFieldNumber = 1; + const ::std::string& base_type_name() const; + void set_base_type_name(const ::std::string& value); + void set_base_type_name(const char* value); + void set_base_type_name(const char* value, size_t size); + ::std::string* mutable_base_type_name(); + ::std::string* release_base_type_name(); + void set_allocated_base_type_name(::std::string* base_type_name); + + // repeated int32 extension_number = 2; + int extension_number_size() const; + void clear_extension_number(); + static const int kExtensionNumberFieldNumber = 2; + ::google::protobuf::int32 extension_number(int index) const; + void set_extension_number(int index, ::google::protobuf::int32 value); + void add_extension_number(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + extension_number() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_extension_number(); - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionNumberResponse) private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; - ::google::protobuf::RepeatedPtrField< ::std::string> services_; + ::google::protobuf::internal::ArenaStringPtr base_type_name_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > extension_number_; + mutable int _extension_number_cached_byte_size_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static ListServiceResponse* default_instance_; + static ExtensionNumberResponse* default_instance_; }; // ------------------------------------------------------------------- -class FileDescriptorProtoResponse : public ::google::protobuf::Message { +class ListServiceResponse : public ::google::protobuf::Message { public: - FileDescriptorProtoResponse(); - virtual ~FileDescriptorProtoResponse(); + ListServiceResponse(); + virtual ~ListServiceResponse(); - FileDescriptorProtoResponse(const FileDescriptorProtoResponse& from); + ListServiceResponse(const ListServiceResponse& from); - inline FileDescriptorProtoResponse& operator=( - const FileDescriptorProtoResponse& from) { + inline ListServiceResponse& operator=(const ListServiceResponse& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); - static const FileDescriptorProtoResponse& default_instance(); + static const ListServiceResponse& default_instance(); - void Swap(FileDescriptorProtoResponse* other); + void Swap(ListServiceResponse* other); // implements Message ---------------------------------------------- - inline FileDescriptorProtoResponse* New() const { return New(NULL); } + inline ListServiceResponse* New() const { return New(NULL); } - FileDescriptorProtoResponse* New(::google::protobuf::Arena* arena) const; + ListServiceResponse* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const FileDescriptorProtoResponse& from); - void MergeFrom(const FileDescriptorProtoResponse& from); + void CopyFrom(const ListServiceResponse& from); + void MergeFrom(const ListServiceResponse& from); void Clear(); bool IsInitialized() const; @@ -594,85 +639,86 @@ class FileDescriptorProtoResponse : public ::google::protobuf::Message { ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; int GetCachedSize() const { return _cached_size_; } - - private: + private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(FileDescriptorProtoResponse* other); - - private: + void InternalSwap(ListServiceResponse* other); + private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } + public: - public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- - // optional bytes file_descriptor_proto = 1; - void clear_file_descriptor_proto(); - static const int kFileDescriptorProtoFieldNumber = 1; - const ::std::string& file_descriptor_proto() const; - void set_file_descriptor_proto(const ::std::string& value); - void set_file_descriptor_proto(const char* value); - void set_file_descriptor_proto(const void* value, size_t size); - ::std::string* mutable_file_descriptor_proto(); - ::std::string* release_file_descriptor_proto(); - void set_allocated_file_descriptor_proto( - ::std::string* file_descriptor_proto); + // repeated string service = 1; + int service_size() const; + void clear_service(); + static const int kServiceFieldNumber = 1; + const ::std::string& service(int index) const; + ::std::string* mutable_service(int index); + void set_service(int index, const ::std::string& value); + void set_service(int index, const char* value); + void set_service(int index, const char* value, size_t size); + ::std::string* add_service(); + void add_service(const ::std::string& value); + void add_service(const char* value); + void add_service(const char* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& service() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_service(); - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ListServiceResponse) private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr file_descriptor_proto_; + ::google::protobuf::RepeatedPtrField< ::std::string> service_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static FileDescriptorProtoResponse* default_instance_; + static ListServiceResponse* default_instance_; }; // ------------------------------------------------------------------- -class ExtensionNumberResponse : public ::google::protobuf::Message { +class ErrorResponse : public ::google::protobuf::Message { public: - ExtensionNumberResponse(); - virtual ~ExtensionNumberResponse(); + ErrorResponse(); + virtual ~ErrorResponse(); - ExtensionNumberResponse(const ExtensionNumberResponse& from); + ErrorResponse(const ErrorResponse& from); - inline ExtensionNumberResponse& operator=( - const ExtensionNumberResponse& from) { + inline ErrorResponse& operator=(const ErrorResponse& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); - static const ExtensionNumberResponse& default_instance(); + static const ErrorResponse& default_instance(); - void Swap(ExtensionNumberResponse* other); + void Swap(ErrorResponse* other); // implements Message ---------------------------------------------- - inline ExtensionNumberResponse* New() const { return New(NULL); } + inline ErrorResponse* New() const { return New(NULL); } - ExtensionNumberResponse* New(::google::protobuf::Arena* arena) const; + ErrorResponse* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const ExtensionNumberResponse& from); - void MergeFrom(const ExtensionNumberResponse& from); + void CopyFrom(const ErrorResponse& from); + void MergeFrom(const ErrorResponse& from); void Clear(); bool IsInitialized() const; @@ -681,212 +727,531 @@ class ExtensionNumberResponse : public ::google::protobuf::Message { ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; int GetCachedSize() const { return _cached_size_; } - - private: + private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(ExtensionNumberResponse* other); - - private: + void InternalSwap(ErrorResponse* other); + private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } + public: - public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- - // repeated int32 extension_number = 1; - int extension_number_size() const; - void clear_extension_number(); - static const int kExtensionNumberFieldNumber = 1; - ::google::protobuf::int32 extension_number(int index) const; - void set_extension_number(int index, ::google::protobuf::int32 value); - void add_extension_number(::google::protobuf::int32 value); - const ::google::protobuf::RepeatedField< ::google::protobuf::int32>& - extension_number() const; - ::google::protobuf::RepeatedField< ::google::protobuf::int32>* - mutable_extension_number(); - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionNumberResponse) + // optional int32 error_code = 1; + void clear_error_code(); + static const int kErrorCodeFieldNumber = 1; + ::google::protobuf::int32 error_code() const; + void set_error_code(::google::protobuf::int32 value); + + // optional string error_message = 2; + void clear_error_message(); + static const int kErrorMessageFieldNumber = 2; + const ::std::string& error_message() const; + void set_error_message(const ::std::string& value); + void set_error_message(const char* value); + void set_error_message(const char* value, size_t size); + ::std::string* mutable_error_message(); + ::std::string* release_error_message(); + void set_allocated_error_message(::std::string* error_message); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ErrorResponse) private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; - ::google::protobuf::RepeatedField< ::google::protobuf::int32> - extension_number_; - mutable int _extension_number_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr error_message_; + ::google::protobuf::int32 error_code_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static ExtensionNumberResponse* default_instance_; + static ErrorResponse* default_instance_; }; // =================================================================== + // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS -// EmptyRequest +// DescriptorDatabaseRequest -// ------------------------------------------------------------------- - -// FileNameRequest - -// optional string filename = 1; -inline void FileNameRequest::clear_filename() { - filename_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +// optional string host = 1; +inline void DescriptorDatabaseRequest::clear_host() { + host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& FileNameRequest::filename() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileNameRequest.filename) - return filename_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline const ::std::string& DescriptorDatabaseRequest::host() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) + return host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline void FileNameRequest::set_filename(const ::std::string& value) { - filename_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileNameRequest.filename) +inline void DescriptorDatabaseRequest::set_host(const ::std::string& value) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -inline void FileNameRequest::set_filename(const char* value) { - filename_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileNameRequest.filename) +inline void DescriptorDatabaseRequest::set_host(const char* value) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -inline void FileNameRequest::set_filename(const char* value, size_t size) { - filename_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), +inline void DescriptorDatabaseRequest::set_host(const char* value, size_t size) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileNameRequest.filename) + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -inline ::std::string* FileNameRequest::mutable_filename() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileNameRequest.filename) - return filename_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline ::std::string* DescriptorDatabaseRequest::mutable_host() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) + return host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* FileNameRequest::release_filename() { - return filename_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline ::std::string* DescriptorDatabaseRequest::release_host() { + + return host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline void FileNameRequest::set_allocated_filename(::std::string* filename) { - if (filename != NULL) { +inline void DescriptorDatabaseRequest::set_allocated_host(::std::string* host) { + if (host != NULL) { + } else { + } - filename_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), filename); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.FileNameRequest.filename) + host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), host); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -// ------------------------------------------------------------------- +// optional string file_by_filename = 3; +inline bool DescriptorDatabaseRequest::has_file_by_filename() const { + return message_request_case() == kFileByFilename; +} +inline void DescriptorDatabaseRequest::set_has_file_by_filename() { + _oneof_case_[0] = kFileByFilename; +} +inline void DescriptorDatabaseRequest::clear_file_by_filename() { + if (has_file_by_filename()) { + message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} +inline const ::std::string& DescriptorDatabaseRequest::file_by_filename() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) + if (has_file_by_filename()) { + return message_request_.file_by_filename_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +inline void DescriptorDatabaseRequest::set_file_by_filename(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) +} +inline void DescriptorDatabaseRequest::set_file_by_filename(const char* value) { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) +} +inline void DescriptorDatabaseRequest::set_file_by_filename(const char* value, size_t size) { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) +} +inline ::std::string* DescriptorDatabaseRequest::mutable_file_by_filename() { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) + return message_request_.file_by_filename_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* DescriptorDatabaseRequest::release_file_by_filename() { + if (has_file_by_filename()) { + clear_has_message_request(); + return message_request_.file_by_filename_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} +inline void DescriptorDatabaseRequest::set_allocated_file_by_filename(::std::string* file_by_filename) { + if (!has_file_by_filename()) { + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (file_by_filename != NULL) { + set_has_file_by_filename(); + message_request_.file_by_filename_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_by_filename); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) +} + +// optional string file_containing_symbol = 4; +inline bool DescriptorDatabaseRequest::has_file_containing_symbol() const { + return message_request_case() == kFileContainingSymbol; +} +inline void DescriptorDatabaseRequest::set_has_file_containing_symbol() { + _oneof_case_[0] = kFileContainingSymbol; +} +inline void DescriptorDatabaseRequest::clear_file_containing_symbol() { + if (has_file_containing_symbol()) { + message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} +inline const ::std::string& DescriptorDatabaseRequest::file_containing_symbol() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) + if (has_file_containing_symbol()) { + return message_request_.file_containing_symbol_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +inline void DescriptorDatabaseRequest::set_file_containing_symbol(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) +} +inline void DescriptorDatabaseRequest::set_file_containing_symbol(const char* value) { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) +} +inline void DescriptorDatabaseRequest::set_file_containing_symbol(const char* value, size_t size) { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) +} +inline ::std::string* DescriptorDatabaseRequest::mutable_file_containing_symbol() { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) + return message_request_.file_containing_symbol_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* DescriptorDatabaseRequest::release_file_containing_symbol() { + if (has_file_containing_symbol()) { + clear_has_message_request(); + return message_request_.file_containing_symbol_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} +inline void DescriptorDatabaseRequest::set_allocated_file_containing_symbol(::std::string* file_containing_symbol) { + if (!has_file_containing_symbol()) { + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (file_containing_symbol != NULL) { + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_containing_symbol); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) +} -// SymbolRequest +// optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; +inline bool DescriptorDatabaseRequest::has_file_containing_extension() const { + return message_request_case() == kFileContainingExtension; +} +inline void DescriptorDatabaseRequest::set_has_file_containing_extension() { + _oneof_case_[0] = kFileContainingExtension; +} +inline void DescriptorDatabaseRequest::clear_file_containing_extension() { + if (has_file_containing_extension()) { + delete message_request_.file_containing_extension_; + clear_has_message_request(); + } +} +inline const ::grpc::reflection::v1alpha::ExtensionRequest& DescriptorDatabaseRequest::file_containing_extension() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_extension) + return has_file_containing_extension() + ? *message_request_.file_containing_extension_ + : ::grpc::reflection::v1alpha::ExtensionRequest::default_instance(); +} +inline ::grpc::reflection::v1alpha::ExtensionRequest* DescriptorDatabaseRequest::mutable_file_containing_extension() { + if (!has_file_containing_extension()) { + clear_message_request(); + set_has_file_containing_extension(); + message_request_.file_containing_extension_ = new ::grpc::reflection::v1alpha::ExtensionRequest; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_extension) + return message_request_.file_containing_extension_; +} +inline ::grpc::reflection::v1alpha::ExtensionRequest* DescriptorDatabaseRequest::release_file_containing_extension() { + if (has_file_containing_extension()) { + clear_has_message_request(); + ::grpc::reflection::v1alpha::ExtensionRequest* temp = message_request_.file_containing_extension_; + message_request_.file_containing_extension_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void DescriptorDatabaseRequest::set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension) { + clear_message_request(); + if (file_containing_extension) { + set_has_file_containing_extension(); + message_request_.file_containing_extension_ = file_containing_extension; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_extension) +} -// optional string symbol = 1; -inline void SymbolRequest::clear_symbol() { - symbol_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +// optional string all_extension_numbers_of_type = 6; +inline bool DescriptorDatabaseRequest::has_all_extension_numbers_of_type() const { + return message_request_case() == kAllExtensionNumbersOfType; +} +inline void DescriptorDatabaseRequest::set_has_all_extension_numbers_of_type() { + _oneof_case_[0] = kAllExtensionNumbersOfType; +} +inline void DescriptorDatabaseRequest::clear_all_extension_numbers_of_type() { + if (has_all_extension_numbers_of_type()) { + message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } } -inline const ::std::string& SymbolRequest::symbol() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.SymbolRequest.symbol) - return symbol_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline const ::std::string& DescriptorDatabaseRequest::all_extension_numbers_of_type() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) + if (has_all_extension_numbers_of_type()) { + return message_request_.all_extension_numbers_of_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } -inline void SymbolRequest::set_symbol(const ::std::string& value) { - symbol_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.SymbolRequest.symbol) +inline void DescriptorDatabaseRequest::set_all_extension_numbers_of_type(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) } -inline void SymbolRequest::set_symbol(const char* value) { - symbol_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), +inline void DescriptorDatabaseRequest::set_all_extension_numbers_of_type(const char* value) { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.SymbolRequest.symbol) + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) } -inline void SymbolRequest::set_symbol(const char* value, size_t size) { - symbol_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.SymbolRequest.symbol) +inline void DescriptorDatabaseRequest::set_all_extension_numbers_of_type(const char* value, size_t size) { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) +} +inline ::std::string* DescriptorDatabaseRequest::mutable_all_extension_numbers_of_type() { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) + return message_request_.all_extension_numbers_of_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* SymbolRequest::mutable_symbol() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.SymbolRequest.symbol) - return symbol_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline ::std::string* DescriptorDatabaseRequest::release_all_extension_numbers_of_type() { + if (has_all_extension_numbers_of_type()) { + clear_has_message_request(); + return message_request_.all_extension_numbers_of_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} +inline void DescriptorDatabaseRequest::set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type) { + if (!has_all_extension_numbers_of_type()) { + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (all_extension_numbers_of_type != NULL) { + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + all_extension_numbers_of_type); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) +} + +// optional string list_services = 7; +inline bool DescriptorDatabaseRequest::has_list_services() const { + return message_request_case() == kListServices; +} +inline void DescriptorDatabaseRequest::set_has_list_services() { + _oneof_case_[0] = kListServices; +} +inline void DescriptorDatabaseRequest::clear_list_services() { + if (has_list_services()) { + message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} +inline const ::std::string& DescriptorDatabaseRequest::list_services() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) + if (has_list_services()) { + return message_request_.list_services_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +inline void DescriptorDatabaseRequest::set_list_services(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) } -inline ::std::string* SymbolRequest::release_symbol() { - return symbol_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline void DescriptorDatabaseRequest::set_list_services(const char* value) { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) +} +inline void DescriptorDatabaseRequest::set_list_services(const char* value, size_t size) { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) } -inline void SymbolRequest::set_allocated_symbol(::std::string* symbol) { - if (symbol != NULL) { +inline ::std::string* DescriptorDatabaseRequest::mutable_list_services() { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) + return message_request_.list_services_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* DescriptorDatabaseRequest::release_list_services() { + if (has_list_services()) { + clear_has_message_request(); + return message_request_.list_services_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } else { + return NULL; + } +} +inline void DescriptorDatabaseRequest::set_allocated_list_services(::std::string* list_services) { + if (!has_list_services()) { + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (list_services != NULL) { + set_has_list_services(); + message_request_.list_services_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + list_services); } - symbol_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), symbol); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.SymbolRequest.symbol) + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) } +inline bool DescriptorDatabaseRequest::has_message_request() const { + return message_request_case() != MESSAGE_REQUEST_NOT_SET; +} +inline void DescriptorDatabaseRequest::clear_has_message_request() { + _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET; +} +inline DescriptorDatabaseRequest::MessageRequestCase DescriptorDatabaseRequest::message_request_case() const { + return DescriptorDatabaseRequest::MessageRequestCase(_oneof_case_[0]); +} // ------------------------------------------------------------------- // ExtensionRequest // optional string containing_type = 1; inline void ExtensionRequest::clear_containing_type() { - containing_type_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& ExtensionRequest::containing_type() const { // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - return containing_type_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return containing_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void ExtensionRequest::set_containing_type(const ::std::string& value) { - containing_type_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } inline void ExtensionRequest::set_containing_type(const char* value) { - containing_type_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } -inline void ExtensionRequest::set_containing_type(const char* value, - size_t size) { - containing_type_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), +inline void ExtensionRequest::set_containing_type(const char* value, size_t size) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } inline ::std::string* ExtensionRequest::mutable_containing_type() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - return containing_type_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return containing_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* ExtensionRequest::release_containing_type() { - return containing_type_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + + return containing_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline void ExtensionRequest::set_allocated_containing_type( - ::std::string* containing_type) { +inline void ExtensionRequest::set_allocated_containing_type(::std::string* containing_type) { if (containing_type != NULL) { + } else { + } - containing_type_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - containing_type); + containing_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), containing_type); // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } @@ -898,215 +1263,523 @@ inline ::google::protobuf::int32 ExtensionRequest::extension_number() const { // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.extension_number) return extension_number_; } -inline void ExtensionRequest::set_extension_number( - ::google::protobuf::int32 value) { +inline void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) { + extension_number_ = value; // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number) } // ------------------------------------------------------------------- -// TypeRequest +// DescriptorDatabaseResponse -// optional string type = 1; -inline void TypeRequest::clear_type() { - type_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +// optional string valid_host = 1; +inline void DescriptorDatabaseResponse::clear_valid_host() { + valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& TypeRequest::type() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.TypeRequest.type) - return type_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline const ::std::string& DescriptorDatabaseResponse::valid_host() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) + return valid_host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline void TypeRequest::set_type(const ::std::string& value) { - type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.TypeRequest.type) +inline void DescriptorDatabaseResponse::set_valid_host(const ::std::string& value) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) } -inline void TypeRequest::set_type(const char* value) { - type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.TypeRequest.type) +inline void DescriptorDatabaseResponse::set_valid_host(const char* value) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) } -inline void TypeRequest::set_type(const char* value, size_t size) { - type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.TypeRequest.type) +inline void DescriptorDatabaseResponse::set_valid_host(const char* value, size_t size) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) } -inline ::std::string* TypeRequest::mutable_type() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.TypeRequest.type) - return type_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline ::std::string* DescriptorDatabaseResponse::mutable_valid_host() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) + return valid_host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* TypeRequest::release_type() { - return type_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline ::std::string* DescriptorDatabaseResponse::release_valid_host() { + + return valid_host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline void TypeRequest::set_allocated_type(::std::string* type) { - if (type != NULL) { +inline void DescriptorDatabaseResponse::set_allocated_valid_host(::std::string* valid_host) { + if (valid_host != NULL) { + } else { + } - type_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), type); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.TypeRequest.type) + valid_host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), valid_host); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) } -// ------------------------------------------------------------------- - -// ListServiceResponse +// optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; +inline bool DescriptorDatabaseResponse::has_original_request() const { + return !_is_default_instance_ && original_request_ != NULL; +} +inline void DescriptorDatabaseResponse::clear_original_request() { + if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; + original_request_ = NULL; +} +inline const ::grpc::reflection::v1alpha::DescriptorDatabaseRequest& DescriptorDatabaseResponse::original_request() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.original_request) + return original_request_ != NULL ? *original_request_ : *default_instance_->original_request_; +} +inline ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* DescriptorDatabaseResponse::mutable_original_request() { + + if (original_request_ == NULL) { + original_request_ = new ::grpc::reflection::v1alpha::DescriptorDatabaseRequest; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.original_request) + return original_request_; +} +inline ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* DescriptorDatabaseResponse::release_original_request() { + + ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* temp = original_request_; + original_request_ = NULL; + return temp; +} +inline void DescriptorDatabaseResponse::set_allocated_original_request(::grpc::reflection::v1alpha::DescriptorDatabaseRequest* original_request) { + delete original_request_; + original_request_ = original_request; + if (original_request) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.original_request) +} -// repeated string services = 1; -inline int ListServiceResponse::services_size() const { - return services_.size(); +// optional bytes file_descriptor_proto = 4; +inline bool DescriptorDatabaseResponse::has_file_descriptor_proto() const { + return message_response_case() == kFileDescriptorProto; +} +inline void DescriptorDatabaseResponse::set_has_file_descriptor_proto() { + _oneof_case_[0] = kFileDescriptorProto; } -inline void ListServiceResponse::clear_services() { services_.Clear(); } -inline const ::std::string& ListServiceResponse::services(int index) const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.services) - return services_.Get(index); +inline void DescriptorDatabaseResponse::clear_file_descriptor_proto() { + if (has_file_descriptor_proto()) { + message_response_.file_descriptor_proto_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_response(); + } } -inline ::std::string* ListServiceResponse::mutable_services(int index) { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.services) - return services_.Mutable(index); +inline const ::std::string& DescriptorDatabaseResponse::file_descriptor_proto() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) + if (has_file_descriptor_proto()) { + return message_response_.file_descriptor_proto_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } -inline void ListServiceResponse::set_services(int index, - const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ListServiceResponse.services) - services_.Mutable(index)->assign(value); +inline void DescriptorDatabaseResponse::set_file_descriptor_proto(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_response_.file_descriptor_proto_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) } -inline void ListServiceResponse::set_services(int index, const char* value) { - services_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ListServiceResponse.services) +inline void DescriptorDatabaseResponse::set_file_descriptor_proto(const char* value) { + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_response_.file_descriptor_proto_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) } -inline void ListServiceResponse::set_services(int index, const char* value, - size_t size) { - services_.Mutable(index)->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ListServiceResponse.services) +inline void DescriptorDatabaseResponse::set_file_descriptor_proto(const void* value, size_t size) { + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_response_.file_descriptor_proto_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) } -inline ::std::string* ListServiceResponse::add_services() { - return services_.Add(); +inline ::std::string* DescriptorDatabaseResponse::mutable_file_descriptor_proto() { + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) + return message_response_.file_descriptor_proto_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline void ListServiceResponse::add_services(const ::std::string& value) { - services_.Add()->assign(value); - // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.services) +inline ::std::string* DescriptorDatabaseResponse::release_file_descriptor_proto() { + if (has_file_descriptor_proto()) { + clear_has_message_response(); + return message_response_.file_descriptor_proto_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } } -inline void ListServiceResponse::add_services(const char* value) { - services_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.ListServiceResponse.services) +inline void DescriptorDatabaseResponse::set_allocated_file_descriptor_proto(::std::string* file_descriptor_proto) { + if (!has_file_descriptor_proto()) { + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_response(); + if (file_descriptor_proto != NULL) { + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_descriptor_proto); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) } -inline void ListServiceResponse::add_services(const char* value, size_t size) { - services_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.ListServiceResponse.services) + +// optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; +inline bool DescriptorDatabaseResponse::has_all_extension_numbers_response() const { + return message_response_case() == kAllExtensionNumbersResponse; } -inline const ::google::protobuf::RepeatedPtrField< ::std::string>& -ListServiceResponse::services() const { - // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.services) - return services_; +inline void DescriptorDatabaseResponse::set_has_all_extension_numbers_response() { + _oneof_case_[0] = kAllExtensionNumbersResponse; } -inline ::google::protobuf::RepeatedPtrField< ::std::string>* -ListServiceResponse::mutable_services() { - // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.services) - return &services_; +inline void DescriptorDatabaseResponse::clear_all_extension_numbers_response() { + if (has_all_extension_numbers_response()) { + delete message_response_.all_extension_numbers_response_; + clear_has_message_response(); + } +} +inline const ::grpc::reflection::v1alpha::ExtensionNumberResponse& DescriptorDatabaseResponse::all_extension_numbers_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.all_extension_numbers_response) + return has_all_extension_numbers_response() + ? *message_response_.all_extension_numbers_response_ + : ::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance(); +} +inline ::grpc::reflection::v1alpha::ExtensionNumberResponse* DescriptorDatabaseResponse::mutable_all_extension_numbers_response() { + if (!has_all_extension_numbers_response()) { + clear_message_response(); + set_has_all_extension_numbers_response(); + message_response_.all_extension_numbers_response_ = new ::grpc::reflection::v1alpha::ExtensionNumberResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.all_extension_numbers_response) + return message_response_.all_extension_numbers_response_; +} +inline ::grpc::reflection::v1alpha::ExtensionNumberResponse* DescriptorDatabaseResponse::release_all_extension_numbers_response() { + if (has_all_extension_numbers_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ExtensionNumberResponse* temp = message_response_.all_extension_numbers_response_; + message_response_.all_extension_numbers_response_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void DescriptorDatabaseResponse::set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response) { + clear_message_response(); + if (all_extension_numbers_response) { + set_has_all_extension_numbers_response(); + message_response_.all_extension_numbers_response_ = all_extension_numbers_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.all_extension_numbers_response) } -// ------------------------------------------------------------------- +// optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; +inline bool DescriptorDatabaseResponse::has_list_services_response() const { + return message_response_case() == kListServicesResponse; +} +inline void DescriptorDatabaseResponse::set_has_list_services_response() { + _oneof_case_[0] = kListServicesResponse; +} +inline void DescriptorDatabaseResponse::clear_list_services_response() { + if (has_list_services_response()) { + delete message_response_.list_services_response_; + clear_has_message_response(); + } +} +inline const ::grpc::reflection::v1alpha::ListServiceResponse& DescriptorDatabaseResponse::list_services_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.list_services_response) + return has_list_services_response() + ? *message_response_.list_services_response_ + : ::grpc::reflection::v1alpha::ListServiceResponse::default_instance(); +} +inline ::grpc::reflection::v1alpha::ListServiceResponse* DescriptorDatabaseResponse::mutable_list_services_response() { + if (!has_list_services_response()) { + clear_message_response(); + set_has_list_services_response(); + message_response_.list_services_response_ = new ::grpc::reflection::v1alpha::ListServiceResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.list_services_response) + return message_response_.list_services_response_; +} +inline ::grpc::reflection::v1alpha::ListServiceResponse* DescriptorDatabaseResponse::release_list_services_response() { + if (has_list_services_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ListServiceResponse* temp = message_response_.list_services_response_; + message_response_.list_services_response_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void DescriptorDatabaseResponse::set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response) { + clear_message_response(); + if (list_services_response) { + set_has_list_services_response(); + message_response_.list_services_response_ = list_services_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.list_services_response) +} -// FileDescriptorProtoResponse - -// optional bytes file_descriptor_proto = 1; -inline void FileDescriptorProtoResponse::clear_file_descriptor_proto() { - file_descriptor_proto_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline const ::std::string& FileDescriptorProtoResponse::file_descriptor_proto() - const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) - return file_descriptor_proto_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void FileDescriptorProtoResponse::set_file_descriptor_proto( - const ::std::string& value) { - file_descriptor_proto_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) -} -inline void FileDescriptorProtoResponse::set_file_descriptor_proto( - const char* value) { - file_descriptor_proto_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +// optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; +inline bool DescriptorDatabaseResponse::has_error_response() const { + return message_response_case() == kErrorResponse; } -inline void FileDescriptorProtoResponse::set_file_descriptor_proto( - const void* value, size_t size) { - file_descriptor_proto_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +inline void DescriptorDatabaseResponse::set_has_error_response() { + _oneof_case_[0] = kErrorResponse; } -inline ::std::string* -FileDescriptorProtoResponse::mutable_file_descriptor_proto() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) - return file_descriptor_proto_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline void DescriptorDatabaseResponse::clear_error_response() { + if (has_error_response()) { + delete message_response_.error_response_; + clear_has_message_response(); + } } -inline ::std::string* -FileDescriptorProtoResponse::release_file_descriptor_proto() { - return file_descriptor_proto_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline const ::grpc::reflection::v1alpha::ErrorResponse& DescriptorDatabaseResponse::error_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.error_response) + return has_error_response() + ? *message_response_.error_response_ + : ::grpc::reflection::v1alpha::ErrorResponse::default_instance(); } -inline void FileDescriptorProtoResponse::set_allocated_file_descriptor_proto( - ::std::string* file_descriptor_proto) { - if (file_descriptor_proto != NULL) { +inline ::grpc::reflection::v1alpha::ErrorResponse* DescriptorDatabaseResponse::mutable_error_response() { + if (!has_error_response()) { + clear_message_response(); + set_has_error_response(); + message_response_.error_response_ = new ::grpc::reflection::v1alpha::ErrorResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.error_response) + return message_response_.error_response_; +} +inline ::grpc::reflection::v1alpha::ErrorResponse* DescriptorDatabaseResponse::release_error_response() { + if (has_error_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ErrorResponse* temp = message_response_.error_response_; + message_response_.error_response_ = NULL; + return temp; } else { + return NULL; } - file_descriptor_proto_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - file_descriptor_proto); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +} +inline void DescriptorDatabaseResponse::set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response) { + clear_message_response(); + if (error_response) { + set_has_error_response(); + message_response_.error_response_ = error_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.error_response) } +inline bool DescriptorDatabaseResponse::has_message_response() const { + return message_response_case() != MESSAGE_RESPONSE_NOT_SET; +} +inline void DescriptorDatabaseResponse::clear_has_message_response() { + _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET; +} +inline DescriptorDatabaseResponse::MessageResponseCase DescriptorDatabaseResponse::message_response_case() const { + return DescriptorDatabaseResponse::MessageResponseCase(_oneof_case_[0]); +} // ------------------------------------------------------------------- // ExtensionNumberResponse -// repeated int32 extension_number = 1; +// optional string base_type_name = 1; +inline void ExtensionNumberResponse::clear_base_type_name() { + base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ExtensionNumberResponse::base_type_name() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + return base_type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ExtensionNumberResponse::set_base_type_name(const ::std::string& value) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} +inline void ExtensionNumberResponse::set_base_type_name(const char* value) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} +inline void ExtensionNumberResponse::set_base_type_name(const char* value, size_t size) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} +inline ::std::string* ExtensionNumberResponse::mutable_base_type_name() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + return base_type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ExtensionNumberResponse::release_base_type_name() { + + return base_type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ExtensionNumberResponse::set_allocated_base_type_name(::std::string* base_type_name) { + if (base_type_name != NULL) { + + } else { + + } + base_type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), base_type_name); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} + +// repeated int32 extension_number = 2; inline int ExtensionNumberResponse::extension_number_size() const { return extension_number_.size(); } inline void ExtensionNumberResponse::clear_extension_number() { extension_number_.Clear(); } -inline ::google::protobuf::int32 ExtensionNumberResponse::extension_number( - int index) const { +inline ::google::protobuf::int32 ExtensionNumberResponse::extension_number(int index) const { // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) return extension_number_.Get(index); } -inline void ExtensionNumberResponse::set_extension_number( - int index, ::google::protobuf::int32 value) { +inline void ExtensionNumberResponse::set_extension_number(int index, ::google::protobuf::int32 value) { extension_number_.Set(index, value); // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) } -inline void ExtensionNumberResponse::add_extension_number( - ::google::protobuf::int32 value) { +inline void ExtensionNumberResponse::add_extension_number(::google::protobuf::int32 value) { extension_number_.Add(value); // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) } -inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32>& +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& ExtensionNumberResponse::extension_number() const { // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) return extension_number_; } -inline ::google::protobuf::RepeatedField< ::google::protobuf::int32>* +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* ExtensionNumberResponse::mutable_extension_number() { // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) return &extension_number_; } -#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- +// ListServiceResponse + +// repeated string service = 1; +inline int ListServiceResponse::service_size() const { + return service_.size(); +} +inline void ListServiceResponse::clear_service() { + service_.Clear(); +} +inline const ::std::string& ListServiceResponse::service(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Get(index); +} +inline ::std::string* ListServiceResponse::mutable_service(int index) { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Mutable(index); +} +inline void ListServiceResponse::set_service(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ListServiceResponse.service) + service_.Mutable(index)->assign(value); +} +inline void ListServiceResponse::set_service(int index, const char* value) { + service_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ListServiceResponse.service) +} +inline void ListServiceResponse::set_service(int index, const char* value, size_t size) { + service_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ListServiceResponse.service) +} +inline ::std::string* ListServiceResponse::add_service() { + return service_.Add(); +} +inline void ListServiceResponse::add_service(const ::std::string& value) { + service_.Add()->assign(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.service) +} +inline void ListServiceResponse::add_service(const char* value) { + service_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.ListServiceResponse.service) +} +inline void ListServiceResponse::add_service(const char* value, size_t size) { + service_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.ListServiceResponse.service) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +ListServiceResponse::service() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +ListServiceResponse::mutable_service() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.service) + return &service_; +} + // ------------------------------------------------------------------- +// ErrorResponse + +// optional int32 error_code = 1; +inline void ErrorResponse::clear_error_code() { + error_code_ = 0; +} +inline ::google::protobuf::int32 ErrorResponse::error_code() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_code) + return error_code_; +} +inline void ErrorResponse::set_error_code(::google::protobuf::int32 value) { + + error_code_ = value; + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_code) +} + +// optional string error_message = 2; +inline void ErrorResponse::clear_error_message() { + error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ErrorResponse::error_message() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_message) + return error_message_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ErrorResponse::set_error_message(const ::std::string& value) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_message) +} +inline void ErrorResponse::set_error_message(const char* value) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ErrorResponse.error_message) +} +inline void ErrorResponse::set_error_message(const char* value, size_t size) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ErrorResponse.error_message) +} +inline ::std::string* ErrorResponse::mutable_error_message() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ErrorResponse.error_message) + return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ErrorResponse::release_error_message() { + + return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ErrorResponse::set_allocated_error_message(::std::string* error_message) { + if (error_message != NULL) { + + } else { + + } + error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message) +} + +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- // ------------------------------------------------------------------- @@ -1117,6 +1790,7 @@ ExtensionNumberResponse::mutable_extension_number() { // ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) } // namespace v1alpha diff --git a/extensions/reflection/proto_server_reflection.cc b/extensions/reflection/proto_server_reflection.cc index 0662bb595a..1befb1d2f5 100644 --- a/extensions/reflection/proto_server_reflection.cc +++ b/extensions/reflection/proto_server_reflection.cc @@ -51,14 +51,12 @@ using google::protobuf::FileDescriptor; using google::protobuf::FieldDescriptor; using google::protobuf::DescriptorPool; using google::protobuf::FileDescriptorProto; -using grpc::reflection::v1alpha::EmptyRequest; -using grpc::reflection::v1alpha::ListServiceResponse; -using grpc::reflection::v1alpha::FileNameRequest; -using grpc::reflection::v1alpha::SymbolRequest; +using grpc::reflection::v1alpha::DescriptorDatabaseRequest; using grpc::reflection::v1alpha::ExtensionRequest; -using grpc::reflection::v1alpha::TypeRequest; -using grpc::reflection::v1alpha::FileDescriptorProtoResponse; +using grpc::reflection::v1alpha::DescriptorDatabaseResponse; +using grpc::reflection::v1alpha::ListServiceResponse; using grpc::reflection::v1alpha::ExtensionNumberResponse; +using grpc::reflection::v1alpha::ErrorResponse; namespace grpc { @@ -70,55 +68,101 @@ void ProtoServerReflection::SetServiceList( services_ = services; } +Status ProtoServerReflection::DescriptorDatabaseInfo( + ServerContext* context, + ServerReaderWriter* + stream) { + DescriptorDatabaseRequest request; + DescriptorDatabaseResponse response; + Status status; + while (stream->Read(&request)) { + switch (request.message_request_case()) { + case DescriptorDatabaseRequest::MessageRequestCase::kFileByFilename: + status = GetFileByName(context, request.file_by_filename(), &response); + break; + case DescriptorDatabaseRequest::MessageRequestCase::kFileContainingSymbol: + status = GetFileContainingSymbol( + context, request.file_containing_symbol(), &response); + break; + case DescriptorDatabaseRequest::MessageRequestCase:: + kFileContainingExtension: + status = GetFileContainingExtension( + context, &request.file_containing_extension(), &response); + break; + case DescriptorDatabaseRequest::MessageRequestCase:: + kAllExtensionNumbersOfType: + status = GetAllExtensionNumbers( + context, request.all_extension_numbers_of_type(), + response.mutable_all_extension_numbers_response()); + break; + case DescriptorDatabaseRequest::MessageRequestCase::kListServices: + status = + ListService(context, response.mutable_list_services_response()); + break; + default: + status = Status(StatusCode::UNIMPLEMENTED, ""); + } + + response.set_valid_host(request.host()); + response.set_allocated_original_request( + new DescriptorDatabaseRequest(request)); + stream->Write(response); + } + + return Status::OK; +} + +void ProtoServerReflection::FillErrorResponse(Status* status, + ErrorResponse* error_response) { + error_response->set_error_code(status->error_code()); + error_response->set_error_message(status->error_message()); +} + Status ProtoServerReflection::ListService(ServerContext* context, - const EmptyRequest* request, ListServiceResponse* response) { if (services_ == nullptr) { return Status(StatusCode::NOT_FOUND, "Services not found."); } for (auto it = services_->begin(); it != services_->end(); ++it) { - response->add_services(*it); + response->add_service(*it); } return Status::OK; } Status ProtoServerReflection::GetFileByName( - ServerContext* context, const FileNameRequest* request, - FileDescriptorProtoResponse* response) { + ServerContext* context, const grpc::string& filename, + DescriptorDatabaseResponse* response) { if (descriptor_pool_ == nullptr) { return Status::CANCELLED; } - const FileDescriptor* file_desc = - descriptor_pool_->FindFileByName(request->filename()); + const FileDescriptor* file_desc = descriptor_pool_->FindFileByName(filename); if (file_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "File not found."); } FillFileDescriptorProtoResponse(file_desc, response); - // file_desc->CopyTo(response->mutable_file_descriptor_proto()); return Status::OK; } Status ProtoServerReflection::GetFileContainingSymbol( - ServerContext* context, const SymbolRequest* request, - FileDescriptorProtoResponse* response) { + ServerContext* context, const grpc::string& symbol, + DescriptorDatabaseResponse* response) { if (descriptor_pool_ == nullptr) { return Status::CANCELLED; } const FileDescriptor* file_desc = - descriptor_pool_->FindFileContainingSymbol(request->symbol()); + descriptor_pool_->FindFileContainingSymbol(symbol); if (file_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Symbol not found."); } FillFileDescriptorProtoResponse(file_desc, response); - // file_desc->CopyTo(response->mutable_file_descriptor_proto()); return Status::OK; } Status ProtoServerReflection::GetFileContainingExtension( ServerContext* context, const ExtensionRequest* request, - FileDescriptorProtoResponse* response) { + DescriptorDatabaseResponse* response) { if (descriptor_pool_ == nullptr) { return Status::CANCELLED; } @@ -135,19 +179,17 @@ Status ProtoServerReflection::GetFileContainingExtension( return Status(StatusCode::NOT_FOUND, "Extension not found."); } FillFileDescriptorProtoResponse(field_desc->file(), response); - // field_desc->file()->CopyTo(response->mutable_file_descriptor_proto()); return Status::OK; } Status ProtoServerReflection::GetAllExtensionNumbers( - ServerContext* context, const TypeRequest* request, + ServerContext* context, const grpc::string& type, ExtensionNumberResponse* response) { if (descriptor_pool_ == nullptr) { return Status::CANCELLED; } - const Descriptor* desc = - descriptor_pool_->FindMessageTypeByName(request->type()); + const Descriptor* desc = descriptor_pool_->FindMessageTypeByName(type); if (desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Type not found."); } @@ -157,11 +199,12 @@ Status ProtoServerReflection::GetAllExtensionNumbers( for (auto extension : extensions) { response->add_extension_number(extension->number()); } + response->set_base_type_name(type); return Status::OK; } void ProtoServerReflection::FillFileDescriptorProtoResponse( - const FileDescriptor* file_desc, FileDescriptorProtoResponse* response) { + const FileDescriptor* file_desc, DescriptorDatabaseResponse* response) { FileDescriptorProto file_desc_proto; grpc::string data; file_desc->CopyTo(&file_desc_proto); diff --git a/extensions/reflection/proto_server_reflection.h b/extensions/reflection/proto_server_reflection.h index 5fe23191ff..c32ee9ff54 100644 --- a/extensions/reflection/proto_server_reflection.h +++ b/extensions/reflection/proto_server_reflection.h @@ -52,36 +52,41 @@ class ProtoServerReflection GRPC_FINAL public: ProtoServerReflection(); - ProtoServerReflection(const Server* server); - void SetServiceList(const std::vector* services); - Status ListService( - ServerContext* context, const reflection::v1alpha::EmptyRequest* request, - reflection::v1alpha::ListServiceResponse* response) GRPC_OVERRIDE; + Status DescriptorDatabaseInfo( + ServerContext* context, + ServerReaderWriter* + stream) GRPC_OVERRIDE; + + private: + Status ListService(ServerContext* context, + reflection::v1alpha::ListServiceResponse* response); Status GetFileByName( - ServerContext* context, - const reflection::v1alpha::FileNameRequest* request, - reflection::v1alpha::FileDescriptorProtoResponse* response) GRPC_OVERRIDE; + ServerContext* context, const grpc::string& file_name, + reflection::v1alpha::DescriptorDatabaseResponse* response); Status GetFileContainingSymbol( - ServerContext* context, const reflection::v1alpha::SymbolRequest* request, - reflection::v1alpha::FileDescriptorProtoResponse* response) GRPC_OVERRIDE; + ServerContext* context, const grpc::string& symbol, + reflection::v1alpha::DescriptorDatabaseResponse* response); Status GetFileContainingExtension( ServerContext* context, const reflection::v1alpha::ExtensionRequest* request, - reflection::v1alpha::FileDescriptorProtoResponse* response) GRPC_OVERRIDE; + reflection::v1alpha::DescriptorDatabaseResponse* response); Status GetAllExtensionNumbers( - ServerContext* context, const reflection::v1alpha::TypeRequest* request, - reflection::v1alpha::ExtensionNumberResponse* response) GRPC_OVERRIDE; + ServerContext* context, const grpc::string& type, + reflection::v1alpha::ExtensionNumberResponse* response); - private: void FillFileDescriptorProtoResponse( const google::protobuf::FileDescriptor* file_desc, - reflection::v1alpha::FileDescriptorProtoResponse* response); + reflection::v1alpha::DescriptorDatabaseResponse* response); + + void FillErrorResponse(Status* status, + reflection::v1alpha::ErrorResponse* error_response); const google::protobuf::DescriptorPool* descriptor_pool_; const std::vector* services_; diff --git a/extensions/reflection/reflection.grpc.pb.cc b/extensions/reflection/reflection.grpc.pb.cc index c098e52752..83a63529fc 100644 --- a/extensions/reflection/reflection.grpc.pb.cc +++ b/extensions/reflection/reflection.grpc.pb.cc @@ -1,9 +1,43 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + // Generated by the gRPC protobuf plugin. // If you make any local change, they will be lost. // source: reflection.proto -#include #include +#include #include #include @@ -18,228 +52,46 @@ namespace reflection { namespace v1alpha { static const char* ServerReflection_method_names[] = { - "/grpc.reflection.v1alpha.ServerReflection/ListService", - "/grpc.reflection.v1alpha.ServerReflection/GetFileByName", - "/grpc.reflection.v1alpha.ServerReflection/GetFileContainingSymbol", - "/grpc.reflection.v1alpha.ServerReflection/GetFileContainingExtension", - "/grpc.reflection.v1alpha.ServerReflection/GetAllExtensionNumbers", + "/grpc.reflection.v1alpha.ServerReflection/DescriptorDatabaseInfo", }; -std::unique_ptr ServerReflection::NewStub( - const std::shared_ptr< ::grpc::ChannelInterface>& channel, - const ::grpc::StubOptions& options) { - std::unique_ptr stub( - new ServerReflection::Stub(channel)); +std::unique_ptr< ServerReflection::Stub> ServerReflection::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + std::unique_ptr< ServerReflection::Stub> stub(new ServerReflection::Stub(channel)); return stub; } -ServerReflection::Stub::Stub( - const std::shared_ptr< ::grpc::ChannelInterface>& channel) - : channel_(channel), - rpcmethod_ListService_(ServerReflection_method_names[0], - ::grpc::RpcMethod::NORMAL_RPC, channel), - rpcmethod_GetFileByName_(ServerReflection_method_names[1], - ::grpc::RpcMethod::NORMAL_RPC, channel), - rpcmethod_GetFileContainingSymbol_(ServerReflection_method_names[2], - ::grpc::RpcMethod::NORMAL_RPC, - channel), - rpcmethod_GetFileContainingExtension_(ServerReflection_method_names[3], - ::grpc::RpcMethod::NORMAL_RPC, - channel), - rpcmethod_GetAllExtensionNumbers_(ServerReflection_method_names[4], - ::grpc::RpcMethod::NORMAL_RPC, - channel) {} - -::grpc::Status ServerReflection::Stub::ListService( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::reflection::v1alpha::ListServiceResponse* response) { - return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_ListService_, - context, request, response); -} - -::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ListServiceResponse>* -ServerReflection::Stub::AsyncListServiceRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::CompletionQueue* cq) { - return new ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ListServiceResponse>( - channel_.get(), cq, rpcmethod_ListService_, context, request); -} - -::grpc::Status ServerReflection::Stub::GetFileByName( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { - return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_GetFileByName_, - context, request, response); -} - -::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* -ServerReflection::Stub::AsyncGetFileByNameRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::CompletionQueue* cq) { - return new ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( - channel_.get(), cq, rpcmethod_GetFileByName_, context, request); -} - -::grpc::Status ServerReflection::Stub::GetFileContainingSymbol( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { - return ::grpc::BlockingUnaryCall(channel_.get(), - rpcmethod_GetFileContainingSymbol_, context, - request, response); -} - -::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* -ServerReflection::Stub::AsyncGetFileContainingSymbolRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::CompletionQueue* cq) { - return new ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( - channel_.get(), cq, rpcmethod_GetFileContainingSymbol_, context, request); -} - -::grpc::Status ServerReflection::Stub::GetFileContainingExtension( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { - return ::grpc::BlockingUnaryCall(channel_.get(), - rpcmethod_GetFileContainingExtension_, - context, request, response); -} +ServerReflection::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_DescriptorDatabaseInfo_(ServerReflection_method_names[0], ::grpc::RpcMethod::BIDI_STREAMING, channel) + {} -::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* -ServerReflection::Stub::AsyncGetFileContainingExtensionRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::CompletionQueue* cq) { - return new ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( - channel_.get(), cq, rpcmethod_GetFileContainingExtension_, context, - request); +::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>* ServerReflection::Stub::DescriptorDatabaseInfoRaw(::grpc::ClientContext* context) { + return new ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>(channel_.get(), rpcmethod_DescriptorDatabaseInfo_, context); } -::grpc::Status ServerReflection::Stub::GetAllExtensionNumbers( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) { - return ::grpc::BlockingUnaryCall(channel_.get(), - rpcmethod_GetAllExtensionNumbers_, context, - request, response); -} - -::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>* -ServerReflection::Stub::AsyncGetAllExtensionNumbersRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::CompletionQueue* cq) { - return new ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>( - channel_.get(), cq, rpcmethod_GetAllExtensionNumbers_, context, request); +::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>* ServerReflection::Stub::AsyncDescriptorDatabaseInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return new ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>(channel_.get(), cq, rpcmethod_DescriptorDatabaseInfo_, context, tag); } ServerReflection::Service::Service() { (void)ServerReflection_method_names; AddMethod(new ::grpc::RpcServiceMethod( - ServerReflection_method_names[0], ::grpc::RpcMethod::NORMAL_RPC, - new ::grpc::RpcMethodHandler< - ServerReflection::Service, ::grpc::reflection::v1alpha::EmptyRequest, - ::grpc::reflection::v1alpha::ListServiceResponse>( - std::mem_fn(&ServerReflection::Service::ListService), this))); - AddMethod(new ::grpc::RpcServiceMethod( - ServerReflection_method_names[1], ::grpc::RpcMethod::NORMAL_RPC, - new ::grpc::RpcMethodHandler< - ServerReflection::Service, - ::grpc::reflection::v1alpha::FileNameRequest, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( - std::mem_fn(&ServerReflection::Service::GetFileByName), this))); - AddMethod(new ::grpc::RpcServiceMethod( - ServerReflection_method_names[2], ::grpc::RpcMethod::NORMAL_RPC, - new ::grpc::RpcMethodHandler< - ServerReflection::Service, ::grpc::reflection::v1alpha::SymbolRequest, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( - std::mem_fn(&ServerReflection::Service::GetFileContainingSymbol), - this))); - AddMethod(new ::grpc::RpcServiceMethod( - ServerReflection_method_names[3], ::grpc::RpcMethod::NORMAL_RPC, - new ::grpc::RpcMethodHandler< - ServerReflection::Service, - ::grpc::reflection::v1alpha::ExtensionRequest, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( - std::mem_fn(&ServerReflection::Service::GetFileContainingExtension), - this))); - AddMethod(new ::grpc::RpcServiceMethod( - ServerReflection_method_names[4], ::grpc::RpcMethod::NORMAL_RPC, - new ::grpc::RpcMethodHandler< - ServerReflection::Service, ::grpc::reflection::v1alpha::TypeRequest, - ::grpc::reflection::v1alpha::ExtensionNumberResponse>( - std::mem_fn(&ServerReflection::Service::GetAllExtensionNumbers), - this))); + ServerReflection_method_names[0], + ::grpc::RpcMethod::BIDI_STREAMING, + new ::grpc::BidiStreamingHandler< ServerReflection::Service, ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>( + std::mem_fn(&ServerReflection::Service::DescriptorDatabaseInfo), this))); } -ServerReflection::Service::~Service() {} - -::grpc::Status ServerReflection::Service::ListService( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest* request, - ::grpc::reflection::v1alpha::ListServiceResponse* response) { - (void)context; - (void)request; - (void)response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +ServerReflection::Service::~Service() { } -::grpc::Status ServerReflection::Service::GetFileByName( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { - (void)context; - (void)request; - (void)response; +::grpc::Status ServerReflection::Service::DescriptorDatabaseInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseResponse, ::grpc::reflection::v1alpha::DescriptorDatabaseRequest>* stream) { + (void) context; + (void) stream; return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } -::grpc::Status ServerReflection::Service::GetFileContainingSymbol( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { - (void)context; - (void)request; - (void)response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status ServerReflection::Service::GetFileContainingExtension( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { - (void)context; - (void)request; - (void)response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status ServerReflection::Service::GetAllExtensionNumbers( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::TypeRequest* request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) { - (void)context; - (void)request; - (void)response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} } // namespace grpc } // namespace reflection } // namespace v1alpha + diff --git a/extensions/reflection/reflection.pb.cc b/extensions/reflection/reflection.pb.cc index 97b3cb8791..0c9bfe79a4 100644 --- a/extensions/reflection/reflection.pb.cc +++ b/extensions/reflection/reflection.pb.cc @@ -1,3 +1,37 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + // Generated by the protocol buffer compiler. DO NOT EDIT! // source: reflection.proto @@ -6,15 +40,15 @@ #include +#include +#include +#include +#include +#include #include #include -#include #include -#include -#include -#include #include -#include // @@protoc_insertion_point(includes) namespace grpc { @@ -23,147 +57,156 @@ namespace v1alpha { namespace { -const ::google::protobuf::Descriptor* EmptyRequest_descriptor_ = NULL; +const ::google::protobuf::Descriptor* DescriptorDatabaseRequest_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* - EmptyRequest_reflection_ = NULL; -const ::google::protobuf::Descriptor* FileNameRequest_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - FileNameRequest_reflection_ = NULL; -const ::google::protobuf::Descriptor* SymbolRequest_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SymbolRequest_reflection_ = NULL; + DescriptorDatabaseRequest_reflection_ = NULL; +struct DescriptorDatabaseRequestOneofInstance { + ::google::protobuf::internal::ArenaStringPtr file_by_filename_; + ::google::protobuf::internal::ArenaStringPtr file_containing_symbol_; + const ::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension_; + ::google::protobuf::internal::ArenaStringPtr all_extension_numbers_of_type_; + ::google::protobuf::internal::ArenaStringPtr list_services_; +}* DescriptorDatabaseRequest_default_oneof_instance_ = NULL; const ::google::protobuf::Descriptor* ExtensionRequest_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* - ExtensionRequest_reflection_ = NULL; -const ::google::protobuf::Descriptor* TypeRequest_descriptor_ = NULL; + ExtensionRequest_reflection_ = NULL; +const ::google::protobuf::Descriptor* DescriptorDatabaseResponse_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* - TypeRequest_reflection_ = NULL; -const ::google::protobuf::Descriptor* ListServiceResponse_descriptor_ = NULL; + DescriptorDatabaseResponse_reflection_ = NULL; +struct DescriptorDatabaseResponseOneofInstance { + ::google::protobuf::internal::ArenaStringPtr file_descriptor_proto_; + const ::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response_; + const ::grpc::reflection::v1alpha::ListServiceResponse* list_services_response_; + const ::grpc::reflection::v1alpha::ErrorResponse* error_response_; +}* DescriptorDatabaseResponse_default_oneof_instance_ = NULL; +const ::google::protobuf::Descriptor* ExtensionNumberResponse_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* - ListServiceResponse_reflection_ = NULL; -const ::google::protobuf::Descriptor* FileDescriptorProtoResponse_descriptor_ = - NULL; + ExtensionNumberResponse_reflection_ = NULL; +const ::google::protobuf::Descriptor* ListServiceResponse_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* - FileDescriptorProtoResponse_reflection_ = NULL; -const ::google::protobuf::Descriptor* ExtensionNumberResponse_descriptor_ = - NULL; + ListServiceResponse_reflection_ = NULL; +const ::google::protobuf::Descriptor* ErrorResponse_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* - ExtensionNumberResponse_reflection_ = NULL; + ErrorResponse_reflection_ = NULL; } // namespace + void protobuf_AssignDesc_reflection_2eproto() { protobuf_AddDesc_reflection_2eproto(); const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "reflection.proto"); + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "reflection.proto"); GOOGLE_CHECK(file != NULL); - EmptyRequest_descriptor_ = file->message_type(0); - static const int EmptyRequest_offsets_[1] = {}; - EmptyRequest_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - EmptyRequest_descriptor_, EmptyRequest::default_instance_, - EmptyRequest_offsets_, -1, -1, -1, sizeof(EmptyRequest), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EmptyRequest, - _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - EmptyRequest, _is_default_instance_)); - FileNameRequest_descriptor_ = file->message_type(1); - static const int FileNameRequest_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileNameRequest, - filename_), - }; - FileNameRequest_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - FileNameRequest_descriptor_, FileNameRequest::default_instance_, - FileNameRequest_offsets_, -1, -1, -1, sizeof(FileNameRequest), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileNameRequest, - _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - FileNameRequest, _is_default_instance_)); - SymbolRequest_descriptor_ = file->message_type(2); - static const int SymbolRequest_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SymbolRequest, symbol_), + DescriptorDatabaseRequest_descriptor_ = file->message_type(0); + static const int DescriptorDatabaseRequest_offsets_[7] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseRequest, host_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseRequest_default_oneof_instance_, file_by_filename_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseRequest_default_oneof_instance_, file_containing_symbol_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseRequest_default_oneof_instance_, file_containing_extension_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseRequest_default_oneof_instance_, all_extension_numbers_of_type_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseRequest_default_oneof_instance_, list_services_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseRequest, message_request_), }; - SymbolRequest_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - SymbolRequest_descriptor_, SymbolRequest::default_instance_, - SymbolRequest_offsets_, -1, -1, -1, sizeof(SymbolRequest), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SymbolRequest, - _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - SymbolRequest, _is_default_instance_)); - ExtensionRequest_descriptor_ = file->message_type(3); + DescriptorDatabaseRequest_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + DescriptorDatabaseRequest_descriptor_, + DescriptorDatabaseRequest::default_instance_, + DescriptorDatabaseRequest_offsets_, + -1, + -1, + -1, + DescriptorDatabaseRequest_default_oneof_instance_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseRequest, _oneof_case_[0]), + sizeof(DescriptorDatabaseRequest), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseRequest, _is_default_instance_)); + ExtensionRequest_descriptor_ = file->message_type(1); static const int ExtensionRequest_offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, - containing_type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, - extension_number_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, containing_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, extension_number_), }; - ExtensionRequest_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - ExtensionRequest_descriptor_, ExtensionRequest::default_instance_, - ExtensionRequest_offsets_, -1, -1, -1, sizeof(ExtensionRequest), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, - _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - ExtensionRequest, _is_default_instance_)); - TypeRequest_descriptor_ = file->message_type(4); - static const int TypeRequest_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TypeRequest, type_), + ExtensionRequest_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ExtensionRequest_descriptor_, + ExtensionRequest::default_instance_, + ExtensionRequest_offsets_, + -1, + -1, + -1, + sizeof(ExtensionRequest), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, _is_default_instance_)); + DescriptorDatabaseResponse_descriptor_ = file->message_type(2); + static const int DescriptorDatabaseResponse_offsets_[7] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseResponse, valid_host_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseResponse, original_request_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseResponse_default_oneof_instance_, file_descriptor_proto_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseResponse_default_oneof_instance_, all_extension_numbers_response_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseResponse_default_oneof_instance_, list_services_response_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseResponse_default_oneof_instance_, error_response_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseResponse, message_response_), }; - TypeRequest_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - TypeRequest_descriptor_, TypeRequest::default_instance_, - TypeRequest_offsets_, -1, -1, -1, sizeof(TypeRequest), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TypeRequest, - _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - TypeRequest, _is_default_instance_)); - ListServiceResponse_descriptor_ = file->message_type(5); - static const int ListServiceResponse_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, - services_), + DescriptorDatabaseResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + DescriptorDatabaseResponse_descriptor_, + DescriptorDatabaseResponse::default_instance_, + DescriptorDatabaseResponse_offsets_, + -1, + -1, + -1, + DescriptorDatabaseResponse_default_oneof_instance_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseResponse, _oneof_case_[0]), + sizeof(DescriptorDatabaseResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseResponse, _is_default_instance_)); + ExtensionNumberResponse_descriptor_ = file->message_type(3); + static const int ExtensionNumberResponse_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, base_type_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, extension_number_), }; - ListServiceResponse_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - ListServiceResponse_descriptor_, - ListServiceResponse::default_instance_, ListServiceResponse_offsets_, - -1, -1, -1, sizeof(ListServiceResponse), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, - _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - ListServiceResponse, _is_default_instance_)); - FileDescriptorProtoResponse_descriptor_ = file->message_type(6); - static const int FileDescriptorProtoResponse_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - FileDescriptorProtoResponse, file_descriptor_proto_), + ExtensionNumberResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ExtensionNumberResponse_descriptor_, + ExtensionNumberResponse::default_instance_, + ExtensionNumberResponse_offsets_, + -1, + -1, + -1, + sizeof(ExtensionNumberResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, _is_default_instance_)); + ListServiceResponse_descriptor_ = file->message_type(4); + static const int ListServiceResponse_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, service_), }; - FileDescriptorProtoResponse_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - FileDescriptorProtoResponse_descriptor_, - FileDescriptorProtoResponse::default_instance_, - FileDescriptorProtoResponse_offsets_, -1, -1, -1, - sizeof(FileDescriptorProtoResponse), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - FileDescriptorProtoResponse, _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - FileDescriptorProtoResponse, _is_default_instance_)); - ExtensionNumberResponse_descriptor_ = file->message_type(7); - static const int ExtensionNumberResponse_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, - extension_number_), + ListServiceResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ListServiceResponse_descriptor_, + ListServiceResponse::default_instance_, + ListServiceResponse_offsets_, + -1, + -1, + -1, + sizeof(ListServiceResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, _is_default_instance_)); + ErrorResponse_descriptor_ = file->message_type(5); + static const int ErrorResponse_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, error_code_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, error_message_), }; - ExtensionNumberResponse_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - ExtensionNumberResponse_descriptor_, - ExtensionNumberResponse::default_instance_, - ExtensionNumberResponse_offsets_, -1, -1, -1, - sizeof(ExtensionNumberResponse), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - ExtensionNumberResponse, _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - ExtensionNumberResponse, _is_default_instance_)); + ErrorResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ErrorResponse_descriptor_, + ErrorResponse::default_instance_, + ErrorResponse_offsets_, + -1, + -1, + -1, + sizeof(ErrorResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, _is_default_instance_)); } namespace { @@ -171,51 +214,42 @@ namespace { GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); inline void protobuf_AssignDescriptorsOnce() { ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_reflection_2eproto); + &protobuf_AssignDesc_reflection_2eproto); } void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - EmptyRequest_descriptor_, &EmptyRequest::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - FileNameRequest_descriptor_, &FileNameRequest::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SymbolRequest_descriptor_, &SymbolRequest::default_instance()); + DescriptorDatabaseRequest_descriptor_, &DescriptorDatabaseRequest::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( ExtensionRequest_descriptor_, &ExtensionRequest::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - TypeRequest_descriptor_, &TypeRequest::default_instance()); + DescriptorDatabaseResponse_descriptor_, &DescriptorDatabaseResponse::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ListServiceResponse_descriptor_, - &ListServiceResponse::default_instance()); + ExtensionNumberResponse_descriptor_, &ExtensionNumberResponse::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - FileDescriptorProtoResponse_descriptor_, - &FileDescriptorProtoResponse::default_instance()); + ListServiceResponse_descriptor_, &ListServiceResponse::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ExtensionNumberResponse_descriptor_, - &ExtensionNumberResponse::default_instance()); + ErrorResponse_descriptor_, &ErrorResponse::default_instance()); } } // namespace void protobuf_ShutdownFile_reflection_2eproto() { - delete EmptyRequest::default_instance_; - delete EmptyRequest_reflection_; - delete FileNameRequest::default_instance_; - delete FileNameRequest_reflection_; - delete SymbolRequest::default_instance_; - delete SymbolRequest_reflection_; + delete DescriptorDatabaseRequest::default_instance_; + delete DescriptorDatabaseRequest_default_oneof_instance_; + delete DescriptorDatabaseRequest_reflection_; delete ExtensionRequest::default_instance_; delete ExtensionRequest_reflection_; - delete TypeRequest::default_instance_; - delete TypeRequest_reflection_; - delete ListServiceResponse::default_instance_; - delete ListServiceResponse_reflection_; - delete FileDescriptorProtoResponse::default_instance_; - delete FileDescriptorProtoResponse_reflection_; + delete DescriptorDatabaseResponse::default_instance_; + delete DescriptorDatabaseResponse_default_oneof_instance_; + delete DescriptorDatabaseResponse_reflection_; delete ExtensionNumberResponse::default_instance_; delete ExtensionNumberResponse_reflection_; + delete ListServiceResponse::default_instance_; + delete ListServiceResponse_reflection_; + delete ErrorResponse::default_instance_; + delete ErrorResponse_reflection_; } void protobuf_AddDesc_reflection_2eproto() { @@ -225,54 +259,52 @@ void protobuf_AddDesc_reflection_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\020reflection.proto\022\027grpc.reflection.v1al" - "pha\"\016\n\014EmptyRequest\"#\n\017FileNameRequest\022\020" - "\n\010filename\030\001 \001(\t\"\037\n\rSymbolRequest\022\016\n\006sym" - "bol\030\001 \001(\t\"E\n\020ExtensionRequest\022\027\n\017contain" - "ing_type\030\001 \001(\t\022\030\n\020extension_number\030\002 \001(\005" - "\"\033\n\013TypeRequest\022\014\n\004type\030\001 " - "\001(\t\"\'\n\023ListSer" - "viceResponse\022\020\n\010services\030\001 \003(\t\"<\n\033FileDe" - "scriptorProtoResponse\022\035\n\025file_descriptor" - "_proto\030\001 \001(\014\"3\n\027ExtensionNumberResponse\022" - "\030\n\020extension_number\030\001 \003(\0052\333\004\n\020ServerRefl" - "ection\022d\n\013ListService\022%.grpc.reflection." - "v1alpha.EmptyRequest\032,.grpc.reflection.v" - "1alpha.ListServiceResponse\"\000\022q\n\rGetFileB" - "yName\022(.grpc.reflection.v1alpha.FileName" - "Request\0324.grpc.reflection.v1alpha.FileDe" - "scriptorProtoResponse\"\000\022y\n\027GetFileContai" - "ningSymbol\022&.grpc.reflection.v1alpha.Sym" - "bolRequest\0324.grpc.reflection.v1alpha.Fil" - "eDescriptorProtoResponse\"\000\022\177\n\032GetFileCon" - "tainingExtension\022).grpc.reflection.v1alp" - "ha.ExtensionRequest\0324.grpc.reflection.v1" - "alpha.FileDescriptorProtoResponse\"\000\022r\n\026G" - "etAllExtensionNumbers\022$.grpc.reflection." - "v1alpha.TypeRequest\0320.grpc.reflection.v1" - "alpha.ExtensionNumberResponse\"\000b\006proto3", - 999); + "\n\020reflection.proto\022\027grpc.reflection.v1al" + "pha\"\214\002\n\031DescriptorDatabaseRequest\022\014\n\004hos" + "t\030\001 \001(\t\022\032\n\020file_by_filename\030\003 \001(\tH\000\022 \n\026f" + "ile_containing_symbol\030\004 \001(\tH\000\022N\n\031file_co" + "ntaining_extension\030\005 \001(\0132).grpc.reflecti" + "on.v1alpha.ExtensionRequestH\000\022\'\n\035all_ext" + "ension_numbers_of_type\030\006 \001(\tH\000\022\027\n\rlist_s" + "ervices\030\007 \001(\tH\000B\021\n\017message_request\"E\n\020Ex" + "tensionRequest\022\027\n\017containing_type\030\001 \001(\t\022" + "\030\n\020extension_number\030\002 \001(\005\"\241\003\n\032Descriptor" + "DatabaseResponse\022\022\n\nvalid_host\030\001 \001(\t\022L\n\020" + "original_request\030\002 \001(\01322.grpc.reflection" + ".v1alpha.DescriptorDatabaseRequest\022\037\n\025fi" + "le_descriptor_proto\030\004 \001(\014H\000\022Z\n\036all_exten" + "sion_numbers_response\030\005 \001(\01320.grpc.refle" + "ction.v1alpha.ExtensionNumberResponseH\000\022" + "N\n\026list_services_response\030\006 \001(\0132,.grpc.r" + "eflection.v1alpha.ListServiceResponseH\000\022" + "@\n\016error_response\030\007 \001(\0132&.grpc.reflectio" + "n.v1alpha.ErrorResponseH\000B\022\n\020message_res" + "ponse\"K\n\027ExtensionNumberResponse\022\026\n\016base" + "_type_name\030\001 \001(\t\022\030\n\020extension_number\030\002 \003" + "(\005\"&\n\023ListServiceResponse\022\017\n\007service\030\001 \003" + "(\t\":\n\rErrorResponse\022\022\n\nerror_code\030\001 \001(\005\022" + "\025\n\rerror_message\030\002 \001(\t2\232\001\n\020ServerReflect" + "ion\022\205\001\n\026DescriptorDatabaseInfo\0222.grpc.re" + "flection.v1alpha.DescriptorDatabaseReque" + "st\0323.grpc.reflection.v1alpha.DescriptorD" + "atabaseResponse(\0010\001b\006proto3", 1147); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( - "reflection.proto", &protobuf_RegisterTypes); - EmptyRequest::default_instance_ = new EmptyRequest(); - FileNameRequest::default_instance_ = new FileNameRequest(); - SymbolRequest::default_instance_ = new SymbolRequest(); + "reflection.proto", &protobuf_RegisterTypes); + DescriptorDatabaseRequest::default_instance_ = new DescriptorDatabaseRequest(); + DescriptorDatabaseRequest_default_oneof_instance_ = new DescriptorDatabaseRequestOneofInstance(); ExtensionRequest::default_instance_ = new ExtensionRequest(); - TypeRequest::default_instance_ = new TypeRequest(); - ListServiceResponse::default_instance_ = new ListServiceResponse(); - FileDescriptorProtoResponse::default_instance_ = - new FileDescriptorProtoResponse(); + DescriptorDatabaseResponse::default_instance_ = new DescriptorDatabaseResponse(); + DescriptorDatabaseResponse_default_oneof_instance_ = new DescriptorDatabaseResponseOneofInstance(); ExtensionNumberResponse::default_instance_ = new ExtensionNumberResponse(); - EmptyRequest::default_instance_->InitAsDefaultInstance(); - FileNameRequest::default_instance_->InitAsDefaultInstance(); - SymbolRequest::default_instance_->InitAsDefaultInstance(); + ListServiceResponse::default_instance_ = new ListServiceResponse(); + ErrorResponse::default_instance_ = new ErrorResponse(); + DescriptorDatabaseRequest::default_instance_->InitAsDefaultInstance(); ExtensionRequest::default_instance_->InitAsDefaultInstance(); - TypeRequest::default_instance_->InitAsDefaultInstance(); - ListServiceResponse::default_instance_->InitAsDefaultInstance(); - FileDescriptorProtoResponse::default_instance_->InitAsDefaultInstance(); + DescriptorDatabaseResponse::default_instance_->InitAsDefaultInstance(); ExtensionNumberResponse::default_instance_->InitAsDefaultInstance(); - ::google::protobuf::internal::OnShutdown( - &protobuf_ShutdownFile_reflection_2eproto); + ListServiceResponse::default_instance_->InitAsDefaultInstance(); + ErrorResponse::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_reflection_2eproto); } // Force AddDescriptors() to be called at static initialization time. @@ -291,263 +323,223 @@ static void MergeFromFail(int line) { } // namespace + // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int DescriptorDatabaseRequest::kHostFieldNumber; +const int DescriptorDatabaseRequest::kFileByFilenameFieldNumber; +const int DescriptorDatabaseRequest::kFileContainingSymbolFieldNumber; +const int DescriptorDatabaseRequest::kFileContainingExtensionFieldNumber; +const int DescriptorDatabaseRequest::kAllExtensionNumbersOfTypeFieldNumber; +const int DescriptorDatabaseRequest::kListServicesFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 -EmptyRequest::EmptyRequest() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +DescriptorDatabaseRequest::DescriptorDatabaseRequest() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.EmptyRequest) + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.DescriptorDatabaseRequest) } -void EmptyRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } +void DescriptorDatabaseRequest::InitAsDefaultInstance() { + _is_default_instance_ = true; + DescriptorDatabaseRequest_default_oneof_instance_->file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + DescriptorDatabaseRequest_default_oneof_instance_->file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + DescriptorDatabaseRequest_default_oneof_instance_->file_containing_extension_ = const_cast< ::grpc::reflection::v1alpha::ExtensionRequest*>(&::grpc::reflection::v1alpha::ExtensionRequest::default_instance()); + DescriptorDatabaseRequest_default_oneof_instance_->all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + DescriptorDatabaseRequest_default_oneof_instance_->list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} -EmptyRequest::EmptyRequest(const EmptyRequest& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +DescriptorDatabaseRequest::DescriptorDatabaseRequest(const DescriptorDatabaseRequest& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { SharedCtor(); MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.EmptyRequest) + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.DescriptorDatabaseRequest) } -void EmptyRequest::SharedCtor() { - _is_default_instance_ = false; +void DescriptorDatabaseRequest::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; + host_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); } -EmptyRequest::~EmptyRequest() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.EmptyRequest) +DescriptorDatabaseRequest::~DescriptorDatabaseRequest() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.DescriptorDatabaseRequest) SharedDtor(); } -void EmptyRequest::SharedDtor() { +void DescriptorDatabaseRequest::SharedDtor() { + host_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (has_message_request()) { + clear_message_request(); + } if (this != default_instance_) { } } -void EmptyRequest::SetCachedSize(int size) const { +void DescriptorDatabaseRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const ::google::protobuf::Descriptor* EmptyRequest::descriptor() { +const ::google::protobuf::Descriptor* DescriptorDatabaseRequest::descriptor() { protobuf_AssignDescriptorsOnce(); - return EmptyRequest_descriptor_; + return DescriptorDatabaseRequest_descriptor_; } -const EmptyRequest& EmptyRequest::default_instance() { +const DescriptorDatabaseRequest& DescriptorDatabaseRequest::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); return *default_instance_; } -EmptyRequest* EmptyRequest::default_instance_ = NULL; +DescriptorDatabaseRequest* DescriptorDatabaseRequest::default_instance_ = NULL; -EmptyRequest* EmptyRequest::New(::google::protobuf::Arena* arena) const { - EmptyRequest* n = new EmptyRequest; +DescriptorDatabaseRequest* DescriptorDatabaseRequest::New(::google::protobuf::Arena* arena) const { + DescriptorDatabaseRequest* n = new DescriptorDatabaseRequest; if (arena != NULL) { arena->Own(n); } return n; } -void EmptyRequest::Clear() {} - -bool EmptyRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.EmptyRequest) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); - tag = p.first; - if (!p.second) goto handle_unusual; - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - goto success; +void DescriptorDatabaseRequest::clear_message_request() { + switch(message_request_case()) { + case kFileByFilename: { + message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case kFileContainingSymbol: { + message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case kFileContainingExtension: { + delete message_request_.file_containing_extension_; + break; + } + case kAllExtensionNumbersOfType: { + message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case kListServices: { + message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case MESSAGE_REQUEST_NOT_SET: { + break; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - } -success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.EmptyRequest) - return true; -failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.EmptyRequest) - return false; -#undef DO_ -} - -void EmptyRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.EmptyRequest) - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.EmptyRequest) -} - -::google::protobuf::uint8* EmptyRequest::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.EmptyRequest) - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.EmptyRequest) - return target; -} - -int EmptyRequest::ByteSize() const { - int total_size = 0; - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void EmptyRequest::MergeFrom(const ::google::protobuf::Message& from) { - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const EmptyRequest* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void EmptyRequest::MergeFrom(const EmptyRequest& from) { - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); -} - -void EmptyRequest::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void EmptyRequest::CopyFrom(const EmptyRequest& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool EmptyRequest::IsInitialized() const { return true; } - -void EmptyRequest::Swap(EmptyRequest* other) { - if (other == this) return; - InternalSwap(other); -} -void EmptyRequest::InternalSwap(EmptyRequest* other) { - _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); -} - -::google::protobuf::Metadata EmptyRequest::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = EmptyRequest_descriptor_; - metadata.reflection = EmptyRequest_reflection_; - return metadata; -} - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// EmptyRequest - -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int FileNameRequest::kFilenameFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -FileNameRequest::FileNameRequest() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.FileNameRequest) -} - -void FileNameRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } - -FileNameRequest::FileNameRequest(const FileNameRequest& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.FileNameRequest) -} - -void FileNameRequest::SharedCtor() { - _is_default_instance_ = false; - ::google::protobuf::internal::GetEmptyString(); - _cached_size_ = 0; - filename_.UnsafeSetDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - -FileNameRequest::~FileNameRequest() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.FileNameRequest) - SharedDtor(); -} - -void FileNameRequest::SharedDtor() { - filename_.DestroyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != default_instance_) { } + _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET; } -void FileNameRequest::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* FileNameRequest::descriptor() { - protobuf_AssignDescriptorsOnce(); - return FileNameRequest_descriptor_; -} -const FileNameRequest& FileNameRequest::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); - return *default_instance_; +void DescriptorDatabaseRequest::Clear() { + host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_message_request(); } -FileNameRequest* FileNameRequest::default_instance_ = NULL; - -FileNameRequest* FileNameRequest::New(::google::protobuf::Arena* arena) const { - FileNameRequest* n = new FileNameRequest; - if (arena != NULL) { - arena->Own(n); - } - return n; -} - -void FileNameRequest::Clear() { - filename_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - -bool FileNameRequest::MergePartialFromCodedStream( +bool DescriptorDatabaseRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.FileNameRequest) + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.DescriptorDatabaseRequest) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string filename = 1; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string host = 1; case 1: { if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_filename())); + input, this->mutable_host())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->host().data(), this->host().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.host")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_file_by_filename; + break; + } + + // optional string file_by_filename = 3; + case 3: { + if (tag == 26) { + parse_file_by_filename: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_file_by_filename())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_by_filename().data(), this->file_by_filename().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_file_containing_symbol; + break; + } + + // optional string file_containing_symbol = 4; + case 4: { + if (tag == 34) { + parse_file_containing_symbol: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_file_containing_symbol())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->filename().data(), this->filename().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.FileNameRequest.filename")); + this->file_containing_symbol().data(), this->file_containing_symbol().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_file_containing_extension; + break; + } + + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + case 5: { + if (tag == 42) { + parse_file_containing_extension: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_file_containing_extension())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_all_extension_numbers_of_type; + break; + } + + // optional string all_extension_numbers_of_type = 6; + case 6: { + if (tag == 50) { + parse_all_extension_numbers_of_type: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_all_extension_numbers_of_type())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(58)) goto parse_list_services; + break; + } + + // optional string list_services = 7; + case 7: { + if (tag == 58) { + parse_list_services: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_list_services())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->list_services().data(), this->list_services().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services")); } else { goto handle_unusual; } @@ -559,78 +551,215 @@ bool FileNameRequest::MergePartialFromCodedStream( handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.FileNameRequest) + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.DescriptorDatabaseRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.FileNameRequest) + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.DescriptorDatabaseRequest) return false; #undef DO_ } -void FileNameRequest::SerializeWithCachedSizes( +void DescriptorDatabaseRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.FileNameRequest) - // optional string filename = 1; - if (this->filename().size() > 0) { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.DescriptorDatabaseRequest) + // optional string host = 1; + if (this->host().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->filename().data(), this->filename().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.FileNameRequest.filename"); + this->host().data(), this->host().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.host"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->filename(), output); + 1, this->host(), output); } - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.FileNameRequest) + // optional string file_by_filename = 3; + if (has_file_by_filename()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_by_filename().data(), this->file_by_filename().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->file_by_filename(), output); + } + + // optional string file_containing_symbol = 4; + if (has_file_containing_symbol()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_containing_symbol().data(), this->file_containing_symbol().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->file_containing_symbol(), output); + } + + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + if (has_file_containing_extension()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, *message_request_.file_containing_extension_, output); + } + + // optional string all_extension_numbers_of_type = 6; + if (has_all_extension_numbers_of_type()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 6, this->all_extension_numbers_of_type(), output); + } + + // optional string list_services = 7; + if (has_list_services()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->list_services().data(), this->list_services().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 7, this->list_services(), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.DescriptorDatabaseRequest) } -::google::protobuf::uint8* FileNameRequest::SerializeWithCachedSizesToArray( +::google::protobuf::uint8* DescriptorDatabaseRequest::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.FileNameRequest) - // optional string filename = 1; - if (this->filename().size() > 0) { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.DescriptorDatabaseRequest) + // optional string host = 1; + if (this->host().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->host().data(), this->host().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.host"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->host(), target); + } + + // optional string file_by_filename = 3; + if (has_file_by_filename()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_by_filename().data(), this->file_by_filename().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->file_by_filename(), target); + } + + // optional string file_containing_symbol = 4; + if (has_file_containing_symbol()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_containing_symbol().data(), this->file_containing_symbol().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->file_containing_symbol(), target); + } + + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + if (has_file_containing_extension()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 5, *message_request_.file_containing_extension_, target); + } + + // optional string all_extension_numbers_of_type = 6; + if (has_all_extension_numbers_of_type()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 6, this->all_extension_numbers_of_type(), target); + } + + // optional string list_services = 7; + if (has_list_services()) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->filename().data(), this->filename().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.FileNameRequest.filename"); - target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->filename(), target); + this->list_services().data(), this->list_services().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 7, this->list_services(), target); } - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.FileNameRequest) + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.DescriptorDatabaseRequest) return target; } -int FileNameRequest::ByteSize() const { +int DescriptorDatabaseRequest::ByteSize() const { int total_size = 0; - // optional string filename = 1; - if (this->filename().size() > 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->filename()); + // optional string host = 1; + if (this->host().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->host()); } + switch (message_request_case()) { + // optional string file_by_filename = 3; + case kFileByFilename: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->file_by_filename()); + break; + } + // optional string file_containing_symbol = 4; + case kFileContainingSymbol: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->file_containing_symbol()); + break; + } + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + case kFileContainingExtension: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *message_request_.file_containing_extension_); + break; + } + // optional string all_extension_numbers_of_type = 6; + case kAllExtensionNumbersOfType: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->all_extension_numbers_of_type()); + break; + } + // optional string list_services = 7; + case kListServices: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->list_services()); + break; + } + case MESSAGE_REQUEST_NOT_SET: { + break; + } + } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } -void FileNameRequest::MergeFrom(const ::google::protobuf::Message& from) { +void DescriptorDatabaseRequest::MergeFrom(const ::google::protobuf::Message& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const FileNameRequest* source = - ::google::protobuf::internal::DynamicCastToGenerated< - const FileNameRequest>(&from); + const DescriptorDatabaseRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { @@ -638,369 +767,498 @@ void FileNameRequest::MergeFrom(const ::google::protobuf::Message& from) { } } -void FileNameRequest::MergeFrom(const FileNameRequest& from) { +void DescriptorDatabaseRequest::MergeFrom(const DescriptorDatabaseRequest& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - if (from.filename().size() > 0) { - filename_.AssignWithDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - from.filename_); + switch (from.message_request_case()) { + case kFileByFilename: { + set_file_by_filename(from.file_by_filename()); + break; + } + case kFileContainingSymbol: { + set_file_containing_symbol(from.file_containing_symbol()); + break; + } + case kFileContainingExtension: { + mutable_file_containing_extension()->::grpc::reflection::v1alpha::ExtensionRequest::MergeFrom(from.file_containing_extension()); + break; + } + case kAllExtensionNumbersOfType: { + set_all_extension_numbers_of_type(from.all_extension_numbers_of_type()); + break; + } + case kListServices: { + set_list_services(from.list_services()); + break; + } + case MESSAGE_REQUEST_NOT_SET: { + break; + } + } + if (from.host().size() > 0) { + + host_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.host_); } } -void FileNameRequest::CopyFrom(const ::google::protobuf::Message& from) { +void DescriptorDatabaseRequest::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } -void FileNameRequest::CopyFrom(const FileNameRequest& from) { +void DescriptorDatabaseRequest::CopyFrom(const DescriptorDatabaseRequest& from) { if (&from == this) return; Clear(); MergeFrom(from); } -bool FileNameRequest::IsInitialized() const { return true; } +bool DescriptorDatabaseRequest::IsInitialized() const { + + return true; +} -void FileNameRequest::Swap(FileNameRequest* other) { +void DescriptorDatabaseRequest::Swap(DescriptorDatabaseRequest* other) { if (other == this) return; InternalSwap(other); } -void FileNameRequest::InternalSwap(FileNameRequest* other) { - filename_.Swap(&other->filename_); +void DescriptorDatabaseRequest::InternalSwap(DescriptorDatabaseRequest* other) { + host_.Swap(&other->host_); + std::swap(message_request_, other->message_request_); + std::swap(_oneof_case_[0], other->_oneof_case_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); std::swap(_cached_size_, other->_cached_size_); } -::google::protobuf::Metadata FileNameRequest::GetMetadata() const { +::google::protobuf::Metadata DescriptorDatabaseRequest::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; - metadata.descriptor = FileNameRequest_descriptor_; - metadata.reflection = FileNameRequest_reflection_; + metadata.descriptor = DescriptorDatabaseRequest_descriptor_; + metadata.reflection = DescriptorDatabaseRequest_reflection_; return metadata; } #if PROTOBUF_INLINE_NOT_IN_HEADERS -// FileNameRequest - -// optional string filename = 1; -void FileNameRequest::clear_filename() { - filename_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -const ::std::string& FileNameRequest::filename() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileNameRequest.filename) - return filename_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -void FileNameRequest::set_filename(const ::std::string& value) { - filename_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileNameRequest.filename) -} -void FileNameRequest::set_filename(const char* value) { - filename_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileNameRequest.filename) +// DescriptorDatabaseRequest + +// optional string host = 1; +void DescriptorDatabaseRequest::clear_host() { + host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& DescriptorDatabaseRequest::host() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) + return host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void DescriptorDatabaseRequest::set_host(const ::std::string& value) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -void FileNameRequest::set_filename(const char* value, size_t size) { - filename_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + void DescriptorDatabaseRequest::set_host(const char* value) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) +} + void DescriptorDatabaseRequest::set_host(const char* value, size_t size) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileNameRequest.filename) + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -::std::string* FileNameRequest::mutable_filename() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileNameRequest.filename) - return filename_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::std::string* DescriptorDatabaseRequest::mutable_host() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) + return host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -::std::string* FileNameRequest::release_filename() { - return filename_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::std::string* DescriptorDatabaseRequest::release_host() { + + return host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void FileNameRequest::set_allocated_filename(::std::string* filename) { - if (filename != NULL) { + void DescriptorDatabaseRequest::set_allocated_host(::std::string* host) { + if (host != NULL) { + } else { + } - filename_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), filename); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.FileNameRequest.filename) + host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), host); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int SymbolRequest::kSymbolFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -SymbolRequest::SymbolRequest() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.SymbolRequest) +// optional string file_by_filename = 3; +bool DescriptorDatabaseRequest::has_file_by_filename() const { + return message_request_case() == kFileByFilename; } - -void SymbolRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } - -SymbolRequest::SymbolRequest(const SymbolRequest& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.SymbolRequest) +void DescriptorDatabaseRequest::set_has_file_by_filename() { + _oneof_case_[0] = kFileByFilename; } - -void SymbolRequest::SharedCtor() { - _is_default_instance_ = false; - ::google::protobuf::internal::GetEmptyString(); - _cached_size_ = 0; - symbol_.UnsafeSetDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +void DescriptorDatabaseRequest::clear_file_by_filename() { + if (has_file_by_filename()) { + message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } } - -SymbolRequest::~SymbolRequest() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.SymbolRequest) - SharedDtor(); + const ::std::string& DescriptorDatabaseRequest::file_by_filename() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) + if (has_file_by_filename()) { + return message_request_.file_by_filename_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } - -void SymbolRequest::SharedDtor() { - symbol_.DestroyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != default_instance_) { + void DescriptorDatabaseRequest::set_file_by_filename(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) } - -void SymbolRequest::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); + void DescriptorDatabaseRequest::set_file_by_filename(const char* value) { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) +} + void DescriptorDatabaseRequest::set_file_by_filename(const char* value, size_t size) { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) +} + ::std::string* DescriptorDatabaseRequest::mutable_file_by_filename() { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) + return message_request_.file_by_filename_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* DescriptorDatabaseRequest::release_file_by_filename() { + if (has_file_by_filename()) { + clear_has_message_request(); + return message_request_.file_by_filename_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } } -const ::google::protobuf::Descriptor* SymbolRequest::descriptor() { - protobuf_AssignDescriptorsOnce(); - return SymbolRequest_descriptor_; + void DescriptorDatabaseRequest::set_allocated_file_by_filename(::std::string* file_by_filename) { + if (!has_file_by_filename()) { + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (file_by_filename != NULL) { + set_has_file_by_filename(); + message_request_.file_by_filename_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_by_filename); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) } -const SymbolRequest& SymbolRequest::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); - return *default_instance_; +// optional string file_containing_symbol = 4; +bool DescriptorDatabaseRequest::has_file_containing_symbol() const { + return message_request_case() == kFileContainingSymbol; } - -SymbolRequest* SymbolRequest::default_instance_ = NULL; - -SymbolRequest* SymbolRequest::New(::google::protobuf::Arena* arena) const { - SymbolRequest* n = new SymbolRequest; - if (arena != NULL) { - arena->Own(n); +void DescriptorDatabaseRequest::set_has_file_containing_symbol() { + _oneof_case_[0] = kFileContainingSymbol; +} +void DescriptorDatabaseRequest::clear_file_containing_symbol() { + if (has_file_containing_symbol()) { + message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); } - return n; } - -void SymbolRequest::Clear() { - symbol_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + const ::std::string& DescriptorDatabaseRequest::file_containing_symbol() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) + if (has_file_containing_symbol()) { + return message_request_.file_containing_symbol_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } - -bool SymbolRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.SymbolRequest) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); - tag = p.first; - if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string symbol = 1; - case 1: { - if (tag == 10) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_symbol())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->symbol().data(), this->symbol().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.SymbolRequest.symbol")); - } else { - goto handle_unusual; - } - if (input->ExpectAtEnd()) goto success; - break; - } - - default: { - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); - break; - } - } + void DescriptorDatabaseRequest::set_file_containing_symbol(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.SymbolRequest) - return true; -failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.SymbolRequest) - return false; -#undef DO_ + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) } - -void SymbolRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.SymbolRequest) - // optional string symbol = 1; - if (this->symbol().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->symbol().data(), this->symbol().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.SymbolRequest.symbol"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->symbol(), output); + void DescriptorDatabaseRequest::set_file_containing_symbol(const char* value) { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) +} + void DescriptorDatabaseRequest::set_file_containing_symbol(const char* value, size_t size) { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) +} + ::std::string* DescriptorDatabaseRequest::mutable_file_containing_symbol() { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) + return message_request_.file_containing_symbol_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* DescriptorDatabaseRequest::release_file_containing_symbol() { + if (has_file_containing_symbol()) { + clear_has_message_request(); + return message_request_.file_containing_symbol_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; } - - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.SymbolRequest) } - -::google::protobuf::uint8* SymbolRequest::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.SymbolRequest) - // optional string symbol = 1; - if (this->symbol().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->symbol().data(), this->symbol().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.SymbolRequest.symbol"); - target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->symbol(), target); + void DescriptorDatabaseRequest::set_allocated_file_containing_symbol(::std::string* file_containing_symbol) { + if (!has_file_containing_symbol()) { + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } - - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.SymbolRequest) - return target; + clear_message_request(); + if (file_containing_symbol != NULL) { + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_containing_symbol); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) } -int SymbolRequest::ByteSize() const { - int total_size = 0; - - // optional string symbol = 1; - if (this->symbol().size() > 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->symbol()); +// optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; +bool DescriptorDatabaseRequest::has_file_containing_extension() const { + return message_request_case() == kFileContainingExtension; +} +void DescriptorDatabaseRequest::set_has_file_containing_extension() { + _oneof_case_[0] = kFileContainingExtension; +} +void DescriptorDatabaseRequest::clear_file_containing_extension() { + if (has_file_containing_extension()) { + delete message_request_.file_containing_extension_; + clear_has_message_request(); } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; } - -void SymbolRequest::MergeFrom(const ::google::protobuf::Message& from) { - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const SymbolRequest* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + const ::grpc::reflection::v1alpha::ExtensionRequest& DescriptorDatabaseRequest::file_containing_extension() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_extension) + return has_file_containing_extension() + ? *message_request_.file_containing_extension_ + : ::grpc::reflection::v1alpha::ExtensionRequest::default_instance(); +} +::grpc::reflection::v1alpha::ExtensionRequest* DescriptorDatabaseRequest::mutable_file_containing_extension() { + if (!has_file_containing_extension()) { + clear_message_request(); + set_has_file_containing_extension(); + message_request_.file_containing_extension_ = new ::grpc::reflection::v1alpha::ExtensionRequest; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_extension) + return message_request_.file_containing_extension_; +} +::grpc::reflection::v1alpha::ExtensionRequest* DescriptorDatabaseRequest::release_file_containing_extension() { + if (has_file_containing_extension()) { + clear_has_message_request(); + ::grpc::reflection::v1alpha::ExtensionRequest* temp = message_request_.file_containing_extension_; + message_request_.file_containing_extension_ = NULL; + return temp; } else { - MergeFrom(*source); + return NULL; } } - -void SymbolRequest::MergeFrom(const SymbolRequest& from) { - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - if (from.symbol().size() > 0) { - symbol_.AssignWithDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - from.symbol_); +void DescriptorDatabaseRequest::set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension) { + clear_message_request(); + if (file_containing_extension) { + set_has_file_containing_extension(); + message_request_.file_containing_extension_ = file_containing_extension; } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_extension) } -void SymbolRequest::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); +// optional string all_extension_numbers_of_type = 6; +bool DescriptorDatabaseRequest::has_all_extension_numbers_of_type() const { + return message_request_case() == kAllExtensionNumbersOfType; } - -void SymbolRequest::CopyFrom(const SymbolRequest& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); +void DescriptorDatabaseRequest::set_has_all_extension_numbers_of_type() { + _oneof_case_[0] = kAllExtensionNumbersOfType; } - -bool SymbolRequest::IsInitialized() const { return true; } - -void SymbolRequest::Swap(SymbolRequest* other) { - if (other == this) return; - InternalSwap(other); +void DescriptorDatabaseRequest::clear_all_extension_numbers_of_type() { + if (has_all_extension_numbers_of_type()) { + message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} + const ::std::string& DescriptorDatabaseRequest::all_extension_numbers_of_type() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) + if (has_all_extension_numbers_of_type()) { + return message_request_.all_extension_numbers_of_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} + void DescriptorDatabaseRequest::set_all_extension_numbers_of_type(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) +} + void DescriptorDatabaseRequest::set_all_extension_numbers_of_type(const char* value) { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) +} + void DescriptorDatabaseRequest::set_all_extension_numbers_of_type(const char* value, size_t size) { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) +} + ::std::string* DescriptorDatabaseRequest::mutable_all_extension_numbers_of_type() { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) + return message_request_.all_extension_numbers_of_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* DescriptorDatabaseRequest::release_all_extension_numbers_of_type() { + if (has_all_extension_numbers_of_type()) { + clear_has_message_request(); + return message_request_.all_extension_numbers_of_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } } -void SymbolRequest::InternalSwap(SymbolRequest* other) { - symbol_.Swap(&other->symbol_); - _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + void DescriptorDatabaseRequest::set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type) { + if (!has_all_extension_numbers_of_type()) { + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (all_extension_numbers_of_type != NULL) { + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + all_extension_numbers_of_type); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) } -::google::protobuf::Metadata SymbolRequest::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SymbolRequest_descriptor_; - metadata.reflection = SymbolRequest_reflection_; - return metadata; +// optional string list_services = 7; +bool DescriptorDatabaseRequest::has_list_services() const { + return message_request_case() == kListServices; } - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// SymbolRequest - -// optional string symbol = 1; -void SymbolRequest::clear_symbol() { - symbol_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -const ::std::string& SymbolRequest::symbol() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.SymbolRequest.symbol) - return symbol_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -void SymbolRequest::set_symbol(const ::std::string& value) { - symbol_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.SymbolRequest.symbol) -} -void SymbolRequest::set_symbol(const char* value) { - symbol_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.SymbolRequest.symbol) +void DescriptorDatabaseRequest::set_has_list_services() { + _oneof_case_[0] = kListServices; } -void SymbolRequest::set_symbol(const char* value, size_t size) { - symbol_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.SymbolRequest.symbol) +void DescriptorDatabaseRequest::clear_list_services() { + if (has_list_services()) { + message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } } -::std::string* SymbolRequest::mutable_symbol() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.SymbolRequest.symbol) - return symbol_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + const ::std::string& DescriptorDatabaseRequest::list_services() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) + if (has_list_services()) { + return message_request_.list_services_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } -::std::string* SymbolRequest::release_symbol() { - return symbol_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + void DescriptorDatabaseRequest::set_list_services(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) } -void SymbolRequest::set_allocated_symbol(::std::string* symbol) { - if (symbol != NULL) { + void DescriptorDatabaseRequest::set_list_services(const char* value) { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) +} + void DescriptorDatabaseRequest::set_list_services(const char* value, size_t size) { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) +} + ::std::string* DescriptorDatabaseRequest::mutable_list_services() { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) + return message_request_.list_services_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* DescriptorDatabaseRequest::release_list_services() { + if (has_list_services()) { + clear_has_message_request(); + return message_request_.list_services_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } else { + return NULL; } - symbol_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), symbol); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.SymbolRequest.symbol) +} + void DescriptorDatabaseRequest::set_allocated_list_services(::std::string* list_services) { + if (!has_list_services()) { + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (list_services != NULL) { + set_has_list_services(); + message_request_.list_services_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + list_services); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) } +bool DescriptorDatabaseRequest::has_message_request() const { + return message_request_case() != MESSAGE_REQUEST_NOT_SET; +} +void DescriptorDatabaseRequest::clear_has_message_request() { + _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET; +} +DescriptorDatabaseRequest::MessageRequestCase DescriptorDatabaseRequest::message_request_case() const { + return DescriptorDatabaseRequest::MessageRequestCase(_oneof_case_[0]); +} #endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== @@ -1011,26 +1269,28 @@ const int ExtensionRequest::kExtensionNumberFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ExtensionRequest::ExtensionRequest() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionRequest) } -void ExtensionRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } +void ExtensionRequest::InitAsDefaultInstance() { + _is_default_instance_ = true; +} ExtensionRequest::ExtensionRequest(const ExtensionRequest& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { SharedCtor(); MergeFrom(from); // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionRequest) } void ExtensionRequest::SharedCtor() { - _is_default_instance_ = false; + _is_default_instance_ = false; ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; - containing_type_.UnsafeSetDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + containing_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); extension_number_ = 0; } @@ -1040,8 +1300,7 @@ ExtensionRequest::~ExtensionRequest() { } void ExtensionRequest::SharedDtor() { - containing_type_.DestroyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + containing_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != default_instance_) { } } @@ -1063,8 +1322,7 @@ const ExtensionRequest& ExtensionRequest::default_instance() { ExtensionRequest* ExtensionRequest::default_instance_ = NULL; -ExtensionRequest* ExtensionRequest::New( - ::google::protobuf::Arena* arena) const { +ExtensionRequest* ExtensionRequest::New(::google::protobuf::Arena* arena) const { ExtensionRequest* n = new ExtensionRequest; if (arena != NULL) { arena->Own(n); @@ -1073,33 +1331,29 @@ ExtensionRequest* ExtensionRequest::New( } void ExtensionRequest::Clear() { - containing_type_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); extension_number_ = 0; } bool ExtensionRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionRequest) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string containing_type = 1; case 1: { if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_containing_type())); + input, this->mutable_containing_type())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->containing_type().data(), this->containing_type().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ExtensionRequest.containing_type")); + this->containing_type().data(), this->containing_type().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ExtensionRequest.containing_type")); } else { goto handle_unusual; } @@ -1110,11 +1364,10 @@ bool ExtensionRequest::MergePartialFromCodedStream( // optional int32 extension_number = 2; case 2: { if (tag == 16) { - parse_extension_number: + parse_extension_number: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &extension_number_))); + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &extension_number_))); } else { goto handle_unusual; @@ -1127,12 +1380,10 @@ bool ExtensionRequest::MergePartialFromCodedStream( handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } @@ -1152,17 +1403,16 @@ void ExtensionRequest::SerializeWithCachedSizes( // optional string containing_type = 1; if (this->containing_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->containing_type().data(), this->containing_type().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); + this->containing_type().data(), this->containing_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->containing_type(), output); + 1, this->containing_type(), output); } // optional int32 extension_number = 2; if (this->extension_number() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32( - 2, this->extension_number(), output); + ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->extension_number(), output); } // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionRequest) @@ -1174,17 +1424,17 @@ void ExtensionRequest::SerializeWithCachedSizes( // optional string containing_type = 1; if (this->containing_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->containing_type().data(), this->containing_type().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); - target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + this->containing_type().data(), this->containing_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->containing_type(), target); } // optional int32 extension_number = 2; if (this->extension_number() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray( - 2, this->extension_number(), target); + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->extension_number(), target); } // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionRequest) @@ -1196,14 +1446,16 @@ int ExtensionRequest::ByteSize() const { // optional string containing_type = 1; if (this->containing_type().size() > 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->containing_type()); + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->containing_type()); } // optional int32 extension_number = 2; if (this->extension_number() != 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( - this->extension_number()); + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->extension_number()); } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); @@ -1214,9 +1466,9 @@ int ExtensionRequest::ByteSize() const { void ExtensionRequest::MergeFrom(const ::google::protobuf::Message& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const ExtensionRequest* source = - ::google::protobuf::internal::DynamicCastToGenerated< - const ExtensionRequest>(&from); + const ExtensionRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { @@ -1227,9 +1479,8 @@ void ExtensionRequest::MergeFrom(const ::google::protobuf::Message& from) { void ExtensionRequest::MergeFrom(const ExtensionRequest& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); if (from.containing_type().size() > 0) { - containing_type_.AssignWithDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - from.containing_type_); + + containing_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.containing_type_); } if (from.extension_number() != 0) { set_extension_number(from.extension_number()); @@ -1248,7 +1499,10 @@ void ExtensionRequest::CopyFrom(const ExtensionRequest& from) { MergeFrom(from); } -bool ExtensionRequest::IsInitialized() const { return true; } +bool ExtensionRequest::IsInitialized() const { + + return true; +} void ExtensionRequest::Swap(ExtensionRequest* other) { if (other == this) return; @@ -1274,58 +1528,57 @@ void ExtensionRequest::InternalSwap(ExtensionRequest* other) { // optional string containing_type = 1; void ExtensionRequest::clear_containing_type() { - containing_type_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -const ::std::string& ExtensionRequest::containing_type() const { + const ::std::string& ExtensionRequest::containing_type() const { // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - return containing_type_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return containing_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void ExtensionRequest::set_containing_type(const ::std::string& value) { - containing_type_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + void ExtensionRequest::set_containing_type(const ::std::string& value) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } -void ExtensionRequest::set_containing_type(const char* value) { - containing_type_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); + void ExtensionRequest::set_containing_type(const char* value) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } -void ExtensionRequest::set_containing_type(const char* value, size_t size) { - containing_type_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + void ExtensionRequest::set_containing_type(const char* value, size_t size) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } -::std::string* ExtensionRequest::mutable_containing_type() { + ::std::string* ExtensionRequest::mutable_containing_type() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - return containing_type_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return containing_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -::std::string* ExtensionRequest::release_containing_type() { - return containing_type_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::std::string* ExtensionRequest::release_containing_type() { + + return containing_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void ExtensionRequest::set_allocated_containing_type( - ::std::string* containing_type) { + void ExtensionRequest::set_allocated_containing_type(::std::string* containing_type) { if (containing_type != NULL) { + } else { + } - containing_type_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - containing_type); + containing_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), containing_type); // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } // optional int32 extension_number = 2; -void ExtensionRequest::clear_extension_number() { extension_number_ = 0; } -::google::protobuf::int32 ExtensionRequest::extension_number() const { +void ExtensionRequest::clear_extension_number() { + extension_number_ = 0; +} + ::google::protobuf::int32 ExtensionRequest::extension_number() const { // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.extension_number) return extension_number_; } -void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) { + void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) { + extension_number_ = value; // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number) } @@ -1335,96 +1588,203 @@ void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) { // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int TypeRequest::kTypeFieldNumber; +const int DescriptorDatabaseResponse::kValidHostFieldNumber; +const int DescriptorDatabaseResponse::kOriginalRequestFieldNumber; +const int DescriptorDatabaseResponse::kFileDescriptorProtoFieldNumber; +const int DescriptorDatabaseResponse::kAllExtensionNumbersResponseFieldNumber; +const int DescriptorDatabaseResponse::kListServicesResponseFieldNumber; +const int DescriptorDatabaseResponse::kErrorResponseFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 -TypeRequest::TypeRequest() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +DescriptorDatabaseResponse::DescriptorDatabaseResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.TypeRequest) + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.DescriptorDatabaseResponse) } -void TypeRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } +void DescriptorDatabaseResponse::InitAsDefaultInstance() { + _is_default_instance_ = true; + original_request_ = const_cast< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest*>(&::grpc::reflection::v1alpha::DescriptorDatabaseRequest::default_instance()); + DescriptorDatabaseResponse_default_oneof_instance_->file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + DescriptorDatabaseResponse_default_oneof_instance_->all_extension_numbers_response_ = const_cast< ::grpc::reflection::v1alpha::ExtensionNumberResponse*>(&::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance()); + DescriptorDatabaseResponse_default_oneof_instance_->list_services_response_ = const_cast< ::grpc::reflection::v1alpha::ListServiceResponse*>(&::grpc::reflection::v1alpha::ListServiceResponse::default_instance()); + DescriptorDatabaseResponse_default_oneof_instance_->error_response_ = const_cast< ::grpc::reflection::v1alpha::ErrorResponse*>(&::grpc::reflection::v1alpha::ErrorResponse::default_instance()); +} -TypeRequest::TypeRequest(const TypeRequest& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +DescriptorDatabaseResponse::DescriptorDatabaseResponse(const DescriptorDatabaseResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { SharedCtor(); MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.TypeRequest) + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.DescriptorDatabaseResponse) } -void TypeRequest::SharedCtor() { - _is_default_instance_ = false; +void DescriptorDatabaseResponse::SharedCtor() { + _is_default_instance_ = false; ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; - type_.UnsafeSetDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + valid_host_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + original_request_ = NULL; + clear_has_message_response(); } -TypeRequest::~TypeRequest() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.TypeRequest) +DescriptorDatabaseResponse::~DescriptorDatabaseResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.DescriptorDatabaseResponse) SharedDtor(); } -void TypeRequest::SharedDtor() { - type_.DestroyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +void DescriptorDatabaseResponse::SharedDtor() { + valid_host_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (has_message_response()) { + clear_message_response(); + } if (this != default_instance_) { + delete original_request_; } } -void TypeRequest::SetCachedSize(int size) const { +void DescriptorDatabaseResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const ::google::protobuf::Descriptor* TypeRequest::descriptor() { +const ::google::protobuf::Descriptor* DescriptorDatabaseResponse::descriptor() { protobuf_AssignDescriptorsOnce(); - return TypeRequest_descriptor_; + return DescriptorDatabaseResponse_descriptor_; } -const TypeRequest& TypeRequest::default_instance() { +const DescriptorDatabaseResponse& DescriptorDatabaseResponse::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); return *default_instance_; } -TypeRequest* TypeRequest::default_instance_ = NULL; +DescriptorDatabaseResponse* DescriptorDatabaseResponse::default_instance_ = NULL; -TypeRequest* TypeRequest::New(::google::protobuf::Arena* arena) const { - TypeRequest* n = new TypeRequest; +DescriptorDatabaseResponse* DescriptorDatabaseResponse::New(::google::protobuf::Arena* arena) const { + DescriptorDatabaseResponse* n = new DescriptorDatabaseResponse; if (arena != NULL) { arena->Own(n); } return n; } -void TypeRequest::Clear() { - type_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +void DescriptorDatabaseResponse::clear_message_response() { + switch(message_response_case()) { + case kFileDescriptorProto: { + message_response_.file_descriptor_proto_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case kAllExtensionNumbersResponse: { + delete message_response_.all_extension_numbers_response_; + break; + } + case kListServicesResponse: { + delete message_response_.list_services_response_; + break; + } + case kErrorResponse: { + delete message_response_.error_response_; + break; + } + case MESSAGE_RESPONSE_NOT_SET: { + break; + } + } + _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET; +} + + +void DescriptorDatabaseResponse::Clear() { + valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; + original_request_ = NULL; + clear_message_response(); } -bool TypeRequest::MergePartialFromCodedStream( +bool DescriptorDatabaseResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.TypeRequest) + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.DescriptorDatabaseResponse) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string type = 1; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string valid_host = 1; case 1: { if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_type())); + input, this->mutable_valid_host())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->type().data(), this->type().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.TypeRequest.type")); + this->valid_host().data(), this->valid_host().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_original_request; + break; + } + + // optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; + case 2: { + if (tag == 18) { + parse_original_request: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_original_request())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_file_descriptor_proto; + break; + } + + // optional bytes file_descriptor_proto = 4; + case 4: { + if (tag == 34) { + parse_file_descriptor_proto: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_file_descriptor_proto())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_all_extension_numbers_response; + break; + } + + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + case 5: { + if (tag == 42) { + parse_all_extension_numbers_response: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_all_extension_numbers_response())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_list_services_response; + break; + } + + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + case 6: { + if (tag == 50) { + parse_list_services_response: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_list_services_response())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(58)) goto parse_error_response; + break; + } + + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + case 7: { + if (tag == 58) { + parse_error_response: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_error_response())); } else { goto handle_unusual; } @@ -1436,77 +1796,182 @@ bool TypeRequest::MergePartialFromCodedStream( handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.TypeRequest) + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.DescriptorDatabaseResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.TypeRequest) + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.DescriptorDatabaseResponse) return false; #undef DO_ } -void TypeRequest::SerializeWithCachedSizes( +void DescriptorDatabaseResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.TypeRequest) - // optional string type = 1; - if (this->type().size() > 0) { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.DescriptorDatabaseResponse) + // optional string valid_host = 1; + if (this->valid_host().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->type().data(), this->type().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.TypeRequest.type"); + this->valid_host().data(), this->valid_host().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->type(), output); + 1, this->valid_host(), output); + } + + // optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; + if (this->has_original_request()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, *this->original_request_, output); + } + + // optional bytes file_descriptor_proto = 4; + if (has_file_descriptor_proto()) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 4, this->file_descriptor_proto(), output); + } + + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + if (has_all_extension_numbers_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, *message_response_.all_extension_numbers_response_, output); + } + + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + if (has_list_services_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 6, *message_response_.list_services_response_, output); } - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.TypeRequest) + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + if (has_error_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 7, *message_response_.error_response_, output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.DescriptorDatabaseResponse) } -::google::protobuf::uint8* TypeRequest::SerializeWithCachedSizesToArray( +::google::protobuf::uint8* DescriptorDatabaseResponse::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.TypeRequest) - // optional string type = 1; - if (this->type().size() > 0) { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.DescriptorDatabaseResponse) + // optional string valid_host = 1; + if (this->valid_host().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->type().data(), this->type().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.TypeRequest.type"); - target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->type(), target); + this->valid_host().data(), this->valid_host().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->valid_host(), target); + } + + // optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; + if (this->has_original_request()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, *this->original_request_, target); + } + + // optional bytes file_descriptor_proto = 4; + if (has_file_descriptor_proto()) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 4, this->file_descriptor_proto(), target); } - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.TypeRequest) + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + if (has_all_extension_numbers_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 5, *message_response_.all_extension_numbers_response_, target); + } + + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + if (has_list_services_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 6, *message_response_.list_services_response_, target); + } + + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + if (has_error_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 7, *message_response_.error_response_, target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.DescriptorDatabaseResponse) return target; } -int TypeRequest::ByteSize() const { +int DescriptorDatabaseResponse::ByteSize() const { int total_size = 0; - // optional string type = 1; - if (this->type().size() > 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->type()); + // optional string valid_host = 1; + if (this->valid_host().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->valid_host()); + } + + // optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; + if (this->has_original_request()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->original_request_); } + switch (message_response_case()) { + // optional bytes file_descriptor_proto = 4; + case kFileDescriptorProto: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->file_descriptor_proto()); + break; + } + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + case kAllExtensionNumbersResponse: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *message_response_.all_extension_numbers_response_); + break; + } + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + case kListServicesResponse: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *message_response_.list_services_response_); + break; + } + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + case kErrorResponse: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *message_response_.error_response_); + break; + } + case MESSAGE_RESPONSE_NOT_SET: { + break; + } + } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } -void TypeRequest::MergeFrom(const ::google::protobuf::Message& from) { +void DescriptorDatabaseResponse::MergeFrom(const ::google::protobuf::Message& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const TypeRequest* source = - ::google::protobuf::internal::DynamicCastToGenerated( + const DescriptorDatabaseResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); @@ -1515,190 +1980,504 @@ void TypeRequest::MergeFrom(const ::google::protobuf::Message& from) { } } -void TypeRequest::MergeFrom(const TypeRequest& from) { +void DescriptorDatabaseResponse::MergeFrom(const DescriptorDatabaseResponse& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - if (from.type().size() > 0) { - type_.AssignWithDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - from.type_); + switch (from.message_response_case()) { + case kFileDescriptorProto: { + set_file_descriptor_proto(from.file_descriptor_proto()); + break; + } + case kAllExtensionNumbersResponse: { + mutable_all_extension_numbers_response()->::grpc::reflection::v1alpha::ExtensionNumberResponse::MergeFrom(from.all_extension_numbers_response()); + break; + } + case kListServicesResponse: { + mutable_list_services_response()->::grpc::reflection::v1alpha::ListServiceResponse::MergeFrom(from.list_services_response()); + break; + } + case kErrorResponse: { + mutable_error_response()->::grpc::reflection::v1alpha::ErrorResponse::MergeFrom(from.error_response()); + break; + } + case MESSAGE_RESPONSE_NOT_SET: { + break; + } + } + if (from.valid_host().size() > 0) { + + valid_host_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.valid_host_); + } + if (from.has_original_request()) { + mutable_original_request()->::grpc::reflection::v1alpha::DescriptorDatabaseRequest::MergeFrom(from.original_request()); } } -void TypeRequest::CopyFrom(const ::google::protobuf::Message& from) { +void DescriptorDatabaseResponse::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } -void TypeRequest::CopyFrom(const TypeRequest& from) { +void DescriptorDatabaseResponse::CopyFrom(const DescriptorDatabaseResponse& from) { if (&from == this) return; Clear(); MergeFrom(from); } -bool TypeRequest::IsInitialized() const { return true; } +bool DescriptorDatabaseResponse::IsInitialized() const { + + return true; +} -void TypeRequest::Swap(TypeRequest* other) { +void DescriptorDatabaseResponse::Swap(DescriptorDatabaseResponse* other) { if (other == this) return; InternalSwap(other); } -void TypeRequest::InternalSwap(TypeRequest* other) { - type_.Swap(&other->type_); +void DescriptorDatabaseResponse::InternalSwap(DescriptorDatabaseResponse* other) { + valid_host_.Swap(&other->valid_host_); + std::swap(original_request_, other->original_request_); + std::swap(message_response_, other->message_response_); + std::swap(_oneof_case_[0], other->_oneof_case_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); std::swap(_cached_size_, other->_cached_size_); } -::google::protobuf::Metadata TypeRequest::GetMetadata() const { +::google::protobuf::Metadata DescriptorDatabaseResponse::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; - metadata.descriptor = TypeRequest_descriptor_; - metadata.reflection = TypeRequest_reflection_; + metadata.descriptor = DescriptorDatabaseResponse_descriptor_; + metadata.reflection = DescriptorDatabaseResponse_reflection_; return metadata; } #if PROTOBUF_INLINE_NOT_IN_HEADERS -// TypeRequest - -// optional string type = 1; -void TypeRequest::clear_type() { - type_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -const ::std::string& TypeRequest::type() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.TypeRequest.type) - return type_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -void TypeRequest::set_type(const ::std::string& value) { - type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.TypeRequest.type) -} -void TypeRequest::set_type(const char* value) { - type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.TypeRequest.type) -} -void TypeRequest::set_type(const char* value, size_t size) { - type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.TypeRequest.type) -} -::std::string* TypeRequest::mutable_type() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.TypeRequest.type) - return type_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -::std::string* TypeRequest::release_type() { - return type_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -void TypeRequest::set_allocated_type(::std::string* type) { - if (type != NULL) { +// DescriptorDatabaseResponse + +// optional string valid_host = 1; +void DescriptorDatabaseResponse::clear_valid_host() { + valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& DescriptorDatabaseResponse::valid_host() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) + return valid_host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void DescriptorDatabaseResponse::set_valid_host(const ::std::string& value) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) +} + void DescriptorDatabaseResponse::set_valid_host(const char* value) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) +} + void DescriptorDatabaseResponse::set_valid_host(const char* value, size_t size) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) +} + ::std::string* DescriptorDatabaseResponse::mutable_valid_host() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) + return valid_host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* DescriptorDatabaseResponse::release_valid_host() { + + return valid_host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void DescriptorDatabaseResponse::set_allocated_valid_host(::std::string* valid_host) { + if (valid_host != NULL) { + + } else { + + } + valid_host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), valid_host); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) +} + +// optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; +bool DescriptorDatabaseResponse::has_original_request() const { + return !_is_default_instance_ && original_request_ != NULL; +} +void DescriptorDatabaseResponse::clear_original_request() { + if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; + original_request_ = NULL; +} +const ::grpc::reflection::v1alpha::DescriptorDatabaseRequest& DescriptorDatabaseResponse::original_request() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.original_request) + return original_request_ != NULL ? *original_request_ : *default_instance_->original_request_; +} +::grpc::reflection::v1alpha::DescriptorDatabaseRequest* DescriptorDatabaseResponse::mutable_original_request() { + + if (original_request_ == NULL) { + original_request_ = new ::grpc::reflection::v1alpha::DescriptorDatabaseRequest; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.original_request) + return original_request_; +} +::grpc::reflection::v1alpha::DescriptorDatabaseRequest* DescriptorDatabaseResponse::release_original_request() { + + ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* temp = original_request_; + original_request_ = NULL; + return temp; +} +void DescriptorDatabaseResponse::set_allocated_original_request(::grpc::reflection::v1alpha::DescriptorDatabaseRequest* original_request) { + delete original_request_; + original_request_ = original_request; + if (original_request) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.original_request) +} + +// optional bytes file_descriptor_proto = 4; +bool DescriptorDatabaseResponse::has_file_descriptor_proto() const { + return message_response_case() == kFileDescriptorProto; +} +void DescriptorDatabaseResponse::set_has_file_descriptor_proto() { + _oneof_case_[0] = kFileDescriptorProto; +} +void DescriptorDatabaseResponse::clear_file_descriptor_proto() { + if (has_file_descriptor_proto()) { + message_response_.file_descriptor_proto_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_response(); + } +} + const ::std::string& DescriptorDatabaseResponse::file_descriptor_proto() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) + if (has_file_descriptor_proto()) { + return message_response_.file_descriptor_proto_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} + void DescriptorDatabaseResponse::set_file_descriptor_proto(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_response_.file_descriptor_proto_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) +} + void DescriptorDatabaseResponse::set_file_descriptor_proto(const char* value) { + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_response_.file_descriptor_proto_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) +} + void DescriptorDatabaseResponse::set_file_descriptor_proto(const void* value, size_t size) { + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_response_.file_descriptor_proto_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) +} + ::std::string* DescriptorDatabaseResponse::mutable_file_descriptor_proto() { + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) + return message_response_.file_descriptor_proto_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* DescriptorDatabaseResponse::release_file_descriptor_proto() { + if (has_file_descriptor_proto()) { + clear_has_message_response(); + return message_response_.file_descriptor_proto_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} + void DescriptorDatabaseResponse::set_allocated_file_descriptor_proto(::std::string* file_descriptor_proto) { + if (!has_file_descriptor_proto()) { + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_response(); + if (file_descriptor_proto != NULL) { + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_descriptor_proto); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) +} + +// optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; +bool DescriptorDatabaseResponse::has_all_extension_numbers_response() const { + return message_response_case() == kAllExtensionNumbersResponse; +} +void DescriptorDatabaseResponse::set_has_all_extension_numbers_response() { + _oneof_case_[0] = kAllExtensionNumbersResponse; +} +void DescriptorDatabaseResponse::clear_all_extension_numbers_response() { + if (has_all_extension_numbers_response()) { + delete message_response_.all_extension_numbers_response_; + clear_has_message_response(); + } +} + const ::grpc::reflection::v1alpha::ExtensionNumberResponse& DescriptorDatabaseResponse::all_extension_numbers_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.all_extension_numbers_response) + return has_all_extension_numbers_response() + ? *message_response_.all_extension_numbers_response_ + : ::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance(); +} +::grpc::reflection::v1alpha::ExtensionNumberResponse* DescriptorDatabaseResponse::mutable_all_extension_numbers_response() { + if (!has_all_extension_numbers_response()) { + clear_message_response(); + set_has_all_extension_numbers_response(); + message_response_.all_extension_numbers_response_ = new ::grpc::reflection::v1alpha::ExtensionNumberResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.all_extension_numbers_response) + return message_response_.all_extension_numbers_response_; +} +::grpc::reflection::v1alpha::ExtensionNumberResponse* DescriptorDatabaseResponse::release_all_extension_numbers_response() { + if (has_all_extension_numbers_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ExtensionNumberResponse* temp = message_response_.all_extension_numbers_response_; + message_response_.all_extension_numbers_response_ = NULL; + return temp; + } else { + return NULL; + } +} +void DescriptorDatabaseResponse::set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response) { + clear_message_response(); + if (all_extension_numbers_response) { + set_has_all_extension_numbers_response(); + message_response_.all_extension_numbers_response_ = all_extension_numbers_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.all_extension_numbers_response) +} + +// optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; +bool DescriptorDatabaseResponse::has_list_services_response() const { + return message_response_case() == kListServicesResponse; +} +void DescriptorDatabaseResponse::set_has_list_services_response() { + _oneof_case_[0] = kListServicesResponse; +} +void DescriptorDatabaseResponse::clear_list_services_response() { + if (has_list_services_response()) { + delete message_response_.list_services_response_; + clear_has_message_response(); + } +} + const ::grpc::reflection::v1alpha::ListServiceResponse& DescriptorDatabaseResponse::list_services_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.list_services_response) + return has_list_services_response() + ? *message_response_.list_services_response_ + : ::grpc::reflection::v1alpha::ListServiceResponse::default_instance(); +} +::grpc::reflection::v1alpha::ListServiceResponse* DescriptorDatabaseResponse::mutable_list_services_response() { + if (!has_list_services_response()) { + clear_message_response(); + set_has_list_services_response(); + message_response_.list_services_response_ = new ::grpc::reflection::v1alpha::ListServiceResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.list_services_response) + return message_response_.list_services_response_; +} +::grpc::reflection::v1alpha::ListServiceResponse* DescriptorDatabaseResponse::release_list_services_response() { + if (has_list_services_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ListServiceResponse* temp = message_response_.list_services_response_; + message_response_.list_services_response_ = NULL; + return temp; + } else { + return NULL; + } +} +void DescriptorDatabaseResponse::set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response) { + clear_message_response(); + if (list_services_response) { + set_has_list_services_response(); + message_response_.list_services_response_ = list_services_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.list_services_response) +} + +// optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; +bool DescriptorDatabaseResponse::has_error_response() const { + return message_response_case() == kErrorResponse; +} +void DescriptorDatabaseResponse::set_has_error_response() { + _oneof_case_[0] = kErrorResponse; +} +void DescriptorDatabaseResponse::clear_error_response() { + if (has_error_response()) { + delete message_response_.error_response_; + clear_has_message_response(); + } +} + const ::grpc::reflection::v1alpha::ErrorResponse& DescriptorDatabaseResponse::error_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.error_response) + return has_error_response() + ? *message_response_.error_response_ + : ::grpc::reflection::v1alpha::ErrorResponse::default_instance(); +} +::grpc::reflection::v1alpha::ErrorResponse* DescriptorDatabaseResponse::mutable_error_response() { + if (!has_error_response()) { + clear_message_response(); + set_has_error_response(); + message_response_.error_response_ = new ::grpc::reflection::v1alpha::ErrorResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.error_response) + return message_response_.error_response_; +} +::grpc::reflection::v1alpha::ErrorResponse* DescriptorDatabaseResponse::release_error_response() { + if (has_error_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ErrorResponse* temp = message_response_.error_response_; + message_response_.error_response_ = NULL; + return temp; } else { + return NULL; + } +} +void DescriptorDatabaseResponse::set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response) { + clear_message_response(); + if (error_response) { + set_has_error_response(); + message_response_.error_response_ = error_response; } - type_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), type); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.TypeRequest.type) + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.error_response) } +bool DescriptorDatabaseResponse::has_message_response() const { + return message_response_case() != MESSAGE_RESPONSE_NOT_SET; +} +void DescriptorDatabaseResponse::clear_has_message_response() { + _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET; +} +DescriptorDatabaseResponse::MessageResponseCase DescriptorDatabaseResponse::message_response_case() const { + return DescriptorDatabaseResponse::MessageResponseCase(_oneof_case_[0]); +} #endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ListServiceResponse::kServicesFieldNumber; +const int ExtensionNumberResponse::kBaseTypeNameFieldNumber; +const int ExtensionNumberResponse::kExtensionNumberFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 -ListServiceResponse::ListServiceResponse() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +ExtensionNumberResponse::ExtensionNumberResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) } -void ListServiceResponse::InitAsDefaultInstance() { +void ExtensionNumberResponse::InitAsDefaultInstance() { _is_default_instance_ = true; } -ListServiceResponse::ListServiceResponse(const ListServiceResponse& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +ExtensionNumberResponse::ExtensionNumberResponse(const ExtensionNumberResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { SharedCtor(); MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) } -void ListServiceResponse::SharedCtor() { - _is_default_instance_ = false; +void ExtensionNumberResponse::SharedCtor() { + _is_default_instance_ = false; ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; + base_type_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -ListServiceResponse::~ListServiceResponse() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ListServiceResponse) +ExtensionNumberResponse::~ExtensionNumberResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ExtensionNumberResponse) SharedDtor(); } -void ListServiceResponse::SharedDtor() { +void ExtensionNumberResponse::SharedDtor() { + base_type_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != default_instance_) { } } -void ListServiceResponse::SetCachedSize(int size) const { +void ExtensionNumberResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const ::google::protobuf::Descriptor* ListServiceResponse::descriptor() { +const ::google::protobuf::Descriptor* ExtensionNumberResponse::descriptor() { protobuf_AssignDescriptorsOnce(); - return ListServiceResponse_descriptor_; + return ExtensionNumberResponse_descriptor_; } -const ListServiceResponse& ListServiceResponse::default_instance() { +const ExtensionNumberResponse& ExtensionNumberResponse::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); return *default_instance_; } -ListServiceResponse* ListServiceResponse::default_instance_ = NULL; +ExtensionNumberResponse* ExtensionNumberResponse::default_instance_ = NULL; -ListServiceResponse* ListServiceResponse::New( - ::google::protobuf::Arena* arena) const { - ListServiceResponse* n = new ListServiceResponse; +ExtensionNumberResponse* ExtensionNumberResponse::New(::google::protobuf::Arena* arena) const { + ExtensionNumberResponse* n = new ExtensionNumberResponse; if (arena != NULL) { arena->Own(n); } return n; } -void ListServiceResponse::Clear() { services_.Clear(); } +void ExtensionNumberResponse::Clear() { + base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + extension_number_.Clear(); +} -bool ListServiceResponse::MergePartialFromCodedStream( +bool ExtensionNumberResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionNumberResponse) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated string services = 1; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string base_type_name = 1; case 1: { if (tag == 10) { - parse_services: DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->add_services())); + input, this->mutable_base_type_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->services(this->services_size() - 1).data(), - this->services(this->services_size() - 1).length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ListServiceResponse.services")); + this->base_type_name().data(), this->base_type_name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_extension_number; + break; + } + + // repeated int32 extension_number = 2; + case 2: { + if (tag == 18) { + parse_extension_number: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_extension_number()))); + } else if (tag == 16) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 18, input, this->mutable_extension_number()))); } else { goto handle_unusual; } - if (input->ExpectTag(10)) goto parse_services; if (input->ExpectAtEnd()) goto success; break; } @@ -1707,66 +2486,106 @@ bool ListServiceResponse::MergePartialFromCodedStream( handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ExtensionNumberResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ExtensionNumberResponse) return false; #undef DO_ } -void ListServiceResponse::SerializeWithCachedSizes( +void ExtensionNumberResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ListServiceResponse) - // repeated string services = 1; - for (int i = 0; i < this->services_size(); i++) { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + // optional string base_type_name = 1; + if (this->base_type_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->services(i).data(), this->services(i).length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ListServiceResponse.services"); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->services(i), output); + this->base_type_name().data(), this->base_type_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->base_type_name(), output); + } + + // repeated int32 extension_number = 2; + if (this->extension_number_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_extension_number_cached_byte_size_); + } + for (int i = 0; i < this->extension_number_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->extension_number(i), output); } - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionNumberResponse) } -::google::protobuf::uint8* ListServiceResponse::SerializeWithCachedSizesToArray( +::google::protobuf::uint8* ExtensionNumberResponse::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ListServiceResponse) - // repeated string services = 1; - for (int i = 0; i < this->services_size(); i++) { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + // optional string base_type_name = 1; + if (this->base_type_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->services(i).data(), this->services(i).length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ListServiceResponse.services"); - target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->services(i), target); + this->base_type_name().data(), this->base_type_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->base_type_name(), target); } - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ListServiceResponse) + // repeated int32 extension_number = 2; + if (this->extension_number_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 2, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _extension_number_cached_byte_size_, target); + } + for (int i = 0; i < this->extension_number_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->extension_number(i), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionNumberResponse) return target; } -int ListServiceResponse::ByteSize() const { +int ExtensionNumberResponse::ByteSize() const { int total_size = 0; - // repeated string services = 1; - total_size += 1 * this->services_size(); - for (int i = 0; i < this->services_size(); i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - this->services(i)); + // optional string base_type_name = 1; + if (this->base_type_name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->base_type_name()); + } + + // repeated int32 extension_number = 2; + { + int data_size = 0; + for (int i = 0; i < this->extension_number_size(); i++) { + data_size += ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->extension_number(i)); + } + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _extension_number_cached_byte_size_ = data_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); @@ -1775,11 +2594,11 @@ int ListServiceResponse::ByteSize() const { return total_size; } -void ListServiceResponse::MergeFrom(const ::google::protobuf::Message& from) { +void ExtensionNumberResponse::MergeFrom(const ::google::protobuf::Message& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const ListServiceResponse* source = - ::google::protobuf::internal::DynamicCastToGenerated< - const ListServiceResponse>(&from); + const ExtensionNumberResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { @@ -1787,92 +2606,125 @@ void ListServiceResponse::MergeFrom(const ::google::protobuf::Message& from) { } } -void ListServiceResponse::MergeFrom(const ListServiceResponse& from) { +void ExtensionNumberResponse::MergeFrom(const ExtensionNumberResponse& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - services_.MergeFrom(from.services_); + extension_number_.MergeFrom(from.extension_number_); + if (from.base_type_name().size() > 0) { + + base_type_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.base_type_name_); + } } -void ListServiceResponse::CopyFrom(const ::google::protobuf::Message& from) { +void ExtensionNumberResponse::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } -void ListServiceResponse::CopyFrom(const ListServiceResponse& from) { +void ExtensionNumberResponse::CopyFrom(const ExtensionNumberResponse& from) { if (&from == this) return; Clear(); MergeFrom(from); } -bool ListServiceResponse::IsInitialized() const { return true; } +bool ExtensionNumberResponse::IsInitialized() const { -void ListServiceResponse::Swap(ListServiceResponse* other) { + return true; +} + +void ExtensionNumberResponse::Swap(ExtensionNumberResponse* other) { if (other == this) return; InternalSwap(other); } -void ListServiceResponse::InternalSwap(ListServiceResponse* other) { - services_.UnsafeArenaSwap(&other->services_); +void ExtensionNumberResponse::InternalSwap(ExtensionNumberResponse* other) { + base_type_name_.Swap(&other->base_type_name_); + extension_number_.UnsafeArenaSwap(&other->extension_number_); _internal_metadata_.Swap(&other->_internal_metadata_); std::swap(_cached_size_, other->_cached_size_); } -::google::protobuf::Metadata ListServiceResponse::GetMetadata() const { +::google::protobuf::Metadata ExtensionNumberResponse::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; - metadata.descriptor = ListServiceResponse_descriptor_; - metadata.reflection = ListServiceResponse_reflection_; + metadata.descriptor = ExtensionNumberResponse_descriptor_; + metadata.reflection = ExtensionNumberResponse_reflection_; return metadata; } #if PROTOBUF_INLINE_NOT_IN_HEADERS -// ListServiceResponse +// ExtensionNumberResponse -// repeated string services = 1; -int ListServiceResponse::services_size() const { return services_.size(); } -void ListServiceResponse::clear_services() { services_.Clear(); } -const ::std::string& ListServiceResponse::services(int index) const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.services) - return services_.Get(index); +// optional string base_type_name = 1; +void ExtensionNumberResponse::clear_base_type_name() { + base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& ExtensionNumberResponse::base_type_name() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + return base_type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ExtensionNumberResponse::set_base_type_name(const ::std::string& value) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} + void ExtensionNumberResponse::set_base_type_name(const char* value) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) } -::std::string* ListServiceResponse::mutable_services(int index) { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.services) - return services_.Mutable(index); + void ExtensionNumberResponse::set_base_type_name(const char* value, size_t size) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} + ::std::string* ExtensionNumberResponse::mutable_base_type_name() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + return base_type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void ListServiceResponse::set_services(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ListServiceResponse.services) - services_.Mutable(index)->assign(value); + ::std::string* ExtensionNumberResponse::release_base_type_name() { + + return base_type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ExtensionNumberResponse::set_allocated_base_type_name(::std::string* base_type_name) { + if (base_type_name != NULL) { + + } else { + + } + base_type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), base_type_name); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) } -void ListServiceResponse::set_services(int index, const char* value) { - services_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ListServiceResponse.services) + +// repeated int32 extension_number = 2; +int ExtensionNumberResponse::extension_number_size() const { + return extension_number_.size(); } -void ListServiceResponse::set_services(int index, const char* value, - size_t size) { - services_.Mutable(index)->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ListServiceResponse.services) +void ExtensionNumberResponse::clear_extension_number() { + extension_number_.Clear(); } -::std::string* ListServiceResponse::add_services() { return services_.Add(); } -void ListServiceResponse::add_services(const ::std::string& value) { - services_.Add()->assign(value); - // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.services) + ::google::protobuf::int32 ExtensionNumberResponse::extension_number(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return extension_number_.Get(index); } -void ListServiceResponse::add_services(const char* value) { - services_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.ListServiceResponse.services) + void ExtensionNumberResponse::set_extension_number(int index, ::google::protobuf::int32 value) { + extension_number_.Set(index, value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) } -void ListServiceResponse::add_services(const char* value, size_t size) { - services_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.ListServiceResponse.services) + void ExtensionNumberResponse::add_extension_number(::google::protobuf::int32 value) { + extension_number_.Add(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) } -const ::google::protobuf::RepeatedPtrField< ::std::string>& -ListServiceResponse::services() const { - // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.services) - return services_; + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +ExtensionNumberResponse::extension_number() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return extension_number_; } -::google::protobuf::RepeatedPtrField< ::std::string>* -ListServiceResponse::mutable_services() { - // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.services) - return &services_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +ExtensionNumberResponse::mutable_extension_number() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return &extension_number_; } #endif // PROTOBUF_INLINE_NOT_IN_HEADERS @@ -1880,102 +2732,97 @@ ListServiceResponse::mutable_services() { // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int FileDescriptorProtoResponse::kFileDescriptorProtoFieldNumber; +const int ListServiceResponse::kServiceFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 -FileDescriptorProtoResponse::FileDescriptorProtoResponse() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +ListServiceResponse::ListServiceResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ListServiceResponse) } -void FileDescriptorProtoResponse::InitAsDefaultInstance() { +void ListServiceResponse::InitAsDefaultInstance() { _is_default_instance_ = true; } -FileDescriptorProtoResponse::FileDescriptorProtoResponse( - const FileDescriptorProtoResponse& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +ListServiceResponse::ListServiceResponse(const ListServiceResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { SharedCtor(); MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ListServiceResponse) } -void FileDescriptorProtoResponse::SharedCtor() { - _is_default_instance_ = false; +void ListServiceResponse::SharedCtor() { + _is_default_instance_ = false; ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; - file_descriptor_proto_.UnsafeSetDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -FileDescriptorProtoResponse::~FileDescriptorProtoResponse() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.FileDescriptorProtoResponse) +ListServiceResponse::~ListServiceResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ListServiceResponse) SharedDtor(); } -void FileDescriptorProtoResponse::SharedDtor() { - file_descriptor_proto_.DestroyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +void ListServiceResponse::SharedDtor() { if (this != default_instance_) { } } -void FileDescriptorProtoResponse::SetCachedSize(int size) const { +void ListServiceResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const ::google::protobuf::Descriptor* -FileDescriptorProtoResponse::descriptor() { +const ::google::protobuf::Descriptor* ListServiceResponse::descriptor() { protobuf_AssignDescriptorsOnce(); - return FileDescriptorProtoResponse_descriptor_; + return ListServiceResponse_descriptor_; } -const FileDescriptorProtoResponse& -FileDescriptorProtoResponse::default_instance() { +const ListServiceResponse& ListServiceResponse::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); return *default_instance_; } -FileDescriptorProtoResponse* FileDescriptorProtoResponse::default_instance_ = - NULL; +ListServiceResponse* ListServiceResponse::default_instance_ = NULL; -FileDescriptorProtoResponse* FileDescriptorProtoResponse::New( - ::google::protobuf::Arena* arena) const { - FileDescriptorProtoResponse* n = new FileDescriptorProtoResponse; +ListServiceResponse* ListServiceResponse::New(::google::protobuf::Arena* arena) const { + ListServiceResponse* n = new ListServiceResponse; if (arena != NULL) { arena->Own(n); } return n; } -void FileDescriptorProtoResponse::Clear() { - file_descriptor_proto_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +void ListServiceResponse::Clear() { + service_.Clear(); } -bool FileDescriptorProtoResponse::MergePartialFromCodedStream( +bool ListServiceResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ListServiceResponse) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional bytes file_descriptor_proto = 1; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated string service = 1; case 1: { if (tag == 10) { - DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( - input, this->mutable_file_descriptor_proto())); + parse_service: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_service())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->service(this->service_size() - 1).data(), + this->service(this->service_size() - 1).length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ListServiceResponse.service")); } else { goto handle_unusual; } + if (input->ExpectTag(10)) goto parse_service; if (input->ExpectAtEnd()) goto success; break; } @@ -1984,58 +2831,64 @@ bool FileDescriptorProtoResponse::MergePartialFromCodedStream( handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ListServiceResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ListServiceResponse) return false; #undef DO_ } -void FileDescriptorProtoResponse::SerializeWithCachedSizes( +void ListServiceResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.FileDescriptorProtoResponse) - // optional bytes file_descriptor_proto = 1; - if (this->file_descriptor_proto().size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( - 1, this->file_descriptor_proto(), output); + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ListServiceResponse) + // repeated string service = 1; + for (int i = 0; i < this->service_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->service(i).data(), this->service(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ListServiceResponse.service"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->service(i), output); } - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ListServiceResponse) } -::google::protobuf::uint8* -FileDescriptorProtoResponse::SerializeWithCachedSizesToArray( +::google::protobuf::uint8* ListServiceResponse::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.FileDescriptorProtoResponse) - // optional bytes file_descriptor_proto = 1; - if (this->file_descriptor_proto().size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( - 1, this->file_descriptor_proto(), target); + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ListServiceResponse) + // repeated string service = 1; + for (int i = 0; i < this->service_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->service(i).data(), this->service(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ListServiceResponse.service"); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(1, this->service(i), target); } - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ListServiceResponse) return target; } -int FileDescriptorProtoResponse::ByteSize() const { +int ListServiceResponse::ByteSize() const { int total_size = 0; - // optional bytes file_descriptor_proto = 1; - if (this->file_descriptor_proto().size() > 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( - this->file_descriptor_proto()); + // repeated string service = 1; + total_size += 1 * this->service_size(); + for (int i = 0; i < this->service_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->service(i)); } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); @@ -2044,12 +2897,11 @@ int FileDescriptorProtoResponse::ByteSize() const { return total_size; } -void FileDescriptorProtoResponse::MergeFrom( - const ::google::protobuf::Message& from) { +void ListServiceResponse::MergeFrom(const ::google::protobuf::Message& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const FileDescriptorProtoResponse* source = - ::google::protobuf::internal::DynamicCastToGenerated< - const FileDescriptorProtoResponse>(&from); + const ListServiceResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { @@ -2057,102 +2909,101 @@ void FileDescriptorProtoResponse::MergeFrom( } } -void FileDescriptorProtoResponse::MergeFrom( - const FileDescriptorProtoResponse& from) { +void ListServiceResponse::MergeFrom(const ListServiceResponse& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - if (from.file_descriptor_proto().size() > 0) { - file_descriptor_proto_.AssignWithDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - from.file_descriptor_proto_); - } + service_.MergeFrom(from.service_); } -void FileDescriptorProtoResponse::CopyFrom( - const ::google::protobuf::Message& from) { +void ListServiceResponse::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } -void FileDescriptorProtoResponse::CopyFrom( - const FileDescriptorProtoResponse& from) { +void ListServiceResponse::CopyFrom(const ListServiceResponse& from) { if (&from == this) return; Clear(); MergeFrom(from); } -bool FileDescriptorProtoResponse::IsInitialized() const { return true; } +bool ListServiceResponse::IsInitialized() const { + + return true; +} -void FileDescriptorProtoResponse::Swap(FileDescriptorProtoResponse* other) { +void ListServiceResponse::Swap(ListServiceResponse* other) { if (other == this) return; InternalSwap(other); } -void FileDescriptorProtoResponse::InternalSwap( - FileDescriptorProtoResponse* other) { - file_descriptor_proto_.Swap(&other->file_descriptor_proto_); +void ListServiceResponse::InternalSwap(ListServiceResponse* other) { + service_.UnsafeArenaSwap(&other->service_); _internal_metadata_.Swap(&other->_internal_metadata_); std::swap(_cached_size_, other->_cached_size_); } -::google::protobuf::Metadata FileDescriptorProtoResponse::GetMetadata() const { +::google::protobuf::Metadata ListServiceResponse::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; - metadata.descriptor = FileDescriptorProtoResponse_descriptor_; - metadata.reflection = FileDescriptorProtoResponse_reflection_; + metadata.descriptor = ListServiceResponse_descriptor_; + metadata.reflection = ListServiceResponse_reflection_; return metadata; } #if PROTOBUF_INLINE_NOT_IN_HEADERS -// FileDescriptorProtoResponse - -// optional bytes file_descriptor_proto = 1; -void FileDescriptorProtoResponse::clear_file_descriptor_proto() { - file_descriptor_proto_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -const ::std::string& FileDescriptorProtoResponse::file_descriptor_proto() - const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) - return file_descriptor_proto_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -void FileDescriptorProtoResponse::set_file_descriptor_proto( - const ::std::string& value) { - file_descriptor_proto_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) -} -void FileDescriptorProtoResponse::set_file_descriptor_proto(const char* value) { - file_descriptor_proto_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +// ListServiceResponse + +// repeated string service = 1; +int ListServiceResponse::service_size() const { + return service_.size(); } -void FileDescriptorProtoResponse::set_file_descriptor_proto(const void* value, - size_t size) { - file_descriptor_proto_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +void ListServiceResponse::clear_service() { + service_.Clear(); } -::std::string* FileDescriptorProtoResponse::mutable_file_descriptor_proto() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) - return file_descriptor_proto_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + const ::std::string& ListServiceResponse::service(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Get(index); } -::std::string* FileDescriptorProtoResponse::release_file_descriptor_proto() { - return file_descriptor_proto_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::std::string* ListServiceResponse::mutable_service(int index) { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Mutable(index); } -void FileDescriptorProtoResponse::set_allocated_file_descriptor_proto( - ::std::string* file_descriptor_proto) { - if (file_descriptor_proto != NULL) { - } else { - } - file_descriptor_proto_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - file_descriptor_proto); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) + void ListServiceResponse::set_service(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ListServiceResponse.service) + service_.Mutable(index)->assign(value); +} + void ListServiceResponse::set_service(int index, const char* value) { + service_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ListServiceResponse.service) +} + void ListServiceResponse::set_service(int index, const char* value, size_t size) { + service_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ListServiceResponse.service) +} + ::std::string* ListServiceResponse::add_service() { + return service_.Add(); +} + void ListServiceResponse::add_service(const ::std::string& value) { + service_.Add()->assign(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.service) +} + void ListServiceResponse::add_service(const char* value) { + service_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.ListServiceResponse.service) +} + void ListServiceResponse::add_service(const char* value, size_t size) { + service_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.ListServiceResponse.service) +} + const ::google::protobuf::RepeatedPtrField< ::std::string>& +ListServiceResponse::service() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_; +} + ::google::protobuf::RepeatedPtrField< ::std::string>* +ListServiceResponse::mutable_service() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.service) + return &service_; } #endif // PROTOBUF_INLINE_NOT_IN_HEADERS @@ -2160,98 +3011,111 @@ void FileDescriptorProtoResponse::set_allocated_file_descriptor_proto( // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ExtensionNumberResponse::kExtensionNumberFieldNumber; +const int ErrorResponse::kErrorCodeFieldNumber; +const int ErrorResponse::kErrorMessageFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 -ExtensionNumberResponse::ExtensionNumberResponse() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +ErrorResponse::ErrorResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ErrorResponse) } -void ExtensionNumberResponse::InitAsDefaultInstance() { +void ErrorResponse::InitAsDefaultInstance() { _is_default_instance_ = true; } -ExtensionNumberResponse::ExtensionNumberResponse( - const ExtensionNumberResponse& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +ErrorResponse::ErrorResponse(const ErrorResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { SharedCtor(); MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ErrorResponse) } -void ExtensionNumberResponse::SharedCtor() { - _is_default_instance_ = false; +void ErrorResponse::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; + error_code_ = 0; + error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -ExtensionNumberResponse::~ExtensionNumberResponse() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ExtensionNumberResponse) +ErrorResponse::~ErrorResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ErrorResponse) SharedDtor(); } -void ExtensionNumberResponse::SharedDtor() { +void ErrorResponse::SharedDtor() { + error_message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != default_instance_) { } } -void ExtensionNumberResponse::SetCachedSize(int size) const { +void ErrorResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const ::google::protobuf::Descriptor* ExtensionNumberResponse::descriptor() { +const ::google::protobuf::Descriptor* ErrorResponse::descriptor() { protobuf_AssignDescriptorsOnce(); - return ExtensionNumberResponse_descriptor_; + return ErrorResponse_descriptor_; } -const ExtensionNumberResponse& ExtensionNumberResponse::default_instance() { +const ErrorResponse& ErrorResponse::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); return *default_instance_; } -ExtensionNumberResponse* ExtensionNumberResponse::default_instance_ = NULL; +ErrorResponse* ErrorResponse::default_instance_ = NULL; -ExtensionNumberResponse* ExtensionNumberResponse::New( - ::google::protobuf::Arena* arena) const { - ExtensionNumberResponse* n = new ExtensionNumberResponse; +ErrorResponse* ErrorResponse::New(::google::protobuf::Arena* arena) const { + ErrorResponse* n = new ErrorResponse; if (arena != NULL) { arena->Own(n); } return n; } -void ExtensionNumberResponse::Clear() { extension_number_.Clear(); } +void ErrorResponse::Clear() { + error_code_ = 0; + error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} -bool ExtensionNumberResponse::MergePartialFromCodedStream( +bool ErrorResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ErrorResponse) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated int32 extension_number = 1; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional int32 error_code = 1; case 1: { - if (tag == 10) { - DO_(( - ::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, this->mutable_extension_number()))); - } else if (tag == 8) { - DO_(( - ::google::protobuf::internal::WireFormatLite:: - ReadRepeatedPrimitiveNoInline< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - 1, 10, input, this->mutable_extension_number()))); + if (tag == 8) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &error_code_))); + + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_error_message; + break; + } + + // optional string error_message = 2; + case 2: { + if (tag == 18) { + parse_error_message: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_error_message())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->error_message().data(), this->error_message().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ErrorResponse.error_message")); } else { goto handle_unusual; } @@ -2263,85 +3127,82 @@ bool ExtensionNumberResponse::MergePartialFromCodedStream( handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ErrorResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ErrorResponse) return false; #undef DO_ } -void ExtensionNumberResponse::SerializeWithCachedSizes( +void ErrorResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ExtensionNumberResponse) - // repeated int32 extension_number = 1; - if (this->extension_number_size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteTag( - 1, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - output); - output->WriteVarint32(_extension_number_cached_byte_size_); + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ErrorResponse) + // optional int32 error_code = 1; + if (this->error_code() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->error_code(), output); } - for (int i = 0; i < this->extension_number_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( - this->extension_number(i), output); + + // optional string error_message = 2; + if (this->error_message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->error_message().data(), this->error_message().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ErrorResponse.error_message"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->error_message(), output); } - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ErrorResponse) } -::google::protobuf::uint8* -ExtensionNumberResponse::SerializeWithCachedSizesToArray( +::google::protobuf::uint8* ErrorResponse::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ExtensionNumberResponse) - // repeated int32 extension_number = 1; - if (this->extension_number_size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( - 1, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - target); - target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( - _extension_number_cached_byte_size_, target); + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ErrorResponse) + // optional int32 error_code = 1; + if (this->error_code() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->error_code(), target); } - for (int i = 0; i < this->extension_number_size(); i++) { + + // optional string error_message = 2; + if (this->error_message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->error_message().data(), this->error_message().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ErrorResponse.error_message"); target = - ::google::protobuf::internal::WireFormatLite::WriteInt32NoTagToArray( - this->extension_number(i), target); + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->error_message(), target); } - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ErrorResponse) return target; } -int ExtensionNumberResponse::ByteSize() const { +int ErrorResponse::ByteSize() const { int total_size = 0; - // repeated int32 extension_number = 1; - { - int data_size = 0; - for (int i = 0; i < this->extension_number_size(); i++) { - data_size += ::google::protobuf::internal::WireFormatLite::Int32Size( - this->extension_number(i)); - } - if (data_size > 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( - data_size); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _extension_number_cached_byte_size_ = data_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - total_size += data_size; + // optional int32 error_code = 1; + if (this->error_code() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->error_code()); + } + + // optional string error_message = 2; + if (this->error_message().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->error_message()); } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); @@ -2350,12 +3211,11 @@ int ExtensionNumberResponse::ByteSize() const { return total_size; } -void ExtensionNumberResponse::MergeFrom( - const ::google::protobuf::Message& from) { +void ErrorResponse::MergeFrom(const ::google::protobuf::Message& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const ExtensionNumberResponse* source = - ::google::protobuf::internal::DynamicCastToGenerated< - const ExtensionNumberResponse>(&from); + const ErrorResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { @@ -2363,78 +3223,111 @@ void ExtensionNumberResponse::MergeFrom( } } -void ExtensionNumberResponse::MergeFrom(const ExtensionNumberResponse& from) { +void ErrorResponse::MergeFrom(const ErrorResponse& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - extension_number_.MergeFrom(from.extension_number_); + if (from.error_code() != 0) { + set_error_code(from.error_code()); + } + if (from.error_message().size() > 0) { + + error_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_message_); + } } -void ExtensionNumberResponse::CopyFrom( - const ::google::protobuf::Message& from) { +void ErrorResponse::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } -void ExtensionNumberResponse::CopyFrom(const ExtensionNumberResponse& from) { +void ErrorResponse::CopyFrom(const ErrorResponse& from) { if (&from == this) return; Clear(); MergeFrom(from); } -bool ExtensionNumberResponse::IsInitialized() const { return true; } +bool ErrorResponse::IsInitialized() const { -void ExtensionNumberResponse::Swap(ExtensionNumberResponse* other) { + return true; +} + +void ErrorResponse::Swap(ErrorResponse* other) { if (other == this) return; InternalSwap(other); } -void ExtensionNumberResponse::InternalSwap(ExtensionNumberResponse* other) { - extension_number_.UnsafeArenaSwap(&other->extension_number_); +void ErrorResponse::InternalSwap(ErrorResponse* other) { + std::swap(error_code_, other->error_code_); + error_message_.Swap(&other->error_message_); _internal_metadata_.Swap(&other->_internal_metadata_); std::swap(_cached_size_, other->_cached_size_); } -::google::protobuf::Metadata ExtensionNumberResponse::GetMetadata() const { +::google::protobuf::Metadata ErrorResponse::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; - metadata.descriptor = ExtensionNumberResponse_descriptor_; - metadata.reflection = ExtensionNumberResponse_reflection_; + metadata.descriptor = ErrorResponse_descriptor_; + metadata.reflection = ErrorResponse_reflection_; return metadata; } #if PROTOBUF_INLINE_NOT_IN_HEADERS -// ExtensionNumberResponse +// ErrorResponse -// repeated int32 extension_number = 1; -int ExtensionNumberResponse::extension_number_size() const { - return extension_number_.size(); +// optional int32 error_code = 1; +void ErrorResponse::clear_error_code() { + error_code_ = 0; } -void ExtensionNumberResponse::clear_extension_number() { - extension_number_.Clear(); + ::google::protobuf::int32 ErrorResponse::error_code() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_code) + return error_code_; } -::google::protobuf::int32 ExtensionNumberResponse::extension_number( - int index) const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) - return extension_number_.Get(index); + void ErrorResponse::set_error_code(::google::protobuf::int32 value) { + + error_code_ = value; + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_code) } -void ExtensionNumberResponse::set_extension_number( - int index, ::google::protobuf::int32 value) { - extension_number_.Set(index, value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + +// optional string error_message = 2; +void ErrorResponse::clear_error_message() { + error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void ExtensionNumberResponse::add_extension_number( - ::google::protobuf::int32 value) { - extension_number_.Add(value); - // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + const ::std::string& ErrorResponse::error_message() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_message) + return error_message_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -const ::google::protobuf::RepeatedField< ::google::protobuf::int32>& -ExtensionNumberResponse::extension_number() const { - // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) - return extension_number_; + void ErrorResponse::set_error_message(const ::std::string& value) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_message) } -::google::protobuf::RepeatedField< ::google::protobuf::int32>* -ExtensionNumberResponse::mutable_extension_number() { - // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) - return &extension_number_; + void ErrorResponse::set_error_message(const char* value) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ErrorResponse.error_message) +} + void ErrorResponse::set_error_message(const char* value, size_t size) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ErrorResponse.error_message) +} + ::std::string* ErrorResponse::mutable_error_message() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ErrorResponse.error_message) + return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* ErrorResponse::release_error_message() { + + return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ErrorResponse::set_allocated_error_message(::std::string* error_message) { + if (error_message != NULL) { + + } else { + + } + error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message) } #endif // PROTOBUF_INLINE_NOT_IN_HEADERS diff --git a/src/proto/grpc/reflection/v1alpha/reflection.proto b/src/proto/grpc/reflection/v1alpha/reflection.proto index 4b13bd1e51..6e6a0b0864 100644 --- a/src/proto/grpc/reflection/v1alpha/reflection.proto +++ b/src/proto/grpc/reflection/v1alpha/reflection.proto @@ -34,85 +34,98 @@ syntax = "proto3"; package grpc.reflection.v1alpha; service ServerReflection { - // List the full names of registered services. - rpc ListService(EmptyRequest) returns (ListServiceResponse) { - } - - // Find a proto file by file name. - rpc GetFileByName(FileNameRequest) returns (FileDescriptorProtoResponse) { - } - - // Find the proto file that declares the given fully-qualified symbol name. - rpc GetFileContainingSymbol(SymbolRequest) - returns (FileDescriptorProtoResponse) { - } - - // Find the proto file which defines an extension extending the given message - // type with the given field number. - rpc GetFileContainingExtension(ExtensionRequest) - returns (FileDescriptorProtoResponse) { - } - - // Finds the tag numbers used by all known extensions of extendee_type, and - // appends them to ExtensionNumberResponse in an undefined order. - // This method is best-effort: it's not guaranteed that the reflection service - // will implement this method, and it's not guaranteed that this method will - // provide all extensions. Returns StatusCode::UNIMPLEMENTED if it's not - // implemented. - rpc GetAllExtensionNumbers(TypeRequest) returns (ExtensionNumberResponse) { - } -} - -// An empty message sent by the client when calling ListService method. -message EmptyRequest { -} - -// The filename sent by the client when calling GetFileByName method. -message FileNameRequest { - // Name of the proto file. - string filename = 1; + // The reflection service is structured as a bidirectional stream, ensuring + // all related requests go to a single server. + rpc DescriptorDatabaseInfo(stream DescriptorDatabaseRequest) + returns (stream DescriptorDatabaseResponse); } -// The symbol name sent by the client when calling GetFileContainingSymbol -// method. -message SymbolRequest { - // Fully-qualified symbol name (e.g. .[.] or - // .). - string symbol = 1; +// The message sent by the client when calling DescriptorDatabaseInfo method. +message DescriptorDatabaseRequest { + string host = 1; + // To use reflection service, the client should set one of the following + // fields in message_request. The server distinguishes requests by their + // defined field and then handles them using corresponding methods. + oneof message_request { + // Find a proto file by the file name. + string file_by_filename = 3; + + // Find the proto file that declares the given fully-qualified symbol name. + // This field should be a fully-qualified symbol name + // (e.g. .[.] or .). + string file_containing_symbol = 4; + + // Find the proto file which defines an extension extending the given + // message type with the given field number. + ExtensionRequest file_containing_extension = 5; + + // Finds the tag numbers used by all known extensions of extendee_type, and + // appends them to ExtensionNumberResponse in an undefined order. + // Its corresponding method is best-effort: it's not guaranteed that the + // reflection service will implement this method, and it's not guaranteed + // that this method will provide all extensions. Returns + // StatusCode::UNIMPLEMENTED if it's not implemented. + // This field should be a fully-qualified type name. The format is + // . + string all_extension_numbers_of_type = 6; + + // List the full names of registered services. The content will not be + // checked. + string list_services = 7; + } } -// The type name and extension number sent by the client when calling -// GetFileContainingExtension method. +// The type name and extension number sent by the client when requesting +// file_containing_extension. message ExtensionRequest { // Fully-qualified type name. The format should be . string containing_type = 1; int32 extension_number = 2; } -// The type name sent by the client when calling GetAllExtensionNumbers method. -message TypeRequest { - // Fully-qualified type name. The format should be . - string type = 1; +// The message sent by the server to answer DescriptorDatabaseInfo method. +message DescriptorDatabaseResponse { + string valid_host = 1; + DescriptorDatabaseRequest original_request = 2; + // The server set one of the following fields accroding to the message_request + // in the request. + oneof message_response { + // A serialized FileDescriptorProto message. We avoid taking a dependency on + // descriptor.proto, which uses proto2 only features, by making them opaque + // bytes instead. This message is used to answer file_by_filename, + // file_containing_symbol, file_containing_extension requests. + bytes file_descriptor_proto = 4; + + // This message is used to answer all_extension_numbers_of_type requst. + ExtensionNumberResponse all_extension_numbers_response = 5; + + // This message is used to answer list_services request. + ListServiceResponse list_services_response = 6; + + // This message is used when an error occurs. + ErrorResponse error_response = 7; + } +} + +// A list of extension numbers sent by the server answering +// all_extension_numbers_of_type request. +message ExtensionNumberResponse { + // Full name of the base type, including the package name. The format + // is . + string base_type_name = 1; + repeated int32 extension_number = 2; } -// A list of service names sent by the server answering ListService method. +// A list of service names sent by the server answering list_services request. message ListServiceResponse { // Full names of registered services, including package names. The format // is . - repeated string services = 1; -} - -// A serialized FileDescriptorProto sent by the server answering -// GetFileByName, GetFileContainingSymbol, GetFileContainingExtension methods. -message FileDescriptorProtoResponse { - // Serialized FileDescriptorProto message. Some languages have limited support - // for working with descriptors. The can only obtain an opaque binary blob - // that contains serialized FileDescriptorProto message. - bytes file_descriptor_proto = 1; + repeated string service = 1; } -// A list of extension numbers sent by the server answering -// GetAllExtensionNumbers method. -message ExtensionNumberResponse { - repeated int32 extension_number = 1; +// The error code and error message sent by the server when an error occurs. +message ErrorResponse { + // This field uses the error codes defined in grpc::StatusCode. + int32 error_code = 1; + string error_message = 2; } diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc index c2ed93c12b..4ed069ffc2 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.cc +++ b/test/cpp/util/proto_reflection_descriptor_database.cc @@ -37,15 +37,21 @@ #include +using grpc::reflection::v1alpha::ServerReflection; +using grpc::reflection::v1alpha::DescriptorDatabaseRequest; +using grpc::reflection::v1alpha::DescriptorDatabaseResponse; +using grpc::reflection::v1alpha::ListServiceResponse; +using grpc::reflection::v1alpha::ErrorResponse; + namespace grpc { ProtoReflectionDescriptorDatabase::ProtoReflectionDescriptorDatabase( - std::unique_ptr stub) + std::unique_ptr stub) : stub_(std::move(stub)) {} ProtoReflectionDescriptorDatabase::ProtoReflectionDescriptorDatabase( std::shared_ptr channel) - : stub_(reflection::v1alpha::ServerReflection::NewStub(channel)) {} + : stub_(ServerReflection::NewStub(channel)) {} ProtoReflectionDescriptorDatabase::~ProtoReflectionDescriptorDatabase() {} @@ -59,28 +65,40 @@ bool ProtoReflectionDescriptorDatabase::FindFileByName( return false; } - ClientContext ctx; - reflection::v1alpha::FileNameRequest request; - request.set_filename(filename); - reflection::v1alpha::FileDescriptorProtoResponse response; + DescriptorDatabaseRequest request; + request.set_file_by_filename(filename); + DescriptorDatabaseResponse response; + + GetStream()->Write(request); + GetStream()->Read(&response); - Status status = stub_->GetFileByName(&ctx, request, &response); - if (status.ok()) { - // const google::protobuf::FileDescriptorProto* file_proto = - // response.mutable_file_descriptor_proto(); + if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto) { const google::protobuf::FileDescriptorProto file_proto = - ParseFileDescriptorProtoResponse(&response); + ParseFileDescriptorProtoResponse(response.file_descriptor_proto()); known_files_.insert(file_proto.name()); cached_db_.Add(file_proto); - } else if (status.error_code() == StatusCode::NOT_FOUND) { - gpr_log(GPR_INFO, "NOT_FOUND from server for FindFileByName(%s)", - filename.c_str()); + } else if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + const ErrorResponse error = response.error_response(); + if (error.error_code() == StatusCode::NOT_FOUND) { + gpr_log(GPR_INFO, "NOT_FOUND from server for FindFileByName(%s)", + filename.c_str()); + } else { + gpr_log(GPR_INFO, + "Error on FindFileByName(%s)\n\tError code: %d\n" + "\tError Message: %s", + filename.c_str(), error.error_code(), + error.error_message().c_str()); + } } else { - gpr_log(GPR_INFO, - "Error on FindFileByName(%s)\n\tError code: %d\n" - "\tError Message: %s", - filename.c_str(), status.error_code(), - status.error_message().c_str()); + gpr_log( + GPR_INFO, + "Error on FindFileByName(%s) response type\n" + "\tExpecting: %d\n\tReceived: %d", + filename.c_str(), + DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto, + response.message_response_case()); } return cached_db_.FindFileByName(filename, output); @@ -96,31 +114,46 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingSymbol( return false; } - ClientContext ctx; - reflection::v1alpha::SymbolRequest request; - request.set_symbol(symbol_name); - reflection::v1alpha::FileDescriptorProtoResponse response; + DescriptorDatabaseRequest request; + request.set_file_containing_symbol(symbol_name); + DescriptorDatabaseResponse response; + + GetStream()->Write(request); + GetStream()->Read(&response); - Status status = stub_->GetFileContainingSymbol(&ctx, request, &response); - if (status.ok()) { + // Status status = stub_->GetFileContainingSymbol(&ctx, request, &response); + if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto) { const google::protobuf::FileDescriptorProto file_proto = - ParseFileDescriptorProtoResponse(&response); + ParseFileDescriptorProtoResponse(response.file_descriptor_proto()); if (known_files_.find(file_proto.name()) == known_files_.end()) { known_files_.insert(file_proto.name()); cached_db_.Add(file_proto); } - } else if (status.error_code() == StatusCode::NOT_FOUND) { - missing_symbols_.insert(symbol_name); - gpr_log(GPR_INFO, "NOT_FOUND from server for FindFileContainingSymbol(%s)", - symbol_name.c_str()); + } else if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + const ErrorResponse error = response.error_response(); + if (error.error_code() == StatusCode::NOT_FOUND) { + missing_symbols_.insert(symbol_name); + gpr_log(GPR_INFO, + "NOT_FOUND from server for FindFileContainingSymbol(%s)", + symbol_name.c_str()); + } else { + gpr_log(GPR_INFO, + "Error on FindFileContainingSymbol(%s)\n" + "\tError code: %d\n\tError Message: %s", + symbol_name.c_str(), error.error_code(), + error.error_message().c_str()); + } } else { - gpr_log(GPR_INFO, - "Error on FindFileContainingSymbol(%s)\n" - "\tError code: %d\n\tError Message: %s", - symbol_name.c_str(), status.error_code(), - status.error_message().c_str()); + gpr_log( + GPR_INFO, + "Error on FindFileContainingSymbol(%s) response type\n" + "\tExpecting: %d\n\tReceived: %d", + symbol_name.c_str(), + DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto, + response.message_response_case()); } - return cached_db_.FindFileContainingSymbol(symbol_name, output); } @@ -139,35 +172,53 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingExtension( return false; } - ClientContext ctx; - reflection::v1alpha::ExtensionRequest request; - request.set_containing_type(containing_type); - request.set_extension_number(field_number); - reflection::v1alpha::FileDescriptorProtoResponse response; + DescriptorDatabaseRequest request; + request.mutable_file_containing_extension()->set_containing_type( + containing_type); + request.mutable_file_containing_extension()->set_extension_number( + field_number); + DescriptorDatabaseResponse response; - Status status = stub_->GetFileContainingExtension(&ctx, request, &response); - if (status.ok()) { + GetStream()->Write(request); + GetStream()->Read(&response); + + // Status status = stub_->GetFileContainingExtension(&ctx, request, + // &response); + if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto) { const google::protobuf::FileDescriptorProto file_proto = - ParseFileDescriptorProtoResponse(&response); + ParseFileDescriptorProtoResponse(response.file_descriptor_proto()); if (known_files_.find(file_proto.name()) == known_files_.end()) { known_files_.insert(file_proto.name()); cached_db_.Add(file_proto); } - } else if (status.error_code() == StatusCode::NOT_FOUND) { - if (missing_extensions_.find(containing_type) == - missing_extensions_.end()) { - missing_extensions_[containing_type] = {}; + } else if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + const ErrorResponse error = response.error_response(); + if (error.error_code() == StatusCode::NOT_FOUND) { + if (missing_extensions_.find(containing_type) == + missing_extensions_.end()) { + missing_extensions_[containing_type] = {}; + } + missing_extensions_[containing_type].insert(field_number); + gpr_log(GPR_INFO, + "NOT_FOUND from server for FindFileContainingExtension(%s, %d)", + containing_type.c_str(), field_number); + } else { + gpr_log(GPR_INFO, + "Error on FindFileContainingExtension(%s, %d)\n" + "\tError code: %d\n\tError Message: %s", + containing_type.c_str(), field_number, error.error_code(), + error.error_message().c_str()); } - missing_extensions_[containing_type].insert(field_number); - gpr_log(GPR_INFO, - "NOT_FOUND from server for FindFileContainingExtension(%s, %d)", - containing_type.c_str(), field_number); } else { - gpr_log(GPR_INFO, - "Error on FindFileContainingExtension(%s, %d)\n" - "\tError code: %d\n\tError Message: %s", - containing_type.c_str(), field_number, status.error_code(), - status.error_message().c_str()); + gpr_log( + GPR_INFO, + "Error on FindFileContainingExtension(%s, %d) response type\n" + "\tExpecting: %d\n\tReceived: %d", + containing_type.c_str(), field_number, + DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto, + response.message_response_case()); } return cached_db_.FindFileContainingExtension(containing_type, field_number, @@ -182,57 +233,86 @@ bool ProtoReflectionDescriptorDatabase::FindAllExtensionNumbers( return true; } - ClientContext ctx; - reflection::v1alpha::TypeRequest request; - request.set_type(extendee_type); - reflection::v1alpha::ExtensionNumberResponse response; + DescriptorDatabaseRequest request; + request.set_all_extension_numbers_of_type(extendee_type); + DescriptorDatabaseResponse response; + + GetStream()->Write(request); + GetStream()->Read(&response); - Status status = stub_->GetAllExtensionNumbers(&ctx, request, &response); - if (status.ok()) { - auto number = response.extension_number(); + // Status status = stub_->GetAllExtensionNumbers(&ctx, request, &response); + if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase:: + kAllExtensionNumbersResponse) { + auto number = response.all_extension_numbers_response().extension_number(); *output = std::vector(number.begin(), number.end()); cached_extension_numbers_[extendee_type] = *output; return true; - } else if (status.error_code() == StatusCode::NOT_FOUND) { - gpr_log(GPR_INFO, "NOT_FOUND from server for FindAllExtensionNumbers(%s)", - extendee_type.c_str()); - } else { - gpr_log(GPR_INFO, - "Error on FindAllExtensionNumbersExtension(%s)\n" - "\tError code: %d\n\tError Message: %s", - extendee_type.c_str(), status.error_code(), - status.error_message().c_str()); + } else if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + const ErrorResponse error = response.error_response(); + if (error.error_code() == StatusCode::NOT_FOUND) { + gpr_log(GPR_INFO, "NOT_FOUND from server for FindAllExtensionNumbers(%s)", + extendee_type.c_str()); + } else { + gpr_log(GPR_INFO, + "Error on FindAllExtensionNumbersExtension(%s)\n" + "\tError code: %d\n\tError Message: %s", + extendee_type.c_str(), error.error_code(), + error.error_message().c_str()); + } } return false; } bool ProtoReflectionDescriptorDatabase::GetServices( std::vector* output) { - ClientContext ctx; - reflection::v1alpha::EmptyRequest request; - reflection::v1alpha::ListServiceResponse response; - - Status status = stub_->ListService(&ctx, request, &response); - if (status.ok()) { - for (int i = 0; i < response.services_size(); ++i) { - (*output).push_back(response.services(i)); + DescriptorDatabaseRequest request; + request.set_list_services(""); + DescriptorDatabaseResponse response; + GetStream()->Write(request); + GetStream()->Read(&response); + + // Status status = stub_->ListService(&ctx, request, &response); + if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kListServicesResponse) { + const ListServiceResponse ls_response = response.list_services_response(); + for (int i = 0; i < ls_response.service_size(); ++i) { + (*output).push_back(ls_response.service(i)); } return true; - } else { + } else if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + const ErrorResponse error = response.error_response(); gpr_log(GPR_INFO, "Error on GetServices()\n\tError code: %d\n" "\tError Message: %s", - status.error_code(), status.error_message().c_str()); + error.error_code(), error.error_message().c_str()); + } else { + gpr_log( + GPR_INFO, + "Error on GetServices() response type\n\tExpecting: %d\n\tReceived: %d", + DescriptorDatabaseResponse::MessageResponseCase::kListServicesResponse, + response.message_response_case()); } return false; } const google::protobuf::FileDescriptorProto ProtoReflectionDescriptorDatabase::ParseFileDescriptorProtoResponse( - reflection::v1alpha::FileDescriptorProtoResponse* response) { + const std::string& byte_fd_proto) { google::protobuf::FileDescriptorProto file_desc_proto; - file_desc_proto.ParseFromString(response->file_descriptor_proto()); + file_desc_proto.ParseFromString(byte_fd_proto); return file_desc_proto; } +const std::shared_ptr +ProtoReflectionDescriptorDatabase::GetStream() { + if (stream_ == nullptr) { + stream_ = stub_->DescriptorDatabaseInfo(&ctx_); + // stream_.reset(std::move(stub_->DescriptorDatabaseInfo(&ctx_))); + } + return stream_; +} + } // namespace grpc diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index bf94654c3d..f37135e681 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -80,9 +80,18 @@ class ProtoReflectionDescriptorDatabase } private: + typedef ClientReaderWriter< + grpc::reflection::v1alpha::DescriptorDatabaseRequest, + grpc::reflection::v1alpha::DescriptorDatabaseResponse> + ClientStream; + const google::protobuf::FileDescriptorProto ParseFileDescriptorProtoResponse( - reflection::v1alpha::FileDescriptorProtoResponse* response); + const std::string& byte_fd_proto); + + const std::shared_ptr GetStream(); + std::shared_ptr stream_; + grpc::ClientContext ctx_; std::unique_ptr stub_; std::unordered_set known_files_; std::unordered_set missing_symbols_; diff --git a/test/cpp/util/reflection_debug/reflection_client.cc b/test/cpp/util/reflection_debug/reflection_client.cc index fb40627514..a1e97f7ede 100644 --- a/test/cpp/util/reflection_debug/reflection_client.cc +++ b/test/cpp/util/reflection_debug/reflection_client.cc @@ -48,8 +48,8 @@ using grpc::ClientContext; using grpc::Status; using grpc::ProtoReflectionDescriptorDatabase; using grpc::reflection::v1alpha::ServerReflection; -using grpc::reflection::v1alpha::EmptyRequest; -using grpc::reflection::v1alpha::ListServiceResponse; +// using grpc::reflection::v1alpha::EmptyRequest; +// using grpc::reflection::v1alpha::ListServiceResponse; using google::protobuf::FileDescriptorProto; using google::protobuf::DescriptorPool; using google::protobuf::ServiceDescriptor; @@ -65,28 +65,22 @@ class ReflectionClient { desc_pool_(new DescriptorPool(db_.get())) {} void PrintInfo() { - EmptyRequest request; - ListServiceResponse response; - ClientContext context; - Status status = db_->stub()->ListService(&context, request, &response); - if (status.ok()) { + std::vector services; + bool found_services = db_->GetServices(&services); + if (found_services) { std::string padding = ""; - std::cout << "Service amount:" << response.services_size() << std::endl; - for (int i = 0; i < response.services_size(); ++i) { - if (i != response.services_size() - 1) { + std::cout << "Service amount:" << services.size() << std::endl; + for (auto it = services.begin(); it != services.end(); ++it) { + if (it != services.end() - 1) { std::cout << padding << "│ " << std::endl; - std::cout << padding << "├─" << response.services(i) << std::endl; - PrintService(desc_pool_->FindServiceByName(response.services(i)), - padding + "│ "); + std::cout << padding << "├─" << *it << std::endl; + PrintService(desc_pool_->FindServiceByName(*it), padding + "│ "); } else { std::cout << padding << "│ " << std::endl; - std::cout << padding << "└─" << response.services(i) << std::endl; - PrintService(desc_pool_->FindServiceByName(response.services(i)), - padding + " "); + std::cout << padding << "└─" << *it << std::endl; + PrintService(desc_pool_->FindServiceByName(*it), padding + " "); } } - } else { - std::cout << status.error_message(); } } @@ -157,6 +151,15 @@ class ReflectionClient { } void Test() { + { + std::vector services; + bool found = db_->GetServices(&services); + if (found) { + for (auto it : services) { + std::cout << it << std::endl; + } + } + } { FileDescriptorProto output; bool found = db_->FindFileByName("helloworld.proto", &output); @@ -176,9 +179,9 @@ class ReflectionClient { "helloworld.Greeter.HelloRequest", 1, &output); if (found) std::cout << output.name() << std::endl; } - DescriptorPool pool(db_.get()); - std::cout << pool.FindServiceByName("helloworld.Greeter")->name() - << std::endl; + // DescriptorPool pool(db_.get()); + // std::cout << pool.FindServiceByName("helloworld.Greeter")->name() + // << std::endl; } private: diff --git a/tools/codegen/extensions/gen_reflection_proto.sh b/tools/codegen/extensions/gen_reflection_proto.sh index f0bb6e5ccc..26f9e4711a 100755 --- a/tools/codegen/extensions/gen_reflection_proto.sh +++ b/tools/codegen/extensions/gen_reflection_proto.sh @@ -1,4 +1,34 @@ #!/bin/bash + +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + PROTO_DIR="src/proto/grpc/reflection/v1alpha" PROTO_FILE="reflection" HEADER_DIR="extensions/include/grpc++/impl" @@ -22,9 +52,19 @@ $PROTOC -I$PROTO_DIR --cpp_out=$TMP_DIR ${PROTO_DIR}/${PROTO_FILE}.proto $PROTOC -I$PROTO_DIR --grpc_out=$TMP_DIR --plugin=protoc-gen-grpc=${GRPC_PLUGIN} ${PROTO_DIR}/${PROTO_FILE}.proto sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.pb.cc +sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.h sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.cc sed -i "s/\"${PROTO_FILE}.grpc.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.grpc.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.cc -sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.h + +/bin/cp LICENSE ${TMP_DIR}/TMP_LICENSE +sed -i -e "s/./ &/" -e "s/.*/ \*&/" ${TMP_DIR}/TMP_LICENSE +sed -i -r "\$a\ *\n *\/\n\n" ${TMP_DIR}/TMP_LICENSE + +sed -i -e "1s/^/ *\n/" -e "1s/^/\/*\n/" ${TMP_DIR}/*.pb.h +sed -i -e "1s/^/ *\n/" -e "1s/^/\/*\n/" ${TMP_DIR}/*.pb.cc + +sed -i "2r ${TMP_DIR}/TMP_LICENSE" ${TMP_DIR}/*.pb.h +sed -i "2r ${TMP_DIR}/TMP_LICENSE" ${TMP_DIR}/*.pb.cc /bin/mv ${TMP_DIR}/${PROTO_FILE}.pb.h ${HEADER_DIR} /bin/mv ${TMP_DIR}/${PROTO_FILE}.grpc.pb.h ${HEADER_DIR} -- cgit v1.2.3 From ace4986e653e51e1e7dcab0beabdfa460e0a61c8 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 19 May 2016 15:10:22 -0700 Subject: Update reflection implementation along with API changes --- .../grpc++/impl/proto_server_reflection_plugin.h | 17 +++- extensions/reflection/proto_server_reflection.cc | 9 +- extensions/reflection/proto_server_reflection.h | 2 +- .../reflection/proto_server_reflection_plugin.cc | 12 +-- .../util/proto_reflection_descriptor_database.cc | 106 ++++++++++++--------- .../util/proto_reflection_descriptor_database.h | 9 +- 6 files changed, 89 insertions(+), 66 deletions(-) (limited to 'test/cpp') diff --git a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h index adc6eb7bc3..e09c413251 100644 --- a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h +++ b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h @@ -61,13 +61,22 @@ class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { std::shared_ptr<::grpc::ProtoServerReflection> reflection_service; }; -std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { - return std::unique_ptr<::grpc::ServerBuilderPlugin>( - new ProtoServerReflectionPlugin()); -} +// std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { +// return std::unique_ptr<::grpc::ServerBuilderPlugin>( +// new ProtoServerReflectionPlugin()); +// } + +std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection(); void grpc_AddServerBuilderPlugin_reflection(); +// Force AddServerBuilderPlugin() to be called at static initialization time. +struct StaticPluginInitializer_reflection { + StaticPluginInitializer_reflection() { + grpc_AddServerBuilderPlugin_reflection(); + } +} static_plugin_initializer_reflection_; + } // namespace reflection } // namespace grpc diff --git a/extensions/reflection/proto_server_reflection.cc b/extensions/reflection/proto_server_reflection.cc index ec82d5f18e..28292a42d6 100644 --- a/extensions/reflection/proto_server_reflection.cc +++ b/extensions/reflection/proto_server_reflection.cc @@ -105,6 +105,9 @@ Status ProtoServerReflection::ServerReflectionInfo( status = Status(StatusCode::UNIMPLEMENTED, ""); } + if (!status.ok()) { + FillErrorResponse(status, response.mutable_error_response()); + } response.set_valid_host(request.host()); response.set_allocated_original_request( new ServerReflectionRequest(request)); @@ -114,10 +117,10 @@ Status ProtoServerReflection::ServerReflectionInfo( return Status::OK; } -void ProtoServerReflection::FillErrorResponse(Status* status, +void ProtoServerReflection::FillErrorResponse(const Status& status, ErrorResponse* error_response) { - error_response->set_error_code(status->error_code()); - error_response->set_error_message(status->error_message()); + error_response->set_error_code(status.error_code()); + error_response->set_error_message(status.error_message()); } Status ProtoServerReflection::ListService(ServerContext* context, diff --git a/extensions/reflection/proto_server_reflection.h b/extensions/reflection/proto_server_reflection.h index f86d6f1bf4..53deef906c 100644 --- a/extensions/reflection/proto_server_reflection.h +++ b/extensions/reflection/proto_server_reflection.h @@ -85,7 +85,7 @@ class ProtoServerReflection GRPC_FINAL const google::protobuf::FileDescriptor* file_desc, reflection::v1alpha::ServerReflectionResponse* response); - void FillErrorResponse(Status* status, + void FillErrorResponse(const Status& status, reflection::v1alpha::ErrorResponse* error_response); const google::protobuf::DescriptorPool* descriptor_pool_; diff --git a/extensions/reflection/proto_server_reflection_plugin.cc b/extensions/reflection/proto_server_reflection_plugin.cc index 6adfa45047..d038a7fff5 100644 --- a/extensions/reflection/proto_server_reflection_plugin.cc +++ b/extensions/reflection/proto_server_reflection_plugin.cc @@ -71,6 +71,11 @@ bool ProtoServerReflectionPlugin::has_async_methods() const { return false; } +std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { + return std::unique_ptr<::grpc::ServerBuilderPlugin>( + new ProtoServerReflectionPlugin()); +} + void grpc_AddServerBuilderPlugin_reflection() { static bool already_here = false; if (already_here) return; @@ -78,12 +83,5 @@ void grpc_AddServerBuilderPlugin_reflection() { ::grpc::ServerBuilder::InternalAddPluginFactory(&CreateProtoReflection); } -// Force AddServerBuilderPlugin() to be called at static initialization time. -struct StaticPluginInitializer_reflection { - StaticPluginInitializer_reflection() { - grpc_AddServerBuilderPlugin_reflection(); - } -} static_plugin_initializer_reflection_; - } // namespace reflection } // namespace grpc diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc index 4ed069ffc2..3963b0c093 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.cc +++ b/test/cpp/util/proto_reflection_descriptor_database.cc @@ -38,8 +38,8 @@ #include using grpc::reflection::v1alpha::ServerReflection; -using grpc::reflection::v1alpha::DescriptorDatabaseRequest; -using grpc::reflection::v1alpha::DescriptorDatabaseResponse; +using grpc::reflection::v1alpha::ServerReflectionRequest; +using grpc::reflection::v1alpha::ServerReflectionResponse; using grpc::reflection::v1alpha::ListServiceResponse; using grpc::reflection::v1alpha::ErrorResponse; @@ -65,21 +65,22 @@ bool ProtoReflectionDescriptorDatabase::FindFileByName( return false; } - DescriptorDatabaseRequest request; + ServerReflectionRequest request; request.set_file_by_filename(filename); - DescriptorDatabaseResponse response; + ServerReflectionResponse response; GetStream()->Write(request); GetStream()->Read(&response); if (response.message_response_case() == - DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto) { - const google::protobuf::FileDescriptorProto file_proto = - ParseFileDescriptorProtoResponse(response.file_descriptor_proto()); - known_files_.insert(file_proto.name()); - cached_db_.Add(file_proto); + ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse) { + AddFileFromResponse(response.file_descriptor_response()); + // const google::protobuf::FileDescriptorProto file_proto = + // ParseFileDescriptorProtoResponse(response.file_descriptor_response()); + // known_files_.insert(file_proto.name()); + // cached_db_.Add(file_proto); } else if (response.message_response_case() == - DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + ServerReflectionResponse::MessageResponseCase::kErrorResponse) { const ErrorResponse error = response.error_response(); if (error.error_code() == StatusCode::NOT_FOUND) { gpr_log(GPR_INFO, "NOT_FOUND from server for FindFileByName(%s)", @@ -97,7 +98,7 @@ bool ProtoReflectionDescriptorDatabase::FindFileByName( "Error on FindFileByName(%s) response type\n" "\tExpecting: %d\n\tReceived: %d", filename.c_str(), - DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto, + ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse, response.message_response_case()); } @@ -114,24 +115,25 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingSymbol( return false; } - DescriptorDatabaseRequest request; + ServerReflectionRequest request; request.set_file_containing_symbol(symbol_name); - DescriptorDatabaseResponse response; + ServerReflectionResponse response; GetStream()->Write(request); GetStream()->Read(&response); // Status status = stub_->GetFileContainingSymbol(&ctx, request, &response); if (response.message_response_case() == - DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto) { - const google::protobuf::FileDescriptorProto file_proto = - ParseFileDescriptorProtoResponse(response.file_descriptor_proto()); - if (known_files_.find(file_proto.name()) == known_files_.end()) { - known_files_.insert(file_proto.name()); - cached_db_.Add(file_proto); - } + ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse) { + AddFileFromResponse(response.file_descriptor_response()); + // const google::protobuf::FileDescriptorProto file_proto = + // ParseFileDescriptorProtoResponse(response.file_descriptor_response()); + // if (known_files_.find(file_proto.name()) == known_files_.end()) { + // known_files_.insert(file_proto.name()); + // cached_db_.Add(file_proto); + // } } else if (response.message_response_case() == - DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + ServerReflectionResponse::MessageResponseCase::kErrorResponse) { const ErrorResponse error = response.error_response(); if (error.error_code() == StatusCode::NOT_FOUND) { missing_symbols_.insert(symbol_name); @@ -151,7 +153,7 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingSymbol( "Error on FindFileContainingSymbol(%s) response type\n" "\tExpecting: %d\n\tReceived: %d", symbol_name.c_str(), - DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto, + ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse, response.message_response_case()); } return cached_db_.FindFileContainingSymbol(symbol_name, output); @@ -172,12 +174,12 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingExtension( return false; } - DescriptorDatabaseRequest request; + ServerReflectionRequest request; request.mutable_file_containing_extension()->set_containing_type( containing_type); request.mutable_file_containing_extension()->set_extension_number( field_number); - DescriptorDatabaseResponse response; + ServerReflectionResponse response; GetStream()->Write(request); GetStream()->Read(&response); @@ -185,15 +187,16 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingExtension( // Status status = stub_->GetFileContainingExtension(&ctx, request, // &response); if (response.message_response_case() == - DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto) { - const google::protobuf::FileDescriptorProto file_proto = - ParseFileDescriptorProtoResponse(response.file_descriptor_proto()); - if (known_files_.find(file_proto.name()) == known_files_.end()) { - known_files_.insert(file_proto.name()); - cached_db_.Add(file_proto); - } + ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse) { + AddFileFromResponse(response.file_descriptor_response()); + // const google::protobuf::FileDescriptorProto file_proto = + // ParseFileDescriptorProtoResponse(response.file_descriptor_response()); + // if (known_files_.find(file_proto.name()) == known_files_.end()) { + // known_files_.insert(file_proto.name()); + // cached_db_.Add(file_proto); + // } } else if (response.message_response_case() == - DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + ServerReflectionResponse::MessageResponseCase::kErrorResponse) { const ErrorResponse error = response.error_response(); if (error.error_code() == StatusCode::NOT_FOUND) { if (missing_extensions_.find(containing_type) == @@ -217,7 +220,7 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingExtension( "Error on FindFileContainingExtension(%s, %d) response type\n" "\tExpecting: %d\n\tReceived: %d", containing_type.c_str(), field_number, - DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto, + ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse, response.message_response_case()); } @@ -233,23 +236,22 @@ bool ProtoReflectionDescriptorDatabase::FindAllExtensionNumbers( return true; } - DescriptorDatabaseRequest request; + ServerReflectionRequest request; request.set_all_extension_numbers_of_type(extendee_type); - DescriptorDatabaseResponse response; + ServerReflectionResponse response; GetStream()->Write(request); GetStream()->Read(&response); - // Status status = stub_->GetAllExtensionNumbers(&ctx, request, &response); if (response.message_response_case() == - DescriptorDatabaseResponse::MessageResponseCase:: + ServerReflectionResponse::MessageResponseCase:: kAllExtensionNumbersResponse) { auto number = response.all_extension_numbers_response().extension_number(); *output = std::vector(number.begin(), number.end()); cached_extension_numbers_[extendee_type] = *output; return true; } else if (response.message_response_case() == - DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + ServerReflectionResponse::MessageResponseCase::kErrorResponse) { const ErrorResponse error = response.error_response(); if (error.error_code() == StatusCode::NOT_FOUND) { gpr_log(GPR_INFO, "NOT_FOUND from server for FindAllExtensionNumbers(%s)", @@ -267,22 +269,21 @@ bool ProtoReflectionDescriptorDatabase::FindAllExtensionNumbers( bool ProtoReflectionDescriptorDatabase::GetServices( std::vector* output) { - DescriptorDatabaseRequest request; + ServerReflectionRequest request; request.set_list_services(""); - DescriptorDatabaseResponse response; + ServerReflectionResponse response; GetStream()->Write(request); GetStream()->Read(&response); - // Status status = stub_->ListService(&ctx, request, &response); if (response.message_response_case() == - DescriptorDatabaseResponse::MessageResponseCase::kListServicesResponse) { + ServerReflectionResponse::MessageResponseCase::kListServicesResponse) { const ListServiceResponse ls_response = response.list_services_response(); for (int i = 0; i < ls_response.service_size(); ++i) { - (*output).push_back(ls_response.service(i)); + (*output).push_back(ls_response.service(i).name()); } return true; } else if (response.message_response_case() == - DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + ServerReflectionResponse::MessageResponseCase::kErrorResponse) { const ErrorResponse error = response.error_response(); gpr_log(GPR_INFO, "Error on GetServices()\n\tError code: %d\n" @@ -292,7 +293,7 @@ bool ProtoReflectionDescriptorDatabase::GetServices( gpr_log( GPR_INFO, "Error on GetServices() response type\n\tExpecting: %d\n\tReceived: %d", - DescriptorDatabaseResponse::MessageResponseCase::kListServicesResponse, + ServerReflectionResponse::MessageResponseCase::kListServicesResponse, response.message_response_case()); } return false; @@ -306,11 +307,22 @@ ProtoReflectionDescriptorDatabase::ParseFileDescriptorProtoResponse( return file_desc_proto; } +void ProtoReflectionDescriptorDatabase::AddFileFromResponse( + const grpc::reflection::v1alpha::FileDescriptorResponse& response) { + for (int i = 0; i < response.file_descriptor_proto_size(); ++i) { + const google::protobuf::FileDescriptorProto file_proto = + ParseFileDescriptorProtoResponse(response.file_descriptor_proto(i)); + if (known_files_.find(file_proto.name()) == known_files_.end()) { + known_files_.insert(file_proto.name()); + cached_db_.Add(file_proto); + } + } +} + const std::shared_ptr ProtoReflectionDescriptorDatabase::GetStream() { if (stream_ == nullptr) { - stream_ = stub_->DescriptorDatabaseInfo(&ctx_); - // stream_.reset(std::move(stub_->DescriptorDatabaseInfo(&ctx_))); + stream_ = stub_->ServerReflectionInfo(&ctx_); } return stream_; } diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index f37135e681..4bb9c21a92 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -42,8 +42,6 @@ #include #include -// #include "reflection.grpc.pb.h" - namespace grpc { class ProtoReflectionDescriptorDatabase @@ -81,13 +79,16 @@ class ProtoReflectionDescriptorDatabase private: typedef ClientReaderWriter< - grpc::reflection::v1alpha::DescriptorDatabaseRequest, - grpc::reflection::v1alpha::DescriptorDatabaseResponse> + grpc::reflection::v1alpha::ServerReflectionRequest, + grpc::reflection::v1alpha::ServerReflectionResponse> ClientStream; const google::protobuf::FileDescriptorProto ParseFileDescriptorProtoResponse( const std::string& byte_fd_proto); + void AddFileFromResponse( + const grpc::reflection::v1alpha::FileDescriptorResponse& response); + const std::shared_ptr GetStream(); std::shared_ptr stream_; -- cgit v1.2.3 From 91c51a7abaa43317df37e5b159491024678cf47d Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 20 May 2016 14:46:49 -0700 Subject: Add proto_server_reflection_test --- Makefile | 100 +++++----- build.yaml | 30 +-- .../grpc++/impl/proto_server_reflection_plugin.h | 7 +- test/cpp/end2end/proto_server_reflection_test.cc | 165 ++++++++++++++++ test/cpp/util/reflection_debug/Makefile | 50 ----- .../cpp/util/reflection_debug/reflection_client.cc | 219 --------------------- tools/run_tests/sources_and_headers.json | 43 ++-- tools/run_tests/tests.json | 26 +-- .../proto_server_reflection_test.vcxproj | 215 ++++++++++++++++++++ .../proto_server_reflection_test.vcxproj.filters | 32 +++ .../reflection_debug_test.vcxproj | 206 ------------------- .../reflection_debug_test.vcxproj.filters | 32 --- 12 files changed, 516 insertions(+), 609 deletions(-) create mode 100644 test/cpp/end2end/proto_server_reflection_test.cc delete mode 100644 test/cpp/util/reflection_debug/Makefile delete mode 100644 test/cpp/util/reflection_debug/reflection_client.cc create mode 100644 vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj create mode 100644 vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj.filters delete mode 100644 vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj.filters (limited to 'test/cpp') diff --git a/Makefile b/Makefile index 673fbf2f15..97377dba03 100644 --- a/Makefile +++ b/Makefile @@ -1034,6 +1034,7 @@ interop_test: $(BINDIR)/$(CONFIG)/interop_test json_run_localhost: $(BINDIR)/$(CONFIG)/json_run_localhost metrics_client: $(BINDIR)/$(CONFIG)/metrics_client mock_test: $(BINDIR)/$(CONFIG)/mock_test +proto_server_reflection_test: $(BINDIR)/$(CONFIG)/proto_server_reflection_test qps_interarrival_test: $(BINDIR)/$(CONFIG)/qps_interarrival_test qps_json_driver: $(BINDIR)/$(CONFIG)/qps_json_driver qps_openloop_test: $(BINDIR)/$(CONFIG)/qps_openloop_test @@ -1041,7 +1042,6 @@ qps_test: $(BINDIR)/$(CONFIG)/qps_test qps_worker: $(BINDIR)/$(CONFIG)/qps_worker reconnect_interop_client: $(BINDIR)/$(CONFIG)/reconnect_interop_client reconnect_interop_server: $(BINDIR)/$(CONFIG)/reconnect_interop_server -reflection_debug_test: $(BINDIR)/$(CONFIG)/reflection_debug_test secure_auth_context_test: $(BINDIR)/$(CONFIG)/secure_auth_context_test secure_sync_unary_ping_pong_test: $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test server_builder_plugin_test: $(BINDIR)/$(CONFIG)/server_builder_plugin_test @@ -1404,6 +1404,7 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/json_run_localhost \ $(BINDIR)/$(CONFIG)/metrics_client \ $(BINDIR)/$(CONFIG)/mock_test \ + $(BINDIR)/$(CONFIG)/proto_server_reflection_test \ $(BINDIR)/$(CONFIG)/qps_interarrival_test \ $(BINDIR)/$(CONFIG)/qps_json_driver \ $(BINDIR)/$(CONFIG)/qps_openloop_test \ @@ -1411,7 +1412,6 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/qps_worker \ $(BINDIR)/$(CONFIG)/reconnect_interop_client \ $(BINDIR)/$(CONFIG)/reconnect_interop_server \ - $(BINDIR)/$(CONFIG)/reflection_debug_test \ $(BINDIR)/$(CONFIG)/secure_auth_context_test \ $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test \ $(BINDIR)/$(CONFIG)/server_builder_plugin_test \ @@ -1740,12 +1740,12 @@ test_cxx: test_zookeeper buildtests_cxx $(Q) $(BINDIR)/$(CONFIG)/interop_test || ( echo test interop_test failed ; exit 1 ) $(E) "[RUN] Testing mock_test" $(Q) $(BINDIR)/$(CONFIG)/mock_test || ( echo test mock_test failed ; exit 1 ) + $(E) "[RUN] Testing proto_server_reflection_test" + $(Q) $(BINDIR)/$(CONFIG)/proto_server_reflection_test || ( echo test proto_server_reflection_test failed ; exit 1 ) $(E) "[RUN] Testing qps_openloop_test" $(Q) $(BINDIR)/$(CONFIG)/qps_openloop_test || ( echo test qps_openloop_test failed ; exit 1 ) $(E) "[RUN] Testing qps_test" $(Q) $(BINDIR)/$(CONFIG)/qps_test || ( echo test qps_test failed ; exit 1 ) - $(E) "[RUN] Testing reflection_debug_test" - $(Q) $(BINDIR)/$(CONFIG)/reflection_debug_test || ( echo test reflection_debug_test failed ; exit 1 ) $(E) "[RUN] Testing secure_auth_context_test" $(Q) $(BINDIR)/$(CONFIG)/secure_auth_context_test || ( echo test secure_auth_context_test failed ; exit 1 ) $(E) "[RUN] Testing secure_sync_unary_ping_pong_test" @@ -11193,6 +11193,52 @@ endif endif +PROTO_SERVER_REFLECTION_TEST_SRC = \ + test/cpp/end2end/proto_server_reflection_test.cc \ + test/cpp/util/proto_reflection_descriptor_database.cc \ + +PROTO_SERVER_REFLECTION_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(PROTO_SERVER_REFLECTION_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/proto_server_reflection_test: openssl_dep_error + +else + + + + +ifeq ($(NO_PROTOBUF),true) + +# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. + +$(BINDIR)/$(CONFIG)/proto_server_reflection_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/proto_server_reflection_test: $(PROTOBUF_DEP) $(PROTO_SERVER_REFLECTION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(PROTO_SERVER_REFLECTION_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/proto_server_reflection_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/test/cpp/end2end/proto_server_reflection_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +$(OBJDIR)/$(CONFIG)/test/cpp/util/proto_reflection_descriptor_database.o: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_proto_server_reflection_test: $(PROTO_SERVER_REFLECTION_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(PROTO_SERVER_REFLECTION_TEST_OBJS:.o=.dep) +endif +endif + + QPS_INTERARRIVAL_TEST_SRC = \ test/cpp/qps/qps_interarrival_test.cc \ @@ -11517,52 +11563,6 @@ endif $(OBJDIR)/$(CONFIG)/test/cpp/interop/reconnect_interop_server.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc -REFLECTION_DEBUG_TEST_SRC = \ - test/cpp/util/proto_reflection_descriptor_database.cc \ - test/cpp/util/reflection_debug/reflection_client.cc \ - -REFLECTION_DEBUG_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(REFLECTION_DEBUG_TEST_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/reflection_debug_test: openssl_dep_error - -else - - - - -ifeq ($(NO_PROTOBUF),true) - -# You can't build the protoc plugins or protobuf-enabled targets if you don't have protobuf 3.0.0+. - -$(BINDIR)/$(CONFIG)/reflection_debug_test: protobuf_dep_error - -else - -$(BINDIR)/$(CONFIG)/reflection_debug_test: $(PROTOBUF_DEP) $(REFLECTION_DEBUG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a - $(E) "[LD] Linking $@" - $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(REFLECTION_DEBUG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/reflection_debug_test - -endif - -endif - -$(OBJDIR)/$(CONFIG)/test/cpp/util/proto_reflection_descriptor_database.o: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a - -$(OBJDIR)/$(CONFIG)/test/cpp/util/reflection_debug/reflection_client.o: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_reflection_debug_test: $(REFLECTION_DEBUG_TEST_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(REFLECTION_DEBUG_TEST_OBJS:.o=.dep) -endif -endif - - SECURE_AUTH_CONTEXT_TEST_SRC = \ test/cpp/common/secure_auth_context_test.cc \ diff --git a/build.yaml b/build.yaml index c165304c90..5465c3b882 100644 --- a/build.yaml +++ b/build.yaml @@ -2787,6 +2787,23 @@ targets: - grpc - gpr_test_util - gpr +- name: proto_server_reflection_test + gtest: true + build: test + language: c++ + headers: + - test/cpp/util/proto_reflection_descriptor_database.h + src: + - test/cpp/end2end/proto_server_reflection_test.cc + - test/cpp/util/proto_reflection_descriptor_database.cc + deps: + - grpc++_reflection + - grpc++_test_util + - grpc_test_util + - grpc++ + - grpc + - gpr_test_util + - gpr - name: qps_interarrival_test build: test run: false @@ -2915,19 +2932,6 @@ targets: - gpr_test_util - gpr - grpc++_test_config -- name: reflection_debug_test - build: test - language: c++ - headers: - - test/cpp/util/proto_reflection_descriptor_database.h - src: - - test/cpp/util/proto_reflection_descriptor_database.cc - - test/cpp/util/reflection_debug/reflection_client.cc - deps: - - grpc++_reflection - - grpc++ - - grpc - - gpr - name: secure_auth_context_test gtest: true build: test diff --git a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h index e09c413251..df0abb2b16 100644 --- a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h +++ b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h @@ -61,17 +61,12 @@ class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { std::shared_ptr<::grpc::ProtoServerReflection> reflection_service; }; -// std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { -// return std::unique_ptr<::grpc::ServerBuilderPlugin>( -// new ProtoServerReflectionPlugin()); -// } - std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection(); void grpc_AddServerBuilderPlugin_reflection(); // Force AddServerBuilderPlugin() to be called at static initialization time. -struct StaticPluginInitializer_reflection { +static struct StaticPluginInitializer_reflection { StaticPluginInitializer_reflection() { grpc_AddServerBuilderPlugin_reflection(); } diff --git a/test/cpp/end2end/proto_server_reflection_test.cc b/test/cpp/end2end/proto_server_reflection_test.cc new file mode 100644 index 0000000000..ae770654ff --- /dev/null +++ b/test/cpp/end2end/proto_server_reflection_test.cc @@ -0,0 +1,165 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "src/proto/grpc/testing/echo.grpc.pb.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" +#include "test/cpp/end2end/test_service_impl.h" +#include "test/cpp/util/proto_reflection_descriptor_database.h" + +namespace grpc { +namespace testing { + +class ProtoServerReflectionTest : public ::testing::Test { + public: + ProtoServerReflectionTest() {} + + void SetUp() GRPC_OVERRIDE { + port_ = grpc_pick_unused_port_or_die(); + ref_desc_pool_ = google::protobuf::DescriptorPool::generated_pool(); + + ServerBuilder builder; + grpc::string server_address = "localhost:" + to_string(port_); + builder.AddListeningPort(server_address, InsecureServerCredentials()); + server_ = builder.BuildAndStart(); + } + + void ResetStub() { + string target = "dns:localhost:" + to_string(port_); + std::shared_ptr channel = + CreateChannel(target, InsecureChannelCredentials()); + stub_ = grpc::testing::EchoTestService::NewStub(channel); + desc_db_.reset(new ProtoReflectionDescriptorDatabase(channel)); + desc_pool_.reset(new google::protobuf::DescriptorPool(desc_db_.get())); + } + + string to_string(const int number) { + std::stringstream strs; + strs << number; + return strs.str(); + } + + void CompareService(const grpc::string& service) { + const google::protobuf::ServiceDescriptor* service_desc = + desc_pool_->FindServiceByName(service); + const google::protobuf::ServiceDescriptor* ref_service_desc = + ref_desc_pool_->FindServiceByName(service); + EXPECT_TRUE(service_desc != nullptr); + EXPECT_TRUE(ref_service_desc != nullptr); + EXPECT_EQ(service_desc->DebugString(), ref_service_desc->DebugString()); + + const google::protobuf::FileDescriptor* file_desc = service_desc->file(); + if (known_files_.find(file_desc->package() + "/" + file_desc->name()) != + known_files_.end()) { + EXPECT_EQ(file_desc->DebugString(), + ref_service_desc->file()->DebugString()); + known_files_.insert(file_desc->package() + "/" + file_desc->name()); + } + + for (int i = 0; i < service_desc->method_count(); ++i) { + CompareMethod(service_desc->method(i)->full_name()); + } + } + + void CompareMethod(const grpc::string& method) { + const google::protobuf::MethodDescriptor* method_desc = + desc_pool_->FindMethodByName(method); + const google::protobuf::MethodDescriptor* ref_method_desc = + ref_desc_pool_->FindMethodByName(method); + EXPECT_TRUE(method_desc != nullptr); + EXPECT_TRUE(ref_method_desc != nullptr); + EXPECT_EQ(method_desc->DebugString(), ref_method_desc->DebugString()); + + CompareType(method_desc->input_type()->full_name()); + CompareType(method_desc->output_type()->full_name()); + } + + void CompareType(const grpc::string& type) { + if (known_types_.find(type) != known_types_.end()) { + return; + } + + const google::protobuf::Descriptor* desc = + desc_pool_->FindMessageTypeByName(type); + const google::protobuf::Descriptor* ref_desc = + ref_desc_pool_->FindMessageTypeByName(type); + EXPECT_TRUE(desc != nullptr); + EXPECT_TRUE(ref_desc != nullptr); + EXPECT_EQ(desc->DebugString(), ref_desc->DebugString()); + } + + protected: + std::unique_ptr server_; + std::unique_ptr stub_; + std::unique_ptr desc_db_; + std::unique_ptr desc_pool_; + std::unordered_set known_files_; + std::unordered_set known_types_; + const google::protobuf::DescriptorPool* ref_desc_pool_; + int port_; +}; + +TEST_F(ProtoServerReflectionTest, CheckResponseWithLocalDescriptorPool) { + ResetStub(); + + std::vector services; + desc_db_->GetServices(&services); + // The service list has at least one service (reflection servcie). + EXPECT_TRUE(services.size() > 0); + + for (auto it = services.begin(); it != services.end(); ++it) { + CompareService(*it); + } +} + +} // namespace testing +} // namespace grpc + +int main(int argc, char** argv) { + grpc_test_init(argc, argv); + ::testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); +} diff --git a/test/cpp/util/reflection_debug/Makefile b/test/cpp/util/reflection_debug/Makefile deleted file mode 100644 index 9eea5ae734..0000000000 --- a/test/cpp/util/reflection_debug/Makefile +++ /dev/null @@ -1,50 +0,0 @@ - -# Copyright 2015-2016, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# - -CXX = g++ -INCLUDES += -I. -I.. -CPPFLAGS += -I/usr/local/include -pthread -CXXFLAGS += -std=c++11 ${INCLUDES} -LDFLAGS += -L/usr/local/lib -lgrpc++_unsecure -lgrpc -lgrpc++_reflection -lprotobuf -lpthread -ldl -VPATH = .. - -# PROTOS_PATH = ../../../src/cpp/plugin/reflection - -vpath %.proto $(PROTOS_PATH) - -all: reflection_client - -reflection_client: proto_reflection_descriptor_database.o reflection_client.o - $(CXX) $(INCLUDES) $^ $(LDFLAGS) -o $@ - - -clean: - rm -f *.o reflection_client diff --git a/test/cpp/util/reflection_debug/reflection_client.cc b/test/cpp/util/reflection_debug/reflection_client.cc deleted file mode 100644 index a1e97f7ede..0000000000 --- a/test/cpp/util/reflection_debug/reflection_client.cc +++ /dev/null @@ -1,219 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include -#include -#include - -#include -#include -#include - -#include "proto_reflection_descriptor_database.h" -// #include "reflection.grpc.pb.h" - -using grpc::Channel; -using grpc::ClientContext; -using grpc::Status; -using grpc::ProtoReflectionDescriptorDatabase; -using grpc::reflection::v1alpha::ServerReflection; -// using grpc::reflection::v1alpha::EmptyRequest; -// using grpc::reflection::v1alpha::ListServiceResponse; -using google::protobuf::FileDescriptorProto; -using google::protobuf::DescriptorPool; -using google::protobuf::ServiceDescriptor; -using google::protobuf::MethodDescriptor; -using google::protobuf::Descriptor; -using google::protobuf::FieldDescriptor; - -class ReflectionClient { - public: - ReflectionClient(std::shared_ptr channel) - : db_(new ProtoReflectionDescriptorDatabase( - ServerReflection::NewStub(channel))), - desc_pool_(new DescriptorPool(db_.get())) {} - - void PrintInfo() { - std::vector services; - bool found_services = db_->GetServices(&services); - if (found_services) { - std::string padding = ""; - std::cout << "Service amount:" << services.size() << std::endl; - for (auto it = services.begin(); it != services.end(); ++it) { - if (it != services.end() - 1) { - std::cout << padding << "│ " << std::endl; - std::cout << padding << "├─" << *it << std::endl; - PrintService(desc_pool_->FindServiceByName(*it), padding + "│ "); - } else { - std::cout << padding << "│ " << std::endl; - std::cout << padding << "└─" << *it << std::endl; - PrintService(desc_pool_->FindServiceByName(*it), padding + " "); - } - } - } - } - - void PrintService(const ServiceDescriptor* service_desc, - const std::string padding) { - if (service_desc != nullptr) { - std::cout << padding << "│ Method amount:" << service_desc->method_count() - << std::endl; - for (int i = 0; i < service_desc->method_count(); ++i) { - if (i != service_desc->method_count() - 1) { - std::cout << padding << "├─" << service_desc->method(i)->name() - << std::endl; - PrintMethod(service_desc->method(i), padding + "│ "); - } else { - std::cout << padding << "└─" << service_desc->method(i)->name() - << std::endl; - PrintMethod(service_desc->method(i), padding + " "); - } - } - } - } - - void PrintMethod(const MethodDescriptor* method_desc, - const std::string padding) { - if (method_desc != nullptr) { - std::cout << padding - << "├─input type: " << method_desc->input_type()->name() - << std::endl; - PrintMessageType(method_desc->input_type(), padding + "│ "); - std::cout << padding - << "└─output type: " << method_desc->output_type()->name() - << std::endl; - PrintMessageType(method_desc->output_type(), padding + " "); - } - } - - void PrintMessageType(const Descriptor* type_desc, - const std::string padding) { - if (type_desc != nullptr) { - if (type_desc->field_count() > 0) { - std::cout << padding << "│ Field amount:" << type_desc->field_count() - << std::endl; - } - for (int i = 0; i < type_desc->field_count(); ++i) { - if (i != type_desc->field_count() - 1) { - const FieldDescriptor* field = type_desc->field(i); - std::cout << padding << "├─ " << std::left << std::setw(15) - << kLabelToName[field->label()] << std::setw(30) - << " name: " + field->name() << std::setw(50) - << " type: " + - (field->type() == FieldDescriptor::Type::TYPE_MESSAGE - ? field->message_type()->name() - : field->type_name()) - << std::endl; - } else { - const FieldDescriptor* field = type_desc->field(i); - std::cout << padding << "└─ " << std::left << std::setw(15) - << kLabelToName[field->label()] << std::setw(30) - << " name: " + field->name() << std::setw(50) - << " type: " + - (field->type() == FieldDescriptor::Type::TYPE_MESSAGE - ? field->message_type()->name() - : field->type_name()) - << std::endl; - } - } - } - } - - void Test() { - { - std::vector services; - bool found = db_->GetServices(&services); - if (found) { - for (auto it : services) { - std::cout << it << std::endl; - } - } - } - { - FileDescriptorProto output; - bool found = db_->FindFileByName("helloworld.proto", &output); - if (found) std::cout << output.name() << std::endl; - } - { - FileDescriptorProto output; - bool found = - db_->FindFileContainingSymbol("helloworld.Greeter.SayHello", &output); - if (found) std::cout << output.name() << std::endl; - } - { - FileDescriptorProto output; - bool found = db_->FindFileContainingExtension( - "helloworld.Greeter.HelloRequest", 1, &output); - found = db_->FindFileContainingExtension( - "helloworld.Greeter.HelloRequest", 1, &output); - if (found) std::cout << output.name() << std::endl; - } - // DescriptorPool pool(db_.get()); - // std::cout << pool.FindServiceByName("helloworld.Greeter")->name() - // << std::endl; - } - - private: - const char* const kLabelToName[FieldDescriptor::Label::MAX_LABEL + 1] = { - "ERROR", // 0 is reserved for errors - - "optional", // LABEL_OPTIONAL - "required", // LABEL_REQUIRED - "repeated", // LABEL_REPEATED - }; - - std::unique_ptr db_; - std::unique_ptr desc_pool_; -}; - -int main(int argc, char** argv) { - int port = 50051; - if (argc == 2) { - try { - port = std::stoi(argv[1]); - if (port > 65535 || port < 1024) { - throw std::out_of_range("Port number out of range."); - } - } catch (std::invalid_argument&) { - } catch (std::out_of_range&) { - } - } - - ReflectionClient reflection_client(grpc::CreateChannel( - "localhost:" + std::to_string(port), grpc::InsecureChannelCredentials())); - - reflection_client.PrintInfo(); - - return 0; -} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 3eae785754..f1d344b613 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -2389,6 +2389,29 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_reflection", + "grpc++_test_util", + "grpc_test_util" + ], + "headers": [ + "test/cpp/util/proto_reflection_descriptor_database.h" + ], + "language": "c++", + "name": "proto_server_reflection_test", + "src": [ + "test/cpp/end2end/proto_server_reflection_test.cc", + "test/cpp/util/proto_reflection_descriptor_database.cc", + "test/cpp/util/proto_reflection_descriptor_database.h" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -2551,26 +2574,6 @@ "third_party": false, "type": "target" }, - { - "deps": [ - "gpr", - "grpc", - "grpc++", - "grpc++_reflection" - ], - "headers": [ - "test/cpp/util/proto_reflection_descriptor_database.h" - ], - "language": "c++", - "name": "reflection_debug_test", - "src": [ - "test/cpp/util/proto_reflection_descriptor_database.cc", - "test/cpp/util/proto_reflection_descriptor_database.h", - "test/cpp/util/reflection_debug/reflection_client.cc" - ], - "third_party": false, - "type": "target" - }, { "deps": [ "gpr", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 0025b48c33..47098fb14b 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -2375,18 +2375,20 @@ "ci_platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ], - "cpu_cost": 0.5, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, - "gtest": false, + "gtest": true, "language": "c++", - "name": "qps_openloop_test", + "name": "proto_server_reflection_test", "platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ] }, { @@ -2396,12 +2398,12 @@ "mac", "posix" ], - "cpu_cost": 10, + "cpu_cost": 0.5, "exclude_configs": [], "flaky": false, "gtest": false, "language": "c++", - "name": "qps_test", + "name": "qps_openloop_test", "platforms": [ "linux", "mac", @@ -2413,20 +2415,18 @@ "ci_platforms": [ "linux", "mac", - "posix", - "windows" + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 10, "exclude_configs": [], "flaky": false, "gtest": false, "language": "c++", - "name": "reflection_debug_test", + "name": "qps_test", "platforms": [ "linux", "mac", - "posix", - "windows" + "posix" ] }, { diff --git a/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj b/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj new file mode 100644 index 0000000000..27fc168946 --- /dev/null +++ b/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj @@ -0,0 +1,215 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {1881E6A1-EAD4-A68C-9727-FF1956B66185} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + + + proto_server_reflection_test + static + Debug + static + Debug + + + proto_server_reflection_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + + + + + + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB} + + + {0BE77741-552A-929B-A497-4EF7ECE17A64} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj.filters b/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj.filters new file mode 100644 index 0000000000..6d6e5c1f32 --- /dev/null +++ b/vsprojects/vcxproj/test/proto_server_reflection_test/proto_server_reflection_test.vcxproj.filters @@ -0,0 +1,32 @@ + + + + + test\cpp\end2end + + + test\cpp\util + + + + + test\cpp\util + + + + + + {354831a1-52fb-6364-b568-c8c49bfb8d29} + + + {b4d957ef-f9fd-2a14-078c-b72f80096f70} + + + {130f224c-89a5-54ea-7045-b54b4188c52b} + + + {aae81aad-5563-fceb-1461-10fdec84c5b0} + + + + diff --git a/vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj b/vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj deleted file mode 100644 index 757e1cd535..0000000000 --- a/vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {037B9EA1-03CC-6A3B-4E4B-DB17C3D59CF8} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - - - reflection_debug_test - static - Debug - static - Debug - - - reflection_debug_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - - - - - - {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB} - - - {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj.filters b/vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj.filters deleted file mode 100644 index 6258acedcc..0000000000 --- a/vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj.filters +++ /dev/null @@ -1,32 +0,0 @@ - - - - - test\cpp\util - - - test\cpp\util\reflection_debug - - - - - test\cpp\util - - - - - - {fdf7e642-420d-9e18-7a3c-19dca964f218} - - - {562b3927-e256-190d-ab72-6b4b04ffb8b2} - - - {8ed08be4-a27c-d51c-d587-a02cf3dc5abc} - - - {b84b1385-e0b2-239b-bac2-81a16bc90249} - - - - -- cgit v1.2.3 From c92fe25af5b29f0cb54b06bdcd768a98d749d7b7 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 25 May 2016 07:18:57 -0700 Subject: Add mutex for stream in ProtoReflectionDescriptorDatabase, fix headers check --- build.yaml | 2 ++ .../util/proto_reflection_descriptor_database.cc | 32 ++++++++-------------- .../util/proto_reflection_descriptor_database.h | 2 ++ .../run_tests/sanity/check_sources_and_headers.py | 3 ++ tools/run_tests/sources_and_headers.json | 4 ++- 5 files changed, 22 insertions(+), 21 deletions(-) (limited to 'test/cpp') diff --git a/build.yaml b/build.yaml index 5465c3b882..420a64bcf7 100644 --- a/build.yaml +++ b/build.yaml @@ -914,6 +914,8 @@ libs: - extensions/reflection/proto_server_reflection_plugin.cc - extensions/reflection/reflection.grpc.pb.cc - extensions/reflection/reflection.pb.cc + uses: + - grpc++_base - name: grpc++_test_config build: private language: c++ diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc index 3963b0c093..6513a14992 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.cc +++ b/test/cpp/util/proto_reflection_descriptor_database.cc @@ -31,7 +31,7 @@ * */ -#include "proto_reflection_descriptor_database.h" +#include "test/cpp/util/proto_reflection_descriptor_database.h" #include @@ -69,16 +69,14 @@ bool ProtoReflectionDescriptorDatabase::FindFileByName( request.set_file_by_filename(filename); ServerReflectionResponse response; + stream_mutex_.lock(); GetStream()->Write(request); GetStream()->Read(&response); + stream_mutex_.unlock(); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse) { AddFileFromResponse(response.file_descriptor_response()); - // const google::protobuf::FileDescriptorProto file_proto = - // ParseFileDescriptorProtoResponse(response.file_descriptor_response()); - // known_files_.insert(file_proto.name()); - // cached_db_.Add(file_proto); } else if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kErrorResponse) { const ErrorResponse error = response.error_response(); @@ -119,19 +117,14 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingSymbol( request.set_file_containing_symbol(symbol_name); ServerReflectionResponse response; + stream_mutex_.lock(); GetStream()->Write(request); GetStream()->Read(&response); + stream_mutex_.unlock(); - // Status status = stub_->GetFileContainingSymbol(&ctx, request, &response); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse) { AddFileFromResponse(response.file_descriptor_response()); - // const google::protobuf::FileDescriptorProto file_proto = - // ParseFileDescriptorProtoResponse(response.file_descriptor_response()); - // if (known_files_.find(file_proto.name()) == known_files_.end()) { - // known_files_.insert(file_proto.name()); - // cached_db_.Add(file_proto); - // } } else if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kErrorResponse) { const ErrorResponse error = response.error_response(); @@ -181,20 +174,14 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingExtension( field_number); ServerReflectionResponse response; + stream_mutex_.lock(); GetStream()->Write(request); GetStream()->Read(&response); + stream_mutex_.unlock(); - // Status status = stub_->GetFileContainingExtension(&ctx, request, - // &response); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse) { AddFileFromResponse(response.file_descriptor_response()); - // const google::protobuf::FileDescriptorProto file_proto = - // ParseFileDescriptorProtoResponse(response.file_descriptor_response()); - // if (known_files_.find(file_proto.name()) == known_files_.end()) { - // known_files_.insert(file_proto.name()); - // cached_db_.Add(file_proto); - // } } else if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kErrorResponse) { const ErrorResponse error = response.error_response(); @@ -240,8 +227,10 @@ bool ProtoReflectionDescriptorDatabase::FindAllExtensionNumbers( request.set_all_extension_numbers_of_type(extendee_type); ServerReflectionResponse response; + stream_mutex_.lock(); GetStream()->Write(request); GetStream()->Read(&response); + stream_mutex_.unlock(); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase:: @@ -272,8 +261,11 @@ bool ProtoReflectionDescriptorDatabase::GetServices( ServerReflectionRequest request; request.set_list_services(""); ServerReflectionResponse response; + + stream_mutex_.lock(); GetStream()->Write(request); GetStream()->Read(&response); + stream_mutex_.unlock(); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kListServicesResponse) { diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index 4bb9c21a92..bc25fb0f5c 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -32,6 +32,7 @@ */ #include +#include #include #include #include @@ -98,6 +99,7 @@ class ProtoReflectionDescriptorDatabase std::unordered_set missing_symbols_; std::unordered_map> missing_extensions_; std::unordered_map> cached_extension_numbers_; + std::mutex stream_mutex_; google::protobuf::SimpleDescriptorDatabase cached_db_; }; diff --git a/tools/run_tests/sanity/check_sources_and_headers.py b/tools/run_tests/sanity/check_sources_and_headers.py index c028499ca6..0eb804eb5b 100755 --- a/tools/run_tests/sanity/check_sources_and_headers.py +++ b/tools/run_tests/sanity/check_sources_and_headers.py @@ -57,6 +57,9 @@ def target_has_header(target, name): return True if name == 'src/core/lib/profiling/stap_probes.h': return True + if not name.startswith('extensions') \ + and target_has_header(target, 'extensions/' + name): + return True return False def produces_object(name): diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index f1d344b613..7ad61845d5 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4371,7 +4371,9 @@ "type": "lib" }, { - "deps": [], + "deps": [ + "grpc++_base" + ], "headers": [ "extensions/include/grpc++/impl/proto_server_reflection_plugin.h", "extensions/include/grpc++/impl/reflection.grpc.pb.h", -- cgit v1.2.3 From c8074527b2c98e132061f79b48f06f0c5154b9fb Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 3 Jun 2016 14:36:11 -0700 Subject: Remove unnecessary headers --- .../grpc++/impl/proto_server_reflection_plugin.h | 6 ++---- extensions/reflection/proto_server_reflection.cc | 3 --- extensions/reflection/proto_server_reflection.h | 3 --- .../reflection/proto_server_reflection_plugin.cc | 18 ++++++++++-------- test/cpp/util/proto_reflection_descriptor_database.h | 1 - 5 files changed, 12 insertions(+), 19 deletions(-) (limited to 'test/cpp') diff --git a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h index df0abb2b16..5bf1ff1bfc 100644 --- a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h +++ b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h @@ -34,8 +34,6 @@ #ifndef GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H #define GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H -#include - #include #include @@ -58,7 +56,7 @@ class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { bool has_sync_methods() const GRPC_OVERRIDE; private: - std::shared_ptr<::grpc::ProtoServerReflection> reflection_service; + std::shared_ptr<::grpc::ProtoServerReflection> reflection_service_; }; std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection(); @@ -70,7 +68,7 @@ static struct StaticPluginInitializer_reflection { StaticPluginInitializer_reflection() { grpc_AddServerBuilderPlugin_reflection(); } -} static_plugin_initializer_reflection_; +} static_plugin_initializer_reflection; } // namespace reflection } // namespace grpc diff --git a/extensions/reflection/proto_server_reflection.cc b/extensions/reflection/proto_server_reflection.cc index e41c67cdbc..f3cf7958e8 100644 --- a/extensions/reflection/proto_server_reflection.cc +++ b/extensions/reflection/proto_server_reflection.cc @@ -31,9 +31,6 @@ * */ -#include -#include -#include #include #include diff --git a/extensions/reflection/proto_server_reflection.h b/extensions/reflection/proto_server_reflection.h index f9b98c5fb3..71b316816c 100644 --- a/extensions/reflection/proto_server_reflection.h +++ b/extensions/reflection/proto_server_reflection.h @@ -34,9 +34,6 @@ #ifndef GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H #define GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H -#include -#include -#include #include #include diff --git a/extensions/reflection/proto_server_reflection_plugin.cc b/extensions/reflection/proto_server_reflection_plugin.cc index d038a7fff5..465a8b9442 100644 --- a/extensions/reflection/proto_server_reflection_plugin.cc +++ b/extensions/reflection/proto_server_reflection_plugin.cc @@ -42,31 +42,33 @@ namespace grpc { namespace reflection { ProtoServerReflectionPlugin::ProtoServerReflectionPlugin() - : reflection_service(new grpc::ProtoServerReflection()) {} + : reflection_service_(new grpc::ProtoServerReflection()) {} -grpc::string ProtoServerReflectionPlugin::name() { return "p1"; } +grpc::string ProtoServerReflectionPlugin::name() { + return "proto_server_reflection"; +} void ProtoServerReflectionPlugin::InitServer(grpc::ServerInitializer* si) { - si->RegisterService(reflection_service); + si->RegisterService(reflection_service_); } void ProtoServerReflectionPlugin::Finish(grpc::ServerInitializer* si) { - reflection_service->SetServiceList(si->GetServiceList()); + reflection_service_->SetServiceList(si->GetServiceList()); } void ProtoServerReflectionPlugin::ChangeArguments(const grpc::string& name, void* value) {} bool ProtoServerReflectionPlugin::has_sync_methods() const { - if (reflection_service != nullptr) { - return reflection_service->has_synchronous_methods(); + if (reflection_service_ != nullptr) { + return reflection_service_->has_synchronous_methods(); } return false; } bool ProtoServerReflectionPlugin::has_async_methods() const { - if (reflection_service != nullptr) { - return reflection_service->has_async_methods(); + if (reflection_service_ != nullptr) { + return reflection_service_->has_async_methods(); } return false; } diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index bc25fb0f5c..c6f7b5f046 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -31,7 +31,6 @@ * */ -#include #include #include #include -- cgit v1.2.3 From 1495cb5b249e92ab20d1d7e63b0e627bd7cf2b4c Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 6 Jun 2016 10:58:06 -0700 Subject: Addressed reveiw comments about naming --- .../grpc++/impl/proto_server_reflection_plugin.h | 11 ------- .../reflection/proto_server_reflection_plugin.cc | 10 +++++-- test/cpp/end2end/proto_server_reflection_test.cc | 1 + .../util/proto_reflection_descriptor_database.cc | 34 +++++++++------------- .../util/proto_reflection_descriptor_database.h | 4 +++ .../check_pb_files.sh | 3 -- 6 files changed, 27 insertions(+), 36 deletions(-) (limited to 'test/cpp') diff --git a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h index 5bf1ff1bfc..774d3439e7 100644 --- a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h +++ b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h @@ -59,17 +59,6 @@ class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { std::shared_ptr<::grpc::ProtoServerReflection> reflection_service_; }; -std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection(); - -void grpc_AddServerBuilderPlugin_reflection(); - -// Force AddServerBuilderPlugin() to be called at static initialization time. -static struct StaticPluginInitializer_reflection { - StaticPluginInitializer_reflection() { - grpc_AddServerBuilderPlugin_reflection(); - } -} static_plugin_initializer_reflection; - } // namespace reflection } // namespace grpc diff --git a/extensions/reflection/proto_server_reflection_plugin.cc b/extensions/reflection/proto_server_reflection_plugin.cc index 465a8b9442..8489adc7e1 100644 --- a/extensions/reflection/proto_server_reflection_plugin.cc +++ b/extensions/reflection/proto_server_reflection_plugin.cc @@ -73,17 +73,23 @@ bool ProtoServerReflectionPlugin::has_async_methods() const { return false; } -std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { +static std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { return std::unique_ptr<::grpc::ServerBuilderPlugin>( new ProtoServerReflectionPlugin()); } -void grpc_AddServerBuilderPlugin_reflection() { +static void AddProtoReflectionServerBuilderPlugin() { static bool already_here = false; if (already_here) return; already_here = true; ::grpc::ServerBuilder::InternalAddPluginFactory(&CreateProtoReflection); } +struct StaticProtoReflectionPluginInitializer { + StaticProtoReflectionPluginInitializer() { + AddProtoReflectionServerBuilderPlugin(); + } +} static_proto_reflection_plugin_initializer; + } // namespace reflection } // namespace grpc diff --git a/test/cpp/end2end/proto_server_reflection_test.cc b/test/cpp/end2end/proto_server_reflection_test.cc index ae770654ff..300b209113 100644 --- a/test/cpp/end2end/proto_server_reflection_test.cc +++ b/test/cpp/end2end/proto_server_reflection_test.cc @@ -140,6 +140,7 @@ class ProtoServerReflectionTest : public ::testing::Test { std::unordered_set known_types_; const google::protobuf::DescriptorPool* ref_desc_pool_; int port_; + reflection::ProtoServerReflectionPlugin plugin_; }; TEST_F(ProtoServerReflectionTest, CheckResponseWithLocalDescriptorPool) { diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc index 6513a14992..6907d97bd5 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.cc +++ b/test/cpp/util/proto_reflection_descriptor_database.cc @@ -69,10 +69,7 @@ bool ProtoReflectionDescriptorDatabase::FindFileByName( request.set_file_by_filename(filename); ServerReflectionResponse response; - stream_mutex_.lock(); - GetStream()->Write(request); - GetStream()->Read(&response); - stream_mutex_.unlock(); + DoOneRequest(request, response); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse) { @@ -117,10 +114,7 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingSymbol( request.set_file_containing_symbol(symbol_name); ServerReflectionResponse response; - stream_mutex_.lock(); - GetStream()->Write(request); - GetStream()->Read(&response); - stream_mutex_.unlock(); + DoOneRequest(request, response); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse) { @@ -174,10 +168,7 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingExtension( field_number); ServerReflectionResponse response; - stream_mutex_.lock(); - GetStream()->Write(request); - GetStream()->Read(&response); - stream_mutex_.unlock(); + DoOneRequest(request, response); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse) { @@ -227,10 +218,7 @@ bool ProtoReflectionDescriptorDatabase::FindAllExtensionNumbers( request.set_all_extension_numbers_of_type(extendee_type); ServerReflectionResponse response; - stream_mutex_.lock(); - GetStream()->Write(request); - GetStream()->Read(&response); - stream_mutex_.unlock(); + DoOneRequest(request, response); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase:: @@ -262,10 +250,7 @@ bool ProtoReflectionDescriptorDatabase::GetServices( request.set_list_services(""); ServerReflectionResponse response; - stream_mutex_.lock(); - GetStream()->Write(request); - GetStream()->Read(&response); - stream_mutex_.unlock(); + DoOneRequest(request, response); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kListServicesResponse) { @@ -319,4 +304,13 @@ ProtoReflectionDescriptorDatabase::GetStream() { return stream_; } +void ProtoReflectionDescriptorDatabase::DoOneRequest( + const ServerReflectionRequest& request, + ServerReflectionResponse& response) { + stream_mutex_.lock(); + GetStream()->Write(request); + GetStream()->Read(&response); + stream_mutex_.unlock(); +} + } // namespace grpc diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index c6f7b5f046..7656a496c2 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -91,6 +91,10 @@ class ProtoReflectionDescriptorDatabase const std::shared_ptr GetStream(); + void DoOneRequest( + const grpc::reflection::v1alpha::ServerReflectionRequest& request, + grpc::reflection::v1alpha::ServerReflectionResponse& response); + std::shared_ptr stream_; grpc::ClientContext ctx_; std::unique_ptr stub_; diff --git a/tools/dockerfile/grpc_check_generated_pb_files/check_pb_files.sh b/tools/dockerfile/grpc_check_generated_pb_files/check_pb_files.sh index b1af579a74..62e41755ec 100755 --- a/tools/dockerfile/grpc_check_generated_pb_files/check_pb_files.sh +++ b/tools/dockerfile/grpc_check_generated_pb_files/check_pb_files.sh @@ -33,9 +33,6 @@ set -e mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc -# copy service account keys if available -cp -r /var/local/jenkins/service_account $HOME || true - cd /var/local/git/grpc # build grpc cpp plugin for generating grpc pb files -- cgit v1.2.3 From 0601df3a04a91e5e731e829989fd93290e301d97 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 6 Jun 2016 13:08:06 -0700 Subject: Move reflection src/hdr to src/cpp/ext include/grpc++/ext --- BUILD | 16 +- Makefile | 29 +- build.yaml | 16 +- .../grpc++/impl/proto_server_reflection_plugin.h | 65 - .../include/grpc++/impl/reflection.grpc.pb.h | 184 - extensions/include/grpc++/impl/reflection.pb.h | 2035 ---------- extensions/reflection/proto_server_reflection.cc | 223 -- extensions/reflection/proto_server_reflection.h | 94 - .../reflection/proto_server_reflection_plugin.cc | 95 - extensions/reflection/reflection.grpc.pb.cc | 97 - extensions/reflection/reflection.pb.cc | 3946 -------------------- .../grpc++/ext/proto_server_reflection_plugin.h | 65 + include/grpc++/ext/reflection.grpc.pb.h | 184 + include/grpc++/ext/reflection.pb.h | 2035 ++++++++++ src/cpp/ext/proto_server_reflection.cc | 223 ++ src/cpp/ext/proto_server_reflection.h | 94 + src/cpp/ext/proto_server_reflection_plugin.cc | 95 + src/cpp/ext/reflection.grpc.pb.cc | 97 + src/cpp/ext/reflection.pb.cc | 3946 ++++++++++++++++++++ templates/Makefile.template | 7 +- test/cpp/end2end/proto_server_reflection_test.cc | 2 +- .../util/proto_reflection_descriptor_database.h | 2 +- tools/codegen/extensions/gen_reflection_proto.sh | 6 +- tools/run_tests/sources_and_headers.json | 24 +- .../grpc++_reflection/grpc++_reflection.vcxproj | 16 +- .../grpc++_reflection.vcxproj.filters | 55 +- 26 files changed, 6826 insertions(+), 6825 deletions(-) delete mode 100644 extensions/include/grpc++/impl/proto_server_reflection_plugin.h delete mode 100644 extensions/include/grpc++/impl/reflection.grpc.pb.h delete mode 100644 extensions/include/grpc++/impl/reflection.pb.h delete mode 100644 extensions/reflection/proto_server_reflection.cc delete mode 100644 extensions/reflection/proto_server_reflection.h delete mode 100644 extensions/reflection/proto_server_reflection_plugin.cc delete mode 100644 extensions/reflection/reflection.grpc.pb.cc delete mode 100644 extensions/reflection/reflection.pb.cc create mode 100644 include/grpc++/ext/proto_server_reflection_plugin.h create mode 100644 include/grpc++/ext/reflection.grpc.pb.h create mode 100644 include/grpc++/ext/reflection.pb.h create mode 100644 src/cpp/ext/proto_server_reflection.cc create mode 100644 src/cpp/ext/proto_server_reflection.h create mode 100644 src/cpp/ext/proto_server_reflection_plugin.cc create mode 100644 src/cpp/ext/reflection.grpc.pb.cc create mode 100644 src/cpp/ext/reflection.pb.cc (limited to 'test/cpp') diff --git a/BUILD b/BUILD index b47100ad9c..312ec7df9c 100644 --- a/BUILD +++ b/BUILD @@ -1000,16 +1000,16 @@ cc_library( cc_library( name = "grpc++_reflection", srcs = [ - "extensions/reflection/proto_server_reflection.h", - "extensions/reflection/proto_server_reflection.cc", - "extensions/reflection/proto_server_reflection_plugin.cc", - "extensions/reflection/reflection.grpc.pb.cc", - "extensions/reflection/reflection.pb.cc", + "src/cpp/ext/proto_server_reflection.h", + "src/cpp/ext/proto_server_reflection.cc", + "src/cpp/ext/proto_server_reflection_plugin.cc", + "src/cpp/ext/reflection.grpc.pb.cc", + "src/cpp/ext/reflection.pb.cc", ], hdrs = [ - "extensions/include/grpc++/impl/proto_server_reflection_plugin.h", - "extensions/include/grpc++/impl/reflection.grpc.pb.h", - "extensions/include/grpc++/impl/reflection.pb.h", + "include/grpc++/ext/proto_server_reflection_plugin.h", + "include/grpc++/ext/reflection.grpc.pb.h", + "include/grpc++/ext/reflection.pb.h", ], includes = [ "include", diff --git a/Makefile b/Makefile index 97377dba03..c63b88fedf 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,6 @@ BINDIR = $(BUILDDIR_ABSOLUTE)/bins OBJDIR = $(BUILDDIR_ABSOLUTE)/objs LIBDIR = $(BUILDDIR_ABSOLUTE)/libs GENDIR = $(BUILDDIR_ABSOLUTE)/gens -EXTDIR = $(BUILDDIR_ABSOLUTE)/extensions # Configurations @@ -370,7 +369,7 @@ CPPFLAGS += -fPIC LDFLAGS += -fPIC endif -INCLUDES = . include $(GENDIR) $(EXTDIR) $(EXTDIR)/include +INCLUDES = . include $(GENDIR) LDFLAGS += -Llibs/$(CONFIG) ifeq ($(SYSTEM),Darwin) @@ -2155,8 +2154,8 @@ install-headers_c: install-headers_cxx: $(E) "[INSTALL] Installing public C++ headers" - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(patsubst extensions/%,%,$(dir $(h))) && ) exit 0 || exit 1 - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(patsubst extensions/%,%,$(h)) && ) exit 0 || exit 1 + $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(dir $(h)) && ) exit 0 || exit 1 + $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1 install-static: install-static_c install-static_cxx @@ -3391,15 +3390,15 @@ endif LIBGRPC++_REFLECTION_SRC = \ - extensions/reflection/proto_server_reflection.cc \ - extensions/reflection/proto_server_reflection_plugin.cc \ - extensions/reflection/reflection.grpc.pb.cc \ - extensions/reflection/reflection.pb.cc \ + src/cpp/ext/proto_server_reflection.cc \ + src/cpp/ext/proto_server_reflection_plugin.cc \ + src/cpp/ext/reflection.grpc.pb.cc \ + src/cpp/ext/reflection.pb.cc \ PUBLIC_HEADERS_CXX += \ - extensions/include/grpc++/impl/proto_server_reflection_plugin.h \ - extensions/include/grpc++/impl/reflection.grpc.pb.h \ - extensions/include/grpc++/impl/reflection.pb.h \ + include/grpc++/ext/proto_server_reflection_plugin.h \ + include/grpc++/ext/reflection.grpc.pb.h \ + include/grpc++/ext/reflection.pb.h \ LIBGRPC++_REFLECTION_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_REFLECTION_SRC)))) @@ -14544,10 +14543,6 @@ ifneq ($(OPENSSL_DEP),) # This is to ensure the embedded OpenSSL is built beforehand, properly # installing headers to their final destination on the drive. We need this # otherwise parallel compilation will fail if a source is compiled first. -extensions/reflection/proto_server_reflection.cc: $(OPENSSL_DEP) -extensions/reflection/proto_server_reflection_plugin.cc: $(OPENSSL_DEP) -extensions/reflection/reflection.grpc.pb.cc: $(OPENSSL_DEP) -extensions/reflection/reflection.pb.cc: $(OPENSSL_DEP) src/core/ext/transport/chttp2/client/secure/secure_channel_create.c: $(OPENSSL_DEP) src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DEP) src/core/ext/transport/cronet/client/secure/cronet_channel_create.c: $(OPENSSL_DEP) @@ -14578,6 +14573,10 @@ src/cpp/common/auth_property_iterator.cc: $(OPENSSL_DEP) src/cpp/common/secure_auth_context.cc: $(OPENSSL_DEP) src/cpp/common/secure_channel_arguments.cc: $(OPENSSL_DEP) src/cpp/common/secure_create_auth_context.cc: $(OPENSSL_DEP) +src/cpp/ext/proto_server_reflection.cc: $(OPENSSL_DEP) +src/cpp/ext/proto_server_reflection_plugin.cc: $(OPENSSL_DEP) +src/cpp/ext/reflection.grpc.pb.cc: $(OPENSSL_DEP) +src/cpp/ext/reflection.pb.cc: $(OPENSSL_DEP) src/cpp/server/secure_server_credentials.cc: $(OPENSSL_DEP) src/csharp/ext/grpc_csharp_ext.c: $(OPENSSL_DEP) test/core/bad_client/bad_client.c: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 420a64bcf7..a9c2f3b552 100644 --- a/build.yaml +++ b/build.yaml @@ -904,16 +904,16 @@ libs: build: all language: c++ public_headers: - - extensions/include/grpc++/impl/proto_server_reflection_plugin.h - - extensions/include/grpc++/impl/reflection.grpc.pb.h - - extensions/include/grpc++/impl/reflection.pb.h + - include/grpc++/ext/proto_server_reflection_plugin.h + - include/grpc++/ext/reflection.grpc.pb.h + - include/grpc++/ext/reflection.pb.h headers: - - extensions/reflection/proto_server_reflection.h + - src/cpp/ext/proto_server_reflection.h src: - - extensions/reflection/proto_server_reflection.cc - - extensions/reflection/proto_server_reflection_plugin.cc - - extensions/reflection/reflection.grpc.pb.cc - - extensions/reflection/reflection.pb.cc + - src/cpp/ext/proto_server_reflection.cc + - src/cpp/ext/proto_server_reflection_plugin.cc + - src/cpp/ext/reflection.grpc.pb.cc + - src/cpp/ext/reflection.pb.cc uses: - grpc++_base - name: grpc++_test_config diff --git a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h deleted file mode 100644 index 774d3439e7..0000000000 --- a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H -#define GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H - -#include -#include - -namespace grpc { -class ServerInitializer; -class ProtoServerReflection; -} // namespace grpc - -namespace grpc { -namespace reflection { - -class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { - public: - ProtoServerReflectionPlugin(); - ::grpc::string name() GRPC_OVERRIDE; - void InitServer(::grpc::ServerInitializer* si) GRPC_OVERRIDE; - void Finish(::grpc::ServerInitializer* si) GRPC_OVERRIDE; - void ChangeArguments(const ::grpc::string& name, void* value) GRPC_OVERRIDE; - bool has_async_methods() const GRPC_OVERRIDE; - bool has_sync_methods() const GRPC_OVERRIDE; - - private: - std::shared_ptr<::grpc::ProtoServerReflection> reflection_service_; -}; - -} // namespace reflection -} // namespace grpc - -#endif // GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H diff --git a/extensions/include/grpc++/impl/reflection.grpc.pb.h b/extensions/include/grpc++/impl/reflection.grpc.pb.h deleted file mode 100644 index e49a1b3f50..0000000000 --- a/extensions/include/grpc++/impl/reflection.grpc.pb.h +++ /dev/null @@ -1,184 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -// Generated by the gRPC protobuf plugin. -// If you make any local change, they will be lost. -// source: reflection.proto -// Original file comments: -// Copyright 2016, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// Service exported by server reflection -// -#ifndef GRPC_reflection_2eproto__INCLUDED -#define GRPC_reflection_2eproto__INCLUDED - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace grpc { -class CompletionQueue; -class Channel; -class RpcService; -class ServerCompletionQueue; -class ServerContext; -} // namespace grpc - -namespace grpc { -namespace reflection { -namespace v1alpha { - -class ServerReflection GRPC_FINAL { - public: - class StubInterface { - public: - virtual ~StubInterface() {} - // The reflection service is structured as a bidirectional stream, ensuring - // all related requests go to a single server. - std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> ServerReflectionInfo(::grpc::ClientContext* context) { - return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(ServerReflectionInfoRaw(context)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> AsyncServerReflectionInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(AsyncServerReflectionInfoRaw(context, cq, tag)); - } - private: - virtual ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflectionInfoRaw(::grpc::ClientContext* context) = 0; - virtual ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; - }; - class Stub GRPC_FINAL : public StubInterface { - public: - Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); - std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> ServerReflectionInfo(::grpc::ClientContext* context) { - return std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(ServerReflectionInfoRaw(context)); - } - std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> AsyncServerReflectionInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { - return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(AsyncServerReflectionInfoRaw(context, cq, tag)); - } - - private: - std::shared_ptr< ::grpc::ChannelInterface> channel_; - ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflectionInfoRaw(::grpc::ClientContext* context) GRPC_OVERRIDE; - ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE; - const ::grpc::RpcMethod rpcmethod_ServerReflectionInfo_; - }; - static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); - - class Service : public ::grpc::Service { - public: - Service(); - virtual ~Service(); - // The reflection service is structured as a bidirectional stream, ensuring - // all related requests go to a single server. - virtual ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream); - }; - template - class WithAsyncMethod_ServerReflectionInfo : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service *service) {} - public: - WithAsyncMethod_ServerReflectionInfo() { - ::grpc::Service::MarkMethodAsync(0); - } - ~WithAsyncMethod_ServerReflectionInfo() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { - ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag); - } - }; - typedef WithAsyncMethod_ServerReflectionInfo AsyncService; - template - class WithGenericMethod_ServerReflectionInfo : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(const Service *service) {} - public: - WithGenericMethod_ServerReflectionInfo() { - ::grpc::Service::MarkMethodGeneric(0); - } - ~WithGenericMethod_ServerReflectionInfo() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; -}; - -} // namespace v1alpha -} // namespace reflection -} // namespace grpc - - -#endif // GRPC_reflection_2eproto__INCLUDED diff --git a/extensions/include/grpc++/impl/reflection.pb.h b/extensions/include/grpc++/impl/reflection.pb.h deleted file mode 100644 index 00d07735ee..0000000000 --- a/extensions/include/grpc++/impl/reflection.pb.h +++ /dev/null @@ -1,2035 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: reflection.proto - -#ifndef PROTOBUF_reflection_2eproto__INCLUDED -#define PROTOBUF_reflection_2eproto__INCLUDED - -#include - -#include - -#if GOOGLE_PROTOBUF_VERSION < 3000000 -#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 3000000 < GOOGLE_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 -// @@protoc_insertion_point(includes) - -namespace grpc { -namespace reflection { -namespace v1alpha { - -// Internal implementation detail -- do not call these. -void protobuf_AddDesc_reflection_2eproto(); -void protobuf_AssignDesc_reflection_2eproto(); -void protobuf_ShutdownFile_reflection_2eproto(); - -class ErrorResponse; -class ExtensionNumberResponse; -class ExtensionRequest; -class FileDescriptorResponse; -class ListServiceResponse; -class ServerReflectionRequest; -class ServerReflectionResponse; -class ServiceResponse; - -// =================================================================== - -class ServerReflectionRequest : public ::google::protobuf::Message { - public: - ServerReflectionRequest(); - virtual ~ServerReflectionRequest(); - - ServerReflectionRequest(const ServerReflectionRequest& from); - - inline ServerReflectionRequest& operator=(const ServerReflectionRequest& from) { - CopyFrom(from); - return *this; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const ServerReflectionRequest& default_instance(); - - enum MessageRequestCase { - kFileByFilename = 3, - kFileContainingSymbol = 4, - kFileContainingExtension = 5, - kAllExtensionNumbersOfType = 6, - kListServices = 7, - MESSAGE_REQUEST_NOT_SET = 0, - }; - - void Swap(ServerReflectionRequest* other); - - // implements Message ---------------------------------------------- - - inline ServerReflectionRequest* New() const { return New(NULL); } - - ServerReflectionRequest* New(::google::protobuf::Arena* arena) const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const ServerReflectionRequest& from); - void MergeFrom(const ServerReflectionRequest& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(ServerReflectionRequest* other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string host = 1; - void clear_host(); - static const int kHostFieldNumber = 1; - const ::std::string& host() const; - void set_host(const ::std::string& value); - void set_host(const char* value); - void set_host(const char* value, size_t size); - ::std::string* mutable_host(); - ::std::string* release_host(); - void set_allocated_host(::std::string* host); - - // optional string file_by_filename = 3; - private: - bool has_file_by_filename() const; - public: - void clear_file_by_filename(); - static const int kFileByFilenameFieldNumber = 3; - const ::std::string& file_by_filename() const; - void set_file_by_filename(const ::std::string& value); - void set_file_by_filename(const char* value); - void set_file_by_filename(const char* value, size_t size); - ::std::string* mutable_file_by_filename(); - ::std::string* release_file_by_filename(); - void set_allocated_file_by_filename(::std::string* file_by_filename); - - // optional string file_containing_symbol = 4; - private: - bool has_file_containing_symbol() const; - public: - void clear_file_containing_symbol(); - static const int kFileContainingSymbolFieldNumber = 4; - const ::std::string& file_containing_symbol() const; - void set_file_containing_symbol(const ::std::string& value); - void set_file_containing_symbol(const char* value); - void set_file_containing_symbol(const char* value, size_t size); - ::std::string* mutable_file_containing_symbol(); - ::std::string* release_file_containing_symbol(); - void set_allocated_file_containing_symbol(::std::string* file_containing_symbol); - - // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; - bool has_file_containing_extension() const; - void clear_file_containing_extension(); - static const int kFileContainingExtensionFieldNumber = 5; - const ::grpc::reflection::v1alpha::ExtensionRequest& file_containing_extension() const; - ::grpc::reflection::v1alpha::ExtensionRequest* mutable_file_containing_extension(); - ::grpc::reflection::v1alpha::ExtensionRequest* release_file_containing_extension(); - void set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension); - - // optional string all_extension_numbers_of_type = 6; - private: - bool has_all_extension_numbers_of_type() const; - public: - void clear_all_extension_numbers_of_type(); - static const int kAllExtensionNumbersOfTypeFieldNumber = 6; - const ::std::string& all_extension_numbers_of_type() const; - void set_all_extension_numbers_of_type(const ::std::string& value); - void set_all_extension_numbers_of_type(const char* value); - void set_all_extension_numbers_of_type(const char* value, size_t size); - ::std::string* mutable_all_extension_numbers_of_type(); - ::std::string* release_all_extension_numbers_of_type(); - void set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type); - - // optional string list_services = 7; - private: - bool has_list_services() const; - public: - void clear_list_services(); - static const int kListServicesFieldNumber = 7; - const ::std::string& list_services() const; - void set_list_services(const ::std::string& value); - void set_list_services(const char* value); - void set_list_services(const char* value, size_t size); - ::std::string* mutable_list_services(); - ::std::string* release_list_services(); - void set_allocated_list_services(::std::string* list_services); - - MessageRequestCase message_request_case() const; - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ServerReflectionRequest) - private: - inline void set_has_file_by_filename(); - inline void set_has_file_containing_symbol(); - inline void set_has_file_containing_extension(); - inline void set_has_all_extension_numbers_of_type(); - inline void set_has_list_services(); - - inline bool has_message_request() const; - void clear_message_request(); - inline void clear_has_message_request(); - - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr host_; - union MessageRequestUnion { - MessageRequestUnion() {} - ::google::protobuf::internal::ArenaStringPtr file_by_filename_; - ::google::protobuf::internal::ArenaStringPtr file_containing_symbol_; - ::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension_; - ::google::protobuf::internal::ArenaStringPtr all_extension_numbers_of_type_; - ::google::protobuf::internal::ArenaStringPtr list_services_; - } message_request_; - mutable int _cached_size_; - ::google::protobuf::uint32 _oneof_case_[1]; - - friend void protobuf_AddDesc_reflection_2eproto(); - friend void protobuf_AssignDesc_reflection_2eproto(); - friend void protobuf_ShutdownFile_reflection_2eproto(); - - void InitAsDefaultInstance(); - static ServerReflectionRequest* default_instance_; -}; -// ------------------------------------------------------------------- - -class ExtensionRequest : public ::google::protobuf::Message { - public: - ExtensionRequest(); - virtual ~ExtensionRequest(); - - ExtensionRequest(const ExtensionRequest& from); - - inline ExtensionRequest& operator=(const ExtensionRequest& from) { - CopyFrom(from); - return *this; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const ExtensionRequest& default_instance(); - - void Swap(ExtensionRequest* other); - - // implements Message ---------------------------------------------- - - inline ExtensionRequest* New() const { return New(NULL); } - - ExtensionRequest* New(::google::protobuf::Arena* arena) const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const ExtensionRequest& from); - void MergeFrom(const ExtensionRequest& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(ExtensionRequest* other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string containing_type = 1; - void clear_containing_type(); - static const int kContainingTypeFieldNumber = 1; - const ::std::string& containing_type() const; - void set_containing_type(const ::std::string& value); - void set_containing_type(const char* value); - void set_containing_type(const char* value, size_t size); - ::std::string* mutable_containing_type(); - ::std::string* release_containing_type(); - void set_allocated_containing_type(::std::string* containing_type); - - // optional int32 extension_number = 2; - void clear_extension_number(); - static const int kExtensionNumberFieldNumber = 2; - ::google::protobuf::int32 extension_number() const; - void set_extension_number(::google::protobuf::int32 value); - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionRequest) - private: - - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr containing_type_; - ::google::protobuf::int32 extension_number_; - mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); - friend void protobuf_AssignDesc_reflection_2eproto(); - friend void protobuf_ShutdownFile_reflection_2eproto(); - - void InitAsDefaultInstance(); - static ExtensionRequest* default_instance_; -}; -// ------------------------------------------------------------------- - -class ServerReflectionResponse : public ::google::protobuf::Message { - public: - ServerReflectionResponse(); - virtual ~ServerReflectionResponse(); - - ServerReflectionResponse(const ServerReflectionResponse& from); - - inline ServerReflectionResponse& operator=(const ServerReflectionResponse& from) { - CopyFrom(from); - return *this; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const ServerReflectionResponse& default_instance(); - - enum MessageResponseCase { - kFileDescriptorResponse = 4, - kAllExtensionNumbersResponse = 5, - kListServicesResponse = 6, - kErrorResponse = 7, - MESSAGE_RESPONSE_NOT_SET = 0, - }; - - void Swap(ServerReflectionResponse* other); - - // implements Message ---------------------------------------------- - - inline ServerReflectionResponse* New() const { return New(NULL); } - - ServerReflectionResponse* New(::google::protobuf::Arena* arena) const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const ServerReflectionResponse& from); - void MergeFrom(const ServerReflectionResponse& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(ServerReflectionResponse* other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string valid_host = 1; - void clear_valid_host(); - static const int kValidHostFieldNumber = 1; - const ::std::string& valid_host() const; - void set_valid_host(const ::std::string& value); - void set_valid_host(const char* value); - void set_valid_host(const char* value, size_t size); - ::std::string* mutable_valid_host(); - ::std::string* release_valid_host(); - void set_allocated_valid_host(::std::string* valid_host); - - // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; - bool has_original_request() const; - void clear_original_request(); - static const int kOriginalRequestFieldNumber = 2; - const ::grpc::reflection::v1alpha::ServerReflectionRequest& original_request() const; - ::grpc::reflection::v1alpha::ServerReflectionRequest* mutable_original_request(); - ::grpc::reflection::v1alpha::ServerReflectionRequest* release_original_request(); - void set_allocated_original_request(::grpc::reflection::v1alpha::ServerReflectionRequest* original_request); - - // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; - bool has_file_descriptor_response() const; - void clear_file_descriptor_response(); - static const int kFileDescriptorResponseFieldNumber = 4; - const ::grpc::reflection::v1alpha::FileDescriptorResponse& file_descriptor_response() const; - ::grpc::reflection::v1alpha::FileDescriptorResponse* mutable_file_descriptor_response(); - ::grpc::reflection::v1alpha::FileDescriptorResponse* release_file_descriptor_response(); - void set_allocated_file_descriptor_response(::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response); - - // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; - bool has_all_extension_numbers_response() const; - void clear_all_extension_numbers_response(); - static const int kAllExtensionNumbersResponseFieldNumber = 5; - const ::grpc::reflection::v1alpha::ExtensionNumberResponse& all_extension_numbers_response() const; - ::grpc::reflection::v1alpha::ExtensionNumberResponse* mutable_all_extension_numbers_response(); - ::grpc::reflection::v1alpha::ExtensionNumberResponse* release_all_extension_numbers_response(); - void set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response); - - // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; - bool has_list_services_response() const; - void clear_list_services_response(); - static const int kListServicesResponseFieldNumber = 6; - const ::grpc::reflection::v1alpha::ListServiceResponse& list_services_response() const; - ::grpc::reflection::v1alpha::ListServiceResponse* mutable_list_services_response(); - ::grpc::reflection::v1alpha::ListServiceResponse* release_list_services_response(); - void set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response); - - // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; - bool has_error_response() const; - void clear_error_response(); - static const int kErrorResponseFieldNumber = 7; - const ::grpc::reflection::v1alpha::ErrorResponse& error_response() const; - ::grpc::reflection::v1alpha::ErrorResponse* mutable_error_response(); - ::grpc::reflection::v1alpha::ErrorResponse* release_error_response(); - void set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response); - - MessageResponseCase message_response_case() const; - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ServerReflectionResponse) - private: - inline void set_has_file_descriptor_response(); - inline void set_has_all_extension_numbers_response(); - inline void set_has_list_services_response(); - inline void set_has_error_response(); - - inline bool has_message_response() const; - void clear_message_response(); - inline void clear_has_message_response(); - - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr valid_host_; - ::grpc::reflection::v1alpha::ServerReflectionRequest* original_request_; - union MessageResponseUnion { - MessageResponseUnion() {} - ::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response_; - ::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response_; - ::grpc::reflection::v1alpha::ListServiceResponse* list_services_response_; - ::grpc::reflection::v1alpha::ErrorResponse* error_response_; - } message_response_; - mutable int _cached_size_; - ::google::protobuf::uint32 _oneof_case_[1]; - - friend void protobuf_AddDesc_reflection_2eproto(); - friend void protobuf_AssignDesc_reflection_2eproto(); - friend void protobuf_ShutdownFile_reflection_2eproto(); - - void InitAsDefaultInstance(); - static ServerReflectionResponse* default_instance_; -}; -// ------------------------------------------------------------------- - -class FileDescriptorResponse : public ::google::protobuf::Message { - public: - FileDescriptorResponse(); - virtual ~FileDescriptorResponse(); - - FileDescriptorResponse(const FileDescriptorResponse& from); - - inline FileDescriptorResponse& operator=(const FileDescriptorResponse& from) { - CopyFrom(from); - return *this; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const FileDescriptorResponse& default_instance(); - - void Swap(FileDescriptorResponse* other); - - // implements Message ---------------------------------------------- - - inline FileDescriptorResponse* New() const { return New(NULL); } - - FileDescriptorResponse* New(::google::protobuf::Arena* arena) const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const FileDescriptorResponse& from); - void MergeFrom(const FileDescriptorResponse& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(FileDescriptorResponse* other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // repeated bytes file_descriptor_proto = 1; - int file_descriptor_proto_size() const; - void clear_file_descriptor_proto(); - static const int kFileDescriptorProtoFieldNumber = 1; - const ::std::string& file_descriptor_proto(int index) const; - ::std::string* mutable_file_descriptor_proto(int index); - void set_file_descriptor_proto(int index, const ::std::string& value); - void set_file_descriptor_proto(int index, const char* value); - void set_file_descriptor_proto(int index, const void* value, size_t size); - ::std::string* add_file_descriptor_proto(); - void add_file_descriptor_proto(const ::std::string& value); - void add_file_descriptor_proto(const char* value); - void add_file_descriptor_proto(const void* value, size_t size); - const ::google::protobuf::RepeatedPtrField< ::std::string>& file_descriptor_proto() const; - ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_file_descriptor_proto(); - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.FileDescriptorResponse) - private: - - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::RepeatedPtrField< ::std::string> file_descriptor_proto_; - mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); - friend void protobuf_AssignDesc_reflection_2eproto(); - friend void protobuf_ShutdownFile_reflection_2eproto(); - - void InitAsDefaultInstance(); - static FileDescriptorResponse* default_instance_; -}; -// ------------------------------------------------------------------- - -class ExtensionNumberResponse : public ::google::protobuf::Message { - public: - ExtensionNumberResponse(); - virtual ~ExtensionNumberResponse(); - - ExtensionNumberResponse(const ExtensionNumberResponse& from); - - inline ExtensionNumberResponse& operator=(const ExtensionNumberResponse& from) { - CopyFrom(from); - return *this; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const ExtensionNumberResponse& default_instance(); - - void Swap(ExtensionNumberResponse* other); - - // implements Message ---------------------------------------------- - - inline ExtensionNumberResponse* New() const { return New(NULL); } - - ExtensionNumberResponse* New(::google::protobuf::Arena* arena) const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const ExtensionNumberResponse& from); - void MergeFrom(const ExtensionNumberResponse& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(ExtensionNumberResponse* other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string base_type_name = 1; - void clear_base_type_name(); - static const int kBaseTypeNameFieldNumber = 1; - const ::std::string& base_type_name() const; - void set_base_type_name(const ::std::string& value); - void set_base_type_name(const char* value); - void set_base_type_name(const char* value, size_t size); - ::std::string* mutable_base_type_name(); - ::std::string* release_base_type_name(); - void set_allocated_base_type_name(::std::string* base_type_name); - - // repeated int32 extension_number = 2; - int extension_number_size() const; - void clear_extension_number(); - static const int kExtensionNumberFieldNumber = 2; - ::google::protobuf::int32 extension_number(int index) const; - void set_extension_number(int index, ::google::protobuf::int32 value); - void add_extension_number(::google::protobuf::int32 value); - const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& - extension_number() const; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* - mutable_extension_number(); - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionNumberResponse) - private: - - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr base_type_name_; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 > extension_number_; - mutable int _extension_number_cached_byte_size_; - mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); - friend void protobuf_AssignDesc_reflection_2eproto(); - friend void protobuf_ShutdownFile_reflection_2eproto(); - - void InitAsDefaultInstance(); - static ExtensionNumberResponse* default_instance_; -}; -// ------------------------------------------------------------------- - -class ListServiceResponse : public ::google::protobuf::Message { - public: - ListServiceResponse(); - virtual ~ListServiceResponse(); - - ListServiceResponse(const ListServiceResponse& from); - - inline ListServiceResponse& operator=(const ListServiceResponse& from) { - CopyFrom(from); - return *this; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const ListServiceResponse& default_instance(); - - void Swap(ListServiceResponse* other); - - // implements Message ---------------------------------------------- - - inline ListServiceResponse* New() const { return New(NULL); } - - ListServiceResponse* New(::google::protobuf::Arena* arena) const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const ListServiceResponse& from); - void MergeFrom(const ListServiceResponse& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(ListServiceResponse* other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; - int service_size() const; - void clear_service(); - static const int kServiceFieldNumber = 1; - const ::grpc::reflection::v1alpha::ServiceResponse& service(int index) const; - ::grpc::reflection::v1alpha::ServiceResponse* mutable_service(int index); - ::grpc::reflection::v1alpha::ServiceResponse* add_service(); - ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >* - mutable_service(); - const ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >& - service() const; - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ListServiceResponse) - private: - - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse > service_; - mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); - friend void protobuf_AssignDesc_reflection_2eproto(); - friend void protobuf_ShutdownFile_reflection_2eproto(); - - void InitAsDefaultInstance(); - static ListServiceResponse* default_instance_; -}; -// ------------------------------------------------------------------- - -class ServiceResponse : public ::google::protobuf::Message { - public: - ServiceResponse(); - virtual ~ServiceResponse(); - - ServiceResponse(const ServiceResponse& from); - - inline ServiceResponse& operator=(const ServiceResponse& from) { - CopyFrom(from); - return *this; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const ServiceResponse& default_instance(); - - void Swap(ServiceResponse* other); - - // implements Message ---------------------------------------------- - - inline ServiceResponse* New() const { return New(NULL); } - - ServiceResponse* New(::google::protobuf::Arena* arena) const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const ServiceResponse& from); - void MergeFrom(const ServiceResponse& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(ServiceResponse* other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string name = 1; - void clear_name(); - static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::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); - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ServiceResponse) - private: - - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr name_; - mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); - friend void protobuf_AssignDesc_reflection_2eproto(); - friend void protobuf_ShutdownFile_reflection_2eproto(); - - void InitAsDefaultInstance(); - static ServiceResponse* default_instance_; -}; -// ------------------------------------------------------------------- - -class ErrorResponse : public ::google::protobuf::Message { - public: - ErrorResponse(); - virtual ~ErrorResponse(); - - ErrorResponse(const ErrorResponse& from); - - inline ErrorResponse& operator=(const ErrorResponse& from) { - CopyFrom(from); - return *this; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const ErrorResponse& default_instance(); - - void Swap(ErrorResponse* other); - - // implements Message ---------------------------------------------- - - inline ErrorResponse* New() const { return New(NULL); } - - ErrorResponse* New(::google::protobuf::Arena* arena) const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const ErrorResponse& from); - void MergeFrom(const ErrorResponse& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(ErrorResponse* other); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } - public: - - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional int32 error_code = 1; - void clear_error_code(); - static const int kErrorCodeFieldNumber = 1; - ::google::protobuf::int32 error_code() const; - void set_error_code(::google::protobuf::int32 value); - - // optional string error_message = 2; - void clear_error_message(); - static const int kErrorMessageFieldNumber = 2; - const ::std::string& error_message() const; - void set_error_message(const ::std::string& value); - void set_error_message(const char* value); - void set_error_message(const char* value, size_t size); - ::std::string* mutable_error_message(); - ::std::string* release_error_message(); - void set_allocated_error_message(::std::string* error_message); - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ErrorResponse) - private: - - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr error_message_; - ::google::protobuf::int32 error_code_; - mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); - friend void protobuf_AssignDesc_reflection_2eproto(); - friend void protobuf_ShutdownFile_reflection_2eproto(); - - void InitAsDefaultInstance(); - static ErrorResponse* default_instance_; -}; -// =================================================================== - - -// =================================================================== - -#if !PROTOBUF_INLINE_NOT_IN_HEADERS -// ServerReflectionRequest - -// optional string host = 1; -inline void ServerReflectionRequest::clear_host() { - host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline const ::std::string& ServerReflectionRequest::host() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.host) - return host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void ServerReflectionRequest::set_host(const ::std::string& value) { - - host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.host) -} -inline void ServerReflectionRequest::set_host(const char* value) { - - host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.host) -} -inline void ServerReflectionRequest::set_host(const char* value, size_t size) { - - host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.host) -} -inline ::std::string* ServerReflectionRequest::mutable_host() { - - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.host) - return host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline ::std::string* ServerReflectionRequest::release_host() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.host) - - return host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void ServerReflectionRequest::set_allocated_host(::std::string* host) { - if (host != NULL) { - - } else { - - } - host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), host); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.host) -} - -// optional string file_by_filename = 3; -inline bool ServerReflectionRequest::has_file_by_filename() const { - return message_request_case() == kFileByFilename; -} -inline void ServerReflectionRequest::set_has_file_by_filename() { - _oneof_case_[0] = kFileByFilename; -} -inline void ServerReflectionRequest::clear_file_by_filename() { - if (has_file_by_filename()) { - message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - clear_has_message_request(); - } -} -inline const ::std::string& ServerReflectionRequest::file_by_filename() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) - if (has_file_by_filename()) { - return message_request_.file_by_filename_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); -} -inline void ServerReflectionRequest::set_file_by_filename(const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) - if (!has_file_by_filename()) { - clear_message_request(); - set_has_file_by_filename(); - message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) -} -inline void ServerReflectionRequest::set_file_by_filename(const char* value) { - if (!has_file_by_filename()) { - clear_message_request(); - set_has_file_by_filename(); - message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) -} -inline void ServerReflectionRequest::set_file_by_filename(const char* value, size_t size) { - if (!has_file_by_filename()) { - clear_message_request(); - set_has_file_by_filename(); - message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) -} -inline ::std::string* ServerReflectionRequest::mutable_file_by_filename() { - if (!has_file_by_filename()) { - clear_message_request(); - set_has_file_by_filename(); - message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) - return message_request_.file_by_filename_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline ::std::string* ServerReflectionRequest::release_file_by_filename() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) - if (has_file_by_filename()) { - clear_has_message_request(); - return message_request_.file_by_filename_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } else { - return NULL; - } -} -inline void ServerReflectionRequest::set_allocated_file_by_filename(::std::string* file_by_filename) { - if (!has_file_by_filename()) { - message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - clear_message_request(); - if (file_by_filename != NULL) { - set_has_file_by_filename(); - message_request_.file_by_filename_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - file_by_filename); - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) -} - -// optional string file_containing_symbol = 4; -inline bool ServerReflectionRequest::has_file_containing_symbol() const { - return message_request_case() == kFileContainingSymbol; -} -inline void ServerReflectionRequest::set_has_file_containing_symbol() { - _oneof_case_[0] = kFileContainingSymbol; -} -inline void ServerReflectionRequest::clear_file_containing_symbol() { - if (has_file_containing_symbol()) { - message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - clear_has_message_request(); - } -} -inline const ::std::string& ServerReflectionRequest::file_containing_symbol() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) - if (has_file_containing_symbol()) { - return message_request_.file_containing_symbol_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); -} -inline void ServerReflectionRequest::set_file_containing_symbol(const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) - if (!has_file_containing_symbol()) { - clear_message_request(); - set_has_file_containing_symbol(); - message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) -} -inline void ServerReflectionRequest::set_file_containing_symbol(const char* value) { - if (!has_file_containing_symbol()) { - clear_message_request(); - set_has_file_containing_symbol(); - message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) -} -inline void ServerReflectionRequest::set_file_containing_symbol(const char* value, size_t size) { - if (!has_file_containing_symbol()) { - clear_message_request(); - set_has_file_containing_symbol(); - message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) -} -inline ::std::string* ServerReflectionRequest::mutable_file_containing_symbol() { - if (!has_file_containing_symbol()) { - clear_message_request(); - set_has_file_containing_symbol(); - message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) - return message_request_.file_containing_symbol_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline ::std::string* ServerReflectionRequest::release_file_containing_symbol() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) - if (has_file_containing_symbol()) { - clear_has_message_request(); - return message_request_.file_containing_symbol_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } else { - return NULL; - } -} -inline void ServerReflectionRequest::set_allocated_file_containing_symbol(::std::string* file_containing_symbol) { - if (!has_file_containing_symbol()) { - message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - clear_message_request(); - if (file_containing_symbol != NULL) { - set_has_file_containing_symbol(); - message_request_.file_containing_symbol_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - file_containing_symbol); - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) -} - -// optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; -inline bool ServerReflectionRequest::has_file_containing_extension() const { - return message_request_case() == kFileContainingExtension; -} -inline void ServerReflectionRequest::set_has_file_containing_extension() { - _oneof_case_[0] = kFileContainingExtension; -} -inline void ServerReflectionRequest::clear_file_containing_extension() { - if (has_file_containing_extension()) { - delete message_request_.file_containing_extension_; - clear_has_message_request(); - } -} -inline const ::grpc::reflection::v1alpha::ExtensionRequest& ServerReflectionRequest::file_containing_extension() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) - return has_file_containing_extension() - ? *message_request_.file_containing_extension_ - : ::grpc::reflection::v1alpha::ExtensionRequest::default_instance(); -} -inline ::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::mutable_file_containing_extension() { - if (!has_file_containing_extension()) { - clear_message_request(); - set_has_file_containing_extension(); - message_request_.file_containing_extension_ = new ::grpc::reflection::v1alpha::ExtensionRequest; - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) - return message_request_.file_containing_extension_; -} -inline ::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::release_file_containing_extension() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) - if (has_file_containing_extension()) { - clear_has_message_request(); - ::grpc::reflection::v1alpha::ExtensionRequest* temp = message_request_.file_containing_extension_; - message_request_.file_containing_extension_ = NULL; - return temp; - } else { - return NULL; - } -} -inline void ServerReflectionRequest::set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension) { - clear_message_request(); - if (file_containing_extension) { - set_has_file_containing_extension(); - message_request_.file_containing_extension_ = file_containing_extension; - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) -} - -// optional string all_extension_numbers_of_type = 6; -inline bool ServerReflectionRequest::has_all_extension_numbers_of_type() const { - return message_request_case() == kAllExtensionNumbersOfType; -} -inline void ServerReflectionRequest::set_has_all_extension_numbers_of_type() { - _oneof_case_[0] = kAllExtensionNumbersOfType; -} -inline void ServerReflectionRequest::clear_all_extension_numbers_of_type() { - if (has_all_extension_numbers_of_type()) { - message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - clear_has_message_request(); - } -} -inline const ::std::string& ServerReflectionRequest::all_extension_numbers_of_type() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) - if (has_all_extension_numbers_of_type()) { - return message_request_.all_extension_numbers_of_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); -} -inline void ServerReflectionRequest::set_all_extension_numbers_of_type(const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) - if (!has_all_extension_numbers_of_type()) { - clear_message_request(); - set_has_all_extension_numbers_of_type(); - message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) -} -inline void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value) { - if (!has_all_extension_numbers_of_type()) { - clear_message_request(); - set_has_all_extension_numbers_of_type(); - message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) -} -inline void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value, size_t size) { - if (!has_all_extension_numbers_of_type()) { - clear_message_request(); - set_has_all_extension_numbers_of_type(); - message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) -} -inline ::std::string* ServerReflectionRequest::mutable_all_extension_numbers_of_type() { - if (!has_all_extension_numbers_of_type()) { - clear_message_request(); - set_has_all_extension_numbers_of_type(); - message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) - return message_request_.all_extension_numbers_of_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline ::std::string* ServerReflectionRequest::release_all_extension_numbers_of_type() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) - if (has_all_extension_numbers_of_type()) { - clear_has_message_request(); - return message_request_.all_extension_numbers_of_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } else { - return NULL; - } -} -inline void ServerReflectionRequest::set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type) { - if (!has_all_extension_numbers_of_type()) { - message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - clear_message_request(); - if (all_extension_numbers_of_type != NULL) { - set_has_all_extension_numbers_of_type(); - message_request_.all_extension_numbers_of_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - all_extension_numbers_of_type); - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) -} - -// optional string list_services = 7; -inline bool ServerReflectionRequest::has_list_services() const { - return message_request_case() == kListServices; -} -inline void ServerReflectionRequest::set_has_list_services() { - _oneof_case_[0] = kListServices; -} -inline void ServerReflectionRequest::clear_list_services() { - if (has_list_services()) { - message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - clear_has_message_request(); - } -} -inline const ::std::string& ServerReflectionRequest::list_services() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) - if (has_list_services()) { - return message_request_.list_services_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); -} -inline void ServerReflectionRequest::set_list_services(const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) - if (!has_list_services()) { - clear_message_request(); - set_has_list_services(); - message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) -} -inline void ServerReflectionRequest::set_list_services(const char* value) { - if (!has_list_services()) { - clear_message_request(); - set_has_list_services(); - message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) -} -inline void ServerReflectionRequest::set_list_services(const char* value, size_t size) { - if (!has_list_services()) { - clear_message_request(); - set_has_list_services(); - message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) -} -inline ::std::string* ServerReflectionRequest::mutable_list_services() { - if (!has_list_services()) { - clear_message_request(); - set_has_list_services(); - message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) - return message_request_.list_services_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline ::std::string* ServerReflectionRequest::release_list_services() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) - if (has_list_services()) { - clear_has_message_request(); - return message_request_.list_services_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } else { - return NULL; - } -} -inline void ServerReflectionRequest::set_allocated_list_services(::std::string* list_services) { - if (!has_list_services()) { - message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - clear_message_request(); - if (list_services != NULL) { - set_has_list_services(); - message_request_.list_services_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - list_services); - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) -} - -inline bool ServerReflectionRequest::has_message_request() const { - return message_request_case() != MESSAGE_REQUEST_NOT_SET; -} -inline void ServerReflectionRequest::clear_has_message_request() { - _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET; -} -inline ServerReflectionRequest::MessageRequestCase ServerReflectionRequest::message_request_case() const { - return ServerReflectionRequest::MessageRequestCase(_oneof_case_[0]); -} -// ------------------------------------------------------------------- - -// ExtensionRequest - -// optional string containing_type = 1; -inline void ExtensionRequest::clear_containing_type() { - containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline const ::std::string& ExtensionRequest::containing_type() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - return containing_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void ExtensionRequest::set_containing_type(const ::std::string& value) { - - containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.containing_type) -} -inline void ExtensionRequest::set_containing_type(const char* value) { - - containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionRequest.containing_type) -} -inline void ExtensionRequest::set_containing_type(const char* value, size_t size) { - - containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionRequest.containing_type) -} -inline ::std::string* ExtensionRequest::mutable_containing_type() { - - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - return containing_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline ::std::string* ExtensionRequest::release_containing_type() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - - return containing_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void ExtensionRequest::set_allocated_containing_type(::std::string* containing_type) { - if (containing_type != NULL) { - - } else { - - } - containing_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), containing_type); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionRequest.containing_type) -} - -// optional int32 extension_number = 2; -inline void ExtensionRequest::clear_extension_number() { - extension_number_ = 0; -} -inline ::google::protobuf::int32 ExtensionRequest::extension_number() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.extension_number) - return extension_number_; -} -inline void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) { - - extension_number_ = value; - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number) -} - -// ------------------------------------------------------------------- - -// ServerReflectionResponse - -// optional string valid_host = 1; -inline void ServerReflectionResponse::clear_valid_host() { - valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline const ::std::string& ServerReflectionResponse::valid_host() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) - return valid_host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void ServerReflectionResponse::set_valid_host(const ::std::string& value) { - - valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) -} -inline void ServerReflectionResponse::set_valid_host(const char* value) { - - valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) -} -inline void ServerReflectionResponse::set_valid_host(const char* value, size_t size) { - - valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) -} -inline ::std::string* ServerReflectionResponse::mutable_valid_host() { - - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) - return valid_host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline ::std::string* ServerReflectionResponse::release_valid_host() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) - - return valid_host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void ServerReflectionResponse::set_allocated_valid_host(::std::string* valid_host) { - if (valid_host != NULL) { - - } else { - - } - valid_host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), valid_host); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) -} - -// optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; -inline bool ServerReflectionResponse::has_original_request() const { - return !_is_default_instance_ && original_request_ != NULL; -} -inline void ServerReflectionResponse::clear_original_request() { - if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; - original_request_ = NULL; -} -inline const ::grpc::reflection::v1alpha::ServerReflectionRequest& ServerReflectionResponse::original_request() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) - return original_request_ != NULL ? *original_request_ : *default_instance_->original_request_; -} -inline ::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::mutable_original_request() { - - if (original_request_ == NULL) { - original_request_ = new ::grpc::reflection::v1alpha::ServerReflectionRequest; - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) - return original_request_; -} -inline ::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::release_original_request() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) - - ::grpc::reflection::v1alpha::ServerReflectionRequest* temp = original_request_; - original_request_ = NULL; - return temp; -} -inline void ServerReflectionResponse::set_allocated_original_request(::grpc::reflection::v1alpha::ServerReflectionRequest* original_request) { - delete original_request_; - original_request_ = original_request; - if (original_request) { - - } else { - - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) -} - -// optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; -inline bool ServerReflectionResponse::has_file_descriptor_response() const { - return message_response_case() == kFileDescriptorResponse; -} -inline void ServerReflectionResponse::set_has_file_descriptor_response() { - _oneof_case_[0] = kFileDescriptorResponse; -} -inline void ServerReflectionResponse::clear_file_descriptor_response() { - if (has_file_descriptor_response()) { - delete message_response_.file_descriptor_response_; - clear_has_message_response(); - } -} -inline const ::grpc::reflection::v1alpha::FileDescriptorResponse& ServerReflectionResponse::file_descriptor_response() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) - return has_file_descriptor_response() - ? *message_response_.file_descriptor_response_ - : ::grpc::reflection::v1alpha::FileDescriptorResponse::default_instance(); -} -inline ::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::mutable_file_descriptor_response() { - if (!has_file_descriptor_response()) { - clear_message_response(); - set_has_file_descriptor_response(); - message_response_.file_descriptor_response_ = new ::grpc::reflection::v1alpha::FileDescriptorResponse; - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) - return message_response_.file_descriptor_response_; -} -inline ::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::release_file_descriptor_response() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) - if (has_file_descriptor_response()) { - clear_has_message_response(); - ::grpc::reflection::v1alpha::FileDescriptorResponse* temp = message_response_.file_descriptor_response_; - message_response_.file_descriptor_response_ = NULL; - return temp; - } else { - return NULL; - } -} -inline void ServerReflectionResponse::set_allocated_file_descriptor_response(::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response) { - clear_message_response(); - if (file_descriptor_response) { - set_has_file_descriptor_response(); - message_response_.file_descriptor_response_ = file_descriptor_response; - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) -} - -// optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; -inline bool ServerReflectionResponse::has_all_extension_numbers_response() const { - return message_response_case() == kAllExtensionNumbersResponse; -} -inline void ServerReflectionResponse::set_has_all_extension_numbers_response() { - _oneof_case_[0] = kAllExtensionNumbersResponse; -} -inline void ServerReflectionResponse::clear_all_extension_numbers_response() { - if (has_all_extension_numbers_response()) { - delete message_response_.all_extension_numbers_response_; - clear_has_message_response(); - } -} -inline const ::grpc::reflection::v1alpha::ExtensionNumberResponse& ServerReflectionResponse::all_extension_numbers_response() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) - return has_all_extension_numbers_response() - ? *message_response_.all_extension_numbers_response_ - : ::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance(); -} -inline ::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::mutable_all_extension_numbers_response() { - if (!has_all_extension_numbers_response()) { - clear_message_response(); - set_has_all_extension_numbers_response(); - message_response_.all_extension_numbers_response_ = new ::grpc::reflection::v1alpha::ExtensionNumberResponse; - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) - return message_response_.all_extension_numbers_response_; -} -inline ::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::release_all_extension_numbers_response() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) - if (has_all_extension_numbers_response()) { - clear_has_message_response(); - ::grpc::reflection::v1alpha::ExtensionNumberResponse* temp = message_response_.all_extension_numbers_response_; - message_response_.all_extension_numbers_response_ = NULL; - return temp; - } else { - return NULL; - } -} -inline void ServerReflectionResponse::set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response) { - clear_message_response(); - if (all_extension_numbers_response) { - set_has_all_extension_numbers_response(); - message_response_.all_extension_numbers_response_ = all_extension_numbers_response; - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) -} - -// optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; -inline bool ServerReflectionResponse::has_list_services_response() const { - return message_response_case() == kListServicesResponse; -} -inline void ServerReflectionResponse::set_has_list_services_response() { - _oneof_case_[0] = kListServicesResponse; -} -inline void ServerReflectionResponse::clear_list_services_response() { - if (has_list_services_response()) { - delete message_response_.list_services_response_; - clear_has_message_response(); - } -} -inline const ::grpc::reflection::v1alpha::ListServiceResponse& ServerReflectionResponse::list_services_response() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) - return has_list_services_response() - ? *message_response_.list_services_response_ - : ::grpc::reflection::v1alpha::ListServiceResponse::default_instance(); -} -inline ::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::mutable_list_services_response() { - if (!has_list_services_response()) { - clear_message_response(); - set_has_list_services_response(); - message_response_.list_services_response_ = new ::grpc::reflection::v1alpha::ListServiceResponse; - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) - return message_response_.list_services_response_; -} -inline ::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::release_list_services_response() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) - if (has_list_services_response()) { - clear_has_message_response(); - ::grpc::reflection::v1alpha::ListServiceResponse* temp = message_response_.list_services_response_; - message_response_.list_services_response_ = NULL; - return temp; - } else { - return NULL; - } -} -inline void ServerReflectionResponse::set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response) { - clear_message_response(); - if (list_services_response) { - set_has_list_services_response(); - message_response_.list_services_response_ = list_services_response; - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) -} - -// optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; -inline bool ServerReflectionResponse::has_error_response() const { - return message_response_case() == kErrorResponse; -} -inline void ServerReflectionResponse::set_has_error_response() { - _oneof_case_[0] = kErrorResponse; -} -inline void ServerReflectionResponse::clear_error_response() { - if (has_error_response()) { - delete message_response_.error_response_; - clear_has_message_response(); - } -} -inline const ::grpc::reflection::v1alpha::ErrorResponse& ServerReflectionResponse::error_response() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) - return has_error_response() - ? *message_response_.error_response_ - : ::grpc::reflection::v1alpha::ErrorResponse::default_instance(); -} -inline ::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::mutable_error_response() { - if (!has_error_response()) { - clear_message_response(); - set_has_error_response(); - message_response_.error_response_ = new ::grpc::reflection::v1alpha::ErrorResponse; - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) - return message_response_.error_response_; -} -inline ::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::release_error_response() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) - if (has_error_response()) { - clear_has_message_response(); - ::grpc::reflection::v1alpha::ErrorResponse* temp = message_response_.error_response_; - message_response_.error_response_ = NULL; - return temp; - } else { - return NULL; - } -} -inline void ServerReflectionResponse::set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response) { - clear_message_response(); - if (error_response) { - set_has_error_response(); - message_response_.error_response_ = error_response; - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) -} - -inline bool ServerReflectionResponse::has_message_response() const { - return message_response_case() != MESSAGE_RESPONSE_NOT_SET; -} -inline void ServerReflectionResponse::clear_has_message_response() { - _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET; -} -inline ServerReflectionResponse::MessageResponseCase ServerReflectionResponse::message_response_case() const { - return ServerReflectionResponse::MessageResponseCase(_oneof_case_[0]); -} -// ------------------------------------------------------------------- - -// FileDescriptorResponse - -// repeated bytes file_descriptor_proto = 1; -inline int FileDescriptorResponse::file_descriptor_proto_size() const { - return file_descriptor_proto_.size(); -} -inline void FileDescriptorResponse::clear_file_descriptor_proto() { - file_descriptor_proto_.Clear(); -} -inline const ::std::string& FileDescriptorResponse::file_descriptor_proto(int index) const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) - return file_descriptor_proto_.Get(index); -} -inline ::std::string* FileDescriptorResponse::mutable_file_descriptor_proto(int index) { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) - return file_descriptor_proto_.Mutable(index); -} -inline void FileDescriptorResponse::set_file_descriptor_proto(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) - file_descriptor_proto_.Mutable(index)->assign(value); -} -inline void FileDescriptorResponse::set_file_descriptor_proto(int index, const char* value) { - file_descriptor_proto_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) -} -inline void FileDescriptorResponse::set_file_descriptor_proto(int index, const void* value, size_t size) { - file_descriptor_proto_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) -} -inline ::std::string* FileDescriptorResponse::add_file_descriptor_proto() { - // @@protoc_insertion_point(field_add_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) - return file_descriptor_proto_.Add(); -} -inline void FileDescriptorResponse::add_file_descriptor_proto(const ::std::string& value) { - file_descriptor_proto_.Add()->assign(value); - // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) -} -inline void FileDescriptorResponse::add_file_descriptor_proto(const char* value) { - file_descriptor_proto_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) -} -inline void FileDescriptorResponse::add_file_descriptor_proto(const void* value, size_t size) { - file_descriptor_proto_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) -} -inline const ::google::protobuf::RepeatedPtrField< ::std::string>& -FileDescriptorResponse::file_descriptor_proto() const { - // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) - return file_descriptor_proto_; -} -inline ::google::protobuf::RepeatedPtrField< ::std::string>* -FileDescriptorResponse::mutable_file_descriptor_proto() { - // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) - return &file_descriptor_proto_; -} - -// ------------------------------------------------------------------- - -// ExtensionNumberResponse - -// optional string base_type_name = 1; -inline void ExtensionNumberResponse::clear_base_type_name() { - base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline const ::std::string& ExtensionNumberResponse::base_type_name() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) - return base_type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void ExtensionNumberResponse::set_base_type_name(const ::std::string& value) { - - base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) -} -inline void ExtensionNumberResponse::set_base_type_name(const char* value) { - - base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) -} -inline void ExtensionNumberResponse::set_base_type_name(const char* value, size_t size) { - - base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) -} -inline ::std::string* ExtensionNumberResponse::mutable_base_type_name() { - - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) - return base_type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline ::std::string* ExtensionNumberResponse::release_base_type_name() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) - - return base_type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void ExtensionNumberResponse::set_allocated_base_type_name(::std::string* base_type_name) { - if (base_type_name != NULL) { - - } else { - - } - base_type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), base_type_name); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) -} - -// repeated int32 extension_number = 2; -inline int ExtensionNumberResponse::extension_number_size() const { - return extension_number_.size(); -} -inline void ExtensionNumberResponse::clear_extension_number() { - extension_number_.Clear(); -} -inline ::google::protobuf::int32 ExtensionNumberResponse::extension_number(int index) const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) - return extension_number_.Get(index); -} -inline void ExtensionNumberResponse::set_extension_number(int index, ::google::protobuf::int32 value) { - extension_number_.Set(index, value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) -} -inline void ExtensionNumberResponse::add_extension_number(::google::protobuf::int32 value) { - extension_number_.Add(value); - // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) -} -inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& -ExtensionNumberResponse::extension_number() const { - // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) - return extension_number_; -} -inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* -ExtensionNumberResponse::mutable_extension_number() { - // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) - return &extension_number_; -} - -// ------------------------------------------------------------------- - -// ListServiceResponse - -// repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; -inline int ListServiceResponse::service_size() const { - return service_.size(); -} -inline void ListServiceResponse::clear_service() { - service_.Clear(); -} -inline const ::grpc::reflection::v1alpha::ServiceResponse& ListServiceResponse::service(int index) const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.service) - return service_.Get(index); -} -inline ::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::mutable_service(int index) { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.service) - return service_.Mutable(index); -} -inline ::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::add_service() { - // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.service) - return service_.Add(); -} -inline ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >* -ListServiceResponse::mutable_service() { - // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.service) - return &service_; -} -inline const ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >& -ListServiceResponse::service() const { - // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.service) - return service_; -} - -// ------------------------------------------------------------------- - -// ServiceResponse - -// optional string name = 1; -inline void ServiceResponse::clear_name() { - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline const ::std::string& ServiceResponse::name() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServiceResponse.name) - return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void ServiceResponse::set_name(const ::std::string& value) { - - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServiceResponse.name) -} -inline void ServiceResponse::set_name(const char* value) { - - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServiceResponse.name) -} -inline void ServiceResponse::set_name(const char* value, size_t size) { - - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServiceResponse.name) -} -inline ::std::string* ServiceResponse::mutable_name() { - - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServiceResponse.name) - return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline ::std::string* ServiceResponse::release_name() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServiceResponse.name) - - return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void ServiceResponse::set_allocated_name(::std::string* name) { - if (name != NULL) { - - } else { - - } - name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServiceResponse.name) -} - -// ------------------------------------------------------------------- - -// ErrorResponse - -// optional int32 error_code = 1; -inline void ErrorResponse::clear_error_code() { - error_code_ = 0; -} -inline ::google::protobuf::int32 ErrorResponse::error_code() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_code) - return error_code_; -} -inline void ErrorResponse::set_error_code(::google::protobuf::int32 value) { - - error_code_ = value; - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_code) -} - -// optional string error_message = 2; -inline void ErrorResponse::clear_error_message() { - error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline const ::std::string& ErrorResponse::error_message() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_message) - return error_message_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void ErrorResponse::set_error_message(const ::std::string& value) { - - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_message) -} -inline void ErrorResponse::set_error_message(const char* value) { - - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ErrorResponse.error_message) -} -inline void ErrorResponse::set_error_message(const char* value, size_t size) { - - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ErrorResponse.error_message) -} -inline ::std::string* ErrorResponse::mutable_error_message() { - - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ErrorResponse.error_message) - return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline ::std::string* ErrorResponse::release_error_message() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ErrorResponse.error_message) - - return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void ErrorResponse::set_allocated_error_message(::std::string* error_message) { - if (error_message != NULL) { - - } else { - - } - error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message) -} - -#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - -// ------------------------------------------------------------------- - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace v1alpha -} // namespace reflection -} // namespace grpc - -// @@protoc_insertion_point(global_scope) - -#endif // PROTOBUF_reflection_2eproto__INCLUDED diff --git a/extensions/reflection/proto_server_reflection.cc b/extensions/reflection/proto_server_reflection.cc deleted file mode 100644 index f3cf7958e8..0000000000 --- a/extensions/reflection/proto_server_reflection.cc +++ /dev/null @@ -1,223 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include - -#include - -#include "reflection/proto_server_reflection.h" - -using grpc::Status; -using grpc::StatusCode; -using grpc::reflection::v1alpha::ServerReflectionRequest; -using grpc::reflection::v1alpha::ExtensionRequest; -using grpc::reflection::v1alpha::ServerReflectionResponse; -using grpc::reflection::v1alpha::ListServiceResponse; -using grpc::reflection::v1alpha::ServiceResponse; -using grpc::reflection::v1alpha::ExtensionNumberResponse; -using grpc::reflection::v1alpha::ErrorResponse; -using grpc::reflection::v1alpha::FileDescriptorResponse; - -namespace grpc { - -ProtoServerReflection::ProtoServerReflection() - : descriptor_pool_(protobuf::DescriptorPool::generated_pool()) {} - -void ProtoServerReflection::SetServiceList( - const std::vector* services) { - services_ = services; -} - -Status ProtoServerReflection::ServerReflectionInfo( - ServerContext* context, - ServerReaderWriter* - stream) { - ServerReflectionRequest request; - ServerReflectionResponse response; - Status status; - while (stream->Read(&request)) { - switch (request.message_request_case()) { - case ServerReflectionRequest::MessageRequestCase::kFileByFilename: - status = GetFileByName(context, request.file_by_filename(), &response); - break; - case ServerReflectionRequest::MessageRequestCase::kFileContainingSymbol: - status = GetFileContainingSymbol( - context, request.file_containing_symbol(), &response); - break; - case ServerReflectionRequest::MessageRequestCase:: - kFileContainingExtension: - status = GetFileContainingExtension( - context, &request.file_containing_extension(), &response); - break; - case ServerReflectionRequest::MessageRequestCase:: - kAllExtensionNumbersOfType: - status = GetAllExtensionNumbers( - context, request.all_extension_numbers_of_type(), - response.mutable_all_extension_numbers_response()); - break; - case ServerReflectionRequest::MessageRequestCase::kListServices: - status = - ListService(context, response.mutable_list_services_response()); - break; - default: - status = Status(StatusCode::UNIMPLEMENTED, ""); - } - - if (!status.ok()) { - FillErrorResponse(status, response.mutable_error_response()); - } - response.set_valid_host(request.host()); - response.set_allocated_original_request( - new ServerReflectionRequest(request)); - stream->Write(response); - } - - return Status::OK; -} - -void ProtoServerReflection::FillErrorResponse(const Status& status, - ErrorResponse* error_response) { - error_response->set_error_code(status.error_code()); - error_response->set_error_message(status.error_message()); -} - -Status ProtoServerReflection::ListService(ServerContext* context, - ListServiceResponse* response) { - if (services_ == nullptr) { - return Status(StatusCode::NOT_FOUND, "Services not found."); - } - for (auto it = services_->begin(); it != services_->end(); ++it) { - ServiceResponse* service_response = response->add_service(); - service_response->set_name(*it); - } - return Status::OK; -} - -Status ProtoServerReflection::GetFileByName( - ServerContext* context, const grpc::string& filename, - ServerReflectionResponse* response) { - if (descriptor_pool_ == nullptr) { - return Status::CANCELLED; - } - - const protobuf::FileDescriptor* file_desc = descriptor_pool_->FindFileByName(filename); - if (file_desc == nullptr) { - return Status(StatusCode::NOT_FOUND, "File not found."); - } - std::unordered_set seen_files; - FillFileDescriptorResponse(file_desc, response, &seen_files); - return Status::OK; -} - -Status ProtoServerReflection::GetFileContainingSymbol( - ServerContext* context, const grpc::string& symbol, - ServerReflectionResponse* response) { - if (descriptor_pool_ == nullptr) { - return Status::CANCELLED; - } - - const protobuf::FileDescriptor* file_desc = - descriptor_pool_->FindFileContainingSymbol(symbol); - if (file_desc == nullptr) { - return Status(StatusCode::NOT_FOUND, "Symbol not found."); - } - std::unordered_set seen_files; - FillFileDescriptorResponse(file_desc, response, &seen_files); - return Status::OK; -} - -Status ProtoServerReflection::GetFileContainingExtension( - ServerContext* context, const ExtensionRequest* request, - ServerReflectionResponse* response) { - if (descriptor_pool_ == nullptr) { - return Status::CANCELLED; - } - - const protobuf::Descriptor* desc = - descriptor_pool_->FindMessageTypeByName(request->containing_type()); - if (desc == nullptr) { - return Status(StatusCode::NOT_FOUND, "Type not found."); - } - - const protobuf::FieldDescriptor* field_desc = descriptor_pool_->FindExtensionByNumber( - desc, request->extension_number()); - if (field_desc == nullptr) { - return Status(StatusCode::NOT_FOUND, "Extension not found."); - } - std::unordered_set seen_files; - FillFileDescriptorResponse(field_desc->file(), response, &seen_files); - return Status::OK; -} - -Status ProtoServerReflection::GetAllExtensionNumbers( - ServerContext* context, const grpc::string& type, - ExtensionNumberResponse* response) { - if (descriptor_pool_ == nullptr) { - return Status::CANCELLED; - } - - const protobuf::Descriptor* desc = descriptor_pool_->FindMessageTypeByName(type); - if (desc == nullptr) { - return Status(StatusCode::NOT_FOUND, "Type not found."); - } - - std::vector extensions; - descriptor_pool_->FindAllExtensions(desc, &extensions); - for (auto extension : extensions) { - response->add_extension_number(extension->number()); - } - response->set_base_type_name(type); - return Status::OK; -} - -void ProtoServerReflection::FillFileDescriptorResponse( - const protobuf::FileDescriptor* file_desc, ServerReflectionResponse* response, - std::unordered_set* seen_files) { - if (seen_files->find(file_desc->name()) != seen_files->end()) { - return; - } - seen_files->insert(file_desc->name()); - - protobuf::FileDescriptorProto file_desc_proto; - grpc::string data; - file_desc->CopyTo(&file_desc_proto); - file_desc_proto.SerializeToString(&data); - response->mutable_file_descriptor_response()->add_file_descriptor_proto(data); - - for (int i = 0; i < file_desc->dependency_count(); ++i) { - FillFileDescriptorResponse(file_desc->dependency(i), response, seen_files); - } -} - -} // namespace grpc diff --git a/extensions/reflection/proto_server_reflection.h b/extensions/reflection/proto_server_reflection.h deleted file mode 100644 index 71b316816c..0000000000 --- a/extensions/reflection/proto_server_reflection.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H -#define GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H - -#include -#include - -#include - -#include - -namespace grpc { - -class ProtoServerReflection GRPC_FINAL - : public reflection::v1alpha::ServerReflection::Service { - public: - ProtoServerReflection(); - - void SetServiceList(const std::vector* services); - - Status ServerReflectionInfo( - ServerContext* context, - ServerReaderWriter* - stream) GRPC_OVERRIDE; - - private: - Status ListService(ServerContext* context, - reflection::v1alpha::ListServiceResponse* response); - - Status GetFileByName( - ServerContext* context, const grpc::string& file_name, - reflection::v1alpha::ServerReflectionResponse* response); - - Status GetFileContainingSymbol( - ServerContext* context, const grpc::string& symbol, - reflection::v1alpha::ServerReflectionResponse* response); - - Status GetFileContainingExtension( - ServerContext* context, - const reflection::v1alpha::ExtensionRequest* request, - reflection::v1alpha::ServerReflectionResponse* response); - - Status GetAllExtensionNumbers( - ServerContext* context, const grpc::string& type, - reflection::v1alpha::ExtensionNumberResponse* response); - - void FillFileDescriptorResponse( - const protobuf::FileDescriptor* file_desc, - reflection::v1alpha::ServerReflectionResponse* response, - std::unordered_set* seen_files); - - void FillErrorResponse(const Status& status, - reflection::v1alpha::ErrorResponse* error_response); - - const protobuf::DescriptorPool* descriptor_pool_; - const std::vector* services_; -}; - -} // namespace grpc - -#endif // GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H diff --git a/extensions/reflection/proto_server_reflection_plugin.cc b/extensions/reflection/proto_server_reflection_plugin.cc deleted file mode 100644 index 8489adc7e1..0000000000 --- a/extensions/reflection/proto_server_reflection_plugin.cc +++ /dev/null @@ -1,95 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include -#include -#include - -#include "reflection/proto_server_reflection.h" - -namespace grpc { -namespace reflection { - -ProtoServerReflectionPlugin::ProtoServerReflectionPlugin() - : reflection_service_(new grpc::ProtoServerReflection()) {} - -grpc::string ProtoServerReflectionPlugin::name() { - return "proto_server_reflection"; -} - -void ProtoServerReflectionPlugin::InitServer(grpc::ServerInitializer* si) { - si->RegisterService(reflection_service_); -} - -void ProtoServerReflectionPlugin::Finish(grpc::ServerInitializer* si) { - reflection_service_->SetServiceList(si->GetServiceList()); -} - -void ProtoServerReflectionPlugin::ChangeArguments(const grpc::string& name, - void* value) {} - -bool ProtoServerReflectionPlugin::has_sync_methods() const { - if (reflection_service_ != nullptr) { - return reflection_service_->has_synchronous_methods(); - } - return false; -} - -bool ProtoServerReflectionPlugin::has_async_methods() const { - if (reflection_service_ != nullptr) { - return reflection_service_->has_async_methods(); - } - return false; -} - -static std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { - return std::unique_ptr<::grpc::ServerBuilderPlugin>( - new ProtoServerReflectionPlugin()); -} - -static void AddProtoReflectionServerBuilderPlugin() { - static bool already_here = false; - if (already_here) return; - already_here = true; - ::grpc::ServerBuilder::InternalAddPluginFactory(&CreateProtoReflection); -} - -struct StaticProtoReflectionPluginInitializer { - StaticProtoReflectionPluginInitializer() { - AddProtoReflectionServerBuilderPlugin(); - } -} static_proto_reflection_plugin_initializer; - -} // namespace reflection -} // namespace grpc diff --git a/extensions/reflection/reflection.grpc.pb.cc b/extensions/reflection/reflection.grpc.pb.cc deleted file mode 100644 index e8a376c3f2..0000000000 --- a/extensions/reflection/reflection.grpc.pb.cc +++ /dev/null @@ -1,97 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -// Generated by the gRPC protobuf plugin. -// If you make any local change, they will be lost. -// source: reflection.proto - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -namespace grpc { -namespace reflection { -namespace v1alpha { - -static const char* ServerReflection_method_names[] = { - "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo", -}; - -std::unique_ptr< ServerReflection::Stub> ServerReflection::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { - std::unique_ptr< ServerReflection::Stub> stub(new ServerReflection::Stub(channel)); - return stub; -} - -ServerReflection::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) - : channel_(channel), rpcmethod_ServerReflectionInfo_(ServerReflection_method_names[0], ::grpc::RpcMethod::BIDI_STREAMING, channel) - {} - -::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflection::Stub::ServerReflectionInfoRaw(::grpc::ClientContext* context) { - return new ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>(channel_.get(), rpcmethod_ServerReflectionInfo_, context); -} - -::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflection::Stub::AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { - return new ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>(channel_.get(), cq, rpcmethod_ServerReflectionInfo_, context, tag); -} - -ServerReflection::Service::Service() { - (void)ServerReflection_method_names; - AddMethod(new ::grpc::RpcServiceMethod( - ServerReflection_method_names[0], - ::grpc::RpcMethod::BIDI_STREAMING, - new ::grpc::BidiStreamingHandler< ServerReflection::Service, ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>( - std::mem_fn(&ServerReflection::Service::ServerReflectionInfo), this))); -} - -ServerReflection::Service::~Service() { -} - -::grpc::Status ServerReflection::Service::ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) { - (void) context; - (void) stream; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - - -} // namespace grpc -} // namespace reflection -} // namespace v1alpha - diff --git a/extensions/reflection/reflection.pb.cc b/extensions/reflection/reflection.pb.cc deleted file mode 100644 index a6184f048f..0000000000 --- a/extensions/reflection/reflection.pb.cc +++ /dev/null @@ -1,3946 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - - -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: reflection.proto - -#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -// @@protoc_insertion_point(includes) - -namespace grpc { -namespace reflection { -namespace v1alpha { - -namespace { - -const ::google::protobuf::Descriptor* ServerReflectionRequest_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - ServerReflectionRequest_reflection_ = NULL; -struct ServerReflectionRequestOneofInstance { - ::google::protobuf::internal::ArenaStringPtr file_by_filename_; - ::google::protobuf::internal::ArenaStringPtr file_containing_symbol_; - const ::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension_; - ::google::protobuf::internal::ArenaStringPtr all_extension_numbers_of_type_; - ::google::protobuf::internal::ArenaStringPtr list_services_; -}* ServerReflectionRequest_default_oneof_instance_ = NULL; -const ::google::protobuf::Descriptor* ExtensionRequest_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - ExtensionRequest_reflection_ = NULL; -const ::google::protobuf::Descriptor* ServerReflectionResponse_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - ServerReflectionResponse_reflection_ = NULL; -struct ServerReflectionResponseOneofInstance { - const ::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response_; - const ::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response_; - const ::grpc::reflection::v1alpha::ListServiceResponse* list_services_response_; - const ::grpc::reflection::v1alpha::ErrorResponse* error_response_; -}* ServerReflectionResponse_default_oneof_instance_ = NULL; -const ::google::protobuf::Descriptor* FileDescriptorResponse_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - FileDescriptorResponse_reflection_ = NULL; -const ::google::protobuf::Descriptor* ExtensionNumberResponse_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - ExtensionNumberResponse_reflection_ = NULL; -const ::google::protobuf::Descriptor* ListServiceResponse_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - ListServiceResponse_reflection_ = NULL; -const ::google::protobuf::Descriptor* ServiceResponse_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - ServiceResponse_reflection_ = NULL; -const ::google::protobuf::Descriptor* ErrorResponse_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - ErrorResponse_reflection_ = NULL; - -} // namespace - - -void protobuf_AssignDesc_reflection_2eproto() { - protobuf_AddDesc_reflection_2eproto(); - const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "reflection.proto"); - GOOGLE_CHECK(file != NULL); - ServerReflectionRequest_descriptor_ = file->message_type(0); - static const int ServerReflectionRequest_offsets_[7] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, host_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, file_by_filename_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, file_containing_symbol_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, file_containing_extension_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, all_extension_numbers_of_type_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, list_services_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, message_request_), - }; - ServerReflectionRequest_reflection_ = - ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( - ServerReflectionRequest_descriptor_, - ServerReflectionRequest::default_instance_, - ServerReflectionRequest_offsets_, - -1, - -1, - -1, - ServerReflectionRequest_default_oneof_instance_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, _oneof_case_[0]), - sizeof(ServerReflectionRequest), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, _is_default_instance_)); - ExtensionRequest_descriptor_ = file->message_type(1); - static const int ExtensionRequest_offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, containing_type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, extension_number_), - }; - ExtensionRequest_reflection_ = - ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( - ExtensionRequest_descriptor_, - ExtensionRequest::default_instance_, - ExtensionRequest_offsets_, - -1, - -1, - -1, - sizeof(ExtensionRequest), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, _is_default_instance_)); - ServerReflectionResponse_descriptor_ = file->message_type(2); - static const int ServerReflectionResponse_offsets_[7] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, valid_host_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, original_request_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionResponse_default_oneof_instance_, file_descriptor_response_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionResponse_default_oneof_instance_, all_extension_numbers_response_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionResponse_default_oneof_instance_, list_services_response_), - PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionResponse_default_oneof_instance_, error_response_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, message_response_), - }; - ServerReflectionResponse_reflection_ = - ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( - ServerReflectionResponse_descriptor_, - ServerReflectionResponse::default_instance_, - ServerReflectionResponse_offsets_, - -1, - -1, - -1, - ServerReflectionResponse_default_oneof_instance_, - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, _oneof_case_[0]), - sizeof(ServerReflectionResponse), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, _is_default_instance_)); - FileDescriptorResponse_descriptor_ = file->message_type(3); - static const int FileDescriptorResponse_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorResponse, file_descriptor_proto_), - }; - FileDescriptorResponse_reflection_ = - ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( - FileDescriptorResponse_descriptor_, - FileDescriptorResponse::default_instance_, - FileDescriptorResponse_offsets_, - -1, - -1, - -1, - sizeof(FileDescriptorResponse), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorResponse, _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorResponse, _is_default_instance_)); - ExtensionNumberResponse_descriptor_ = file->message_type(4); - static const int ExtensionNumberResponse_offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, base_type_name_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, extension_number_), - }; - ExtensionNumberResponse_reflection_ = - ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( - ExtensionNumberResponse_descriptor_, - ExtensionNumberResponse::default_instance_, - ExtensionNumberResponse_offsets_, - -1, - -1, - -1, - sizeof(ExtensionNumberResponse), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, _is_default_instance_)); - ListServiceResponse_descriptor_ = file->message_type(5); - static const int ListServiceResponse_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, service_), - }; - ListServiceResponse_reflection_ = - ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( - ListServiceResponse_descriptor_, - ListServiceResponse::default_instance_, - ListServiceResponse_offsets_, - -1, - -1, - -1, - sizeof(ListServiceResponse), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, _is_default_instance_)); - ServiceResponse_descriptor_ = file->message_type(6); - static const int ServiceResponse_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceResponse, name_), - }; - ServiceResponse_reflection_ = - ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( - ServiceResponse_descriptor_, - ServiceResponse::default_instance_, - ServiceResponse_offsets_, - -1, - -1, - -1, - sizeof(ServiceResponse), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceResponse, _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceResponse, _is_default_instance_)); - ErrorResponse_descriptor_ = file->message_type(7); - static const int ErrorResponse_offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, error_code_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, error_message_), - }; - ErrorResponse_reflection_ = - ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( - ErrorResponse_descriptor_, - ErrorResponse::default_instance_, - ErrorResponse_offsets_, - -1, - -1, - -1, - sizeof(ErrorResponse), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, _is_default_instance_)); -} - -namespace { - -GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); -inline void protobuf_AssignDescriptorsOnce() { - ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_reflection_2eproto); -} - -void protobuf_RegisterTypes(const ::std::string&) { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ServerReflectionRequest_descriptor_, &ServerReflectionRequest::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ExtensionRequest_descriptor_, &ExtensionRequest::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ServerReflectionResponse_descriptor_, &ServerReflectionResponse::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - FileDescriptorResponse_descriptor_, &FileDescriptorResponse::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ExtensionNumberResponse_descriptor_, &ExtensionNumberResponse::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ListServiceResponse_descriptor_, &ListServiceResponse::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ServiceResponse_descriptor_, &ServiceResponse::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ErrorResponse_descriptor_, &ErrorResponse::default_instance()); -} - -} // namespace - -void protobuf_ShutdownFile_reflection_2eproto() { - delete ServerReflectionRequest::default_instance_; - delete ServerReflectionRequest_default_oneof_instance_; - delete ServerReflectionRequest_reflection_; - delete ExtensionRequest::default_instance_; - delete ExtensionRequest_reflection_; - delete ServerReflectionResponse::default_instance_; - delete ServerReflectionResponse_default_oneof_instance_; - delete ServerReflectionResponse_reflection_; - delete FileDescriptorResponse::default_instance_; - delete FileDescriptorResponse_reflection_; - delete ExtensionNumberResponse::default_instance_; - delete ExtensionNumberResponse_reflection_; - delete ListServiceResponse::default_instance_; - delete ListServiceResponse_reflection_; - delete ServiceResponse::default_instance_; - delete ServiceResponse_reflection_; - delete ErrorResponse::default_instance_; - delete ErrorResponse_reflection_; -} - -void protobuf_AddDesc_reflection_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; - GOOGLE_PROTOBUF_VERIFY_VERSION; - - ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\020reflection.proto\022\027grpc.reflection.v1al" - "pha\"\212\002\n\027ServerReflectionRequest\022\014\n\004host\030" - "\001 \001(\t\022\032\n\020file_by_filename\030\003 \001(\tH\000\022 \n\026fil" - "e_containing_symbol\030\004 \001(\tH\000\022N\n\031file_cont" - "aining_extension\030\005 \001(\0132).grpc.reflection" - ".v1alpha.ExtensionRequestH\000\022\'\n\035all_exten" - "sion_numbers_of_type\030\006 \001(\tH\000\022\027\n\rlist_ser" - "vices\030\007 \001(\tH\000B\021\n\017message_request\"E\n\020Exte" - "nsionRequest\022\027\n\017containing_type\030\001 \001(\t\022\030\n" - "\020extension_number\030\002 \001(\005\"\321\003\n\030ServerReflec" - "tionResponse\022\022\n\nvalid_host\030\001 \001(\t\022J\n\020orig" - "inal_request\030\002 \001(\01320.grpc.reflection.v1a" - "lpha.ServerReflectionRequest\022S\n\030file_des" - "criptor_response\030\004 \001(\0132/.grpc.reflection" - ".v1alpha.FileDescriptorResponseH\000\022Z\n\036all" - "_extension_numbers_response\030\005 \001(\01320.grpc" - ".reflection.v1alpha.ExtensionNumberRespo" - "nseH\000\022N\n\026list_services_response\030\006 \001(\0132,." - "grpc.reflection.v1alpha.ListServiceRespo" - "nseH\000\022@\n\016error_response\030\007 \001(\0132&.grpc.ref" - "lection.v1alpha.ErrorResponseH\000B\022\n\020messa" - "ge_response\"7\n\026FileDescriptorResponse\022\035\n" - "\025file_descriptor_proto\030\001 \003(\014\"K\n\027Extensio" - "nNumberResponse\022\026\n\016base_type_name\030\001 \001(\t\022" - "\030\n\020extension_number\030\002 \003(\005\"P\n\023ListService" - "Response\0229\n\007service\030\001 \003(\0132(.grpc.reflect" - "ion.v1alpha.ServiceResponse\"\037\n\017ServiceRe" - "sponse\022\014\n\004name\030\001 \001(\t\":\n\rErrorResponse\022\022\n" - "\nerror_code\030\001 \001(\005\022\025\n\rerror_message\030\002 \001(\t" - "2\223\001\n\020ServerReflection\022\177\n\024ServerReflectio" - "nInfo\0220.grpc.reflection.v1alpha.ServerRe" - "flectionRequest\0321.grpc.reflection.v1alph" - "a.ServerReflectionResponse(\0010\001b\006proto3", 1318); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( - "reflection.proto", &protobuf_RegisterTypes); - ServerReflectionRequest::default_instance_ = new ServerReflectionRequest(); - ServerReflectionRequest_default_oneof_instance_ = new ServerReflectionRequestOneofInstance(); - ExtensionRequest::default_instance_ = new ExtensionRequest(); - ServerReflectionResponse::default_instance_ = new ServerReflectionResponse(); - ServerReflectionResponse_default_oneof_instance_ = new ServerReflectionResponseOneofInstance(); - FileDescriptorResponse::default_instance_ = new FileDescriptorResponse(); - ExtensionNumberResponse::default_instance_ = new ExtensionNumberResponse(); - ListServiceResponse::default_instance_ = new ListServiceResponse(); - ServiceResponse::default_instance_ = new ServiceResponse(); - ErrorResponse::default_instance_ = new ErrorResponse(); - ServerReflectionRequest::default_instance_->InitAsDefaultInstance(); - ExtensionRequest::default_instance_->InitAsDefaultInstance(); - ServerReflectionResponse::default_instance_->InitAsDefaultInstance(); - FileDescriptorResponse::default_instance_->InitAsDefaultInstance(); - ExtensionNumberResponse::default_instance_->InitAsDefaultInstance(); - ListServiceResponse::default_instance_->InitAsDefaultInstance(); - ServiceResponse::default_instance_->InitAsDefaultInstance(); - ErrorResponse::default_instance_->InitAsDefaultInstance(); - ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_reflection_2eproto); -} - -// Force AddDescriptors() to be called at static initialization time. -struct StaticDescriptorInitializer_reflection_2eproto { - StaticDescriptorInitializer_reflection_2eproto() { - protobuf_AddDesc_reflection_2eproto(); - } -} static_descriptor_initializer_reflection_2eproto_; - -namespace { - -static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD; -static void MergeFromFail(int line) { - GOOGLE_CHECK(false) << __FILE__ << ":" << line; -} - -} // namespace - - -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ServerReflectionRequest::kHostFieldNumber; -const int ServerReflectionRequest::kFileByFilenameFieldNumber; -const int ServerReflectionRequest::kFileContainingSymbolFieldNumber; -const int ServerReflectionRequest::kFileContainingExtensionFieldNumber; -const int ServerReflectionRequest::kAllExtensionNumbersOfTypeFieldNumber; -const int ServerReflectionRequest::kListServicesFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -ServerReflectionRequest::ServerReflectionRequest() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ServerReflectionRequest) -} - -void ServerReflectionRequest::InitAsDefaultInstance() { - _is_default_instance_ = true; - ServerReflectionRequest_default_oneof_instance_->file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ServerReflectionRequest_default_oneof_instance_->file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ServerReflectionRequest_default_oneof_instance_->file_containing_extension_ = const_cast< ::grpc::reflection::v1alpha::ExtensionRequest*>(&::grpc::reflection::v1alpha::ExtensionRequest::default_instance()); - ServerReflectionRequest_default_oneof_instance_->all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - ServerReflectionRequest_default_oneof_instance_->list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - -ServerReflectionRequest::ServerReflectionRequest(const ServerReflectionRequest& from) - : ::google::protobuf::Message(), - _internal_metadata_(NULL) { - SharedCtor(); - MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ServerReflectionRequest) -} - -void ServerReflectionRequest::SharedCtor() { - _is_default_instance_ = false; - ::google::protobuf::internal::GetEmptyString(); - _cached_size_ = 0; - host_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - clear_has_message_request(); -} - -ServerReflectionRequest::~ServerReflectionRequest() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ServerReflectionRequest) - SharedDtor(); -} - -void ServerReflectionRequest::SharedDtor() { - host_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (has_message_request()) { - clear_message_request(); - } - if (this != default_instance_) { - } -} - -void ServerReflectionRequest::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* ServerReflectionRequest::descriptor() { - protobuf_AssignDescriptorsOnce(); - return ServerReflectionRequest_descriptor_; -} - -const ServerReflectionRequest& ServerReflectionRequest::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); - return *default_instance_; -} - -ServerReflectionRequest* ServerReflectionRequest::default_instance_ = NULL; - -ServerReflectionRequest* ServerReflectionRequest::New(::google::protobuf::Arena* arena) const { - ServerReflectionRequest* n = new ServerReflectionRequest; - if (arena != NULL) { - arena->Own(n); - } - return n; -} - -void ServerReflectionRequest::clear_message_request() { -// @@protoc_insertion_point(one_of_clear_start:grpc.reflection.v1alpha.ServerReflectionRequest) - switch(message_request_case()) { - case kFileByFilename: { - message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - break; - } - case kFileContainingSymbol: { - message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - break; - } - case kFileContainingExtension: { - delete message_request_.file_containing_extension_; - break; - } - case kAllExtensionNumbersOfType: { - message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - break; - } - case kListServices: { - message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - break; - } - case MESSAGE_REQUEST_NOT_SET: { - break; - } - } - _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET; -} - - -void ServerReflectionRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ServerReflectionRequest) - host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - clear_message_request(); -} - -bool ServerReflectionRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ServerReflectionRequest) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string host = 1; - case 1: { - if (tag == 10) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_host())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->host().data(), this->host().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ServerReflectionRequest.host")); - } else { - goto handle_unusual; - } - if (input->ExpectTag(26)) goto parse_file_by_filename; - break; - } - - // optional string file_by_filename = 3; - case 3: { - if (tag == 26) { - parse_file_by_filename: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_file_by_filename())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->file_by_filename().data(), this->file_by_filename().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename")); - } else { - goto handle_unusual; - } - if (input->ExpectTag(34)) goto parse_file_containing_symbol; - break; - } - - // optional string file_containing_symbol = 4; - case 4: { - if (tag == 34) { - parse_file_containing_symbol: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_file_containing_symbol())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->file_containing_symbol().data(), this->file_containing_symbol().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol")); - } else { - goto handle_unusual; - } - if (input->ExpectTag(42)) goto parse_file_containing_extension; - break; - } - - // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; - case 5: { - if (tag == 42) { - parse_file_containing_extension: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_file_containing_extension())); - } else { - goto handle_unusual; - } - if (input->ExpectTag(50)) goto parse_all_extension_numbers_of_type; - break; - } - - // optional string all_extension_numbers_of_type = 6; - case 6: { - if (tag == 50) { - parse_all_extension_numbers_of_type: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_all_extension_numbers_of_type())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type")); - } else { - goto handle_unusual; - } - if (input->ExpectTag(58)) goto parse_list_services; - break; - } - - // optional string list_services = 7; - case 7: { - if (tag == 58) { - parse_list_services: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_list_services())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->list_services().data(), this->list_services().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ServerReflectionRequest.list_services")); - } else { - goto handle_unusual; - } - if (input->ExpectAtEnd()) goto success; - break; - } - - default: { - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ServerReflectionRequest) - return true; -failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ServerReflectionRequest) - return false; -#undef DO_ -} - -void ServerReflectionRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ServerReflectionRequest) - // optional string host = 1; - if (this->host().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->host().data(), this->host().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServerReflectionRequest.host"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->host(), output); - } - - // optional string file_by_filename = 3; - if (has_file_by_filename()) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->file_by_filename().data(), this->file_by_filename().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 3, this->file_by_filename(), output); - } - - // optional string file_containing_symbol = 4; - if (has_file_containing_symbol()) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->file_containing_symbol().data(), this->file_containing_symbol().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 4, this->file_containing_symbol(), output); - } - - // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; - if (has_file_containing_extension()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, *message_request_.file_containing_extension_, output); - } - - // optional string all_extension_numbers_of_type = 6; - if (has_all_extension_numbers_of_type()) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 6, this->all_extension_numbers_of_type(), output); - } - - // optional string list_services = 7; - if (has_list_services()) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->list_services().data(), this->list_services().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServerReflectionRequest.list_services"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 7, this->list_services(), output); - } - - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ServerReflectionRequest) -} - -::google::protobuf::uint8* ServerReflectionRequest::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ServerReflectionRequest) - // optional string host = 1; - if (this->host().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->host().data(), this->host().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServerReflectionRequest.host"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->host(), target); - } - - // optional string file_by_filename = 3; - if (has_file_by_filename()) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->file_by_filename().data(), this->file_by_filename().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 3, this->file_by_filename(), target); - } - - // optional string file_containing_symbol = 4; - if (has_file_containing_symbol()) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->file_containing_symbol().data(), this->file_containing_symbol().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 4, this->file_containing_symbol(), target); - } - - // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; - if (has_file_containing_extension()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 5, *message_request_.file_containing_extension_, target); - } - - // optional string all_extension_numbers_of_type = 6; - if (has_all_extension_numbers_of_type()) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 6, this->all_extension_numbers_of_type(), target); - } - - // optional string list_services = 7; - if (has_list_services()) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->list_services().data(), this->list_services().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServerReflectionRequest.list_services"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 7, this->list_services(), target); - } - - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ServerReflectionRequest) - return target; -} - -int ServerReflectionRequest::ByteSize() const { -// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ServerReflectionRequest) - int total_size = 0; - - // optional string host = 1; - if (this->host().size() > 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->host()); - } - - switch (message_request_case()) { - // optional string file_by_filename = 3; - case kFileByFilename: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->file_by_filename()); - break; - } - // optional string file_containing_symbol = 4; - case kFileContainingSymbol: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->file_containing_symbol()); - break; - } - // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; - case kFileContainingExtension: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - *message_request_.file_containing_extension_); - break; - } - // optional string all_extension_numbers_of_type = 6; - case kAllExtensionNumbersOfType: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->all_extension_numbers_of_type()); - break; - } - // optional string list_services = 7; - case kListServices: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->list_services()); - break; - } - case MESSAGE_REQUEST_NOT_SET: { - break; - } - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ServerReflectionRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ServerReflectionRequest) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const ServerReflectionRequest* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ServerReflectionRequest) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ServerReflectionRequest) - MergeFrom(*source); - } -} - -void ServerReflectionRequest::MergeFrom(const ServerReflectionRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ServerReflectionRequest) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - switch (from.message_request_case()) { - case kFileByFilename: { - set_file_by_filename(from.file_by_filename()); - break; - } - case kFileContainingSymbol: { - set_file_containing_symbol(from.file_containing_symbol()); - break; - } - case kFileContainingExtension: { - mutable_file_containing_extension()->::grpc::reflection::v1alpha::ExtensionRequest::MergeFrom(from.file_containing_extension()); - break; - } - case kAllExtensionNumbersOfType: { - set_all_extension_numbers_of_type(from.all_extension_numbers_of_type()); - break; - } - case kListServices: { - set_list_services(from.list_services()); - break; - } - case MESSAGE_REQUEST_NOT_SET: { - break; - } - } - if (from.host().size() > 0) { - - host_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.host_); - } -} - -void ServerReflectionRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ServerReflectionRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void ServerReflectionRequest::CopyFrom(const ServerReflectionRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ServerReflectionRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ServerReflectionRequest::IsInitialized() const { - - return true; -} - -void ServerReflectionRequest::Swap(ServerReflectionRequest* other) { - if (other == this) return; - InternalSwap(other); -} -void ServerReflectionRequest::InternalSwap(ServerReflectionRequest* other) { - host_.Swap(&other->host_); - std::swap(message_request_, other->message_request_); - std::swap(_oneof_case_[0], other->_oneof_case_[0]); - _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); -} - -::google::protobuf::Metadata ServerReflectionRequest::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = ServerReflectionRequest_descriptor_; - metadata.reflection = ServerReflectionRequest_reflection_; - return metadata; -} - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// ServerReflectionRequest - -// optional string host = 1; -void ServerReflectionRequest::clear_host() { - host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - const ::std::string& ServerReflectionRequest::host() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.host) - return host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - void ServerReflectionRequest::set_host(const ::std::string& value) { - - host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.host) -} - void ServerReflectionRequest::set_host(const char* value) { - - host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.host) -} - void ServerReflectionRequest::set_host(const char* value, size_t size) { - - host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.host) -} - ::std::string* ServerReflectionRequest::mutable_host() { - - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.host) - return host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - ::std::string* ServerReflectionRequest::release_host() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.host) - - return host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - void ServerReflectionRequest::set_allocated_host(::std::string* host) { - if (host != NULL) { - - } else { - - } - host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), host); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.host) -} - -// optional string file_by_filename = 3; -bool ServerReflectionRequest::has_file_by_filename() const { - return message_request_case() == kFileByFilename; -} -void ServerReflectionRequest::set_has_file_by_filename() { - _oneof_case_[0] = kFileByFilename; -} -void ServerReflectionRequest::clear_file_by_filename() { - if (has_file_by_filename()) { - message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - clear_has_message_request(); - } -} - const ::std::string& ServerReflectionRequest::file_by_filename() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) - if (has_file_by_filename()) { - return message_request_.file_by_filename_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); -} - void ServerReflectionRequest::set_file_by_filename(const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) - if (!has_file_by_filename()) { - clear_message_request(); - set_has_file_by_filename(); - message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) -} - void ServerReflectionRequest::set_file_by_filename(const char* value) { - if (!has_file_by_filename()) { - clear_message_request(); - set_has_file_by_filename(); - message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) -} - void ServerReflectionRequest::set_file_by_filename(const char* value, size_t size) { - if (!has_file_by_filename()) { - clear_message_request(); - set_has_file_by_filename(); - message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) -} - ::std::string* ServerReflectionRequest::mutable_file_by_filename() { - if (!has_file_by_filename()) { - clear_message_request(); - set_has_file_by_filename(); - message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) - return message_request_.file_by_filename_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - ::std::string* ServerReflectionRequest::release_file_by_filename() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) - if (has_file_by_filename()) { - clear_has_message_request(); - return message_request_.file_by_filename_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } else { - return NULL; - } -} - void ServerReflectionRequest::set_allocated_file_by_filename(::std::string* file_by_filename) { - if (!has_file_by_filename()) { - message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - clear_message_request(); - if (file_by_filename != NULL) { - set_has_file_by_filename(); - message_request_.file_by_filename_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - file_by_filename); - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) -} - -// optional string file_containing_symbol = 4; -bool ServerReflectionRequest::has_file_containing_symbol() const { - return message_request_case() == kFileContainingSymbol; -} -void ServerReflectionRequest::set_has_file_containing_symbol() { - _oneof_case_[0] = kFileContainingSymbol; -} -void ServerReflectionRequest::clear_file_containing_symbol() { - if (has_file_containing_symbol()) { - message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - clear_has_message_request(); - } -} - const ::std::string& ServerReflectionRequest::file_containing_symbol() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) - if (has_file_containing_symbol()) { - return message_request_.file_containing_symbol_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); -} - void ServerReflectionRequest::set_file_containing_symbol(const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) - if (!has_file_containing_symbol()) { - clear_message_request(); - set_has_file_containing_symbol(); - message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) -} - void ServerReflectionRequest::set_file_containing_symbol(const char* value) { - if (!has_file_containing_symbol()) { - clear_message_request(); - set_has_file_containing_symbol(); - message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) -} - void ServerReflectionRequest::set_file_containing_symbol(const char* value, size_t size) { - if (!has_file_containing_symbol()) { - clear_message_request(); - set_has_file_containing_symbol(); - message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) -} - ::std::string* ServerReflectionRequest::mutable_file_containing_symbol() { - if (!has_file_containing_symbol()) { - clear_message_request(); - set_has_file_containing_symbol(); - message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) - return message_request_.file_containing_symbol_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - ::std::string* ServerReflectionRequest::release_file_containing_symbol() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) - if (has_file_containing_symbol()) { - clear_has_message_request(); - return message_request_.file_containing_symbol_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } else { - return NULL; - } -} - void ServerReflectionRequest::set_allocated_file_containing_symbol(::std::string* file_containing_symbol) { - if (!has_file_containing_symbol()) { - message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - clear_message_request(); - if (file_containing_symbol != NULL) { - set_has_file_containing_symbol(); - message_request_.file_containing_symbol_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - file_containing_symbol); - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) -} - -// optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; -bool ServerReflectionRequest::has_file_containing_extension() const { - return message_request_case() == kFileContainingExtension; -} -void ServerReflectionRequest::set_has_file_containing_extension() { - _oneof_case_[0] = kFileContainingExtension; -} -void ServerReflectionRequest::clear_file_containing_extension() { - if (has_file_containing_extension()) { - delete message_request_.file_containing_extension_; - clear_has_message_request(); - } -} - const ::grpc::reflection::v1alpha::ExtensionRequest& ServerReflectionRequest::file_containing_extension() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) - return has_file_containing_extension() - ? *message_request_.file_containing_extension_ - : ::grpc::reflection::v1alpha::ExtensionRequest::default_instance(); -} -::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::mutable_file_containing_extension() { - if (!has_file_containing_extension()) { - clear_message_request(); - set_has_file_containing_extension(); - message_request_.file_containing_extension_ = new ::grpc::reflection::v1alpha::ExtensionRequest; - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) - return message_request_.file_containing_extension_; -} -::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::release_file_containing_extension() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) - if (has_file_containing_extension()) { - clear_has_message_request(); - ::grpc::reflection::v1alpha::ExtensionRequest* temp = message_request_.file_containing_extension_; - message_request_.file_containing_extension_ = NULL; - return temp; - } else { - return NULL; - } -} -void ServerReflectionRequest::set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension) { - clear_message_request(); - if (file_containing_extension) { - set_has_file_containing_extension(); - message_request_.file_containing_extension_ = file_containing_extension; - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) -} - -// optional string all_extension_numbers_of_type = 6; -bool ServerReflectionRequest::has_all_extension_numbers_of_type() const { - return message_request_case() == kAllExtensionNumbersOfType; -} -void ServerReflectionRequest::set_has_all_extension_numbers_of_type() { - _oneof_case_[0] = kAllExtensionNumbersOfType; -} -void ServerReflectionRequest::clear_all_extension_numbers_of_type() { - if (has_all_extension_numbers_of_type()) { - message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - clear_has_message_request(); - } -} - const ::std::string& ServerReflectionRequest::all_extension_numbers_of_type() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) - if (has_all_extension_numbers_of_type()) { - return message_request_.all_extension_numbers_of_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); -} - void ServerReflectionRequest::set_all_extension_numbers_of_type(const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) - if (!has_all_extension_numbers_of_type()) { - clear_message_request(); - set_has_all_extension_numbers_of_type(); - message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) -} - void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value) { - if (!has_all_extension_numbers_of_type()) { - clear_message_request(); - set_has_all_extension_numbers_of_type(); - message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) -} - void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value, size_t size) { - if (!has_all_extension_numbers_of_type()) { - clear_message_request(); - set_has_all_extension_numbers_of_type(); - message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) -} - ::std::string* ServerReflectionRequest::mutable_all_extension_numbers_of_type() { - if (!has_all_extension_numbers_of_type()) { - clear_message_request(); - set_has_all_extension_numbers_of_type(); - message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) - return message_request_.all_extension_numbers_of_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - ::std::string* ServerReflectionRequest::release_all_extension_numbers_of_type() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) - if (has_all_extension_numbers_of_type()) { - clear_has_message_request(); - return message_request_.all_extension_numbers_of_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } else { - return NULL; - } -} - void ServerReflectionRequest::set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type) { - if (!has_all_extension_numbers_of_type()) { - message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - clear_message_request(); - if (all_extension_numbers_of_type != NULL) { - set_has_all_extension_numbers_of_type(); - message_request_.all_extension_numbers_of_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - all_extension_numbers_of_type); - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) -} - -// optional string list_services = 7; -bool ServerReflectionRequest::has_list_services() const { - return message_request_case() == kListServices; -} -void ServerReflectionRequest::set_has_list_services() { - _oneof_case_[0] = kListServices; -} -void ServerReflectionRequest::clear_list_services() { - if (has_list_services()) { - message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - clear_has_message_request(); - } -} - const ::std::string& ServerReflectionRequest::list_services() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) - if (has_list_services()) { - return message_request_.list_services_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); -} - void ServerReflectionRequest::set_list_services(const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) - if (!has_list_services()) { - clear_message_request(); - set_has_list_services(); - message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) -} - void ServerReflectionRequest::set_list_services(const char* value) { - if (!has_list_services()) { - clear_message_request(); - set_has_list_services(); - message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) -} - void ServerReflectionRequest::set_list_services(const char* value, size_t size) { - if (!has_list_services()) { - clear_message_request(); - set_has_list_services(); - message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( - reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) -} - ::std::string* ServerReflectionRequest::mutable_list_services() { - if (!has_list_services()) { - clear_message_request(); - set_has_list_services(); - message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) - return message_request_.list_services_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - ::std::string* ServerReflectionRequest::release_list_services() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) - if (has_list_services()) { - clear_has_message_request(); - return message_request_.list_services_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } else { - return NULL; - } -} - void ServerReflectionRequest::set_allocated_list_services(::std::string* list_services) { - if (!has_list_services()) { - message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - } - clear_message_request(); - if (list_services != NULL) { - set_has_list_services(); - message_request_.list_services_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - list_services); - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) -} - -bool ServerReflectionRequest::has_message_request() const { - return message_request_case() != MESSAGE_REQUEST_NOT_SET; -} -void ServerReflectionRequest::clear_has_message_request() { - _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET; -} -ServerReflectionRequest::MessageRequestCase ServerReflectionRequest::message_request_case() const { - return ServerReflectionRequest::MessageRequestCase(_oneof_case_[0]); -} -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ExtensionRequest::kContainingTypeFieldNumber; -const int ExtensionRequest::kExtensionNumberFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -ExtensionRequest::ExtensionRequest() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionRequest) -} - -void ExtensionRequest::InitAsDefaultInstance() { - _is_default_instance_ = true; -} - -ExtensionRequest::ExtensionRequest(const ExtensionRequest& from) - : ::google::protobuf::Message(), - _internal_metadata_(NULL) { - SharedCtor(); - MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionRequest) -} - -void ExtensionRequest::SharedCtor() { - _is_default_instance_ = false; - ::google::protobuf::internal::GetEmptyString(); - _cached_size_ = 0; - containing_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - extension_number_ = 0; -} - -ExtensionRequest::~ExtensionRequest() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ExtensionRequest) - SharedDtor(); -} - -void ExtensionRequest::SharedDtor() { - containing_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != default_instance_) { - } -} - -void ExtensionRequest::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* ExtensionRequest::descriptor() { - protobuf_AssignDescriptorsOnce(); - return ExtensionRequest_descriptor_; -} - -const ExtensionRequest& ExtensionRequest::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); - return *default_instance_; -} - -ExtensionRequest* ExtensionRequest::default_instance_ = NULL; - -ExtensionRequest* ExtensionRequest::New(::google::protobuf::Arena* arena) const { - ExtensionRequest* n = new ExtensionRequest; - if (arena != NULL) { - arena->Own(n); - } - return n; -} - -void ExtensionRequest::Clear() { -// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ExtensionRequest) - containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - extension_number_ = 0; -} - -bool ExtensionRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionRequest) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string containing_type = 1; - case 1: { - if (tag == 10) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_containing_type())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->containing_type().data(), this->containing_type().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ExtensionRequest.containing_type")); - } else { - goto handle_unusual; - } - if (input->ExpectTag(16)) goto parse_extension_number; - break; - } - - // optional int32 extension_number = 2; - case 2: { - if (tag == 16) { - parse_extension_number: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &extension_number_))); - - } else { - goto handle_unusual; - } - if (input->ExpectAtEnd()) goto success; - break; - } - - default: { - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ExtensionRequest) - return true; -failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ExtensionRequest) - return false; -#undef DO_ -} - -void ExtensionRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ExtensionRequest) - // optional string containing_type = 1; - if (this->containing_type().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->containing_type().data(), this->containing_type().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->containing_type(), output); - } - - // optional int32 extension_number = 2; - if (this->extension_number() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->extension_number(), output); - } - - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionRequest) -} - -::google::protobuf::uint8* ExtensionRequest::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ExtensionRequest) - // optional string containing_type = 1; - if (this->containing_type().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->containing_type().data(), this->containing_type().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->containing_type(), target); - } - - // optional int32 extension_number = 2; - if (this->extension_number() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->extension_number(), target); - } - - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionRequest) - return target; -} - -int ExtensionRequest::ByteSize() const { -// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ExtensionRequest) - int total_size = 0; - - // optional string containing_type = 1; - if (this->containing_type().size() > 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->containing_type()); - } - - // optional int32 extension_number = 2; - if (this->extension_number() != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->extension_number()); - } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ExtensionRequest::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ExtensionRequest) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const ExtensionRequest* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ExtensionRequest) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ExtensionRequest) - MergeFrom(*source); - } -} - -void ExtensionRequest::MergeFrom(const ExtensionRequest& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ExtensionRequest) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - if (from.containing_type().size() > 0) { - - containing_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.containing_type_); - } - if (from.extension_number() != 0) { - set_extension_number(from.extension_number()); - } -} - -void ExtensionRequest::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ExtensionRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void ExtensionRequest::CopyFrom(const ExtensionRequest& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ExtensionRequest) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ExtensionRequest::IsInitialized() const { - - return true; -} - -void ExtensionRequest::Swap(ExtensionRequest* other) { - if (other == this) return; - InternalSwap(other); -} -void ExtensionRequest::InternalSwap(ExtensionRequest* other) { - containing_type_.Swap(&other->containing_type_); - std::swap(extension_number_, other->extension_number_); - _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); -} - -::google::protobuf::Metadata ExtensionRequest::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = ExtensionRequest_descriptor_; - metadata.reflection = ExtensionRequest_reflection_; - return metadata; -} - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// ExtensionRequest - -// optional string containing_type = 1; -void ExtensionRequest::clear_containing_type() { - containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - const ::std::string& ExtensionRequest::containing_type() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - return containing_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - void ExtensionRequest::set_containing_type(const ::std::string& value) { - - containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.containing_type) -} - void ExtensionRequest::set_containing_type(const char* value) { - - containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionRequest.containing_type) -} - void ExtensionRequest::set_containing_type(const char* value, size_t size) { - - containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionRequest.containing_type) -} - ::std::string* ExtensionRequest::mutable_containing_type() { - - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - return containing_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - ::std::string* ExtensionRequest::release_containing_type() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - - return containing_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - void ExtensionRequest::set_allocated_containing_type(::std::string* containing_type) { - if (containing_type != NULL) { - - } else { - - } - containing_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), containing_type); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionRequest.containing_type) -} - -// optional int32 extension_number = 2; -void ExtensionRequest::clear_extension_number() { - extension_number_ = 0; -} - ::google::protobuf::int32 ExtensionRequest::extension_number() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.extension_number) - return extension_number_; -} - void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) { - - extension_number_ = value; - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number) -} - -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ServerReflectionResponse::kValidHostFieldNumber; -const int ServerReflectionResponse::kOriginalRequestFieldNumber; -const int ServerReflectionResponse::kFileDescriptorResponseFieldNumber; -const int ServerReflectionResponse::kAllExtensionNumbersResponseFieldNumber; -const int ServerReflectionResponse::kListServicesResponseFieldNumber; -const int ServerReflectionResponse::kErrorResponseFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -ServerReflectionResponse::ServerReflectionResponse() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ServerReflectionResponse) -} - -void ServerReflectionResponse::InitAsDefaultInstance() { - _is_default_instance_ = true; - original_request_ = const_cast< ::grpc::reflection::v1alpha::ServerReflectionRequest*>(&::grpc::reflection::v1alpha::ServerReflectionRequest::default_instance()); - ServerReflectionResponse_default_oneof_instance_->file_descriptor_response_ = const_cast< ::grpc::reflection::v1alpha::FileDescriptorResponse*>(&::grpc::reflection::v1alpha::FileDescriptorResponse::default_instance()); - ServerReflectionResponse_default_oneof_instance_->all_extension_numbers_response_ = const_cast< ::grpc::reflection::v1alpha::ExtensionNumberResponse*>(&::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance()); - ServerReflectionResponse_default_oneof_instance_->list_services_response_ = const_cast< ::grpc::reflection::v1alpha::ListServiceResponse*>(&::grpc::reflection::v1alpha::ListServiceResponse::default_instance()); - ServerReflectionResponse_default_oneof_instance_->error_response_ = const_cast< ::grpc::reflection::v1alpha::ErrorResponse*>(&::grpc::reflection::v1alpha::ErrorResponse::default_instance()); -} - -ServerReflectionResponse::ServerReflectionResponse(const ServerReflectionResponse& from) - : ::google::protobuf::Message(), - _internal_metadata_(NULL) { - SharedCtor(); - MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ServerReflectionResponse) -} - -void ServerReflectionResponse::SharedCtor() { - _is_default_instance_ = false; - ::google::protobuf::internal::GetEmptyString(); - _cached_size_ = 0; - valid_host_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - original_request_ = NULL; - clear_has_message_response(); -} - -ServerReflectionResponse::~ServerReflectionResponse() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ServerReflectionResponse) - SharedDtor(); -} - -void ServerReflectionResponse::SharedDtor() { - valid_host_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (has_message_response()) { - clear_message_response(); - } - if (this != default_instance_) { - delete original_request_; - } -} - -void ServerReflectionResponse::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* ServerReflectionResponse::descriptor() { - protobuf_AssignDescriptorsOnce(); - return ServerReflectionResponse_descriptor_; -} - -const ServerReflectionResponse& ServerReflectionResponse::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); - return *default_instance_; -} - -ServerReflectionResponse* ServerReflectionResponse::default_instance_ = NULL; - -ServerReflectionResponse* ServerReflectionResponse::New(::google::protobuf::Arena* arena) const { - ServerReflectionResponse* n = new ServerReflectionResponse; - if (arena != NULL) { - arena->Own(n); - } - return n; -} - -void ServerReflectionResponse::clear_message_response() { -// @@protoc_insertion_point(one_of_clear_start:grpc.reflection.v1alpha.ServerReflectionResponse) - switch(message_response_case()) { - case kFileDescriptorResponse: { - delete message_response_.file_descriptor_response_; - break; - } - case kAllExtensionNumbersResponse: { - delete message_response_.all_extension_numbers_response_; - break; - } - case kListServicesResponse: { - delete message_response_.list_services_response_; - break; - } - case kErrorResponse: { - delete message_response_.error_response_; - break; - } - case MESSAGE_RESPONSE_NOT_SET: { - break; - } - } - _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET; -} - - -void ServerReflectionResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ServerReflectionResponse) - valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; - original_request_ = NULL; - clear_message_response(); -} - -bool ServerReflectionResponse::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ServerReflectionResponse) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string valid_host = 1; - case 1: { - if (tag == 10) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_valid_host())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->valid_host().data(), this->valid_host().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ServerReflectionResponse.valid_host")); - } else { - goto handle_unusual; - } - if (input->ExpectTag(18)) goto parse_original_request; - break; - } - - // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; - case 2: { - if (tag == 18) { - parse_original_request: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_original_request())); - } else { - goto handle_unusual; - } - if (input->ExpectTag(34)) goto parse_file_descriptor_response; - break; - } - - // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; - case 4: { - if (tag == 34) { - parse_file_descriptor_response: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_file_descriptor_response())); - } else { - goto handle_unusual; - } - if (input->ExpectTag(42)) goto parse_all_extension_numbers_response; - break; - } - - // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; - case 5: { - if (tag == 42) { - parse_all_extension_numbers_response: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_all_extension_numbers_response())); - } else { - goto handle_unusual; - } - if (input->ExpectTag(50)) goto parse_list_services_response; - break; - } - - // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; - case 6: { - if (tag == 50) { - parse_list_services_response: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_list_services_response())); - } else { - goto handle_unusual; - } - if (input->ExpectTag(58)) goto parse_error_response; - break; - } - - // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; - case 7: { - if (tag == 58) { - parse_error_response: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_error_response())); - } else { - goto handle_unusual; - } - if (input->ExpectAtEnd()) goto success; - break; - } - - default: { - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ServerReflectionResponse) - return true; -failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ServerReflectionResponse) - return false; -#undef DO_ -} - -void ServerReflectionResponse::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ServerReflectionResponse) - // optional string valid_host = 1; - if (this->valid_host().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->valid_host().data(), this->valid_host().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServerReflectionResponse.valid_host"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->valid_host(), output); - } - - // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; - if (this->has_original_request()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, *this->original_request_, output); - } - - // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; - if (has_file_descriptor_response()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, *message_response_.file_descriptor_response_, output); - } - - // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; - if (has_all_extension_numbers_response()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, *message_response_.all_extension_numbers_response_, output); - } - - // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; - if (has_list_services_response()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 6, *message_response_.list_services_response_, output); - } - - // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; - if (has_error_response()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 7, *message_response_.error_response_, output); - } - - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ServerReflectionResponse) -} - -::google::protobuf::uint8* ServerReflectionResponse::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ServerReflectionResponse) - // optional string valid_host = 1; - if (this->valid_host().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->valid_host().data(), this->valid_host().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServerReflectionResponse.valid_host"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->valid_host(), target); - } - - // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; - if (this->has_original_request()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 2, *this->original_request_, target); - } - - // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; - if (has_file_descriptor_response()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 4, *message_response_.file_descriptor_response_, target); - } - - // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; - if (has_all_extension_numbers_response()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 5, *message_response_.all_extension_numbers_response_, target); - } - - // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; - if (has_list_services_response()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 6, *message_response_.list_services_response_, target); - } - - // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; - if (has_error_response()) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 7, *message_response_.error_response_, target); - } - - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ServerReflectionResponse) - return target; -} - -int ServerReflectionResponse::ByteSize() const { -// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ServerReflectionResponse) - int total_size = 0; - - // optional string valid_host = 1; - if (this->valid_host().size() > 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->valid_host()); - } - - // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; - if (this->has_original_request()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - *this->original_request_); - } - - switch (message_response_case()) { - // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; - case kFileDescriptorResponse: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - *message_response_.file_descriptor_response_); - break; - } - // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; - case kAllExtensionNumbersResponse: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - *message_response_.all_extension_numbers_response_); - break; - } - // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; - case kListServicesResponse: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - *message_response_.list_services_response_); - break; - } - // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; - case kErrorResponse: { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - *message_response_.error_response_); - break; - } - case MESSAGE_RESPONSE_NOT_SET: { - break; - } - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ServerReflectionResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ServerReflectionResponse) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const ServerReflectionResponse* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ServerReflectionResponse) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ServerReflectionResponse) - MergeFrom(*source); - } -} - -void ServerReflectionResponse::MergeFrom(const ServerReflectionResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ServerReflectionResponse) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - switch (from.message_response_case()) { - case kFileDescriptorResponse: { - mutable_file_descriptor_response()->::grpc::reflection::v1alpha::FileDescriptorResponse::MergeFrom(from.file_descriptor_response()); - break; - } - case kAllExtensionNumbersResponse: { - mutable_all_extension_numbers_response()->::grpc::reflection::v1alpha::ExtensionNumberResponse::MergeFrom(from.all_extension_numbers_response()); - break; - } - case kListServicesResponse: { - mutable_list_services_response()->::grpc::reflection::v1alpha::ListServiceResponse::MergeFrom(from.list_services_response()); - break; - } - case kErrorResponse: { - mutable_error_response()->::grpc::reflection::v1alpha::ErrorResponse::MergeFrom(from.error_response()); - break; - } - case MESSAGE_RESPONSE_NOT_SET: { - break; - } - } - if (from.valid_host().size() > 0) { - - valid_host_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.valid_host_); - } - if (from.has_original_request()) { - mutable_original_request()->::grpc::reflection::v1alpha::ServerReflectionRequest::MergeFrom(from.original_request()); - } -} - -void ServerReflectionResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ServerReflectionResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void ServerReflectionResponse::CopyFrom(const ServerReflectionResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ServerReflectionResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ServerReflectionResponse::IsInitialized() const { - - return true; -} - -void ServerReflectionResponse::Swap(ServerReflectionResponse* other) { - if (other == this) return; - InternalSwap(other); -} -void ServerReflectionResponse::InternalSwap(ServerReflectionResponse* other) { - valid_host_.Swap(&other->valid_host_); - std::swap(original_request_, other->original_request_); - std::swap(message_response_, other->message_response_); - std::swap(_oneof_case_[0], other->_oneof_case_[0]); - _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); -} - -::google::protobuf::Metadata ServerReflectionResponse::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = ServerReflectionResponse_descriptor_; - metadata.reflection = ServerReflectionResponse_reflection_; - return metadata; -} - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// ServerReflectionResponse - -// optional string valid_host = 1; -void ServerReflectionResponse::clear_valid_host() { - valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - const ::std::string& ServerReflectionResponse::valid_host() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) - return valid_host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - void ServerReflectionResponse::set_valid_host(const ::std::string& value) { - - valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) -} - void ServerReflectionResponse::set_valid_host(const char* value) { - - valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) -} - void ServerReflectionResponse::set_valid_host(const char* value, size_t size) { - - valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) -} - ::std::string* ServerReflectionResponse::mutable_valid_host() { - - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) - return valid_host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - ::std::string* ServerReflectionResponse::release_valid_host() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) - - return valid_host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - void ServerReflectionResponse::set_allocated_valid_host(::std::string* valid_host) { - if (valid_host != NULL) { - - } else { - - } - valid_host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), valid_host); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) -} - -// optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; -bool ServerReflectionResponse::has_original_request() const { - return !_is_default_instance_ && original_request_ != NULL; -} -void ServerReflectionResponse::clear_original_request() { - if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; - original_request_ = NULL; -} -const ::grpc::reflection::v1alpha::ServerReflectionRequest& ServerReflectionResponse::original_request() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) - return original_request_ != NULL ? *original_request_ : *default_instance_->original_request_; -} -::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::mutable_original_request() { - - if (original_request_ == NULL) { - original_request_ = new ::grpc::reflection::v1alpha::ServerReflectionRequest; - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) - return original_request_; -} -::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::release_original_request() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) - - ::grpc::reflection::v1alpha::ServerReflectionRequest* temp = original_request_; - original_request_ = NULL; - return temp; -} -void ServerReflectionResponse::set_allocated_original_request(::grpc::reflection::v1alpha::ServerReflectionRequest* original_request) { - delete original_request_; - original_request_ = original_request; - if (original_request) { - - } else { - - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) -} - -// optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; -bool ServerReflectionResponse::has_file_descriptor_response() const { - return message_response_case() == kFileDescriptorResponse; -} -void ServerReflectionResponse::set_has_file_descriptor_response() { - _oneof_case_[0] = kFileDescriptorResponse; -} -void ServerReflectionResponse::clear_file_descriptor_response() { - if (has_file_descriptor_response()) { - delete message_response_.file_descriptor_response_; - clear_has_message_response(); - } -} - const ::grpc::reflection::v1alpha::FileDescriptorResponse& ServerReflectionResponse::file_descriptor_response() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) - return has_file_descriptor_response() - ? *message_response_.file_descriptor_response_ - : ::grpc::reflection::v1alpha::FileDescriptorResponse::default_instance(); -} -::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::mutable_file_descriptor_response() { - if (!has_file_descriptor_response()) { - clear_message_response(); - set_has_file_descriptor_response(); - message_response_.file_descriptor_response_ = new ::grpc::reflection::v1alpha::FileDescriptorResponse; - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) - return message_response_.file_descriptor_response_; -} -::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::release_file_descriptor_response() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) - if (has_file_descriptor_response()) { - clear_has_message_response(); - ::grpc::reflection::v1alpha::FileDescriptorResponse* temp = message_response_.file_descriptor_response_; - message_response_.file_descriptor_response_ = NULL; - return temp; - } else { - return NULL; - } -} -void ServerReflectionResponse::set_allocated_file_descriptor_response(::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response) { - clear_message_response(); - if (file_descriptor_response) { - set_has_file_descriptor_response(); - message_response_.file_descriptor_response_ = file_descriptor_response; - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) -} - -// optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; -bool ServerReflectionResponse::has_all_extension_numbers_response() const { - return message_response_case() == kAllExtensionNumbersResponse; -} -void ServerReflectionResponse::set_has_all_extension_numbers_response() { - _oneof_case_[0] = kAllExtensionNumbersResponse; -} -void ServerReflectionResponse::clear_all_extension_numbers_response() { - if (has_all_extension_numbers_response()) { - delete message_response_.all_extension_numbers_response_; - clear_has_message_response(); - } -} - const ::grpc::reflection::v1alpha::ExtensionNumberResponse& ServerReflectionResponse::all_extension_numbers_response() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) - return has_all_extension_numbers_response() - ? *message_response_.all_extension_numbers_response_ - : ::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance(); -} -::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::mutable_all_extension_numbers_response() { - if (!has_all_extension_numbers_response()) { - clear_message_response(); - set_has_all_extension_numbers_response(); - message_response_.all_extension_numbers_response_ = new ::grpc::reflection::v1alpha::ExtensionNumberResponse; - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) - return message_response_.all_extension_numbers_response_; -} -::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::release_all_extension_numbers_response() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) - if (has_all_extension_numbers_response()) { - clear_has_message_response(); - ::grpc::reflection::v1alpha::ExtensionNumberResponse* temp = message_response_.all_extension_numbers_response_; - message_response_.all_extension_numbers_response_ = NULL; - return temp; - } else { - return NULL; - } -} -void ServerReflectionResponse::set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response) { - clear_message_response(); - if (all_extension_numbers_response) { - set_has_all_extension_numbers_response(); - message_response_.all_extension_numbers_response_ = all_extension_numbers_response; - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) -} - -// optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; -bool ServerReflectionResponse::has_list_services_response() const { - return message_response_case() == kListServicesResponse; -} -void ServerReflectionResponse::set_has_list_services_response() { - _oneof_case_[0] = kListServicesResponse; -} -void ServerReflectionResponse::clear_list_services_response() { - if (has_list_services_response()) { - delete message_response_.list_services_response_; - clear_has_message_response(); - } -} - const ::grpc::reflection::v1alpha::ListServiceResponse& ServerReflectionResponse::list_services_response() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) - return has_list_services_response() - ? *message_response_.list_services_response_ - : ::grpc::reflection::v1alpha::ListServiceResponse::default_instance(); -} -::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::mutable_list_services_response() { - if (!has_list_services_response()) { - clear_message_response(); - set_has_list_services_response(); - message_response_.list_services_response_ = new ::grpc::reflection::v1alpha::ListServiceResponse; - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) - return message_response_.list_services_response_; -} -::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::release_list_services_response() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) - if (has_list_services_response()) { - clear_has_message_response(); - ::grpc::reflection::v1alpha::ListServiceResponse* temp = message_response_.list_services_response_; - message_response_.list_services_response_ = NULL; - return temp; - } else { - return NULL; - } -} -void ServerReflectionResponse::set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response) { - clear_message_response(); - if (list_services_response) { - set_has_list_services_response(); - message_response_.list_services_response_ = list_services_response; - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) -} - -// optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; -bool ServerReflectionResponse::has_error_response() const { - return message_response_case() == kErrorResponse; -} -void ServerReflectionResponse::set_has_error_response() { - _oneof_case_[0] = kErrorResponse; -} -void ServerReflectionResponse::clear_error_response() { - if (has_error_response()) { - delete message_response_.error_response_; - clear_has_message_response(); - } -} - const ::grpc::reflection::v1alpha::ErrorResponse& ServerReflectionResponse::error_response() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) - return has_error_response() - ? *message_response_.error_response_ - : ::grpc::reflection::v1alpha::ErrorResponse::default_instance(); -} -::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::mutable_error_response() { - if (!has_error_response()) { - clear_message_response(); - set_has_error_response(); - message_response_.error_response_ = new ::grpc::reflection::v1alpha::ErrorResponse; - } - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) - return message_response_.error_response_; -} -::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::release_error_response() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) - if (has_error_response()) { - clear_has_message_response(); - ::grpc::reflection::v1alpha::ErrorResponse* temp = message_response_.error_response_; - message_response_.error_response_ = NULL; - return temp; - } else { - return NULL; - } -} -void ServerReflectionResponse::set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response) { - clear_message_response(); - if (error_response) { - set_has_error_response(); - message_response_.error_response_ = error_response; - } - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) -} - -bool ServerReflectionResponse::has_message_response() const { - return message_response_case() != MESSAGE_RESPONSE_NOT_SET; -} -void ServerReflectionResponse::clear_has_message_response() { - _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET; -} -ServerReflectionResponse::MessageResponseCase ServerReflectionResponse::message_response_case() const { - return ServerReflectionResponse::MessageResponseCase(_oneof_case_[0]); -} -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int FileDescriptorResponse::kFileDescriptorProtoFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -FileDescriptorResponse::FileDescriptorResponse() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.FileDescriptorResponse) -} - -void FileDescriptorResponse::InitAsDefaultInstance() { - _is_default_instance_ = true; -} - -FileDescriptorResponse::FileDescriptorResponse(const FileDescriptorResponse& from) - : ::google::protobuf::Message(), - _internal_metadata_(NULL) { - SharedCtor(); - MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.FileDescriptorResponse) -} - -void FileDescriptorResponse::SharedCtor() { - _is_default_instance_ = false; - ::google::protobuf::internal::GetEmptyString(); - _cached_size_ = 0; -} - -FileDescriptorResponse::~FileDescriptorResponse() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.FileDescriptorResponse) - SharedDtor(); -} - -void FileDescriptorResponse::SharedDtor() { - if (this != default_instance_) { - } -} - -void FileDescriptorResponse::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* FileDescriptorResponse::descriptor() { - protobuf_AssignDescriptorsOnce(); - return FileDescriptorResponse_descriptor_; -} - -const FileDescriptorResponse& FileDescriptorResponse::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); - return *default_instance_; -} - -FileDescriptorResponse* FileDescriptorResponse::default_instance_ = NULL; - -FileDescriptorResponse* FileDescriptorResponse::New(::google::protobuf::Arena* arena) const { - FileDescriptorResponse* n = new FileDescriptorResponse; - if (arena != NULL) { - arena->Own(n); - } - return n; -} - -void FileDescriptorResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.FileDescriptorResponse) - file_descriptor_proto_.Clear(); -} - -bool FileDescriptorResponse::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.FileDescriptorResponse) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated bytes file_descriptor_proto = 1; - case 1: { - if (tag == 10) { - parse_file_descriptor_proto: - DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( - input, this->add_file_descriptor_proto())); - } else { - goto handle_unusual; - } - if (input->ExpectTag(10)) goto parse_file_descriptor_proto; - if (input->ExpectAtEnd()) goto success; - break; - } - - default: { - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.FileDescriptorResponse) - return true; -failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.FileDescriptorResponse) - return false; -#undef DO_ -} - -void FileDescriptorResponse::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.FileDescriptorResponse) - // repeated bytes file_descriptor_proto = 1; - for (int i = 0; i < this->file_descriptor_proto_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteBytes( - 1, this->file_descriptor_proto(i), output); - } - - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.FileDescriptorResponse) -} - -::google::protobuf::uint8* FileDescriptorResponse::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.FileDescriptorResponse) - // repeated bytes file_descriptor_proto = 1; - for (int i = 0; i < this->file_descriptor_proto_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteBytesToArray(1, this->file_descriptor_proto(i), target); - } - - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.FileDescriptorResponse) - return target; -} - -int FileDescriptorResponse::ByteSize() const { -// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.FileDescriptorResponse) - int total_size = 0; - - // repeated bytes file_descriptor_proto = 1; - total_size += 1 * this->file_descriptor_proto_size(); - for (int i = 0; i < this->file_descriptor_proto_size(); i++) { - total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( - this->file_descriptor_proto(i)); - } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void FileDescriptorResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.FileDescriptorResponse) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const FileDescriptorResponse* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.FileDescriptorResponse) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.FileDescriptorResponse) - MergeFrom(*source); - } -} - -void FileDescriptorResponse::MergeFrom(const FileDescriptorResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.FileDescriptorResponse) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - file_descriptor_proto_.MergeFrom(from.file_descriptor_proto_); -} - -void FileDescriptorResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.FileDescriptorResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void FileDescriptorResponse::CopyFrom(const FileDescriptorResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.FileDescriptorResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool FileDescriptorResponse::IsInitialized() const { - - return true; -} - -void FileDescriptorResponse::Swap(FileDescriptorResponse* other) { - if (other == this) return; - InternalSwap(other); -} -void FileDescriptorResponse::InternalSwap(FileDescriptorResponse* other) { - file_descriptor_proto_.UnsafeArenaSwap(&other->file_descriptor_proto_); - _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); -} - -::google::protobuf::Metadata FileDescriptorResponse::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = FileDescriptorResponse_descriptor_; - metadata.reflection = FileDescriptorResponse_reflection_; - return metadata; -} - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// FileDescriptorResponse - -// repeated bytes file_descriptor_proto = 1; -int FileDescriptorResponse::file_descriptor_proto_size() const { - return file_descriptor_proto_.size(); -} -void FileDescriptorResponse::clear_file_descriptor_proto() { - file_descriptor_proto_.Clear(); -} - const ::std::string& FileDescriptorResponse::file_descriptor_proto(int index) const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) - return file_descriptor_proto_.Get(index); -} - ::std::string* FileDescriptorResponse::mutable_file_descriptor_proto(int index) { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) - return file_descriptor_proto_.Mutable(index); -} - void FileDescriptorResponse::set_file_descriptor_proto(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) - file_descriptor_proto_.Mutable(index)->assign(value); -} - void FileDescriptorResponse::set_file_descriptor_proto(int index, const char* value) { - file_descriptor_proto_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) -} - void FileDescriptorResponse::set_file_descriptor_proto(int index, const void* value, size_t size) { - file_descriptor_proto_.Mutable(index)->assign( - reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) -} - ::std::string* FileDescriptorResponse::add_file_descriptor_proto() { - // @@protoc_insertion_point(field_add_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) - return file_descriptor_proto_.Add(); -} - void FileDescriptorResponse::add_file_descriptor_proto(const ::std::string& value) { - file_descriptor_proto_.Add()->assign(value); - // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) -} - void FileDescriptorResponse::add_file_descriptor_proto(const char* value) { - file_descriptor_proto_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) -} - void FileDescriptorResponse::add_file_descriptor_proto(const void* value, size_t size) { - file_descriptor_proto_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) -} - const ::google::protobuf::RepeatedPtrField< ::std::string>& -FileDescriptorResponse::file_descriptor_proto() const { - // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) - return file_descriptor_proto_; -} - ::google::protobuf::RepeatedPtrField< ::std::string>* -FileDescriptorResponse::mutable_file_descriptor_proto() { - // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) - return &file_descriptor_proto_; -} - -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ExtensionNumberResponse::kBaseTypeNameFieldNumber; -const int ExtensionNumberResponse::kExtensionNumberFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -ExtensionNumberResponse::ExtensionNumberResponse() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) -} - -void ExtensionNumberResponse::InitAsDefaultInstance() { - _is_default_instance_ = true; -} - -ExtensionNumberResponse::ExtensionNumberResponse(const ExtensionNumberResponse& from) - : ::google::protobuf::Message(), - _internal_metadata_(NULL) { - SharedCtor(); - MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) -} - -void ExtensionNumberResponse::SharedCtor() { - _is_default_instance_ = false; - ::google::protobuf::internal::GetEmptyString(); - _cached_size_ = 0; - base_type_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - -ExtensionNumberResponse::~ExtensionNumberResponse() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ExtensionNumberResponse) - SharedDtor(); -} - -void ExtensionNumberResponse::SharedDtor() { - base_type_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != default_instance_) { - } -} - -void ExtensionNumberResponse::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* ExtensionNumberResponse::descriptor() { - protobuf_AssignDescriptorsOnce(); - return ExtensionNumberResponse_descriptor_; -} - -const ExtensionNumberResponse& ExtensionNumberResponse::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); - return *default_instance_; -} - -ExtensionNumberResponse* ExtensionNumberResponse::default_instance_ = NULL; - -ExtensionNumberResponse* ExtensionNumberResponse::New(::google::protobuf::Arena* arena) const { - ExtensionNumberResponse* n = new ExtensionNumberResponse; - if (arena != NULL) { - arena->Own(n); - } - return n; -} - -void ExtensionNumberResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ExtensionNumberResponse) - base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - extension_number_.Clear(); -} - -bool ExtensionNumberResponse::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionNumberResponse) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string base_type_name = 1; - case 1: { - if (tag == 10) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_base_type_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->base_type_name().data(), this->base_type_name().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name")); - } else { - goto handle_unusual; - } - if (input->ExpectTag(18)) goto parse_extension_number; - break; - } - - // repeated int32 extension_number = 2; - case 2: { - if (tag == 18) { - parse_extension_number: - DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, this->mutable_extension_number()))); - } else if (tag == 16) { - DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - 1, 18, input, this->mutable_extension_number()))); - } else { - goto handle_unusual; - } - if (input->ExpectAtEnd()) goto success; - break; - } - - default: { - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ExtensionNumberResponse) - return true; -failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ExtensionNumberResponse) - return false; -#undef DO_ -} - -void ExtensionNumberResponse::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ExtensionNumberResponse) - // optional string base_type_name = 1; - if (this->base_type_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->base_type_name().data(), this->base_type_name().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->base_type_name(), output); - } - - // repeated int32 extension_number = 2; - if (this->extension_number_size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_extension_number_cached_byte_size_); - } - for (int i = 0; i < this->extension_number_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( - this->extension_number(i), output); - } - - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionNumberResponse) -} - -::google::protobuf::uint8* ExtensionNumberResponse::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ExtensionNumberResponse) - // optional string base_type_name = 1; - if (this->base_type_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->base_type_name().data(), this->base_type_name().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->base_type_name(), target); - } - - // repeated int32 extension_number = 2; - if (this->extension_number_size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( - 2, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - target); - target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( - _extension_number_cached_byte_size_, target); - } - for (int i = 0; i < this->extension_number_size(); i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32NoTagToArray(this->extension_number(i), target); - } - - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionNumberResponse) - return target; -} - -int ExtensionNumberResponse::ByteSize() const { -// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ExtensionNumberResponse) - int total_size = 0; - - // optional string base_type_name = 1; - if (this->base_type_name().size() > 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->base_type_name()); - } - - // repeated int32 extension_number = 2; - { - int data_size = 0; - for (int i = 0; i < this->extension_number_size(); i++) { - data_size += ::google::protobuf::internal::WireFormatLite:: - Int32Size(this->extension_number(i)); - } - if (data_size > 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _extension_number_cached_byte_size_ = data_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - total_size += data_size; - } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ExtensionNumberResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ExtensionNumberResponse) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const ExtensionNumberResponse* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ExtensionNumberResponse) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ExtensionNumberResponse) - MergeFrom(*source); - } -} - -void ExtensionNumberResponse::MergeFrom(const ExtensionNumberResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ExtensionNumberResponse) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - extension_number_.MergeFrom(from.extension_number_); - if (from.base_type_name().size() > 0) { - - base_type_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.base_type_name_); - } -} - -void ExtensionNumberResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ExtensionNumberResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void ExtensionNumberResponse::CopyFrom(const ExtensionNumberResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ExtensionNumberResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ExtensionNumberResponse::IsInitialized() const { - - return true; -} - -void ExtensionNumberResponse::Swap(ExtensionNumberResponse* other) { - if (other == this) return; - InternalSwap(other); -} -void ExtensionNumberResponse::InternalSwap(ExtensionNumberResponse* other) { - base_type_name_.Swap(&other->base_type_name_); - extension_number_.UnsafeArenaSwap(&other->extension_number_); - _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); -} - -::google::protobuf::Metadata ExtensionNumberResponse::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = ExtensionNumberResponse_descriptor_; - metadata.reflection = ExtensionNumberResponse_reflection_; - return metadata; -} - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// ExtensionNumberResponse - -// optional string base_type_name = 1; -void ExtensionNumberResponse::clear_base_type_name() { - base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - const ::std::string& ExtensionNumberResponse::base_type_name() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) - return base_type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - void ExtensionNumberResponse::set_base_type_name(const ::std::string& value) { - - base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) -} - void ExtensionNumberResponse::set_base_type_name(const char* value) { - - base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) -} - void ExtensionNumberResponse::set_base_type_name(const char* value, size_t size) { - - base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) -} - ::std::string* ExtensionNumberResponse::mutable_base_type_name() { - - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) - return base_type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - ::std::string* ExtensionNumberResponse::release_base_type_name() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) - - return base_type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - void ExtensionNumberResponse::set_allocated_base_type_name(::std::string* base_type_name) { - if (base_type_name != NULL) { - - } else { - - } - base_type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), base_type_name); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) -} - -// repeated int32 extension_number = 2; -int ExtensionNumberResponse::extension_number_size() const { - return extension_number_.size(); -} -void ExtensionNumberResponse::clear_extension_number() { - extension_number_.Clear(); -} - ::google::protobuf::int32 ExtensionNumberResponse::extension_number(int index) const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) - return extension_number_.Get(index); -} - void ExtensionNumberResponse::set_extension_number(int index, ::google::protobuf::int32 value) { - extension_number_.Set(index, value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) -} - void ExtensionNumberResponse::add_extension_number(::google::protobuf::int32 value) { - extension_number_.Add(value); - // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) -} - const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& -ExtensionNumberResponse::extension_number() const { - // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) - return extension_number_; -} - ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* -ExtensionNumberResponse::mutable_extension_number() { - // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) - return &extension_number_; -} - -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ListServiceResponse::kServiceFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -ListServiceResponse::ListServiceResponse() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ListServiceResponse) -} - -void ListServiceResponse::InitAsDefaultInstance() { - _is_default_instance_ = true; -} - -ListServiceResponse::ListServiceResponse(const ListServiceResponse& from) - : ::google::protobuf::Message(), - _internal_metadata_(NULL) { - SharedCtor(); - MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ListServiceResponse) -} - -void ListServiceResponse::SharedCtor() { - _is_default_instance_ = false; - _cached_size_ = 0; -} - -ListServiceResponse::~ListServiceResponse() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ListServiceResponse) - SharedDtor(); -} - -void ListServiceResponse::SharedDtor() { - if (this != default_instance_) { - } -} - -void ListServiceResponse::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* ListServiceResponse::descriptor() { - protobuf_AssignDescriptorsOnce(); - return ListServiceResponse_descriptor_; -} - -const ListServiceResponse& ListServiceResponse::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); - return *default_instance_; -} - -ListServiceResponse* ListServiceResponse::default_instance_ = NULL; - -ListServiceResponse* ListServiceResponse::New(::google::protobuf::Arena* arena) const { - ListServiceResponse* n = new ListServiceResponse; - if (arena != NULL) { - arena->Own(n); - } - return n; -} - -void ListServiceResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ListServiceResponse) - service_.Clear(); -} - -bool ListServiceResponse::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ListServiceResponse) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; - case 1: { - if (tag == 10) { - DO_(input->IncrementRecursionDepth()); - parse_loop_service: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( - input, add_service())); - } else { - goto handle_unusual; - } - if (input->ExpectTag(10)) goto parse_loop_service; - input->UnsafeDecrementRecursionDepth(); - if (input->ExpectAtEnd()) goto success; - break; - } - - default: { - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ListServiceResponse) - return true; -failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ListServiceResponse) - return false; -#undef DO_ -} - -void ListServiceResponse::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ListServiceResponse) - // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; - for (unsigned int i = 0, n = this->service_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, this->service(i), output); - } - - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ListServiceResponse) -} - -::google::protobuf::uint8* ListServiceResponse::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ListServiceResponse) - // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; - for (unsigned int i = 0, n = this->service_size(); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: - WriteMessageNoVirtualToArray( - 1, this->service(i), target); - } - - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ListServiceResponse) - return target; -} - -int ListServiceResponse::ByteSize() const { -// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ListServiceResponse) - int total_size = 0; - - // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; - total_size += 1 * this->service_size(); - for (int i = 0; i < this->service_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->service(i)); - } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ListServiceResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ListServiceResponse) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const ListServiceResponse* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ListServiceResponse) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ListServiceResponse) - MergeFrom(*source); - } -} - -void ListServiceResponse::MergeFrom(const ListServiceResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ListServiceResponse) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - service_.MergeFrom(from.service_); -} - -void ListServiceResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ListServiceResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void ListServiceResponse::CopyFrom(const ListServiceResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ListServiceResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ListServiceResponse::IsInitialized() const { - - return true; -} - -void ListServiceResponse::Swap(ListServiceResponse* other) { - if (other == this) return; - InternalSwap(other); -} -void ListServiceResponse::InternalSwap(ListServiceResponse* other) { - service_.UnsafeArenaSwap(&other->service_); - _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); -} - -::google::protobuf::Metadata ListServiceResponse::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = ListServiceResponse_descriptor_; - metadata.reflection = ListServiceResponse_reflection_; - return metadata; -} - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// ListServiceResponse - -// repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; -int ListServiceResponse::service_size() const { - return service_.size(); -} -void ListServiceResponse::clear_service() { - service_.Clear(); -} -const ::grpc::reflection::v1alpha::ServiceResponse& ListServiceResponse::service(int index) const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.service) - return service_.Get(index); -} -::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::mutable_service(int index) { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.service) - return service_.Mutable(index); -} -::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::add_service() { - // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.service) - return service_.Add(); -} -::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >* -ListServiceResponse::mutable_service() { - // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.service) - return &service_; -} -const ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >& -ListServiceResponse::service() const { - // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.service) - return service_; -} - -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ServiceResponse::kNameFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -ServiceResponse::ServiceResponse() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ServiceResponse) -} - -void ServiceResponse::InitAsDefaultInstance() { - _is_default_instance_ = true; -} - -ServiceResponse::ServiceResponse(const ServiceResponse& from) - : ::google::protobuf::Message(), - _internal_metadata_(NULL) { - SharedCtor(); - MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ServiceResponse) -} - -void ServiceResponse::SharedCtor() { - _is_default_instance_ = false; - ::google::protobuf::internal::GetEmptyString(); - _cached_size_ = 0; - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - -ServiceResponse::~ServiceResponse() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ServiceResponse) - SharedDtor(); -} - -void ServiceResponse::SharedDtor() { - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != default_instance_) { - } -} - -void ServiceResponse::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* ServiceResponse::descriptor() { - protobuf_AssignDescriptorsOnce(); - return ServiceResponse_descriptor_; -} - -const ServiceResponse& ServiceResponse::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); - return *default_instance_; -} - -ServiceResponse* ServiceResponse::default_instance_ = NULL; - -ServiceResponse* ServiceResponse::New(::google::protobuf::Arena* arena) const { - ServiceResponse* n = new ServiceResponse; - if (arena != NULL) { - arena->Own(n); - } - return n; -} - -void ServiceResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ServiceResponse) - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - -bool ServiceResponse::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ServiceResponse) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string name = 1; - case 1: { - if (tag == 10) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ServiceResponse.name")); - } else { - goto handle_unusual; - } - if (input->ExpectAtEnd()) goto success; - break; - } - - default: { - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ServiceResponse) - return true; -failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ServiceResponse) - return false; -#undef DO_ -} - -void ServiceResponse::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ServiceResponse) - // optional string name = 1; - if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServiceResponse.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ServiceResponse) -} - -::google::protobuf::uint8* ServiceResponse::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ServiceResponse) - // optional string name = 1; - if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), this->name().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ServiceResponse.name"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); - } - - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ServiceResponse) - return target; -} - -int ServiceResponse::ByteSize() const { -// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ServiceResponse) - int total_size = 0; - - // optional string name = 1; - if (this->name().size() > 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ServiceResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ServiceResponse) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const ServiceResponse* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ServiceResponse) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ServiceResponse) - MergeFrom(*source); - } -} - -void ServiceResponse::MergeFrom(const ServiceResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ServiceResponse) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - if (from.name().size() > 0) { - - name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); - } -} - -void ServiceResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ServiceResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void ServiceResponse::CopyFrom(const ServiceResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ServiceResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ServiceResponse::IsInitialized() const { - - return true; -} - -void ServiceResponse::Swap(ServiceResponse* other) { - if (other == this) return; - InternalSwap(other); -} -void ServiceResponse::InternalSwap(ServiceResponse* other) { - name_.Swap(&other->name_); - _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); -} - -::google::protobuf::Metadata ServiceResponse::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = ServiceResponse_descriptor_; - metadata.reflection = ServiceResponse_reflection_; - return metadata; -} - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// ServiceResponse - -// optional string name = 1; -void ServiceResponse::clear_name() { - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - const ::std::string& ServiceResponse::name() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServiceResponse.name) - return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - void ServiceResponse::set_name(const ::std::string& value) { - - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServiceResponse.name) -} - void ServiceResponse::set_name(const char* value) { - - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServiceResponse.name) -} - void ServiceResponse::set_name(const char* value, size_t size) { - - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServiceResponse.name) -} - ::std::string* ServiceResponse::mutable_name() { - - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServiceResponse.name) - return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - ::std::string* ServiceResponse::release_name() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServiceResponse.name) - - return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - void ServiceResponse::set_allocated_name(::std::string* name) { - if (name != NULL) { - - } else { - - } - name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServiceResponse.name) -} - -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ErrorResponse::kErrorCodeFieldNumber; -const int ErrorResponse::kErrorMessageFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -ErrorResponse::ErrorResponse() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ErrorResponse) -} - -void ErrorResponse::InitAsDefaultInstance() { - _is_default_instance_ = true; -} - -ErrorResponse::ErrorResponse(const ErrorResponse& from) - : ::google::protobuf::Message(), - _internal_metadata_(NULL) { - SharedCtor(); - MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ErrorResponse) -} - -void ErrorResponse::SharedCtor() { - _is_default_instance_ = false; - ::google::protobuf::internal::GetEmptyString(); - _cached_size_ = 0; - error_code_ = 0; - error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - -ErrorResponse::~ErrorResponse() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ErrorResponse) - SharedDtor(); -} - -void ErrorResponse::SharedDtor() { - error_message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != default_instance_) { - } -} - -void ErrorResponse::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* ErrorResponse::descriptor() { - protobuf_AssignDescriptorsOnce(); - return ErrorResponse_descriptor_; -} - -const ErrorResponse& ErrorResponse::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); - return *default_instance_; -} - -ErrorResponse* ErrorResponse::default_instance_ = NULL; - -ErrorResponse* ErrorResponse::New(::google::protobuf::Arena* arena) const { - ErrorResponse* n = new ErrorResponse; - if (arena != NULL) { - arena->Own(n); - } - return n; -} - -void ErrorResponse::Clear() { -// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ErrorResponse) - error_code_ = 0; - error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - -bool ErrorResponse::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ErrorResponse) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional int32 error_code = 1; - case 1: { - if (tag == 8) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &error_code_))); - - } else { - goto handle_unusual; - } - if (input->ExpectTag(18)) goto parse_error_message; - break; - } - - // optional string error_message = 2; - case 2: { - if (tag == 18) { - parse_error_message: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_error_message())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->error_message().data(), this->error_message().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ErrorResponse.error_message")); - } else { - goto handle_unusual; - } - if (input->ExpectAtEnd()) goto success; - break; - } - - default: { - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ErrorResponse) - return true; -failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ErrorResponse) - return false; -#undef DO_ -} - -void ErrorResponse::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ErrorResponse) - // optional int32 error_code = 1; - if (this->error_code() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->error_code(), output); - } - - // optional string error_message = 2; - if (this->error_message().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->error_message().data(), this->error_message().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ErrorResponse.error_message"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->error_message(), output); - } - - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ErrorResponse) -} - -::google::protobuf::uint8* ErrorResponse::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ErrorResponse) - // optional int32 error_code = 1; - if (this->error_code() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->error_code(), target); - } - - // optional string error_message = 2; - if (this->error_message().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->error_message().data(), this->error_message().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ErrorResponse.error_message"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 2, this->error_message(), target); - } - - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ErrorResponse) - return target; -} - -int ErrorResponse::ByteSize() const { -// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ErrorResponse) - int total_size = 0; - - // optional int32 error_code = 1; - if (this->error_code() != 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->error_code()); - } - - // optional string error_message = 2; - if (this->error_message().size() > 0) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->error_message()); - } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ErrorResponse::MergeFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ErrorResponse) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const ErrorResponse* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ErrorResponse) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ErrorResponse) - MergeFrom(*source); - } -} - -void ErrorResponse::MergeFrom(const ErrorResponse& from) { -// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ErrorResponse) - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - if (from.error_code() != 0) { - set_error_code(from.error_code()); - } - if (from.error_message().size() > 0) { - - error_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_message_); - } -} - -void ErrorResponse::CopyFrom(const ::google::protobuf::Message& from) { -// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ErrorResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void ErrorResponse::CopyFrom(const ErrorResponse& from) { -// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ErrorResponse) - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ErrorResponse::IsInitialized() const { - - return true; -} - -void ErrorResponse::Swap(ErrorResponse* other) { - if (other == this) return; - InternalSwap(other); -} -void ErrorResponse::InternalSwap(ErrorResponse* other) { - std::swap(error_code_, other->error_code_); - error_message_.Swap(&other->error_message_); - _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); -} - -::google::protobuf::Metadata ErrorResponse::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = ErrorResponse_descriptor_; - metadata.reflection = ErrorResponse_reflection_; - return metadata; -} - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// ErrorResponse - -// optional int32 error_code = 1; -void ErrorResponse::clear_error_code() { - error_code_ = 0; -} - ::google::protobuf::int32 ErrorResponse::error_code() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_code) - return error_code_; -} - void ErrorResponse::set_error_code(::google::protobuf::int32 value) { - - error_code_ = value; - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_code) -} - -// optional string error_message = 2; -void ErrorResponse::clear_error_message() { - error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - const ::std::string& ErrorResponse::error_message() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_message) - return error_message_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - void ErrorResponse::set_error_message(const ::std::string& value) { - - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_message) -} - void ErrorResponse::set_error_message(const char* value) { - - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ErrorResponse.error_message) -} - void ErrorResponse::set_error_message(const char* value, size_t size) { - - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ErrorResponse.error_message) -} - ::std::string* ErrorResponse::mutable_error_message() { - - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ErrorResponse.error_message) - return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - ::std::string* ErrorResponse::release_error_message() { - // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ErrorResponse.error_message) - - return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - void ErrorResponse::set_allocated_error_message(::std::string* error_message) { - if (error_message != NULL) { - - } else { - - } - error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message) -} - -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - -// @@protoc_insertion_point(namespace_scope) - -} // namespace v1alpha -} // namespace reflection -} // namespace grpc - -// @@protoc_insertion_point(global_scope) diff --git a/include/grpc++/ext/proto_server_reflection_plugin.h b/include/grpc++/ext/proto_server_reflection_plugin.h new file mode 100644 index 0000000000..774d3439e7 --- /dev/null +++ b/include/grpc++/ext/proto_server_reflection_plugin.h @@ -0,0 +1,65 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H +#define GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H + +#include +#include + +namespace grpc { +class ServerInitializer; +class ProtoServerReflection; +} // namespace grpc + +namespace grpc { +namespace reflection { + +class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { + public: + ProtoServerReflectionPlugin(); + ::grpc::string name() GRPC_OVERRIDE; + void InitServer(::grpc::ServerInitializer* si) GRPC_OVERRIDE; + void Finish(::grpc::ServerInitializer* si) GRPC_OVERRIDE; + void ChangeArguments(const ::grpc::string& name, void* value) GRPC_OVERRIDE; + bool has_async_methods() const GRPC_OVERRIDE; + bool has_sync_methods() const GRPC_OVERRIDE; + + private: + std::shared_ptr<::grpc::ProtoServerReflection> reflection_service_; +}; + +} // namespace reflection +} // namespace grpc + +#endif // GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H diff --git a/include/grpc++/ext/reflection.grpc.pb.h b/include/grpc++/ext/reflection.grpc.pb.h new file mode 100644 index 0000000000..0b4ef86147 --- /dev/null +++ b/include/grpc++/ext/reflection.grpc.pb.h @@ -0,0 +1,184 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +// Generated by the gRPC protobuf plugin. +// If you make any local change, they will be lost. +// source: reflection.proto +// Original file comments: +// Copyright 2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Service exported by server reflection +// +#ifndef GRPC_reflection_2eproto__INCLUDED +#define GRPC_reflection_2eproto__INCLUDED + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace grpc { +class CompletionQueue; +class Channel; +class RpcService; +class ServerCompletionQueue; +class ServerContext; +} // namespace grpc + +namespace grpc { +namespace reflection { +namespace v1alpha { + +class ServerReflection GRPC_FINAL { + public: + class StubInterface { + public: + virtual ~StubInterface() {} + // The reflection service is structured as a bidirectional stream, ensuring + // all related requests go to a single server. + std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> ServerReflectionInfo(::grpc::ClientContext* context) { + return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(ServerReflectionInfoRaw(context)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> AsyncServerReflectionInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(AsyncServerReflectionInfoRaw(context, cq, tag)); + } + private: + virtual ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflectionInfoRaw(::grpc::ClientContext* context) = 0; + virtual ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; + }; + class Stub GRPC_FINAL : public StubInterface { + public: + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> ServerReflectionInfo(::grpc::ClientContext* context) { + return std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(ServerReflectionInfoRaw(context)); + } + std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>> AsyncServerReflectionInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>>(AsyncServerReflectionInfoRaw(context, cq, tag)); + } + + private: + std::shared_ptr< ::grpc::ChannelInterface> channel_; + ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflectionInfoRaw(::grpc::ClientContext* context) GRPC_OVERRIDE; + ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE; + const ::grpc::RpcMethod rpcmethod_ServerReflectionInfo_; + }; + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + // The reflection service is structured as a bidirectional stream, ensuring + // all related requests go to a single server. + virtual ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream); + }; + template + class WithAsyncMethod_ServerReflectionInfo : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithAsyncMethod_ServerReflectionInfo() { + ::grpc::Service::MarkMethodAsync(0); + } + ~WithAsyncMethod_ServerReflectionInfo() GRPC_OVERRIDE { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) GRPC_FINAL GRPC_OVERRIDE { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_ServerReflectionInfo AsyncService; + template + class WithGenericMethod_ServerReflectionInfo : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(const Service *service) {} + public: + WithGenericMethod_ServerReflectionInfo() { + ::grpc::Service::MarkMethodGeneric(0); + } + ~WithGenericMethod_ServerReflectionInfo() GRPC_OVERRIDE { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) GRPC_FINAL GRPC_OVERRIDE { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; +}; + +} // namespace v1alpha +} // namespace reflection +} // namespace grpc + + +#endif // GRPC_reflection_2eproto__INCLUDED diff --git a/include/grpc++/ext/reflection.pb.h b/include/grpc++/ext/reflection.pb.h new file mode 100644 index 0000000000..00d07735ee --- /dev/null +++ b/include/grpc++/ext/reflection.pb.h @@ -0,0 +1,2035 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: reflection.proto + +#ifndef PROTOBUF_reflection_2eproto__INCLUDED +#define PROTOBUF_reflection_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3000000 +#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 3000000 < GOOGLE_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 +// @@protoc_insertion_point(includes) + +namespace grpc { +namespace reflection { +namespace v1alpha { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_reflection_2eproto(); +void protobuf_AssignDesc_reflection_2eproto(); +void protobuf_ShutdownFile_reflection_2eproto(); + +class ErrorResponse; +class ExtensionNumberResponse; +class ExtensionRequest; +class FileDescriptorResponse; +class ListServiceResponse; +class ServerReflectionRequest; +class ServerReflectionResponse; +class ServiceResponse; + +// =================================================================== + +class ServerReflectionRequest : public ::google::protobuf::Message { + public: + ServerReflectionRequest(); + virtual ~ServerReflectionRequest(); + + ServerReflectionRequest(const ServerReflectionRequest& from); + + inline ServerReflectionRequest& operator=(const ServerReflectionRequest& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ServerReflectionRequest& default_instance(); + + enum MessageRequestCase { + kFileByFilename = 3, + kFileContainingSymbol = 4, + kFileContainingExtension = 5, + kAllExtensionNumbersOfType = 6, + kListServices = 7, + MESSAGE_REQUEST_NOT_SET = 0, + }; + + void Swap(ServerReflectionRequest* other); + + // implements Message ---------------------------------------------- + + inline ServerReflectionRequest* New() const { return New(NULL); } + + ServerReflectionRequest* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ServerReflectionRequest& from); + void MergeFrom(const ServerReflectionRequest& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ServerReflectionRequest* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string host = 1; + void clear_host(); + static const int kHostFieldNumber = 1; + const ::std::string& host() const; + void set_host(const ::std::string& value); + void set_host(const char* value); + void set_host(const char* value, size_t size); + ::std::string* mutable_host(); + ::std::string* release_host(); + void set_allocated_host(::std::string* host); + + // optional string file_by_filename = 3; + private: + bool has_file_by_filename() const; + public: + void clear_file_by_filename(); + static const int kFileByFilenameFieldNumber = 3; + const ::std::string& file_by_filename() const; + void set_file_by_filename(const ::std::string& value); + void set_file_by_filename(const char* value); + void set_file_by_filename(const char* value, size_t size); + ::std::string* mutable_file_by_filename(); + ::std::string* release_file_by_filename(); + void set_allocated_file_by_filename(::std::string* file_by_filename); + + // optional string file_containing_symbol = 4; + private: + bool has_file_containing_symbol() const; + public: + void clear_file_containing_symbol(); + static const int kFileContainingSymbolFieldNumber = 4; + const ::std::string& file_containing_symbol() const; + void set_file_containing_symbol(const ::std::string& value); + void set_file_containing_symbol(const char* value); + void set_file_containing_symbol(const char* value, size_t size); + ::std::string* mutable_file_containing_symbol(); + ::std::string* release_file_containing_symbol(); + void set_allocated_file_containing_symbol(::std::string* file_containing_symbol); + + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + bool has_file_containing_extension() const; + void clear_file_containing_extension(); + static const int kFileContainingExtensionFieldNumber = 5; + const ::grpc::reflection::v1alpha::ExtensionRequest& file_containing_extension() const; + ::grpc::reflection::v1alpha::ExtensionRequest* mutable_file_containing_extension(); + ::grpc::reflection::v1alpha::ExtensionRequest* release_file_containing_extension(); + void set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension); + + // optional string all_extension_numbers_of_type = 6; + private: + bool has_all_extension_numbers_of_type() const; + public: + void clear_all_extension_numbers_of_type(); + static const int kAllExtensionNumbersOfTypeFieldNumber = 6; + const ::std::string& all_extension_numbers_of_type() const; + void set_all_extension_numbers_of_type(const ::std::string& value); + void set_all_extension_numbers_of_type(const char* value); + void set_all_extension_numbers_of_type(const char* value, size_t size); + ::std::string* mutable_all_extension_numbers_of_type(); + ::std::string* release_all_extension_numbers_of_type(); + void set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type); + + // optional string list_services = 7; + private: + bool has_list_services() const; + public: + void clear_list_services(); + static const int kListServicesFieldNumber = 7; + const ::std::string& list_services() const; + void set_list_services(const ::std::string& value); + void set_list_services(const char* value); + void set_list_services(const char* value, size_t size); + ::std::string* mutable_list_services(); + ::std::string* release_list_services(); + void set_allocated_list_services(::std::string* list_services); + + MessageRequestCase message_request_case() const; + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ServerReflectionRequest) + private: + inline void set_has_file_by_filename(); + inline void set_has_file_containing_symbol(); + inline void set_has_file_containing_extension(); + inline void set_has_all_extension_numbers_of_type(); + inline void set_has_list_services(); + + inline bool has_message_request() const; + void clear_message_request(); + inline void clear_has_message_request(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr host_; + union MessageRequestUnion { + MessageRequestUnion() {} + ::google::protobuf::internal::ArenaStringPtr file_by_filename_; + ::google::protobuf::internal::ArenaStringPtr file_containing_symbol_; + ::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension_; + ::google::protobuf::internal::ArenaStringPtr all_extension_numbers_of_type_; + ::google::protobuf::internal::ArenaStringPtr list_services_; + } message_request_; + mutable int _cached_size_; + ::google::protobuf::uint32 _oneof_case_[1]; + + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static ServerReflectionRequest* default_instance_; +}; +// ------------------------------------------------------------------- + +class ExtensionRequest : public ::google::protobuf::Message { + public: + ExtensionRequest(); + virtual ~ExtensionRequest(); + + ExtensionRequest(const ExtensionRequest& from); + + inline ExtensionRequest& operator=(const ExtensionRequest& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ExtensionRequest& default_instance(); + + void Swap(ExtensionRequest* other); + + // implements Message ---------------------------------------------- + + inline ExtensionRequest* New() const { return New(NULL); } + + ExtensionRequest* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ExtensionRequest& from); + void MergeFrom(const ExtensionRequest& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ExtensionRequest* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string containing_type = 1; + void clear_containing_type(); + static const int kContainingTypeFieldNumber = 1; + const ::std::string& containing_type() const; + void set_containing_type(const ::std::string& value); + void set_containing_type(const char* value); + void set_containing_type(const char* value, size_t size); + ::std::string* mutable_containing_type(); + ::std::string* release_containing_type(); + void set_allocated_containing_type(::std::string* containing_type); + + // optional int32 extension_number = 2; + void clear_extension_number(); + static const int kExtensionNumberFieldNumber = 2; + ::google::protobuf::int32 extension_number() const; + void set_extension_number(::google::protobuf::int32 value); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionRequest) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr containing_type_; + ::google::protobuf::int32 extension_number_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static ExtensionRequest* default_instance_; +}; +// ------------------------------------------------------------------- + +class ServerReflectionResponse : public ::google::protobuf::Message { + public: + ServerReflectionResponse(); + virtual ~ServerReflectionResponse(); + + ServerReflectionResponse(const ServerReflectionResponse& from); + + inline ServerReflectionResponse& operator=(const ServerReflectionResponse& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ServerReflectionResponse& default_instance(); + + enum MessageResponseCase { + kFileDescriptorResponse = 4, + kAllExtensionNumbersResponse = 5, + kListServicesResponse = 6, + kErrorResponse = 7, + MESSAGE_RESPONSE_NOT_SET = 0, + }; + + void Swap(ServerReflectionResponse* other); + + // implements Message ---------------------------------------------- + + inline ServerReflectionResponse* New() const { return New(NULL); } + + ServerReflectionResponse* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ServerReflectionResponse& from); + void MergeFrom(const ServerReflectionResponse& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ServerReflectionResponse* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string valid_host = 1; + void clear_valid_host(); + static const int kValidHostFieldNumber = 1; + const ::std::string& valid_host() const; + void set_valid_host(const ::std::string& value); + void set_valid_host(const char* value); + void set_valid_host(const char* value, size_t size); + ::std::string* mutable_valid_host(); + ::std::string* release_valid_host(); + void set_allocated_valid_host(::std::string* valid_host); + + // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; + bool has_original_request() const; + void clear_original_request(); + static const int kOriginalRequestFieldNumber = 2; + const ::grpc::reflection::v1alpha::ServerReflectionRequest& original_request() const; + ::grpc::reflection::v1alpha::ServerReflectionRequest* mutable_original_request(); + ::grpc::reflection::v1alpha::ServerReflectionRequest* release_original_request(); + void set_allocated_original_request(::grpc::reflection::v1alpha::ServerReflectionRequest* original_request); + + // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; + bool has_file_descriptor_response() const; + void clear_file_descriptor_response(); + static const int kFileDescriptorResponseFieldNumber = 4; + const ::grpc::reflection::v1alpha::FileDescriptorResponse& file_descriptor_response() const; + ::grpc::reflection::v1alpha::FileDescriptorResponse* mutable_file_descriptor_response(); + ::grpc::reflection::v1alpha::FileDescriptorResponse* release_file_descriptor_response(); + void set_allocated_file_descriptor_response(::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response); + + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + bool has_all_extension_numbers_response() const; + void clear_all_extension_numbers_response(); + static const int kAllExtensionNumbersResponseFieldNumber = 5; + const ::grpc::reflection::v1alpha::ExtensionNumberResponse& all_extension_numbers_response() const; + ::grpc::reflection::v1alpha::ExtensionNumberResponse* mutable_all_extension_numbers_response(); + ::grpc::reflection::v1alpha::ExtensionNumberResponse* release_all_extension_numbers_response(); + void set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response); + + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + bool has_list_services_response() const; + void clear_list_services_response(); + static const int kListServicesResponseFieldNumber = 6; + const ::grpc::reflection::v1alpha::ListServiceResponse& list_services_response() const; + ::grpc::reflection::v1alpha::ListServiceResponse* mutable_list_services_response(); + ::grpc::reflection::v1alpha::ListServiceResponse* release_list_services_response(); + void set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response); + + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + bool has_error_response() const; + void clear_error_response(); + static const int kErrorResponseFieldNumber = 7; + const ::grpc::reflection::v1alpha::ErrorResponse& error_response() const; + ::grpc::reflection::v1alpha::ErrorResponse* mutable_error_response(); + ::grpc::reflection::v1alpha::ErrorResponse* release_error_response(); + void set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response); + + MessageResponseCase message_response_case() const; + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ServerReflectionResponse) + private: + inline void set_has_file_descriptor_response(); + inline void set_has_all_extension_numbers_response(); + inline void set_has_list_services_response(); + inline void set_has_error_response(); + + inline bool has_message_response() const; + void clear_message_response(); + inline void clear_has_message_response(); + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr valid_host_; + ::grpc::reflection::v1alpha::ServerReflectionRequest* original_request_; + union MessageResponseUnion { + MessageResponseUnion() {} + ::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response_; + ::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response_; + ::grpc::reflection::v1alpha::ListServiceResponse* list_services_response_; + ::grpc::reflection::v1alpha::ErrorResponse* error_response_; + } message_response_; + mutable int _cached_size_; + ::google::protobuf::uint32 _oneof_case_[1]; + + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static ServerReflectionResponse* default_instance_; +}; +// ------------------------------------------------------------------- + +class FileDescriptorResponse : public ::google::protobuf::Message { + public: + FileDescriptorResponse(); + virtual ~FileDescriptorResponse(); + + FileDescriptorResponse(const FileDescriptorResponse& from); + + inline FileDescriptorResponse& operator=(const FileDescriptorResponse& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const FileDescriptorResponse& default_instance(); + + void Swap(FileDescriptorResponse* other); + + // implements Message ---------------------------------------------- + + inline FileDescriptorResponse* New() const { return New(NULL); } + + FileDescriptorResponse* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const FileDescriptorResponse& from); + void MergeFrom(const FileDescriptorResponse& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FileDescriptorResponse* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated bytes file_descriptor_proto = 1; + int file_descriptor_proto_size() const; + void clear_file_descriptor_proto(); + static const int kFileDescriptorProtoFieldNumber = 1; + const ::std::string& file_descriptor_proto(int index) const; + ::std::string* mutable_file_descriptor_proto(int index); + void set_file_descriptor_proto(int index, const ::std::string& value); + void set_file_descriptor_proto(int index, const char* value); + void set_file_descriptor_proto(int index, const void* value, size_t size); + ::std::string* add_file_descriptor_proto(); + void add_file_descriptor_proto(const ::std::string& value); + void add_file_descriptor_proto(const char* value); + void add_file_descriptor_proto(const void* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& file_descriptor_proto() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_file_descriptor_proto(); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.FileDescriptorResponse) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::RepeatedPtrField< ::std::string> file_descriptor_proto_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static FileDescriptorResponse* default_instance_; +}; +// ------------------------------------------------------------------- + +class ExtensionNumberResponse : public ::google::protobuf::Message { + public: + ExtensionNumberResponse(); + virtual ~ExtensionNumberResponse(); + + ExtensionNumberResponse(const ExtensionNumberResponse& from); + + inline ExtensionNumberResponse& operator=(const ExtensionNumberResponse& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ExtensionNumberResponse& default_instance(); + + void Swap(ExtensionNumberResponse* other); + + // implements Message ---------------------------------------------- + + inline ExtensionNumberResponse* New() const { return New(NULL); } + + ExtensionNumberResponse* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ExtensionNumberResponse& from); + void MergeFrom(const ExtensionNumberResponse& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ExtensionNumberResponse* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string base_type_name = 1; + void clear_base_type_name(); + static const int kBaseTypeNameFieldNumber = 1; + const ::std::string& base_type_name() const; + void set_base_type_name(const ::std::string& value); + void set_base_type_name(const char* value); + void set_base_type_name(const char* value, size_t size); + ::std::string* mutable_base_type_name(); + ::std::string* release_base_type_name(); + void set_allocated_base_type_name(::std::string* base_type_name); + + // repeated int32 extension_number = 2; + int extension_number_size() const; + void clear_extension_number(); + static const int kExtensionNumberFieldNumber = 2; + ::google::protobuf::int32 extension_number(int index) const; + void set_extension_number(int index, ::google::protobuf::int32 value); + void add_extension_number(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + extension_number() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_extension_number(); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionNumberResponse) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr base_type_name_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > extension_number_; + mutable int _extension_number_cached_byte_size_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static ExtensionNumberResponse* default_instance_; +}; +// ------------------------------------------------------------------- + +class ListServiceResponse : public ::google::protobuf::Message { + public: + ListServiceResponse(); + virtual ~ListServiceResponse(); + + ListServiceResponse(const ListServiceResponse& from); + + inline ListServiceResponse& operator=(const ListServiceResponse& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ListServiceResponse& default_instance(); + + void Swap(ListServiceResponse* other); + + // implements Message ---------------------------------------------- + + inline ListServiceResponse* New() const { return New(NULL); } + + ListServiceResponse* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ListServiceResponse& from); + void MergeFrom(const ListServiceResponse& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ListServiceResponse* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; + int service_size() const; + void clear_service(); + static const int kServiceFieldNumber = 1; + const ::grpc::reflection::v1alpha::ServiceResponse& service(int index) const; + ::grpc::reflection::v1alpha::ServiceResponse* mutable_service(int index); + ::grpc::reflection::v1alpha::ServiceResponse* add_service(); + ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >* + mutable_service(); + const ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >& + service() const; + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ListServiceResponse) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse > service_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static ListServiceResponse* default_instance_; +}; +// ------------------------------------------------------------------- + +class ServiceResponse : public ::google::protobuf::Message { + public: + ServiceResponse(); + virtual ~ServiceResponse(); + + ServiceResponse(const ServiceResponse& from); + + inline ServiceResponse& operator=(const ServiceResponse& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ServiceResponse& default_instance(); + + void Swap(ServiceResponse* other); + + // implements Message ---------------------------------------------- + + inline ServiceResponse* New() const { return New(NULL); } + + ServiceResponse* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ServiceResponse& from); + void MergeFrom(const ServiceResponse& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ServiceResponse* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string name = 1; + void clear_name(); + static const int kNameFieldNumber = 1; + const ::std::string& name() const; + void set_name(const ::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); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ServiceResponse) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr name_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static ServiceResponse* default_instance_; +}; +// ------------------------------------------------------------------- + +class ErrorResponse : public ::google::protobuf::Message { + public: + ErrorResponse(); + virtual ~ErrorResponse(); + + ErrorResponse(const ErrorResponse& from); + + inline ErrorResponse& operator=(const ErrorResponse& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ErrorResponse& default_instance(); + + void Swap(ErrorResponse* other); + + // implements Message ---------------------------------------------- + + inline ErrorResponse* New() const { return New(NULL); } + + ErrorResponse* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ErrorResponse& from); + void MergeFrom(const ErrorResponse& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ErrorResponse* other); + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + public: + + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional int32 error_code = 1; + void clear_error_code(); + static const int kErrorCodeFieldNumber = 1; + ::google::protobuf::int32 error_code() const; + void set_error_code(::google::protobuf::int32 value); + + // optional string error_message = 2; + void clear_error_message(); + static const int kErrorMessageFieldNumber = 2; + const ::std::string& error_message() const; + void set_error_message(const ::std::string& value); + void set_error_message(const char* value); + void set_error_message(const char* value, size_t size); + ::std::string* mutable_error_message(); + ::std::string* release_error_message(); + void set_allocated_error_message(::std::string* error_message); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ErrorResponse) + private: + + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr error_message_; + ::google::protobuf::int32 error_code_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static ErrorResponse* default_instance_; +}; +// =================================================================== + + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +// ServerReflectionRequest + +// optional string host = 1; +inline void ServerReflectionRequest::clear_host() { + host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ServerReflectionRequest::host() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.host) + return host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ServerReflectionRequest::set_host(const ::std::string& value) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.host) +} +inline void ServerReflectionRequest::set_host(const char* value) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.host) +} +inline void ServerReflectionRequest::set_host(const char* value, size_t size) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.host) +} +inline ::std::string* ServerReflectionRequest::mutable_host() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.host) + return host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ServerReflectionRequest::release_host() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.host) + + return host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ServerReflectionRequest::set_allocated_host(::std::string* host) { + if (host != NULL) { + + } else { + + } + host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), host); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.host) +} + +// optional string file_by_filename = 3; +inline bool ServerReflectionRequest::has_file_by_filename() const { + return message_request_case() == kFileByFilename; +} +inline void ServerReflectionRequest::set_has_file_by_filename() { + _oneof_case_[0] = kFileByFilename; +} +inline void ServerReflectionRequest::clear_file_by_filename() { + if (has_file_by_filename()) { + message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} +inline const ::std::string& ServerReflectionRequest::file_by_filename() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) + if (has_file_by_filename()) { + return message_request_.file_by_filename_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +inline void ServerReflectionRequest::set_file_by_filename(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) +} +inline void ServerReflectionRequest::set_file_by_filename(const char* value) { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) +} +inline void ServerReflectionRequest::set_file_by_filename(const char* value, size_t size) { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) +} +inline ::std::string* ServerReflectionRequest::mutable_file_by_filename() { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) + return message_request_.file_by_filename_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ServerReflectionRequest::release_file_by_filename() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) + if (has_file_by_filename()) { + clear_has_message_request(); + return message_request_.file_by_filename_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} +inline void ServerReflectionRequest::set_allocated_file_by_filename(::std::string* file_by_filename) { + if (!has_file_by_filename()) { + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (file_by_filename != NULL) { + set_has_file_by_filename(); + message_request_.file_by_filename_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_by_filename); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) +} + +// optional string file_containing_symbol = 4; +inline bool ServerReflectionRequest::has_file_containing_symbol() const { + return message_request_case() == kFileContainingSymbol; +} +inline void ServerReflectionRequest::set_has_file_containing_symbol() { + _oneof_case_[0] = kFileContainingSymbol; +} +inline void ServerReflectionRequest::clear_file_containing_symbol() { + if (has_file_containing_symbol()) { + message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} +inline const ::std::string& ServerReflectionRequest::file_containing_symbol() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) + if (has_file_containing_symbol()) { + return message_request_.file_containing_symbol_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +inline void ServerReflectionRequest::set_file_containing_symbol(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) +} +inline void ServerReflectionRequest::set_file_containing_symbol(const char* value) { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) +} +inline void ServerReflectionRequest::set_file_containing_symbol(const char* value, size_t size) { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) +} +inline ::std::string* ServerReflectionRequest::mutable_file_containing_symbol() { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) + return message_request_.file_containing_symbol_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ServerReflectionRequest::release_file_containing_symbol() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) + if (has_file_containing_symbol()) { + clear_has_message_request(); + return message_request_.file_containing_symbol_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} +inline void ServerReflectionRequest::set_allocated_file_containing_symbol(::std::string* file_containing_symbol) { + if (!has_file_containing_symbol()) { + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (file_containing_symbol != NULL) { + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_containing_symbol); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) +} + +// optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; +inline bool ServerReflectionRequest::has_file_containing_extension() const { + return message_request_case() == kFileContainingExtension; +} +inline void ServerReflectionRequest::set_has_file_containing_extension() { + _oneof_case_[0] = kFileContainingExtension; +} +inline void ServerReflectionRequest::clear_file_containing_extension() { + if (has_file_containing_extension()) { + delete message_request_.file_containing_extension_; + clear_has_message_request(); + } +} +inline const ::grpc::reflection::v1alpha::ExtensionRequest& ServerReflectionRequest::file_containing_extension() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) + return has_file_containing_extension() + ? *message_request_.file_containing_extension_ + : ::grpc::reflection::v1alpha::ExtensionRequest::default_instance(); +} +inline ::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::mutable_file_containing_extension() { + if (!has_file_containing_extension()) { + clear_message_request(); + set_has_file_containing_extension(); + message_request_.file_containing_extension_ = new ::grpc::reflection::v1alpha::ExtensionRequest; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) + return message_request_.file_containing_extension_; +} +inline ::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::release_file_containing_extension() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) + if (has_file_containing_extension()) { + clear_has_message_request(); + ::grpc::reflection::v1alpha::ExtensionRequest* temp = message_request_.file_containing_extension_; + message_request_.file_containing_extension_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void ServerReflectionRequest::set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension) { + clear_message_request(); + if (file_containing_extension) { + set_has_file_containing_extension(); + message_request_.file_containing_extension_ = file_containing_extension; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) +} + +// optional string all_extension_numbers_of_type = 6; +inline bool ServerReflectionRequest::has_all_extension_numbers_of_type() const { + return message_request_case() == kAllExtensionNumbersOfType; +} +inline void ServerReflectionRequest::set_has_all_extension_numbers_of_type() { + _oneof_case_[0] = kAllExtensionNumbersOfType; +} +inline void ServerReflectionRequest::clear_all_extension_numbers_of_type() { + if (has_all_extension_numbers_of_type()) { + message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} +inline const ::std::string& ServerReflectionRequest::all_extension_numbers_of_type() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) + if (has_all_extension_numbers_of_type()) { + return message_request_.all_extension_numbers_of_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +inline void ServerReflectionRequest::set_all_extension_numbers_of_type(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) +} +inline void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value) { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) +} +inline void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value, size_t size) { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) +} +inline ::std::string* ServerReflectionRequest::mutable_all_extension_numbers_of_type() { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) + return message_request_.all_extension_numbers_of_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ServerReflectionRequest::release_all_extension_numbers_of_type() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) + if (has_all_extension_numbers_of_type()) { + clear_has_message_request(); + return message_request_.all_extension_numbers_of_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} +inline void ServerReflectionRequest::set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type) { + if (!has_all_extension_numbers_of_type()) { + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (all_extension_numbers_of_type != NULL) { + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + all_extension_numbers_of_type); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) +} + +// optional string list_services = 7; +inline bool ServerReflectionRequest::has_list_services() const { + return message_request_case() == kListServices; +} +inline void ServerReflectionRequest::set_has_list_services() { + _oneof_case_[0] = kListServices; +} +inline void ServerReflectionRequest::clear_list_services() { + if (has_list_services()) { + message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} +inline const ::std::string& ServerReflectionRequest::list_services() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) + if (has_list_services()) { + return message_request_.list_services_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +inline void ServerReflectionRequest::set_list_services(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) +} +inline void ServerReflectionRequest::set_list_services(const char* value) { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) +} +inline void ServerReflectionRequest::set_list_services(const char* value, size_t size) { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) +} +inline ::std::string* ServerReflectionRequest::mutable_list_services() { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) + return message_request_.list_services_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ServerReflectionRequest::release_list_services() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) + if (has_list_services()) { + clear_has_message_request(); + return message_request_.list_services_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} +inline void ServerReflectionRequest::set_allocated_list_services(::std::string* list_services) { + if (!has_list_services()) { + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (list_services != NULL) { + set_has_list_services(); + message_request_.list_services_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + list_services); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) +} + +inline bool ServerReflectionRequest::has_message_request() const { + return message_request_case() != MESSAGE_REQUEST_NOT_SET; +} +inline void ServerReflectionRequest::clear_has_message_request() { + _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET; +} +inline ServerReflectionRequest::MessageRequestCase ServerReflectionRequest::message_request_case() const { + return ServerReflectionRequest::MessageRequestCase(_oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// ExtensionRequest + +// optional string containing_type = 1; +inline void ExtensionRequest::clear_containing_type() { + containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ExtensionRequest::containing_type() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.containing_type) + return containing_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ExtensionRequest::set_containing_type(const ::std::string& value) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} +inline void ExtensionRequest::set_containing_type(const char* value) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} +inline void ExtensionRequest::set_containing_type(const char* value, size_t size) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} +inline ::std::string* ExtensionRequest::mutable_containing_type() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionRequest.containing_type) + return containing_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ExtensionRequest::release_containing_type() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionRequest.containing_type) + + return containing_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ExtensionRequest::set_allocated_containing_type(::std::string* containing_type) { + if (containing_type != NULL) { + + } else { + + } + containing_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), containing_type); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} + +// optional int32 extension_number = 2; +inline void ExtensionRequest::clear_extension_number() { + extension_number_ = 0; +} +inline ::google::protobuf::int32 ExtensionRequest::extension_number() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.extension_number) + return extension_number_; +} +inline void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) { + + extension_number_ = value; + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number) +} + +// ------------------------------------------------------------------- + +// ServerReflectionResponse + +// optional string valid_host = 1; +inline void ServerReflectionResponse::clear_valid_host() { + valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ServerReflectionResponse::valid_host() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) + return valid_host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ServerReflectionResponse::set_valid_host(const ::std::string& value) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) +} +inline void ServerReflectionResponse::set_valid_host(const char* value) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) +} +inline void ServerReflectionResponse::set_valid_host(const char* value, size_t size) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) +} +inline ::std::string* ServerReflectionResponse::mutable_valid_host() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) + return valid_host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ServerReflectionResponse::release_valid_host() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) + + return valid_host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ServerReflectionResponse::set_allocated_valid_host(::std::string* valid_host) { + if (valid_host != NULL) { + + } else { + + } + valid_host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), valid_host); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) +} + +// optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; +inline bool ServerReflectionResponse::has_original_request() const { + return !_is_default_instance_ && original_request_ != NULL; +} +inline void ServerReflectionResponse::clear_original_request() { + if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; + original_request_ = NULL; +} +inline const ::grpc::reflection::v1alpha::ServerReflectionRequest& ServerReflectionResponse::original_request() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) + return original_request_ != NULL ? *original_request_ : *default_instance_->original_request_; +} +inline ::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::mutable_original_request() { + + if (original_request_ == NULL) { + original_request_ = new ::grpc::reflection::v1alpha::ServerReflectionRequest; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) + return original_request_; +} +inline ::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::release_original_request() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) + + ::grpc::reflection::v1alpha::ServerReflectionRequest* temp = original_request_; + original_request_ = NULL; + return temp; +} +inline void ServerReflectionResponse::set_allocated_original_request(::grpc::reflection::v1alpha::ServerReflectionRequest* original_request) { + delete original_request_; + original_request_ = original_request; + if (original_request) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) +} + +// optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; +inline bool ServerReflectionResponse::has_file_descriptor_response() const { + return message_response_case() == kFileDescriptorResponse; +} +inline void ServerReflectionResponse::set_has_file_descriptor_response() { + _oneof_case_[0] = kFileDescriptorResponse; +} +inline void ServerReflectionResponse::clear_file_descriptor_response() { + if (has_file_descriptor_response()) { + delete message_response_.file_descriptor_response_; + clear_has_message_response(); + } +} +inline const ::grpc::reflection::v1alpha::FileDescriptorResponse& ServerReflectionResponse::file_descriptor_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) + return has_file_descriptor_response() + ? *message_response_.file_descriptor_response_ + : ::grpc::reflection::v1alpha::FileDescriptorResponse::default_instance(); +} +inline ::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::mutable_file_descriptor_response() { + if (!has_file_descriptor_response()) { + clear_message_response(); + set_has_file_descriptor_response(); + message_response_.file_descriptor_response_ = new ::grpc::reflection::v1alpha::FileDescriptorResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) + return message_response_.file_descriptor_response_; +} +inline ::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::release_file_descriptor_response() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) + if (has_file_descriptor_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::FileDescriptorResponse* temp = message_response_.file_descriptor_response_; + message_response_.file_descriptor_response_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void ServerReflectionResponse::set_allocated_file_descriptor_response(::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response) { + clear_message_response(); + if (file_descriptor_response) { + set_has_file_descriptor_response(); + message_response_.file_descriptor_response_ = file_descriptor_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) +} + +// optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; +inline bool ServerReflectionResponse::has_all_extension_numbers_response() const { + return message_response_case() == kAllExtensionNumbersResponse; +} +inline void ServerReflectionResponse::set_has_all_extension_numbers_response() { + _oneof_case_[0] = kAllExtensionNumbersResponse; +} +inline void ServerReflectionResponse::clear_all_extension_numbers_response() { + if (has_all_extension_numbers_response()) { + delete message_response_.all_extension_numbers_response_; + clear_has_message_response(); + } +} +inline const ::grpc::reflection::v1alpha::ExtensionNumberResponse& ServerReflectionResponse::all_extension_numbers_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) + return has_all_extension_numbers_response() + ? *message_response_.all_extension_numbers_response_ + : ::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance(); +} +inline ::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::mutable_all_extension_numbers_response() { + if (!has_all_extension_numbers_response()) { + clear_message_response(); + set_has_all_extension_numbers_response(); + message_response_.all_extension_numbers_response_ = new ::grpc::reflection::v1alpha::ExtensionNumberResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) + return message_response_.all_extension_numbers_response_; +} +inline ::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::release_all_extension_numbers_response() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) + if (has_all_extension_numbers_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ExtensionNumberResponse* temp = message_response_.all_extension_numbers_response_; + message_response_.all_extension_numbers_response_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void ServerReflectionResponse::set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response) { + clear_message_response(); + if (all_extension_numbers_response) { + set_has_all_extension_numbers_response(); + message_response_.all_extension_numbers_response_ = all_extension_numbers_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) +} + +// optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; +inline bool ServerReflectionResponse::has_list_services_response() const { + return message_response_case() == kListServicesResponse; +} +inline void ServerReflectionResponse::set_has_list_services_response() { + _oneof_case_[0] = kListServicesResponse; +} +inline void ServerReflectionResponse::clear_list_services_response() { + if (has_list_services_response()) { + delete message_response_.list_services_response_; + clear_has_message_response(); + } +} +inline const ::grpc::reflection::v1alpha::ListServiceResponse& ServerReflectionResponse::list_services_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) + return has_list_services_response() + ? *message_response_.list_services_response_ + : ::grpc::reflection::v1alpha::ListServiceResponse::default_instance(); +} +inline ::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::mutable_list_services_response() { + if (!has_list_services_response()) { + clear_message_response(); + set_has_list_services_response(); + message_response_.list_services_response_ = new ::grpc::reflection::v1alpha::ListServiceResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) + return message_response_.list_services_response_; +} +inline ::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::release_list_services_response() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) + if (has_list_services_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ListServiceResponse* temp = message_response_.list_services_response_; + message_response_.list_services_response_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void ServerReflectionResponse::set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response) { + clear_message_response(); + if (list_services_response) { + set_has_list_services_response(); + message_response_.list_services_response_ = list_services_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) +} + +// optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; +inline bool ServerReflectionResponse::has_error_response() const { + return message_response_case() == kErrorResponse; +} +inline void ServerReflectionResponse::set_has_error_response() { + _oneof_case_[0] = kErrorResponse; +} +inline void ServerReflectionResponse::clear_error_response() { + if (has_error_response()) { + delete message_response_.error_response_; + clear_has_message_response(); + } +} +inline const ::grpc::reflection::v1alpha::ErrorResponse& ServerReflectionResponse::error_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) + return has_error_response() + ? *message_response_.error_response_ + : ::grpc::reflection::v1alpha::ErrorResponse::default_instance(); +} +inline ::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::mutable_error_response() { + if (!has_error_response()) { + clear_message_response(); + set_has_error_response(); + message_response_.error_response_ = new ::grpc::reflection::v1alpha::ErrorResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) + return message_response_.error_response_; +} +inline ::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::release_error_response() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) + if (has_error_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ErrorResponse* temp = message_response_.error_response_; + message_response_.error_response_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void ServerReflectionResponse::set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response) { + clear_message_response(); + if (error_response) { + set_has_error_response(); + message_response_.error_response_ = error_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) +} + +inline bool ServerReflectionResponse::has_message_response() const { + return message_response_case() != MESSAGE_RESPONSE_NOT_SET; +} +inline void ServerReflectionResponse::clear_has_message_response() { + _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET; +} +inline ServerReflectionResponse::MessageResponseCase ServerReflectionResponse::message_response_case() const { + return ServerReflectionResponse::MessageResponseCase(_oneof_case_[0]); +} +// ------------------------------------------------------------------- + +// FileDescriptorResponse + +// repeated bytes file_descriptor_proto = 1; +inline int FileDescriptorResponse::file_descriptor_proto_size() const { + return file_descriptor_proto_.size(); +} +inline void FileDescriptorResponse::clear_file_descriptor_proto() { + file_descriptor_proto_.Clear(); +} +inline const ::std::string& FileDescriptorResponse::file_descriptor_proto(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) + return file_descriptor_proto_.Get(index); +} +inline ::std::string* FileDescriptorResponse::mutable_file_descriptor_proto(int index) { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) + return file_descriptor_proto_.Mutable(index); +} +inline void FileDescriptorResponse::set_file_descriptor_proto(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) + file_descriptor_proto_.Mutable(index)->assign(value); +} +inline void FileDescriptorResponse::set_file_descriptor_proto(int index, const char* value) { + file_descriptor_proto_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) +} +inline void FileDescriptorResponse::set_file_descriptor_proto(int index, const void* value, size_t size) { + file_descriptor_proto_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) +} +inline ::std::string* FileDescriptorResponse::add_file_descriptor_proto() { + // @@protoc_insertion_point(field_add_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) + return file_descriptor_proto_.Add(); +} +inline void FileDescriptorResponse::add_file_descriptor_proto(const ::std::string& value) { + file_descriptor_proto_.Add()->assign(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) +} +inline void FileDescriptorResponse::add_file_descriptor_proto(const char* value) { + file_descriptor_proto_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) +} +inline void FileDescriptorResponse::add_file_descriptor_proto(const void* value, size_t size) { + file_descriptor_proto_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +FileDescriptorResponse::file_descriptor_proto() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) + return file_descriptor_proto_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +FileDescriptorResponse::mutable_file_descriptor_proto() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) + return &file_descriptor_proto_; +} + +// ------------------------------------------------------------------- + +// ExtensionNumberResponse + +// optional string base_type_name = 1; +inline void ExtensionNumberResponse::clear_base_type_name() { + base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ExtensionNumberResponse::base_type_name() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + return base_type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ExtensionNumberResponse::set_base_type_name(const ::std::string& value) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} +inline void ExtensionNumberResponse::set_base_type_name(const char* value) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} +inline void ExtensionNumberResponse::set_base_type_name(const char* value, size_t size) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} +inline ::std::string* ExtensionNumberResponse::mutable_base_type_name() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + return base_type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ExtensionNumberResponse::release_base_type_name() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + + return base_type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ExtensionNumberResponse::set_allocated_base_type_name(::std::string* base_type_name) { + if (base_type_name != NULL) { + + } else { + + } + base_type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), base_type_name); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} + +// repeated int32 extension_number = 2; +inline int ExtensionNumberResponse::extension_number_size() const { + return extension_number_.size(); +} +inline void ExtensionNumberResponse::clear_extension_number() { + extension_number_.Clear(); +} +inline ::google::protobuf::int32 ExtensionNumberResponse::extension_number(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return extension_number_.Get(index); +} +inline void ExtensionNumberResponse::set_extension_number(int index, ::google::protobuf::int32 value) { + extension_number_.Set(index, value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) +} +inline void ExtensionNumberResponse::add_extension_number(::google::protobuf::int32 value) { + extension_number_.Add(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +ExtensionNumberResponse::extension_number() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return extension_number_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +ExtensionNumberResponse::mutable_extension_number() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return &extension_number_; +} + +// ------------------------------------------------------------------- + +// ListServiceResponse + +// repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; +inline int ListServiceResponse::service_size() const { + return service_.size(); +} +inline void ListServiceResponse::clear_service() { + service_.Clear(); +} +inline const ::grpc::reflection::v1alpha::ServiceResponse& ListServiceResponse::service(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Get(index); +} +inline ::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::mutable_service(int index) { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Mutable(index); +} +inline ::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::add_service() { + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Add(); +} +inline ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >* +ListServiceResponse::mutable_service() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.service) + return &service_; +} +inline const ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >& +ListServiceResponse::service() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_; +} + +// ------------------------------------------------------------------- + +// ServiceResponse + +// optional string name = 1; +inline void ServiceResponse::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ServiceResponse::name() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServiceResponse.name) + return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ServiceResponse::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServiceResponse.name) +} +inline void ServiceResponse::set_name(const char* value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServiceResponse.name) +} +inline void ServiceResponse::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServiceResponse.name) +} +inline ::std::string* ServiceResponse::mutable_name() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServiceResponse.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ServiceResponse::release_name() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServiceResponse.name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ServiceResponse::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServiceResponse.name) +} + +// ------------------------------------------------------------------- + +// ErrorResponse + +// optional int32 error_code = 1; +inline void ErrorResponse::clear_error_code() { + error_code_ = 0; +} +inline ::google::protobuf::int32 ErrorResponse::error_code() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_code) + return error_code_; +} +inline void ErrorResponse::set_error_code(::google::protobuf::int32 value) { + + error_code_ = value; + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_code) +} + +// optional string error_message = 2; +inline void ErrorResponse::clear_error_message() { + error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ErrorResponse::error_message() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_message) + return error_message_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ErrorResponse::set_error_message(const ::std::string& value) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_message) +} +inline void ErrorResponse::set_error_message(const char* value) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ErrorResponse.error_message) +} +inline void ErrorResponse::set_error_message(const char* value, size_t size) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ErrorResponse.error_message) +} +inline ::std::string* ErrorResponse::mutable_error_message() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ErrorResponse.error_message) + return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ErrorResponse::release_error_message() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ErrorResponse.error_message) + + return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ErrorResponse::set_allocated_error_message(::std::string* error_message) { + if (error_message != NULL) { + + } else { + + } + error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message) +} + +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace v1alpha +} // namespace reflection +} // namespace grpc + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_reflection_2eproto__INCLUDED diff --git a/src/cpp/ext/proto_server_reflection.cc b/src/cpp/ext/proto_server_reflection.cc new file mode 100644 index 0000000000..6e54bc2720 --- /dev/null +++ b/src/cpp/ext/proto_server_reflection.cc @@ -0,0 +1,223 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +#include + +#include "src/cpp/ext/proto_server_reflection.h" + +using grpc::Status; +using grpc::StatusCode; +using grpc::reflection::v1alpha::ServerReflectionRequest; +using grpc::reflection::v1alpha::ExtensionRequest; +using grpc::reflection::v1alpha::ServerReflectionResponse; +using grpc::reflection::v1alpha::ListServiceResponse; +using grpc::reflection::v1alpha::ServiceResponse; +using grpc::reflection::v1alpha::ExtensionNumberResponse; +using grpc::reflection::v1alpha::ErrorResponse; +using grpc::reflection::v1alpha::FileDescriptorResponse; + +namespace grpc { + +ProtoServerReflection::ProtoServerReflection() + : descriptor_pool_(protobuf::DescriptorPool::generated_pool()) {} + +void ProtoServerReflection::SetServiceList( + const std::vector* services) { + services_ = services; +} + +Status ProtoServerReflection::ServerReflectionInfo( + ServerContext* context, + ServerReaderWriter* + stream) { + ServerReflectionRequest request; + ServerReflectionResponse response; + Status status; + while (stream->Read(&request)) { + switch (request.message_request_case()) { + case ServerReflectionRequest::MessageRequestCase::kFileByFilename: + status = GetFileByName(context, request.file_by_filename(), &response); + break; + case ServerReflectionRequest::MessageRequestCase::kFileContainingSymbol: + status = GetFileContainingSymbol( + context, request.file_containing_symbol(), &response); + break; + case ServerReflectionRequest::MessageRequestCase:: + kFileContainingExtension: + status = GetFileContainingExtension( + context, &request.file_containing_extension(), &response); + break; + case ServerReflectionRequest::MessageRequestCase:: + kAllExtensionNumbersOfType: + status = GetAllExtensionNumbers( + context, request.all_extension_numbers_of_type(), + response.mutable_all_extension_numbers_response()); + break; + case ServerReflectionRequest::MessageRequestCase::kListServices: + status = + ListService(context, response.mutable_list_services_response()); + break; + default: + status = Status(StatusCode::UNIMPLEMENTED, ""); + } + + if (!status.ok()) { + FillErrorResponse(status, response.mutable_error_response()); + } + response.set_valid_host(request.host()); + response.set_allocated_original_request( + new ServerReflectionRequest(request)); + stream->Write(response); + } + + return Status::OK; +} + +void ProtoServerReflection::FillErrorResponse(const Status& status, + ErrorResponse* error_response) { + error_response->set_error_code(status.error_code()); + error_response->set_error_message(status.error_message()); +} + +Status ProtoServerReflection::ListService(ServerContext* context, + ListServiceResponse* response) { + if (services_ == nullptr) { + return Status(StatusCode::NOT_FOUND, "Services not found."); + } + for (auto it = services_->begin(); it != services_->end(); ++it) { + ServiceResponse* service_response = response->add_service(); + service_response->set_name(*it); + } + return Status::OK; +} + +Status ProtoServerReflection::GetFileByName( + ServerContext* context, const grpc::string& filename, + ServerReflectionResponse* response) { + if (descriptor_pool_ == nullptr) { + return Status::CANCELLED; + } + + const protobuf::FileDescriptor* file_desc = descriptor_pool_->FindFileByName(filename); + if (file_desc == nullptr) { + return Status(StatusCode::NOT_FOUND, "File not found."); + } + std::unordered_set seen_files; + FillFileDescriptorResponse(file_desc, response, &seen_files); + return Status::OK; +} + +Status ProtoServerReflection::GetFileContainingSymbol( + ServerContext* context, const grpc::string& symbol, + ServerReflectionResponse* response) { + if (descriptor_pool_ == nullptr) { + return Status::CANCELLED; + } + + const protobuf::FileDescriptor* file_desc = + descriptor_pool_->FindFileContainingSymbol(symbol); + if (file_desc == nullptr) { + return Status(StatusCode::NOT_FOUND, "Symbol not found."); + } + std::unordered_set seen_files; + FillFileDescriptorResponse(file_desc, response, &seen_files); + return Status::OK; +} + +Status ProtoServerReflection::GetFileContainingExtension( + ServerContext* context, const ExtensionRequest* request, + ServerReflectionResponse* response) { + if (descriptor_pool_ == nullptr) { + return Status::CANCELLED; + } + + const protobuf::Descriptor* desc = + descriptor_pool_->FindMessageTypeByName(request->containing_type()); + if (desc == nullptr) { + return Status(StatusCode::NOT_FOUND, "Type not found."); + } + + const protobuf::FieldDescriptor* field_desc = descriptor_pool_->FindExtensionByNumber( + desc, request->extension_number()); + if (field_desc == nullptr) { + return Status(StatusCode::NOT_FOUND, "Extension not found."); + } + std::unordered_set seen_files; + FillFileDescriptorResponse(field_desc->file(), response, &seen_files); + return Status::OK; +} + +Status ProtoServerReflection::GetAllExtensionNumbers( + ServerContext* context, const grpc::string& type, + ExtensionNumberResponse* response) { + if (descriptor_pool_ == nullptr) { + return Status::CANCELLED; + } + + const protobuf::Descriptor* desc = descriptor_pool_->FindMessageTypeByName(type); + if (desc == nullptr) { + return Status(StatusCode::NOT_FOUND, "Type not found."); + } + + std::vector extensions; + descriptor_pool_->FindAllExtensions(desc, &extensions); + for (auto extension : extensions) { + response->add_extension_number(extension->number()); + } + response->set_base_type_name(type); + return Status::OK; +} + +void ProtoServerReflection::FillFileDescriptorResponse( + const protobuf::FileDescriptor* file_desc, ServerReflectionResponse* response, + std::unordered_set* seen_files) { + if (seen_files->find(file_desc->name()) != seen_files->end()) { + return; + } + seen_files->insert(file_desc->name()); + + protobuf::FileDescriptorProto file_desc_proto; + grpc::string data; + file_desc->CopyTo(&file_desc_proto); + file_desc_proto.SerializeToString(&data); + response->mutable_file_descriptor_response()->add_file_descriptor_proto(data); + + for (int i = 0; i < file_desc->dependency_count(); ++i) { + FillFileDescriptorResponse(file_desc->dependency(i), response, seen_files); + } +} + +} // namespace grpc diff --git a/src/cpp/ext/proto_server_reflection.h b/src/cpp/ext/proto_server_reflection.h new file mode 100644 index 0000000000..e7ab1fdf34 --- /dev/null +++ b/src/cpp/ext/proto_server_reflection.h @@ -0,0 +1,94 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H +#define GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H + +#include +#include + +#include + +#include + +namespace grpc { + +class ProtoServerReflection GRPC_FINAL + : public reflection::v1alpha::ServerReflection::Service { + public: + ProtoServerReflection(); + + void SetServiceList(const std::vector* services); + + Status ServerReflectionInfo( + ServerContext* context, + ServerReaderWriter* + stream) GRPC_OVERRIDE; + + private: + Status ListService(ServerContext* context, + reflection::v1alpha::ListServiceResponse* response); + + Status GetFileByName( + ServerContext* context, const grpc::string& file_name, + reflection::v1alpha::ServerReflectionResponse* response); + + Status GetFileContainingSymbol( + ServerContext* context, const grpc::string& symbol, + reflection::v1alpha::ServerReflectionResponse* response); + + Status GetFileContainingExtension( + ServerContext* context, + const reflection::v1alpha::ExtensionRequest* request, + reflection::v1alpha::ServerReflectionResponse* response); + + Status GetAllExtensionNumbers( + ServerContext* context, const grpc::string& type, + reflection::v1alpha::ExtensionNumberResponse* response); + + void FillFileDescriptorResponse( + const protobuf::FileDescriptor* file_desc, + reflection::v1alpha::ServerReflectionResponse* response, + std::unordered_set* seen_files); + + void FillErrorResponse(const Status& status, + reflection::v1alpha::ErrorResponse* error_response); + + const protobuf::DescriptorPool* descriptor_pool_; + const std::vector* services_; +}; + +} // namespace grpc + +#endif // GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H diff --git a/src/cpp/ext/proto_server_reflection_plugin.cc b/src/cpp/ext/proto_server_reflection_plugin.cc new file mode 100644 index 0000000000..becc949359 --- /dev/null +++ b/src/cpp/ext/proto_server_reflection_plugin.cc @@ -0,0 +1,95 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include + +#include "src/cpp/ext/proto_server_reflection.h" + +namespace grpc { +namespace reflection { + +ProtoServerReflectionPlugin::ProtoServerReflectionPlugin() + : reflection_service_(new grpc::ProtoServerReflection()) {} + +grpc::string ProtoServerReflectionPlugin::name() { + return "proto_server_reflection"; +} + +void ProtoServerReflectionPlugin::InitServer(grpc::ServerInitializer* si) { + si->RegisterService(reflection_service_); +} + +void ProtoServerReflectionPlugin::Finish(grpc::ServerInitializer* si) { + reflection_service_->SetServiceList(si->GetServiceList()); +} + +void ProtoServerReflectionPlugin::ChangeArguments(const grpc::string& name, + void* value) {} + +bool ProtoServerReflectionPlugin::has_sync_methods() const { + if (reflection_service_ != nullptr) { + return reflection_service_->has_synchronous_methods(); + } + return false; +} + +bool ProtoServerReflectionPlugin::has_async_methods() const { + if (reflection_service_ != nullptr) { + return reflection_service_->has_async_methods(); + } + return false; +} + +static std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { + return std::unique_ptr<::grpc::ServerBuilderPlugin>( + new ProtoServerReflectionPlugin()); +} + +static void AddProtoReflectionServerBuilderPlugin() { + static bool already_here = false; + if (already_here) return; + already_here = true; + ::grpc::ServerBuilder::InternalAddPluginFactory(&CreateProtoReflection); +} + +struct StaticProtoReflectionPluginInitializer { + StaticProtoReflectionPluginInitializer() { + AddProtoReflectionServerBuilderPlugin(); + } +} static_proto_reflection_plugin_initializer; + +} // namespace reflection +} // namespace grpc diff --git a/src/cpp/ext/reflection.grpc.pb.cc b/src/cpp/ext/reflection.grpc.pb.cc new file mode 100644 index 0000000000..b046dfc1b8 --- /dev/null +++ b/src/cpp/ext/reflection.grpc.pb.cc @@ -0,0 +1,97 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +// Generated by the gRPC protobuf plugin. +// If you make any local change, they will be lost. +// source: reflection.proto + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +namespace grpc { +namespace reflection { +namespace v1alpha { + +static const char* ServerReflection_method_names[] = { + "/grpc.reflection.v1alpha.ServerReflection/ServerReflectionInfo", +}; + +std::unique_ptr< ServerReflection::Stub> ServerReflection::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + std::unique_ptr< ServerReflection::Stub> stub(new ServerReflection::Stub(channel)); + return stub; +} + +ServerReflection::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_ServerReflectionInfo_(ServerReflection_method_names[0], ::grpc::RpcMethod::BIDI_STREAMING, channel) + {} + +::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflection::Stub::ServerReflectionInfoRaw(::grpc::ClientContext* context) { + return new ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>(channel_.get(), rpcmethod_ServerReflectionInfo_, context); +} + +::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>* ServerReflection::Stub::AsyncServerReflectionInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return new ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>(channel_.get(), cq, rpcmethod_ServerReflectionInfo_, context, tag); +} + +ServerReflection::Service::Service() { + (void)ServerReflection_method_names; + AddMethod(new ::grpc::RpcServiceMethod( + ServerReflection_method_names[0], + ::grpc::RpcMethod::BIDI_STREAMING, + new ::grpc::BidiStreamingHandler< ServerReflection::Service, ::grpc::reflection::v1alpha::ServerReflectionRequest, ::grpc::reflection::v1alpha::ServerReflectionResponse>( + std::mem_fn(&ServerReflection::Service::ServerReflectionInfo), this))); +} + +ServerReflection::Service::~Service() { +} + +::grpc::Status ServerReflection::Service::ServerReflectionInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::ServerReflectionResponse, ::grpc::reflection::v1alpha::ServerReflectionRequest>* stream) { + (void) context; + (void) stream; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + + +} // namespace grpc +} // namespace reflection +} // namespace v1alpha + diff --git a/src/cpp/ext/reflection.pb.cc b/src/cpp/ext/reflection.pb.cc new file mode 100644 index 0000000000..b73a65d0a0 --- /dev/null +++ b/src/cpp/ext/reflection.pb.cc @@ -0,0 +1,3946 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: reflection.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace grpc { +namespace reflection { +namespace v1alpha { + +namespace { + +const ::google::protobuf::Descriptor* ServerReflectionRequest_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ServerReflectionRequest_reflection_ = NULL; +struct ServerReflectionRequestOneofInstance { + ::google::protobuf::internal::ArenaStringPtr file_by_filename_; + ::google::protobuf::internal::ArenaStringPtr file_containing_symbol_; + const ::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension_; + ::google::protobuf::internal::ArenaStringPtr all_extension_numbers_of_type_; + ::google::protobuf::internal::ArenaStringPtr list_services_; +}* ServerReflectionRequest_default_oneof_instance_ = NULL; +const ::google::protobuf::Descriptor* ExtensionRequest_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ExtensionRequest_reflection_ = NULL; +const ::google::protobuf::Descriptor* ServerReflectionResponse_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ServerReflectionResponse_reflection_ = NULL; +struct ServerReflectionResponseOneofInstance { + const ::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response_; + const ::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response_; + const ::grpc::reflection::v1alpha::ListServiceResponse* list_services_response_; + const ::grpc::reflection::v1alpha::ErrorResponse* error_response_; +}* ServerReflectionResponse_default_oneof_instance_ = NULL; +const ::google::protobuf::Descriptor* FileDescriptorResponse_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + FileDescriptorResponse_reflection_ = NULL; +const ::google::protobuf::Descriptor* ExtensionNumberResponse_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ExtensionNumberResponse_reflection_ = NULL; +const ::google::protobuf::Descriptor* ListServiceResponse_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ListServiceResponse_reflection_ = NULL; +const ::google::protobuf::Descriptor* ServiceResponse_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ServiceResponse_reflection_ = NULL; +const ::google::protobuf::Descriptor* ErrorResponse_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ErrorResponse_reflection_ = NULL; + +} // namespace + + +void protobuf_AssignDesc_reflection_2eproto() { + protobuf_AddDesc_reflection_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "reflection.proto"); + GOOGLE_CHECK(file != NULL); + ServerReflectionRequest_descriptor_ = file->message_type(0); + static const int ServerReflectionRequest_offsets_[7] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, host_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, file_by_filename_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, file_containing_symbol_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, file_containing_extension_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, all_extension_numbers_of_type_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionRequest_default_oneof_instance_, list_services_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, message_request_), + }; + ServerReflectionRequest_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ServerReflectionRequest_descriptor_, + ServerReflectionRequest::default_instance_, + ServerReflectionRequest_offsets_, + -1, + -1, + -1, + ServerReflectionRequest_default_oneof_instance_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, _oneof_case_[0]), + sizeof(ServerReflectionRequest), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionRequest, _is_default_instance_)); + ExtensionRequest_descriptor_ = file->message_type(1); + static const int ExtensionRequest_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, containing_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, extension_number_), + }; + ExtensionRequest_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ExtensionRequest_descriptor_, + ExtensionRequest::default_instance_, + ExtensionRequest_offsets_, + -1, + -1, + -1, + sizeof(ExtensionRequest), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, _is_default_instance_)); + ServerReflectionResponse_descriptor_ = file->message_type(2); + static const int ServerReflectionResponse_offsets_[7] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, valid_host_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, original_request_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionResponse_default_oneof_instance_, file_descriptor_response_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionResponse_default_oneof_instance_, all_extension_numbers_response_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionResponse_default_oneof_instance_, list_services_response_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(ServerReflectionResponse_default_oneof_instance_, error_response_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, message_response_), + }; + ServerReflectionResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ServerReflectionResponse_descriptor_, + ServerReflectionResponse::default_instance_, + ServerReflectionResponse_offsets_, + -1, + -1, + -1, + ServerReflectionResponse_default_oneof_instance_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, _oneof_case_[0]), + sizeof(ServerReflectionResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServerReflectionResponse, _is_default_instance_)); + FileDescriptorResponse_descriptor_ = file->message_type(3); + static const int FileDescriptorResponse_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorResponse, file_descriptor_proto_), + }; + FileDescriptorResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + FileDescriptorResponse_descriptor_, + FileDescriptorResponse::default_instance_, + FileDescriptorResponse_offsets_, + -1, + -1, + -1, + sizeof(FileDescriptorResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileDescriptorResponse, _is_default_instance_)); + ExtensionNumberResponse_descriptor_ = file->message_type(4); + static const int ExtensionNumberResponse_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, base_type_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, extension_number_), + }; + ExtensionNumberResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ExtensionNumberResponse_descriptor_, + ExtensionNumberResponse::default_instance_, + ExtensionNumberResponse_offsets_, + -1, + -1, + -1, + sizeof(ExtensionNumberResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, _is_default_instance_)); + ListServiceResponse_descriptor_ = file->message_type(5); + static const int ListServiceResponse_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, service_), + }; + ListServiceResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ListServiceResponse_descriptor_, + ListServiceResponse::default_instance_, + ListServiceResponse_offsets_, + -1, + -1, + -1, + sizeof(ListServiceResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, _is_default_instance_)); + ServiceResponse_descriptor_ = file->message_type(6); + static const int ServiceResponse_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceResponse, name_), + }; + ServiceResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ServiceResponse_descriptor_, + ServiceResponse::default_instance_, + ServiceResponse_offsets_, + -1, + -1, + -1, + sizeof(ServiceResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ServiceResponse, _is_default_instance_)); + ErrorResponse_descriptor_ = file->message_type(7); + static const int ErrorResponse_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, error_code_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, error_message_), + }; + ErrorResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ErrorResponse_descriptor_, + ErrorResponse::default_instance_, + ErrorResponse_offsets_, + -1, + -1, + -1, + sizeof(ErrorResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, _is_default_instance_)); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_reflection_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ServerReflectionRequest_descriptor_, &ServerReflectionRequest::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ExtensionRequest_descriptor_, &ExtensionRequest::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ServerReflectionResponse_descriptor_, &ServerReflectionResponse::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + FileDescriptorResponse_descriptor_, &FileDescriptorResponse::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ExtensionNumberResponse_descriptor_, &ExtensionNumberResponse::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ListServiceResponse_descriptor_, &ListServiceResponse::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ServiceResponse_descriptor_, &ServiceResponse::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ErrorResponse_descriptor_, &ErrorResponse::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_reflection_2eproto() { + delete ServerReflectionRequest::default_instance_; + delete ServerReflectionRequest_default_oneof_instance_; + delete ServerReflectionRequest_reflection_; + delete ExtensionRequest::default_instance_; + delete ExtensionRequest_reflection_; + delete ServerReflectionResponse::default_instance_; + delete ServerReflectionResponse_default_oneof_instance_; + delete ServerReflectionResponse_reflection_; + delete FileDescriptorResponse::default_instance_; + delete FileDescriptorResponse_reflection_; + delete ExtensionNumberResponse::default_instance_; + delete ExtensionNumberResponse_reflection_; + delete ListServiceResponse::default_instance_; + delete ListServiceResponse_reflection_; + delete ServiceResponse::default_instance_; + delete ServiceResponse_reflection_; + delete ErrorResponse::default_instance_; + delete ErrorResponse_reflection_; +} + +void protobuf_AddDesc_reflection_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\020reflection.proto\022\027grpc.reflection.v1al" + "pha\"\212\002\n\027ServerReflectionRequest\022\014\n\004host\030" + "\001 \001(\t\022\032\n\020file_by_filename\030\003 \001(\tH\000\022 \n\026fil" + "e_containing_symbol\030\004 \001(\tH\000\022N\n\031file_cont" + "aining_extension\030\005 \001(\0132).grpc.reflection" + ".v1alpha.ExtensionRequestH\000\022\'\n\035all_exten" + "sion_numbers_of_type\030\006 \001(\tH\000\022\027\n\rlist_ser" + "vices\030\007 \001(\tH\000B\021\n\017message_request\"E\n\020Exte" + "nsionRequest\022\027\n\017containing_type\030\001 \001(\t\022\030\n" + "\020extension_number\030\002 \001(\005\"\321\003\n\030ServerReflec" + "tionResponse\022\022\n\nvalid_host\030\001 \001(\t\022J\n\020orig" + "inal_request\030\002 \001(\01320.grpc.reflection.v1a" + "lpha.ServerReflectionRequest\022S\n\030file_des" + "criptor_response\030\004 \001(\0132/.grpc.reflection" + ".v1alpha.FileDescriptorResponseH\000\022Z\n\036all" + "_extension_numbers_response\030\005 \001(\01320.grpc" + ".reflection.v1alpha.ExtensionNumberRespo" + "nseH\000\022N\n\026list_services_response\030\006 \001(\0132,." + "grpc.reflection.v1alpha.ListServiceRespo" + "nseH\000\022@\n\016error_response\030\007 \001(\0132&.grpc.ref" + "lection.v1alpha.ErrorResponseH\000B\022\n\020messa" + "ge_response\"7\n\026FileDescriptorResponse\022\035\n" + "\025file_descriptor_proto\030\001 \003(\014\"K\n\027Extensio" + "nNumberResponse\022\026\n\016base_type_name\030\001 \001(\t\022" + "\030\n\020extension_number\030\002 \003(\005\"P\n\023ListService" + "Response\0229\n\007service\030\001 \003(\0132(.grpc.reflect" + "ion.v1alpha.ServiceResponse\"\037\n\017ServiceRe" + "sponse\022\014\n\004name\030\001 \001(\t\":\n\rErrorResponse\022\022\n" + "\nerror_code\030\001 \001(\005\022\025\n\rerror_message\030\002 \001(\t" + "2\223\001\n\020ServerReflection\022\177\n\024ServerReflectio" + "nInfo\0220.grpc.reflection.v1alpha.ServerRe" + "flectionRequest\0321.grpc.reflection.v1alph" + "a.ServerReflectionResponse(\0010\001b\006proto3", 1318); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "reflection.proto", &protobuf_RegisterTypes); + ServerReflectionRequest::default_instance_ = new ServerReflectionRequest(); + ServerReflectionRequest_default_oneof_instance_ = new ServerReflectionRequestOneofInstance(); + ExtensionRequest::default_instance_ = new ExtensionRequest(); + ServerReflectionResponse::default_instance_ = new ServerReflectionResponse(); + ServerReflectionResponse_default_oneof_instance_ = new ServerReflectionResponseOneofInstance(); + FileDescriptorResponse::default_instance_ = new FileDescriptorResponse(); + ExtensionNumberResponse::default_instance_ = new ExtensionNumberResponse(); + ListServiceResponse::default_instance_ = new ListServiceResponse(); + ServiceResponse::default_instance_ = new ServiceResponse(); + ErrorResponse::default_instance_ = new ErrorResponse(); + ServerReflectionRequest::default_instance_->InitAsDefaultInstance(); + ExtensionRequest::default_instance_->InitAsDefaultInstance(); + ServerReflectionResponse::default_instance_->InitAsDefaultInstance(); + FileDescriptorResponse::default_instance_->InitAsDefaultInstance(); + ExtensionNumberResponse::default_instance_->InitAsDefaultInstance(); + ListServiceResponse::default_instance_->InitAsDefaultInstance(); + ServiceResponse::default_instance_->InitAsDefaultInstance(); + ErrorResponse::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_reflection_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_reflection_2eproto { + StaticDescriptorInitializer_reflection_2eproto() { + protobuf_AddDesc_reflection_2eproto(); + } +} static_descriptor_initializer_reflection_2eproto_; + +namespace { + +static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD; +static void MergeFromFail(int line) { + GOOGLE_CHECK(false) << __FILE__ << ":" << line; +} + +} // namespace + + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ServerReflectionRequest::kHostFieldNumber; +const int ServerReflectionRequest::kFileByFilenameFieldNumber; +const int ServerReflectionRequest::kFileContainingSymbolFieldNumber; +const int ServerReflectionRequest::kFileContainingExtensionFieldNumber; +const int ServerReflectionRequest::kAllExtensionNumbersOfTypeFieldNumber; +const int ServerReflectionRequest::kListServicesFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ServerReflectionRequest::ServerReflectionRequest() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ServerReflectionRequest) +} + +void ServerReflectionRequest::InitAsDefaultInstance() { + _is_default_instance_ = true; + ServerReflectionRequest_default_oneof_instance_->file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ServerReflectionRequest_default_oneof_instance_->file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ServerReflectionRequest_default_oneof_instance_->file_containing_extension_ = const_cast< ::grpc::reflection::v1alpha::ExtensionRequest*>(&::grpc::reflection::v1alpha::ExtensionRequest::default_instance()); + ServerReflectionRequest_default_oneof_instance_->all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ServerReflectionRequest_default_oneof_instance_->list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +ServerReflectionRequest::ServerReflectionRequest(const ServerReflectionRequest& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ServerReflectionRequest) +} + +void ServerReflectionRequest::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + host_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); +} + +ServerReflectionRequest::~ServerReflectionRequest() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ServerReflectionRequest) + SharedDtor(); +} + +void ServerReflectionRequest::SharedDtor() { + host_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (has_message_request()) { + clear_message_request(); + } + if (this != default_instance_) { + } +} + +void ServerReflectionRequest::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ServerReflectionRequest::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ServerReflectionRequest_descriptor_; +} + +const ServerReflectionRequest& ServerReflectionRequest::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +ServerReflectionRequest* ServerReflectionRequest::default_instance_ = NULL; + +ServerReflectionRequest* ServerReflectionRequest::New(::google::protobuf::Arena* arena) const { + ServerReflectionRequest* n = new ServerReflectionRequest; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ServerReflectionRequest::clear_message_request() { +// @@protoc_insertion_point(one_of_clear_start:grpc.reflection.v1alpha.ServerReflectionRequest) + switch(message_request_case()) { + case kFileByFilename: { + message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case kFileContainingSymbol: { + message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case kFileContainingExtension: { + delete message_request_.file_containing_extension_; + break; + } + case kAllExtensionNumbersOfType: { + message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case kListServices: { + message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case MESSAGE_REQUEST_NOT_SET: { + break; + } + } + _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET; +} + + +void ServerReflectionRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ServerReflectionRequest) + host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_message_request(); +} + +bool ServerReflectionRequest::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ServerReflectionRequest) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string host = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_host())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->host().data(), this->host().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ServerReflectionRequest.host")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_file_by_filename; + break; + } + + // optional string file_by_filename = 3; + case 3: { + if (tag == 26) { + parse_file_by_filename: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_file_by_filename())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_by_filename().data(), this->file_by_filename().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_file_containing_symbol; + break; + } + + // optional string file_containing_symbol = 4; + case 4: { + if (tag == 34) { + parse_file_containing_symbol: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_file_containing_symbol())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_containing_symbol().data(), this->file_containing_symbol().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_file_containing_extension; + break; + } + + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + case 5: { + if (tag == 42) { + parse_file_containing_extension: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_file_containing_extension())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_all_extension_numbers_of_type; + break; + } + + // optional string all_extension_numbers_of_type = 6; + case 6: { + if (tag == 50) { + parse_all_extension_numbers_of_type: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_all_extension_numbers_of_type())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(58)) goto parse_list_services; + break; + } + + // optional string list_services = 7; + case 7: { + if (tag == 58) { + parse_list_services: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_list_services())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->list_services().data(), this->list_services().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ServerReflectionRequest.list_services")); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ServerReflectionRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ServerReflectionRequest) + return false; +#undef DO_ +} + +void ServerReflectionRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ServerReflectionRequest) + // optional string host = 1; + if (this->host().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->host().data(), this->host().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServerReflectionRequest.host"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->host(), output); + } + + // optional string file_by_filename = 3; + if (has_file_by_filename()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_by_filename().data(), this->file_by_filename().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->file_by_filename(), output); + } + + // optional string file_containing_symbol = 4; + if (has_file_containing_symbol()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_containing_symbol().data(), this->file_containing_symbol().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->file_containing_symbol(), output); + } + + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + if (has_file_containing_extension()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, *message_request_.file_containing_extension_, output); + } + + // optional string all_extension_numbers_of_type = 6; + if (has_all_extension_numbers_of_type()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 6, this->all_extension_numbers_of_type(), output); + } + + // optional string list_services = 7; + if (has_list_services()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->list_services().data(), this->list_services().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServerReflectionRequest.list_services"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 7, this->list_services(), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ServerReflectionRequest) +} + +::google::protobuf::uint8* ServerReflectionRequest::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ServerReflectionRequest) + // optional string host = 1; + if (this->host().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->host().data(), this->host().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServerReflectionRequest.host"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->host(), target); + } + + // optional string file_by_filename = 3; + if (has_file_by_filename()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_by_filename().data(), this->file_by_filename().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->file_by_filename(), target); + } + + // optional string file_containing_symbol = 4; + if (has_file_containing_symbol()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_containing_symbol().data(), this->file_containing_symbol().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->file_containing_symbol(), target); + } + + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + if (has_file_containing_extension()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 5, *message_request_.file_containing_extension_, target); + } + + // optional string all_extension_numbers_of_type = 6; + if (has_all_extension_numbers_of_type()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 6, this->all_extension_numbers_of_type(), target); + } + + // optional string list_services = 7; + if (has_list_services()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->list_services().data(), this->list_services().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServerReflectionRequest.list_services"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 7, this->list_services(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ServerReflectionRequest) + return target; +} + +int ServerReflectionRequest::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ServerReflectionRequest) + int total_size = 0; + + // optional string host = 1; + if (this->host().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->host()); + } + + switch (message_request_case()) { + // optional string file_by_filename = 3; + case kFileByFilename: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->file_by_filename()); + break; + } + // optional string file_containing_symbol = 4; + case kFileContainingSymbol: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->file_containing_symbol()); + break; + } + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + case kFileContainingExtension: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *message_request_.file_containing_extension_); + break; + } + // optional string all_extension_numbers_of_type = 6; + case kAllExtensionNumbersOfType: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->all_extension_numbers_of_type()); + break; + } + // optional string list_services = 7; + case kListServices: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->list_services()); + break; + } + case MESSAGE_REQUEST_NOT_SET: { + break; + } + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ServerReflectionRequest::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ServerReflectionRequest) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const ServerReflectionRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ServerReflectionRequest) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ServerReflectionRequest) + MergeFrom(*source); + } +} + +void ServerReflectionRequest::MergeFrom(const ServerReflectionRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ServerReflectionRequest) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + switch (from.message_request_case()) { + case kFileByFilename: { + set_file_by_filename(from.file_by_filename()); + break; + } + case kFileContainingSymbol: { + set_file_containing_symbol(from.file_containing_symbol()); + break; + } + case kFileContainingExtension: { + mutable_file_containing_extension()->::grpc::reflection::v1alpha::ExtensionRequest::MergeFrom(from.file_containing_extension()); + break; + } + case kAllExtensionNumbersOfType: { + set_all_extension_numbers_of_type(from.all_extension_numbers_of_type()); + break; + } + case kListServices: { + set_list_services(from.list_services()); + break; + } + case MESSAGE_REQUEST_NOT_SET: { + break; + } + } + if (from.host().size() > 0) { + + host_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.host_); + } +} + +void ServerReflectionRequest::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ServerReflectionRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ServerReflectionRequest::CopyFrom(const ServerReflectionRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ServerReflectionRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ServerReflectionRequest::IsInitialized() const { + + return true; +} + +void ServerReflectionRequest::Swap(ServerReflectionRequest* other) { + if (other == this) return; + InternalSwap(other); +} +void ServerReflectionRequest::InternalSwap(ServerReflectionRequest* other) { + host_.Swap(&other->host_); + std::swap(message_request_, other->message_request_); + std::swap(_oneof_case_[0], other->_oneof_case_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ServerReflectionRequest::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ServerReflectionRequest_descriptor_; + metadata.reflection = ServerReflectionRequest_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// ServerReflectionRequest + +// optional string host = 1; +void ServerReflectionRequest::clear_host() { + host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& ServerReflectionRequest::host() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.host) + return host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ServerReflectionRequest::set_host(const ::std::string& value) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.host) +} + void ServerReflectionRequest::set_host(const char* value) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.host) +} + void ServerReflectionRequest::set_host(const char* value, size_t size) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.host) +} + ::std::string* ServerReflectionRequest::mutable_host() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.host) + return host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* ServerReflectionRequest::release_host() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.host) + + return host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ServerReflectionRequest::set_allocated_host(::std::string* host) { + if (host != NULL) { + + } else { + + } + host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), host); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.host) +} + +// optional string file_by_filename = 3; +bool ServerReflectionRequest::has_file_by_filename() const { + return message_request_case() == kFileByFilename; +} +void ServerReflectionRequest::set_has_file_by_filename() { + _oneof_case_[0] = kFileByFilename; +} +void ServerReflectionRequest::clear_file_by_filename() { + if (has_file_by_filename()) { + message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} + const ::std::string& ServerReflectionRequest::file_by_filename() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) + if (has_file_by_filename()) { + return message_request_.file_by_filename_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} + void ServerReflectionRequest::set_file_by_filename(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) +} + void ServerReflectionRequest::set_file_by_filename(const char* value) { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) +} + void ServerReflectionRequest::set_file_by_filename(const char* value, size_t size) { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) +} + ::std::string* ServerReflectionRequest::mutable_file_by_filename() { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) + return message_request_.file_by_filename_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* ServerReflectionRequest::release_file_by_filename() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) + if (has_file_by_filename()) { + clear_has_message_request(); + return message_request_.file_by_filename_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} + void ServerReflectionRequest::set_allocated_file_by_filename(::std::string* file_by_filename) { + if (!has_file_by_filename()) { + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (file_by_filename != NULL) { + set_has_file_by_filename(); + message_request_.file_by_filename_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_by_filename); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_by_filename) +} + +// optional string file_containing_symbol = 4; +bool ServerReflectionRequest::has_file_containing_symbol() const { + return message_request_case() == kFileContainingSymbol; +} +void ServerReflectionRequest::set_has_file_containing_symbol() { + _oneof_case_[0] = kFileContainingSymbol; +} +void ServerReflectionRequest::clear_file_containing_symbol() { + if (has_file_containing_symbol()) { + message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} + const ::std::string& ServerReflectionRequest::file_containing_symbol() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) + if (has_file_containing_symbol()) { + return message_request_.file_containing_symbol_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} + void ServerReflectionRequest::set_file_containing_symbol(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) +} + void ServerReflectionRequest::set_file_containing_symbol(const char* value) { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) +} + void ServerReflectionRequest::set_file_containing_symbol(const char* value, size_t size) { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) +} + ::std::string* ServerReflectionRequest::mutable_file_containing_symbol() { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) + return message_request_.file_containing_symbol_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* ServerReflectionRequest::release_file_containing_symbol() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) + if (has_file_containing_symbol()) { + clear_has_message_request(); + return message_request_.file_containing_symbol_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} + void ServerReflectionRequest::set_allocated_file_containing_symbol(::std::string* file_containing_symbol) { + if (!has_file_containing_symbol()) { + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (file_containing_symbol != NULL) { + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_containing_symbol); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_symbol) +} + +// optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; +bool ServerReflectionRequest::has_file_containing_extension() const { + return message_request_case() == kFileContainingExtension; +} +void ServerReflectionRequest::set_has_file_containing_extension() { + _oneof_case_[0] = kFileContainingExtension; +} +void ServerReflectionRequest::clear_file_containing_extension() { + if (has_file_containing_extension()) { + delete message_request_.file_containing_extension_; + clear_has_message_request(); + } +} + const ::grpc::reflection::v1alpha::ExtensionRequest& ServerReflectionRequest::file_containing_extension() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) + return has_file_containing_extension() + ? *message_request_.file_containing_extension_ + : ::grpc::reflection::v1alpha::ExtensionRequest::default_instance(); +} +::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::mutable_file_containing_extension() { + if (!has_file_containing_extension()) { + clear_message_request(); + set_has_file_containing_extension(); + message_request_.file_containing_extension_ = new ::grpc::reflection::v1alpha::ExtensionRequest; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) + return message_request_.file_containing_extension_; +} +::grpc::reflection::v1alpha::ExtensionRequest* ServerReflectionRequest::release_file_containing_extension() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) + if (has_file_containing_extension()) { + clear_has_message_request(); + ::grpc::reflection::v1alpha::ExtensionRequest* temp = message_request_.file_containing_extension_; + message_request_.file_containing_extension_ = NULL; + return temp; + } else { + return NULL; + } +} +void ServerReflectionRequest::set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension) { + clear_message_request(); + if (file_containing_extension) { + set_has_file_containing_extension(); + message_request_.file_containing_extension_ = file_containing_extension; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.file_containing_extension) +} + +// optional string all_extension_numbers_of_type = 6; +bool ServerReflectionRequest::has_all_extension_numbers_of_type() const { + return message_request_case() == kAllExtensionNumbersOfType; +} +void ServerReflectionRequest::set_has_all_extension_numbers_of_type() { + _oneof_case_[0] = kAllExtensionNumbersOfType; +} +void ServerReflectionRequest::clear_all_extension_numbers_of_type() { + if (has_all_extension_numbers_of_type()) { + message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} + const ::std::string& ServerReflectionRequest::all_extension_numbers_of_type() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) + if (has_all_extension_numbers_of_type()) { + return message_request_.all_extension_numbers_of_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} + void ServerReflectionRequest::set_all_extension_numbers_of_type(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) +} + void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value) { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) +} + void ServerReflectionRequest::set_all_extension_numbers_of_type(const char* value, size_t size) { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) +} + ::std::string* ServerReflectionRequest::mutable_all_extension_numbers_of_type() { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) + return message_request_.all_extension_numbers_of_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* ServerReflectionRequest::release_all_extension_numbers_of_type() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) + if (has_all_extension_numbers_of_type()) { + clear_has_message_request(); + return message_request_.all_extension_numbers_of_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} + void ServerReflectionRequest::set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type) { + if (!has_all_extension_numbers_of_type()) { + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (all_extension_numbers_of_type != NULL) { + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + all_extension_numbers_of_type); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.all_extension_numbers_of_type) +} + +// optional string list_services = 7; +bool ServerReflectionRequest::has_list_services() const { + return message_request_case() == kListServices; +} +void ServerReflectionRequest::set_has_list_services() { + _oneof_case_[0] = kListServices; +} +void ServerReflectionRequest::clear_list_services() { + if (has_list_services()) { + message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} + const ::std::string& ServerReflectionRequest::list_services() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) + if (has_list_services()) { + return message_request_.list_services_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} + void ServerReflectionRequest::set_list_services(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) +} + void ServerReflectionRequest::set_list_services(const char* value) { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) +} + void ServerReflectionRequest::set_list_services(const char* value, size_t size) { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) +} + ::std::string* ServerReflectionRequest::mutable_list_services() { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) + return message_request_.list_services_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* ServerReflectionRequest::release_list_services() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) + if (has_list_services()) { + clear_has_message_request(); + return message_request_.list_services_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} + void ServerReflectionRequest::set_allocated_list_services(::std::string* list_services) { + if (!has_list_services()) { + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (list_services != NULL) { + set_has_list_services(); + message_request_.list_services_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + list_services); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionRequest.list_services) +} + +bool ServerReflectionRequest::has_message_request() const { + return message_request_case() != MESSAGE_REQUEST_NOT_SET; +} +void ServerReflectionRequest::clear_has_message_request() { + _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET; +} +ServerReflectionRequest::MessageRequestCase ServerReflectionRequest::message_request_case() const { + return ServerReflectionRequest::MessageRequestCase(_oneof_case_[0]); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ExtensionRequest::kContainingTypeFieldNumber; +const int ExtensionRequest::kExtensionNumberFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ExtensionRequest::ExtensionRequest() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionRequest) +} + +void ExtensionRequest::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +ExtensionRequest::ExtensionRequest(const ExtensionRequest& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionRequest) +} + +void ExtensionRequest::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + containing_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + extension_number_ = 0; +} + +ExtensionRequest::~ExtensionRequest() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ExtensionRequest) + SharedDtor(); +} + +void ExtensionRequest::SharedDtor() { + containing_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + } +} + +void ExtensionRequest::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ExtensionRequest::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ExtensionRequest_descriptor_; +} + +const ExtensionRequest& ExtensionRequest::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +ExtensionRequest* ExtensionRequest::default_instance_ = NULL; + +ExtensionRequest* ExtensionRequest::New(::google::protobuf::Arena* arena) const { + ExtensionRequest* n = new ExtensionRequest; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ExtensionRequest::Clear() { +// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ExtensionRequest) + containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + extension_number_ = 0; +} + +bool ExtensionRequest::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionRequest) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string containing_type = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_containing_type())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->containing_type().data(), this->containing_type().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ExtensionRequest.containing_type")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_extension_number; + break; + } + + // optional int32 extension_number = 2; + case 2: { + if (tag == 16) { + parse_extension_number: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &extension_number_))); + + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ExtensionRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ExtensionRequest) + return false; +#undef DO_ +} + +void ExtensionRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ExtensionRequest) + // optional string containing_type = 1; + if (this->containing_type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->containing_type().data(), this->containing_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->containing_type(), output); + } + + // optional int32 extension_number = 2; + if (this->extension_number() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->extension_number(), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionRequest) +} + +::google::protobuf::uint8* ExtensionRequest::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ExtensionRequest) + // optional string containing_type = 1; + if (this->containing_type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->containing_type().data(), this->containing_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->containing_type(), target); + } + + // optional int32 extension_number = 2; + if (this->extension_number() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->extension_number(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionRequest) + return target; +} + +int ExtensionRequest::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ExtensionRequest) + int total_size = 0; + + // optional string containing_type = 1; + if (this->containing_type().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->containing_type()); + } + + // optional int32 extension_number = 2; + if (this->extension_number() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->extension_number()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ExtensionRequest::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ExtensionRequest) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const ExtensionRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ExtensionRequest) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ExtensionRequest) + MergeFrom(*source); + } +} + +void ExtensionRequest::MergeFrom(const ExtensionRequest& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ExtensionRequest) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + if (from.containing_type().size() > 0) { + + containing_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.containing_type_); + } + if (from.extension_number() != 0) { + set_extension_number(from.extension_number()); + } +} + +void ExtensionRequest::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ExtensionRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ExtensionRequest::CopyFrom(const ExtensionRequest& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ExtensionRequest) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ExtensionRequest::IsInitialized() const { + + return true; +} + +void ExtensionRequest::Swap(ExtensionRequest* other) { + if (other == this) return; + InternalSwap(other); +} +void ExtensionRequest::InternalSwap(ExtensionRequest* other) { + containing_type_.Swap(&other->containing_type_); + std::swap(extension_number_, other->extension_number_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ExtensionRequest::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ExtensionRequest_descriptor_; + metadata.reflection = ExtensionRequest_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// ExtensionRequest + +// optional string containing_type = 1; +void ExtensionRequest::clear_containing_type() { + containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& ExtensionRequest::containing_type() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.containing_type) + return containing_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ExtensionRequest::set_containing_type(const ::std::string& value) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} + void ExtensionRequest::set_containing_type(const char* value) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} + void ExtensionRequest::set_containing_type(const char* value, size_t size) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} + ::std::string* ExtensionRequest::mutable_containing_type() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionRequest.containing_type) + return containing_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* ExtensionRequest::release_containing_type() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionRequest.containing_type) + + return containing_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ExtensionRequest::set_allocated_containing_type(::std::string* containing_type) { + if (containing_type != NULL) { + + } else { + + } + containing_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), containing_type); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} + +// optional int32 extension_number = 2; +void ExtensionRequest::clear_extension_number() { + extension_number_ = 0; +} + ::google::protobuf::int32 ExtensionRequest::extension_number() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.extension_number) + return extension_number_; +} + void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) { + + extension_number_ = value; + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ServerReflectionResponse::kValidHostFieldNumber; +const int ServerReflectionResponse::kOriginalRequestFieldNumber; +const int ServerReflectionResponse::kFileDescriptorResponseFieldNumber; +const int ServerReflectionResponse::kAllExtensionNumbersResponseFieldNumber; +const int ServerReflectionResponse::kListServicesResponseFieldNumber; +const int ServerReflectionResponse::kErrorResponseFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ServerReflectionResponse::ServerReflectionResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ServerReflectionResponse) +} + +void ServerReflectionResponse::InitAsDefaultInstance() { + _is_default_instance_ = true; + original_request_ = const_cast< ::grpc::reflection::v1alpha::ServerReflectionRequest*>(&::grpc::reflection::v1alpha::ServerReflectionRequest::default_instance()); + ServerReflectionResponse_default_oneof_instance_->file_descriptor_response_ = const_cast< ::grpc::reflection::v1alpha::FileDescriptorResponse*>(&::grpc::reflection::v1alpha::FileDescriptorResponse::default_instance()); + ServerReflectionResponse_default_oneof_instance_->all_extension_numbers_response_ = const_cast< ::grpc::reflection::v1alpha::ExtensionNumberResponse*>(&::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance()); + ServerReflectionResponse_default_oneof_instance_->list_services_response_ = const_cast< ::grpc::reflection::v1alpha::ListServiceResponse*>(&::grpc::reflection::v1alpha::ListServiceResponse::default_instance()); + ServerReflectionResponse_default_oneof_instance_->error_response_ = const_cast< ::grpc::reflection::v1alpha::ErrorResponse*>(&::grpc::reflection::v1alpha::ErrorResponse::default_instance()); +} + +ServerReflectionResponse::ServerReflectionResponse(const ServerReflectionResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ServerReflectionResponse) +} + +void ServerReflectionResponse::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + valid_host_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + original_request_ = NULL; + clear_has_message_response(); +} + +ServerReflectionResponse::~ServerReflectionResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ServerReflectionResponse) + SharedDtor(); +} + +void ServerReflectionResponse::SharedDtor() { + valid_host_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (has_message_response()) { + clear_message_response(); + } + if (this != default_instance_) { + delete original_request_; + } +} + +void ServerReflectionResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ServerReflectionResponse::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ServerReflectionResponse_descriptor_; +} + +const ServerReflectionResponse& ServerReflectionResponse::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +ServerReflectionResponse* ServerReflectionResponse::default_instance_ = NULL; + +ServerReflectionResponse* ServerReflectionResponse::New(::google::protobuf::Arena* arena) const { + ServerReflectionResponse* n = new ServerReflectionResponse; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ServerReflectionResponse::clear_message_response() { +// @@protoc_insertion_point(one_of_clear_start:grpc.reflection.v1alpha.ServerReflectionResponse) + switch(message_response_case()) { + case kFileDescriptorResponse: { + delete message_response_.file_descriptor_response_; + break; + } + case kAllExtensionNumbersResponse: { + delete message_response_.all_extension_numbers_response_; + break; + } + case kListServicesResponse: { + delete message_response_.list_services_response_; + break; + } + case kErrorResponse: { + delete message_response_.error_response_; + break; + } + case MESSAGE_RESPONSE_NOT_SET: { + break; + } + } + _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET; +} + + +void ServerReflectionResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ServerReflectionResponse) + valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; + original_request_ = NULL; + clear_message_response(); +} + +bool ServerReflectionResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ServerReflectionResponse) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string valid_host = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_valid_host())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->valid_host().data(), this->valid_host().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ServerReflectionResponse.valid_host")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_original_request; + break; + } + + // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; + case 2: { + if (tag == 18) { + parse_original_request: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_original_request())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_file_descriptor_response; + break; + } + + // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; + case 4: { + if (tag == 34) { + parse_file_descriptor_response: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_file_descriptor_response())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_all_extension_numbers_response; + break; + } + + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + case 5: { + if (tag == 42) { + parse_all_extension_numbers_response: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_all_extension_numbers_response())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_list_services_response; + break; + } + + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + case 6: { + if (tag == 50) { + parse_list_services_response: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_list_services_response())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(58)) goto parse_error_response; + break; + } + + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + case 7: { + if (tag == 58) { + parse_error_response: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_error_response())); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ServerReflectionResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ServerReflectionResponse) + return false; +#undef DO_ +} + +void ServerReflectionResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ServerReflectionResponse) + // optional string valid_host = 1; + if (this->valid_host().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->valid_host().data(), this->valid_host().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServerReflectionResponse.valid_host"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->valid_host(), output); + } + + // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; + if (this->has_original_request()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, *this->original_request_, output); + } + + // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; + if (has_file_descriptor_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 4, *message_response_.file_descriptor_response_, output); + } + + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + if (has_all_extension_numbers_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, *message_response_.all_extension_numbers_response_, output); + } + + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + if (has_list_services_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 6, *message_response_.list_services_response_, output); + } + + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + if (has_error_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 7, *message_response_.error_response_, output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ServerReflectionResponse) +} + +::google::protobuf::uint8* ServerReflectionResponse::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ServerReflectionResponse) + // optional string valid_host = 1; + if (this->valid_host().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->valid_host().data(), this->valid_host().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServerReflectionResponse.valid_host"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->valid_host(), target); + } + + // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; + if (this->has_original_request()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, *this->original_request_, target); + } + + // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; + if (has_file_descriptor_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 4, *message_response_.file_descriptor_response_, target); + } + + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + if (has_all_extension_numbers_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 5, *message_response_.all_extension_numbers_response_, target); + } + + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + if (has_list_services_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 6, *message_response_.list_services_response_, target); + } + + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + if (has_error_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 7, *message_response_.error_response_, target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ServerReflectionResponse) + return target; +} + +int ServerReflectionResponse::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ServerReflectionResponse) + int total_size = 0; + + // optional string valid_host = 1; + if (this->valid_host().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->valid_host()); + } + + // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; + if (this->has_original_request()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->original_request_); + } + + switch (message_response_case()) { + // optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; + case kFileDescriptorResponse: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *message_response_.file_descriptor_response_); + break; + } + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + case kAllExtensionNumbersResponse: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *message_response_.all_extension_numbers_response_); + break; + } + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + case kListServicesResponse: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *message_response_.list_services_response_); + break; + } + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + case kErrorResponse: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *message_response_.error_response_); + break; + } + case MESSAGE_RESPONSE_NOT_SET: { + break; + } + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ServerReflectionResponse::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ServerReflectionResponse) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const ServerReflectionResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ServerReflectionResponse) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ServerReflectionResponse) + MergeFrom(*source); + } +} + +void ServerReflectionResponse::MergeFrom(const ServerReflectionResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ServerReflectionResponse) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + switch (from.message_response_case()) { + case kFileDescriptorResponse: { + mutable_file_descriptor_response()->::grpc::reflection::v1alpha::FileDescriptorResponse::MergeFrom(from.file_descriptor_response()); + break; + } + case kAllExtensionNumbersResponse: { + mutable_all_extension_numbers_response()->::grpc::reflection::v1alpha::ExtensionNumberResponse::MergeFrom(from.all_extension_numbers_response()); + break; + } + case kListServicesResponse: { + mutable_list_services_response()->::grpc::reflection::v1alpha::ListServiceResponse::MergeFrom(from.list_services_response()); + break; + } + case kErrorResponse: { + mutable_error_response()->::grpc::reflection::v1alpha::ErrorResponse::MergeFrom(from.error_response()); + break; + } + case MESSAGE_RESPONSE_NOT_SET: { + break; + } + } + if (from.valid_host().size() > 0) { + + valid_host_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.valid_host_); + } + if (from.has_original_request()) { + mutable_original_request()->::grpc::reflection::v1alpha::ServerReflectionRequest::MergeFrom(from.original_request()); + } +} + +void ServerReflectionResponse::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ServerReflectionResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ServerReflectionResponse::CopyFrom(const ServerReflectionResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ServerReflectionResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ServerReflectionResponse::IsInitialized() const { + + return true; +} + +void ServerReflectionResponse::Swap(ServerReflectionResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void ServerReflectionResponse::InternalSwap(ServerReflectionResponse* other) { + valid_host_.Swap(&other->valid_host_); + std::swap(original_request_, other->original_request_); + std::swap(message_response_, other->message_response_); + std::swap(_oneof_case_[0], other->_oneof_case_[0]); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ServerReflectionResponse::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ServerReflectionResponse_descriptor_; + metadata.reflection = ServerReflectionResponse_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// ServerReflectionResponse + +// optional string valid_host = 1; +void ServerReflectionResponse::clear_valid_host() { + valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& ServerReflectionResponse::valid_host() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) + return valid_host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ServerReflectionResponse::set_valid_host(const ::std::string& value) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) +} + void ServerReflectionResponse::set_valid_host(const char* value) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) +} + void ServerReflectionResponse::set_valid_host(const char* value, size_t size) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) +} + ::std::string* ServerReflectionResponse::mutable_valid_host() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) + return valid_host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* ServerReflectionResponse::release_valid_host() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) + + return valid_host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ServerReflectionResponse::set_allocated_valid_host(::std::string* valid_host) { + if (valid_host != NULL) { + + } else { + + } + valid_host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), valid_host); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.valid_host) +} + +// optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; +bool ServerReflectionResponse::has_original_request() const { + return !_is_default_instance_ && original_request_ != NULL; +} +void ServerReflectionResponse::clear_original_request() { + if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; + original_request_ = NULL; +} +const ::grpc::reflection::v1alpha::ServerReflectionRequest& ServerReflectionResponse::original_request() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) + return original_request_ != NULL ? *original_request_ : *default_instance_->original_request_; +} +::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::mutable_original_request() { + + if (original_request_ == NULL) { + original_request_ = new ::grpc::reflection::v1alpha::ServerReflectionRequest; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) + return original_request_; +} +::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::release_original_request() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) + + ::grpc::reflection::v1alpha::ServerReflectionRequest* temp = original_request_; + original_request_ = NULL; + return temp; +} +void ServerReflectionResponse::set_allocated_original_request(::grpc::reflection::v1alpha::ServerReflectionRequest* original_request) { + delete original_request_; + original_request_ = original_request; + if (original_request) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) +} + +// optional .grpc.reflection.v1alpha.FileDescriptorResponse file_descriptor_response = 4; +bool ServerReflectionResponse::has_file_descriptor_response() const { + return message_response_case() == kFileDescriptorResponse; +} +void ServerReflectionResponse::set_has_file_descriptor_response() { + _oneof_case_[0] = kFileDescriptorResponse; +} +void ServerReflectionResponse::clear_file_descriptor_response() { + if (has_file_descriptor_response()) { + delete message_response_.file_descriptor_response_; + clear_has_message_response(); + } +} + const ::grpc::reflection::v1alpha::FileDescriptorResponse& ServerReflectionResponse::file_descriptor_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) + return has_file_descriptor_response() + ? *message_response_.file_descriptor_response_ + : ::grpc::reflection::v1alpha::FileDescriptorResponse::default_instance(); +} +::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::mutable_file_descriptor_response() { + if (!has_file_descriptor_response()) { + clear_message_response(); + set_has_file_descriptor_response(); + message_response_.file_descriptor_response_ = new ::grpc::reflection::v1alpha::FileDescriptorResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) + return message_response_.file_descriptor_response_; +} +::grpc::reflection::v1alpha::FileDescriptorResponse* ServerReflectionResponse::release_file_descriptor_response() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) + if (has_file_descriptor_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::FileDescriptorResponse* temp = message_response_.file_descriptor_response_; + message_response_.file_descriptor_response_ = NULL; + return temp; + } else { + return NULL; + } +} +void ServerReflectionResponse::set_allocated_file_descriptor_response(::grpc::reflection::v1alpha::FileDescriptorResponse* file_descriptor_response) { + clear_message_response(); + if (file_descriptor_response) { + set_has_file_descriptor_response(); + message_response_.file_descriptor_response_ = file_descriptor_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.file_descriptor_response) +} + +// optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; +bool ServerReflectionResponse::has_all_extension_numbers_response() const { + return message_response_case() == kAllExtensionNumbersResponse; +} +void ServerReflectionResponse::set_has_all_extension_numbers_response() { + _oneof_case_[0] = kAllExtensionNumbersResponse; +} +void ServerReflectionResponse::clear_all_extension_numbers_response() { + if (has_all_extension_numbers_response()) { + delete message_response_.all_extension_numbers_response_; + clear_has_message_response(); + } +} + const ::grpc::reflection::v1alpha::ExtensionNumberResponse& ServerReflectionResponse::all_extension_numbers_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) + return has_all_extension_numbers_response() + ? *message_response_.all_extension_numbers_response_ + : ::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance(); +} +::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::mutable_all_extension_numbers_response() { + if (!has_all_extension_numbers_response()) { + clear_message_response(); + set_has_all_extension_numbers_response(); + message_response_.all_extension_numbers_response_ = new ::grpc::reflection::v1alpha::ExtensionNumberResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) + return message_response_.all_extension_numbers_response_; +} +::grpc::reflection::v1alpha::ExtensionNumberResponse* ServerReflectionResponse::release_all_extension_numbers_response() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) + if (has_all_extension_numbers_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ExtensionNumberResponse* temp = message_response_.all_extension_numbers_response_; + message_response_.all_extension_numbers_response_ = NULL; + return temp; + } else { + return NULL; + } +} +void ServerReflectionResponse::set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response) { + clear_message_response(); + if (all_extension_numbers_response) { + set_has_all_extension_numbers_response(); + message_response_.all_extension_numbers_response_ = all_extension_numbers_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.all_extension_numbers_response) +} + +// optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; +bool ServerReflectionResponse::has_list_services_response() const { + return message_response_case() == kListServicesResponse; +} +void ServerReflectionResponse::set_has_list_services_response() { + _oneof_case_[0] = kListServicesResponse; +} +void ServerReflectionResponse::clear_list_services_response() { + if (has_list_services_response()) { + delete message_response_.list_services_response_; + clear_has_message_response(); + } +} + const ::grpc::reflection::v1alpha::ListServiceResponse& ServerReflectionResponse::list_services_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) + return has_list_services_response() + ? *message_response_.list_services_response_ + : ::grpc::reflection::v1alpha::ListServiceResponse::default_instance(); +} +::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::mutable_list_services_response() { + if (!has_list_services_response()) { + clear_message_response(); + set_has_list_services_response(); + message_response_.list_services_response_ = new ::grpc::reflection::v1alpha::ListServiceResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) + return message_response_.list_services_response_; +} +::grpc::reflection::v1alpha::ListServiceResponse* ServerReflectionResponse::release_list_services_response() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) + if (has_list_services_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ListServiceResponse* temp = message_response_.list_services_response_; + message_response_.list_services_response_ = NULL; + return temp; + } else { + return NULL; + } +} +void ServerReflectionResponse::set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response) { + clear_message_response(); + if (list_services_response) { + set_has_list_services_response(); + message_response_.list_services_response_ = list_services_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.list_services_response) +} + +// optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; +bool ServerReflectionResponse::has_error_response() const { + return message_response_case() == kErrorResponse; +} +void ServerReflectionResponse::set_has_error_response() { + _oneof_case_[0] = kErrorResponse; +} +void ServerReflectionResponse::clear_error_response() { + if (has_error_response()) { + delete message_response_.error_response_; + clear_has_message_response(); + } +} + const ::grpc::reflection::v1alpha::ErrorResponse& ServerReflectionResponse::error_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) + return has_error_response() + ? *message_response_.error_response_ + : ::grpc::reflection::v1alpha::ErrorResponse::default_instance(); +} +::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::mutable_error_response() { + if (!has_error_response()) { + clear_message_response(); + set_has_error_response(); + message_response_.error_response_ = new ::grpc::reflection::v1alpha::ErrorResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) + return message_response_.error_response_; +} +::grpc::reflection::v1alpha::ErrorResponse* ServerReflectionResponse::release_error_response() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) + if (has_error_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ErrorResponse* temp = message_response_.error_response_; + message_response_.error_response_ = NULL; + return temp; + } else { + return NULL; + } +} +void ServerReflectionResponse::set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response) { + clear_message_response(); + if (error_response) { + set_has_error_response(); + message_response_.error_response_ = error_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServerReflectionResponse.error_response) +} + +bool ServerReflectionResponse::has_message_response() const { + return message_response_case() != MESSAGE_RESPONSE_NOT_SET; +} +void ServerReflectionResponse::clear_has_message_response() { + _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET; +} +ServerReflectionResponse::MessageResponseCase ServerReflectionResponse::message_response_case() const { + return ServerReflectionResponse::MessageResponseCase(_oneof_case_[0]); +} +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int FileDescriptorResponse::kFileDescriptorProtoFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +FileDescriptorResponse::FileDescriptorResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.FileDescriptorResponse) +} + +void FileDescriptorResponse::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +FileDescriptorResponse::FileDescriptorResponse(const FileDescriptorResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.FileDescriptorResponse) +} + +void FileDescriptorResponse::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; +} + +FileDescriptorResponse::~FileDescriptorResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.FileDescriptorResponse) + SharedDtor(); +} + +void FileDescriptorResponse::SharedDtor() { + if (this != default_instance_) { + } +} + +void FileDescriptorResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* FileDescriptorResponse::descriptor() { + protobuf_AssignDescriptorsOnce(); + return FileDescriptorResponse_descriptor_; +} + +const FileDescriptorResponse& FileDescriptorResponse::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +FileDescriptorResponse* FileDescriptorResponse::default_instance_ = NULL; + +FileDescriptorResponse* FileDescriptorResponse::New(::google::protobuf::Arena* arena) const { + FileDescriptorResponse* n = new FileDescriptorResponse; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void FileDescriptorResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.FileDescriptorResponse) + file_descriptor_proto_.Clear(); +} + +bool FileDescriptorResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.FileDescriptorResponse) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated bytes file_descriptor_proto = 1; + case 1: { + if (tag == 10) { + parse_file_descriptor_proto: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->add_file_descriptor_proto())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(10)) goto parse_file_descriptor_proto; + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.FileDescriptorResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.FileDescriptorResponse) + return false; +#undef DO_ +} + +void FileDescriptorResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.FileDescriptorResponse) + // repeated bytes file_descriptor_proto = 1; + for (int i = 0; i < this->file_descriptor_proto_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 1, this->file_descriptor_proto(i), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.FileDescriptorResponse) +} + +::google::protobuf::uint8* FileDescriptorResponse::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.FileDescriptorResponse) + // repeated bytes file_descriptor_proto = 1; + for (int i = 0; i < this->file_descriptor_proto_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteBytesToArray(1, this->file_descriptor_proto(i), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.FileDescriptorResponse) + return target; +} + +int FileDescriptorResponse::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.FileDescriptorResponse) + int total_size = 0; + + // repeated bytes file_descriptor_proto = 1; + total_size += 1 * this->file_descriptor_proto_size(); + for (int i = 0; i < this->file_descriptor_proto_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + this->file_descriptor_proto(i)); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void FileDescriptorResponse::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.FileDescriptorResponse) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const FileDescriptorResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.FileDescriptorResponse) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.FileDescriptorResponse) + MergeFrom(*source); + } +} + +void FileDescriptorResponse::MergeFrom(const FileDescriptorResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.FileDescriptorResponse) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + file_descriptor_proto_.MergeFrom(from.file_descriptor_proto_); +} + +void FileDescriptorResponse::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.FileDescriptorResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void FileDescriptorResponse::CopyFrom(const FileDescriptorResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.FileDescriptorResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FileDescriptorResponse::IsInitialized() const { + + return true; +} + +void FileDescriptorResponse::Swap(FileDescriptorResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void FileDescriptorResponse::InternalSwap(FileDescriptorResponse* other) { + file_descriptor_proto_.UnsafeArenaSwap(&other->file_descriptor_proto_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata FileDescriptorResponse::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = FileDescriptorResponse_descriptor_; + metadata.reflection = FileDescriptorResponse_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// FileDescriptorResponse + +// repeated bytes file_descriptor_proto = 1; +int FileDescriptorResponse::file_descriptor_proto_size() const { + return file_descriptor_proto_.size(); +} +void FileDescriptorResponse::clear_file_descriptor_proto() { + file_descriptor_proto_.Clear(); +} + const ::std::string& FileDescriptorResponse::file_descriptor_proto(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) + return file_descriptor_proto_.Get(index); +} + ::std::string* FileDescriptorResponse::mutable_file_descriptor_proto(int index) { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) + return file_descriptor_proto_.Mutable(index); +} + void FileDescriptorResponse::set_file_descriptor_proto(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) + file_descriptor_proto_.Mutable(index)->assign(value); +} + void FileDescriptorResponse::set_file_descriptor_proto(int index, const char* value) { + file_descriptor_proto_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) +} + void FileDescriptorResponse::set_file_descriptor_proto(int index, const void* value, size_t size) { + file_descriptor_proto_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) +} + ::std::string* FileDescriptorResponse::add_file_descriptor_proto() { + // @@protoc_insertion_point(field_add_mutable:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) + return file_descriptor_proto_.Add(); +} + void FileDescriptorResponse::add_file_descriptor_proto(const ::std::string& value) { + file_descriptor_proto_.Add()->assign(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) +} + void FileDescriptorResponse::add_file_descriptor_proto(const char* value) { + file_descriptor_proto_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) +} + void FileDescriptorResponse::add_file_descriptor_proto(const void* value, size_t size) { + file_descriptor_proto_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) +} + const ::google::protobuf::RepeatedPtrField< ::std::string>& +FileDescriptorResponse::file_descriptor_proto() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) + return file_descriptor_proto_; +} + ::google::protobuf::RepeatedPtrField< ::std::string>* +FileDescriptorResponse::mutable_file_descriptor_proto() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.FileDescriptorResponse.file_descriptor_proto) + return &file_descriptor_proto_; +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ExtensionNumberResponse::kBaseTypeNameFieldNumber; +const int ExtensionNumberResponse::kExtensionNumberFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ExtensionNumberResponse::ExtensionNumberResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) +} + +void ExtensionNumberResponse::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +ExtensionNumberResponse::ExtensionNumberResponse(const ExtensionNumberResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) +} + +void ExtensionNumberResponse::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + base_type_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +ExtensionNumberResponse::~ExtensionNumberResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ExtensionNumberResponse) + SharedDtor(); +} + +void ExtensionNumberResponse::SharedDtor() { + base_type_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + } +} + +void ExtensionNumberResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ExtensionNumberResponse::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ExtensionNumberResponse_descriptor_; +} + +const ExtensionNumberResponse& ExtensionNumberResponse::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +ExtensionNumberResponse* ExtensionNumberResponse::default_instance_ = NULL; + +ExtensionNumberResponse* ExtensionNumberResponse::New(::google::protobuf::Arena* arena) const { + ExtensionNumberResponse* n = new ExtensionNumberResponse; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ExtensionNumberResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + extension_number_.Clear(); +} + +bool ExtensionNumberResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string base_type_name = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_base_type_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->base_type_name().data(), this->base_type_name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_extension_number; + break; + } + + // repeated int32 extension_number = 2; + case 2: { + if (tag == 18) { + parse_extension_number: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_extension_number()))); + } else if (tag == 16) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 18, input, this->mutable_extension_number()))); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ExtensionNumberResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ExtensionNumberResponse) + return false; +#undef DO_ +} + +void ExtensionNumberResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + // optional string base_type_name = 1; + if (this->base_type_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->base_type_name().data(), this->base_type_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->base_type_name(), output); + } + + // repeated int32 extension_number = 2; + if (this->extension_number_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_extension_number_cached_byte_size_); + } + for (int i = 0; i < this->extension_number_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->extension_number(i), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionNumberResponse) +} + +::google::protobuf::uint8* ExtensionNumberResponse::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + // optional string base_type_name = 1; + if (this->base_type_name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->base_type_name().data(), this->base_type_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->base_type_name(), target); + } + + // repeated int32 extension_number = 2; + if (this->extension_number_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 2, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _extension_number_cached_byte_size_, target); + } + for (int i = 0; i < this->extension_number_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->extension_number(i), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionNumberResponse) + return target; +} + +int ExtensionNumberResponse::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + int total_size = 0; + + // optional string base_type_name = 1; + if (this->base_type_name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->base_type_name()); + } + + // repeated int32 extension_number = 2; + { + int data_size = 0; + for (int i = 0; i < this->extension_number_size(); i++) { + data_size += ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->extension_number(i)); + } + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _extension_number_cached_byte_size_ = data_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ExtensionNumberResponse::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const ExtensionNumberResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ExtensionNumberResponse) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ExtensionNumberResponse) + MergeFrom(*source); + } +} + +void ExtensionNumberResponse::MergeFrom(const ExtensionNumberResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + extension_number_.MergeFrom(from.extension_number_); + if (from.base_type_name().size() > 0) { + + base_type_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.base_type_name_); + } +} + +void ExtensionNumberResponse::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ExtensionNumberResponse::CopyFrom(const ExtensionNumberResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ExtensionNumberResponse::IsInitialized() const { + + return true; +} + +void ExtensionNumberResponse::Swap(ExtensionNumberResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void ExtensionNumberResponse::InternalSwap(ExtensionNumberResponse* other) { + base_type_name_.Swap(&other->base_type_name_); + extension_number_.UnsafeArenaSwap(&other->extension_number_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ExtensionNumberResponse::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ExtensionNumberResponse_descriptor_; + metadata.reflection = ExtensionNumberResponse_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// ExtensionNumberResponse + +// optional string base_type_name = 1; +void ExtensionNumberResponse::clear_base_type_name() { + base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& ExtensionNumberResponse::base_type_name() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + return base_type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ExtensionNumberResponse::set_base_type_name(const ::std::string& value) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} + void ExtensionNumberResponse::set_base_type_name(const char* value) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} + void ExtensionNumberResponse::set_base_type_name(const char* value, size_t size) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} + ::std::string* ExtensionNumberResponse::mutable_base_type_name() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + return base_type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* ExtensionNumberResponse::release_base_type_name() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + + return base_type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ExtensionNumberResponse::set_allocated_base_type_name(::std::string* base_type_name) { + if (base_type_name != NULL) { + + } else { + + } + base_type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), base_type_name); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} + +// repeated int32 extension_number = 2; +int ExtensionNumberResponse::extension_number_size() const { + return extension_number_.size(); +} +void ExtensionNumberResponse::clear_extension_number() { + extension_number_.Clear(); +} + ::google::protobuf::int32 ExtensionNumberResponse::extension_number(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return extension_number_.Get(index); +} + void ExtensionNumberResponse::set_extension_number(int index, ::google::protobuf::int32 value) { + extension_number_.Set(index, value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) +} + void ExtensionNumberResponse::add_extension_number(::google::protobuf::int32 value) { + extension_number_.Add(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) +} + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +ExtensionNumberResponse::extension_number() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return extension_number_; +} + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +ExtensionNumberResponse::mutable_extension_number() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return &extension_number_; +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ListServiceResponse::kServiceFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ListServiceResponse::ListServiceResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ListServiceResponse) +} + +void ListServiceResponse::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +ListServiceResponse::ListServiceResponse(const ListServiceResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ListServiceResponse) +} + +void ListServiceResponse::SharedCtor() { + _is_default_instance_ = false; + _cached_size_ = 0; +} + +ListServiceResponse::~ListServiceResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ListServiceResponse) + SharedDtor(); +} + +void ListServiceResponse::SharedDtor() { + if (this != default_instance_) { + } +} + +void ListServiceResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ListServiceResponse::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ListServiceResponse_descriptor_; +} + +const ListServiceResponse& ListServiceResponse::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +ListServiceResponse* ListServiceResponse::default_instance_ = NULL; + +ListServiceResponse* ListServiceResponse::New(::google::protobuf::Arena* arena) const { + ListServiceResponse* n = new ListServiceResponse; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ListServiceResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ListServiceResponse) + service_.Clear(); +} + +bool ListServiceResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ListServiceResponse) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; + case 1: { + if (tag == 10) { + DO_(input->IncrementRecursionDepth()); + parse_loop_service: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtualNoRecursionDepth( + input, add_service())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(10)) goto parse_loop_service; + input->UnsafeDecrementRecursionDepth(); + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ListServiceResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ListServiceResponse) + return false; +#undef DO_ +} + +void ListServiceResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ListServiceResponse) + // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; + for (unsigned int i = 0, n = this->service_size(); i < n; i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 1, this->service(i), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ListServiceResponse) +} + +::google::protobuf::uint8* ListServiceResponse::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ListServiceResponse) + // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; + for (unsigned int i = 0, n = this->service_size(); i < n; i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 1, this->service(i), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ListServiceResponse) + return target; +} + +int ListServiceResponse::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ListServiceResponse) + int total_size = 0; + + // repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; + total_size += 1 * this->service_size(); + for (int i = 0; i < this->service_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->service(i)); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ListServiceResponse::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ListServiceResponse) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const ListServiceResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ListServiceResponse) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ListServiceResponse) + MergeFrom(*source); + } +} + +void ListServiceResponse::MergeFrom(const ListServiceResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ListServiceResponse) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + service_.MergeFrom(from.service_); +} + +void ListServiceResponse::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ListServiceResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ListServiceResponse::CopyFrom(const ListServiceResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ListServiceResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ListServiceResponse::IsInitialized() const { + + return true; +} + +void ListServiceResponse::Swap(ListServiceResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void ListServiceResponse::InternalSwap(ListServiceResponse* other) { + service_.UnsafeArenaSwap(&other->service_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ListServiceResponse::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ListServiceResponse_descriptor_; + metadata.reflection = ListServiceResponse_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// ListServiceResponse + +// repeated .grpc.reflection.v1alpha.ServiceResponse service = 1; +int ListServiceResponse::service_size() const { + return service_.size(); +} +void ListServiceResponse::clear_service() { + service_.Clear(); +} +const ::grpc::reflection::v1alpha::ServiceResponse& ListServiceResponse::service(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Get(index); +} +::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::mutable_service(int index) { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Mutable(index); +} +::grpc::reflection::v1alpha::ServiceResponse* ListServiceResponse::add_service() { + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Add(); +} +::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >* +ListServiceResponse::mutable_service() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.service) + return &service_; +} +const ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse >& +ListServiceResponse::service() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_; +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ServiceResponse::kNameFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ServiceResponse::ServiceResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ServiceResponse) +} + +void ServiceResponse::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +ServiceResponse::ServiceResponse(const ServiceResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ServiceResponse) +} + +void ServiceResponse::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +ServiceResponse::~ServiceResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ServiceResponse) + SharedDtor(); +} + +void ServiceResponse::SharedDtor() { + name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + } +} + +void ServiceResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ServiceResponse::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ServiceResponse_descriptor_; +} + +const ServiceResponse& ServiceResponse::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +ServiceResponse* ServiceResponse::default_instance_ = NULL; + +ServiceResponse* ServiceResponse::New(::google::protobuf::Arena* arena) const { + ServiceResponse* n = new ServiceResponse; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ServiceResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ServiceResponse) + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +bool ServiceResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ServiceResponse) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string name = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_name())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ServiceResponse.name")); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ServiceResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ServiceResponse) + return false; +#undef DO_ +} + +void ServiceResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ServiceResponse) + // optional string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServiceResponse.name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->name(), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ServiceResponse) +} + +::google::protobuf::uint8* ServiceResponse::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ServiceResponse) + // optional string name = 1; + if (this->name().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->name().data(), this->name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ServiceResponse.name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->name(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ServiceResponse) + return target; +} + +int ServiceResponse::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ServiceResponse) + int total_size = 0; + + // optional string name = 1; + if (this->name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->name()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ServiceResponse::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ServiceResponse) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const ServiceResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ServiceResponse) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ServiceResponse) + MergeFrom(*source); + } +} + +void ServiceResponse::MergeFrom(const ServiceResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ServiceResponse) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + if (from.name().size() > 0) { + + name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + } +} + +void ServiceResponse::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ServiceResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ServiceResponse::CopyFrom(const ServiceResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ServiceResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ServiceResponse::IsInitialized() const { + + return true; +} + +void ServiceResponse::Swap(ServiceResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void ServiceResponse::InternalSwap(ServiceResponse* other) { + name_.Swap(&other->name_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ServiceResponse::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ServiceResponse_descriptor_; + metadata.reflection = ServiceResponse_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// ServiceResponse + +// optional string name = 1; +void ServiceResponse::clear_name() { + name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& ServiceResponse::name() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServiceResponse.name) + return name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ServiceResponse::set_name(const ::std::string& value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ServiceResponse.name) +} + void ServiceResponse::set_name(const char* value) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ServiceResponse.name) +} + void ServiceResponse::set_name(const char* value, size_t size) { + + name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ServiceResponse.name) +} + ::std::string* ServiceResponse::mutable_name() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ServiceResponse.name) + return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* ServiceResponse::release_name() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ServiceResponse.name) + + return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ServiceResponse::set_allocated_name(::std::string* name) { + if (name != NULL) { + + } else { + + } + name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServiceResponse.name) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ErrorResponse::kErrorCodeFieldNumber; +const int ErrorResponse::kErrorMessageFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ErrorResponse::ErrorResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ErrorResponse) +} + +void ErrorResponse::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +ErrorResponse::ErrorResponse(const ErrorResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ErrorResponse) +} + +void ErrorResponse::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + error_code_ = 0; + error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +ErrorResponse::~ErrorResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ErrorResponse) + SharedDtor(); +} + +void ErrorResponse::SharedDtor() { + error_message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + } +} + +void ErrorResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ErrorResponse::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ErrorResponse_descriptor_; +} + +const ErrorResponse& ErrorResponse::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +ErrorResponse* ErrorResponse::default_instance_ = NULL; + +ErrorResponse* ErrorResponse::New(::google::protobuf::Arena* arena) const { + ErrorResponse* n = new ErrorResponse; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ErrorResponse::Clear() { +// @@protoc_insertion_point(message_clear_start:grpc.reflection.v1alpha.ErrorResponse) + error_code_ = 0; + error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +bool ErrorResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ErrorResponse) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional int32 error_code = 1; + case 1: { + if (tag == 8) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &error_code_))); + + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_error_message; + break; + } + + // optional string error_message = 2; + case 2: { + if (tag == 18) { + parse_error_message: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_error_message())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->error_message().data(), this->error_message().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ErrorResponse.error_message")); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ErrorResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ErrorResponse) + return false; +#undef DO_ +} + +void ErrorResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ErrorResponse) + // optional int32 error_code = 1; + if (this->error_code() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->error_code(), output); + } + + // optional string error_message = 2; + if (this->error_message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->error_message().data(), this->error_message().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ErrorResponse.error_message"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->error_message(), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ErrorResponse) +} + +::google::protobuf::uint8* ErrorResponse::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ErrorResponse) + // optional int32 error_code = 1; + if (this->error_code() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->error_code(), target); + } + + // optional string error_message = 2; + if (this->error_message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->error_message().data(), this->error_message().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ErrorResponse.error_message"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->error_message(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ErrorResponse) + return target; +} + +int ErrorResponse::ByteSize() const { +// @@protoc_insertion_point(message_byte_size_start:grpc.reflection.v1alpha.ErrorResponse) + int total_size = 0; + + // optional int32 error_code = 1; + if (this->error_code() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->error_code()); + } + + // optional string error_message = 2; + if (this->error_message().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->error_message()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ErrorResponse::MergeFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_merge_from_start:grpc.reflection.v1alpha.ErrorResponse) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const ErrorResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + // @@protoc_insertion_point(generalized_merge_from_cast_fail:grpc.reflection.v1alpha.ErrorResponse) + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + // @@protoc_insertion_point(generalized_merge_from_cast_success:grpc.reflection.v1alpha.ErrorResponse) + MergeFrom(*source); + } +} + +void ErrorResponse::MergeFrom(const ErrorResponse& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:grpc.reflection.v1alpha.ErrorResponse) + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + if (from.error_code() != 0) { + set_error_code(from.error_code()); + } + if (from.error_message().size() > 0) { + + error_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_message_); + } +} + +void ErrorResponse::CopyFrom(const ::google::protobuf::Message& from) { +// @@protoc_insertion_point(generalized_copy_from_start:grpc.reflection.v1alpha.ErrorResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ErrorResponse::CopyFrom(const ErrorResponse& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:grpc.reflection.v1alpha.ErrorResponse) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ErrorResponse::IsInitialized() const { + + return true; +} + +void ErrorResponse::Swap(ErrorResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void ErrorResponse::InternalSwap(ErrorResponse* other) { + std::swap(error_code_, other->error_code_); + error_message_.Swap(&other->error_message_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ErrorResponse::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ErrorResponse_descriptor_; + metadata.reflection = ErrorResponse_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// ErrorResponse + +// optional int32 error_code = 1; +void ErrorResponse::clear_error_code() { + error_code_ = 0; +} + ::google::protobuf::int32 ErrorResponse::error_code() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_code) + return error_code_; +} + void ErrorResponse::set_error_code(::google::protobuf::int32 value) { + + error_code_ = value; + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_code) +} + +// optional string error_message = 2; +void ErrorResponse::clear_error_message() { + error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& ErrorResponse::error_message() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_message) + return error_message_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ErrorResponse::set_error_message(const ::std::string& value) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_message) +} + void ErrorResponse::set_error_message(const char* value) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ErrorResponse.error_message) +} + void ErrorResponse::set_error_message(const char* value, size_t size) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ErrorResponse.error_message) +} + ::std::string* ErrorResponse::mutable_error_message() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ErrorResponse.error_message) + return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* ErrorResponse::release_error_message() { + // @@protoc_insertion_point(field_release:grpc.reflection.v1alpha.ErrorResponse.error_message) + + return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ErrorResponse::set_allocated_error_message(::std::string* error_message) { + if (error_message != NULL) { + + } else { + + } + error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace v1alpha +} // namespace reflection +} // namespace grpc + +// @@protoc_insertion_point(global_scope) diff --git a/templates/Makefile.template b/templates/Makefile.template index aa7b8bb0e2..0d5f0ec5b5 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -113,7 +113,6 @@ OBJDIR = $(BUILDDIR_ABSOLUTE)/objs LIBDIR = $(BUILDDIR_ABSOLUTE)/libs GENDIR = $(BUILDDIR_ABSOLUTE)/gens - EXTDIR = $(BUILDDIR_ABSOLUTE)/extensions # Configurations @@ -248,7 +247,7 @@ LDFLAGS += -fPIC endif - INCLUDES = . include $(GENDIR) $(EXTDIR) $(EXTDIR)/include + INCLUDES = . include $(GENDIR) LDFLAGS += -Llibs/$(CONFIG) ifeq ($(SYSTEM),Darwin) @@ -1289,8 +1288,8 @@ install-headers_cxx: $(E) "[INSTALL] Installing public C++ headers" - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(patsubst extensions/%,%,$(dir $(h))) && ) exit 0 || exit 1 - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(patsubst extensions/%,%,$(h)) && ) exit 0 || exit 1 + $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(dir $(h)) && ) exit 0 || exit 1 + $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1 install-static: install-static_c install-static_cxx diff --git a/test/cpp/end2end/proto_server_reflection_test.cc b/test/cpp/end2end/proto_server_reflection_test.cc index 300b209113..f8fc39b553 100644 --- a/test/cpp/end2end/proto_server_reflection_test.cc +++ b/test/cpp/end2end/proto_server_reflection_test.cc @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index 7656a496c2..d7b2163cea 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -40,7 +40,7 @@ #include #include #include -#include +#include namespace grpc { diff --git a/tools/codegen/extensions/gen_reflection_proto.sh b/tools/codegen/extensions/gen_reflection_proto.sh index de970b9f7f..45a1a9f4ec 100755 --- a/tools/codegen/extensions/gen_reflection_proto.sh +++ b/tools/codegen/extensions/gen_reflection_proto.sh @@ -31,9 +31,9 @@ PROTO_DIR="src/proto/grpc/reflection/v1alpha" PROTO_FILE="reflection" -HEADER_DIR="extensions/include/grpc++/impl" -SRC_DIR="extensions/reflection" -INCLUDE_DIR="grpc++/impl" +HEADER_DIR="include/grpc++/ext" +SRC_DIR="src/cpp/ext" +INCLUDE_DIR="grpc++/ext" TMP_DIR="tmp" GRPC_PLUGIN="bins/opt/grpc_cpp_plugin" PROTOC=third_party/protobuf/src/protoc diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 7ad61845d5..f41bb09adb 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4375,22 +4375,22 @@ "grpc++_base" ], "headers": [ - "extensions/include/grpc++/impl/proto_server_reflection_plugin.h", - "extensions/include/grpc++/impl/reflection.grpc.pb.h", - "extensions/include/grpc++/impl/reflection.pb.h", - "extensions/reflection/proto_server_reflection.h" + "include/grpc++/ext/proto_server_reflection_plugin.h", + "include/grpc++/ext/reflection.grpc.pb.h", + "include/grpc++/ext/reflection.pb.h", + "src/cpp/ext/proto_server_reflection.h" ], "language": "c++", "name": "grpc++_reflection", "src": [ - "extensions/include/grpc++/impl/proto_server_reflection_plugin.h", - "extensions/include/grpc++/impl/reflection.grpc.pb.h", - "extensions/include/grpc++/impl/reflection.pb.h", - "extensions/reflection/proto_server_reflection.cc", - "extensions/reflection/proto_server_reflection.h", - "extensions/reflection/proto_server_reflection_plugin.cc", - "extensions/reflection/reflection.grpc.pb.cc", - "extensions/reflection/reflection.pb.cc" + "include/grpc++/ext/proto_server_reflection_plugin.h", + "include/grpc++/ext/reflection.grpc.pb.h", + "include/grpc++/ext/reflection.pb.h", + "src/cpp/ext/proto_server_reflection.cc", + "src/cpp/ext/proto_server_reflection.h", + "src/cpp/ext/proto_server_reflection_plugin.cc", + "src/cpp/ext/reflection.grpc.pb.cc", + "src/cpp/ext/reflection.pb.cc" ], "third_party": false, "type": "lib" diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj index 82b2b85f9e..75c9e8e591 100644 --- a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj +++ b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj @@ -147,21 +147,21 @@ - - - + + + - + - + - + - + - + diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters index a5457bed00..70d3d45372 100644 --- a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters @@ -1,51 +1,54 @@ - - extensions\reflection + + src\cpp\ext - - extensions\reflection + + src\cpp\ext - - extensions\reflection + + src\cpp\ext - - extensions\reflection + + src\cpp\ext - - extensions\include\grpc++\impl + + include\grpc++\ext - - extensions\include\grpc++\impl + + include\grpc++\ext - - extensions\include\grpc++\impl + + include\grpc++\ext - - extensions\reflection + + src\cpp\ext - - {8fd45ce8-8f02-367f-e3f7-4c0ae0e36566} + + {e9441021-f78a-ec84-7efd-1883975feddb} - - {1a18dfcc-bedf-226e-6929-377aba53249b} + + {c66e66b4-a64e-79bf-40e8-1a1bac124a3d} - - {83bf0cce-01da-a93c-0ff3-a1abca63ec5f} + + {8d96203b-d3ce-2164-74a6-06e0ff2b09af} - - {d34e8821-f67b-a793-3419-e2781ab9b3ee} + + {5ec5476e-3d72-e3f9-4f05-3f7c31c13651} - - {11feb184-a1d9-5485-26f0-538ddb50deff} + + {a642ac8e-cec2-35d3-9a8a-78313d03b440} + + + {d0204618-0f6a-dbc6-cf41-ffc04e76075a} -- cgit v1.2.3 From 7ae31a88980cba5e7e0173cad91e62dbfe1b0374 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 6 Jun 2016 14:21:11 -0700 Subject: Add more comments, fix format issues --- .../grpc++/ext/proto_server_reflection_plugin.h | 10 ++++-- src/cpp/ext/proto_server_reflection.cc | 14 +++++--- src/cpp/ext/proto_server_reflection.h | 22 ++++++------- src/cpp/ext/proto_server_reflection_plugin.cc | 6 ++-- .../util/proto_reflection_descriptor_database.h | 37 +++++++++++++++++----- tools/distrib/check_include_guards.py | 2 ++ .../clang_format_all_the_things.sh | 2 +- .../run_tests/sanity/check_sources_and_headers.py | 3 -- 8 files changed, 63 insertions(+), 33 deletions(-) (limited to 'test/cpp') diff --git a/include/grpc++/ext/proto_server_reflection_plugin.h b/include/grpc++/ext/proto_server_reflection_plugin.h index 774d3439e7..517c4737f5 100644 --- a/include/grpc++/ext/proto_server_reflection_plugin.h +++ b/include/grpc++/ext/proto_server_reflection_plugin.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H -#define GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H +#ifndef GRPCXX_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H +#define GRPCXX_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H #include #include @@ -59,7 +59,11 @@ class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { std::shared_ptr<::grpc::ProtoServerReflection> reflection_service_; }; +// Add proto reflection plugin to ServerBuilder. This function should be called +// at the static initialization time. +void InitProtoReflectionServerBuilderPlugin(); + } // namespace reflection } // namespace grpc -#endif // GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H +#endif // GRPCXX_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H diff --git a/src/cpp/ext/proto_server_reflection.cc b/src/cpp/ext/proto_server_reflection.cc index 6e54bc2720..348a035f0f 100644 --- a/src/cpp/ext/proto_server_reflection.cc +++ b/src/cpp/ext/proto_server_reflection.cc @@ -131,7 +131,8 @@ Status ProtoServerReflection::GetFileByName( return Status::CANCELLED; } - const protobuf::FileDescriptor* file_desc = descriptor_pool_->FindFileByName(filename); + const protobuf::FileDescriptor* file_desc = + descriptor_pool_->FindFileByName(filename); if (file_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "File not found."); } @@ -170,8 +171,9 @@ Status ProtoServerReflection::GetFileContainingExtension( return Status(StatusCode::NOT_FOUND, "Type not found."); } - const protobuf::FieldDescriptor* field_desc = descriptor_pool_->FindExtensionByNumber( - desc, request->extension_number()); + const protobuf::FieldDescriptor* field_desc = + descriptor_pool_->FindExtensionByNumber(desc, + request->extension_number()); if (field_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Extension not found."); } @@ -187,7 +189,8 @@ Status ProtoServerReflection::GetAllExtensionNumbers( return Status::CANCELLED; } - const protobuf::Descriptor* desc = descriptor_pool_->FindMessageTypeByName(type); + const protobuf::Descriptor* desc = + descriptor_pool_->FindMessageTypeByName(type); if (desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Type not found."); } @@ -202,7 +205,8 @@ Status ProtoServerReflection::GetAllExtensionNumbers( } void ProtoServerReflection::FillFileDescriptorResponse( - const protobuf::FileDescriptor* file_desc, ServerReflectionResponse* response, + const protobuf::FileDescriptor* file_desc, + ServerReflectionResponse* response, std::unordered_set* seen_files) { if (seen_files->find(file_desc->name()) != seen_files->end()) { return; diff --git a/src/cpp/ext/proto_server_reflection.h b/src/cpp/ext/proto_server_reflection.h index e7ab1fdf34..23c130513d 100644 --- a/src/cpp/ext/proto_server_reflection.h +++ b/src/cpp/ext/proto_server_reflection.h @@ -30,16 +30,14 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ - -#ifndef GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H -#define GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H +#ifndef GRPC_INTERNAL_CPP_EXT_PROTO_SERVER_REFLECTION_H +#define GRPC_INTERNAL_CPP_EXT_PROTO_SERVER_REFLECTION_H #include #include -#include - #include +#include namespace grpc { @@ -48,21 +46,23 @@ class ProtoServerReflection GRPC_FINAL public: ProtoServerReflection(); + // Add the full names of registered services void SetServiceList(const std::vector* services); + // implementation of ServerReflectionInfo(stream ServerReflectionRequest) rpc + // in ServerReflection service Status ServerReflectionInfo( ServerContext* context, ServerReaderWriter* - stream) GRPC_OVERRIDE; + reflection::v1alpha::ServerReflectionRequest>* stream) + GRPC_OVERRIDE; private: Status ListService(ServerContext* context, reflection::v1alpha::ListServiceResponse* response); - Status GetFileByName( - ServerContext* context, const grpc::string& file_name, - reflection::v1alpha::ServerReflectionResponse* response); + Status GetFileByName(ServerContext* context, const grpc::string& file_name, + reflection::v1alpha::ServerReflectionResponse* response); Status GetFileContainingSymbol( ServerContext* context, const grpc::string& symbol, @@ -91,4 +91,4 @@ class ProtoServerReflection GRPC_FINAL } // namespace grpc -#endif // GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H +#endif // GRPC_INTERNAL_CPP_EXT_PROTO_SERVER_REFLECTION_H diff --git a/src/cpp/ext/proto_server_reflection_plugin.cc b/src/cpp/ext/proto_server_reflection_plugin.cc index becc949359..f31d102a9e 100644 --- a/src/cpp/ext/proto_server_reflection_plugin.cc +++ b/src/cpp/ext/proto_server_reflection_plugin.cc @@ -78,16 +78,18 @@ static std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { new ProtoServerReflectionPlugin()); } -static void AddProtoReflectionServerBuilderPlugin() { +void InitProtoReflectionServerBuilderPlugin() { static bool already_here = false; if (already_here) return; already_here = true; ::grpc::ServerBuilder::InternalAddPluginFactory(&CreateProtoReflection); } +// Force InitProtoReflectionServerBuilderPlugin() to be called at static +// initialization time. struct StaticProtoReflectionPluginInitializer { StaticProtoReflectionPluginInitializer() { - AddProtoReflectionServerBuilderPlugin(); + InitProtoReflectionServerBuilderPlugin(); } } static_proto_reflection_plugin_initializer; diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index d7b2163cea..99c00675bb 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -30,6 +30,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ +#ifndef GRPC_TEST_CPP_PROTO_SERVER_REFLECTION_DATABSE_H +#define GRPC_TEST_CPP_PROTO_SERVER_REFLECTION_DATABSE_H #include #include @@ -39,11 +41,14 @@ #include #include #include -#include #include +#include namespace grpc { +// ProtoReflectionDescriptorDatabase takes a stub of ServerReflection and +// provides the methods defined by DescriptorDatabase interfaces. It can be used +// to feed a DescriptorPool instance. class ProtoReflectionDescriptorDatabase : public google::protobuf::DescriptorDatabase { public: @@ -55,28 +60,42 @@ class ProtoReflectionDescriptorDatabase virtual ~ProtoReflectionDescriptorDatabase(); - // DescriptorDatabase methods + // The following four methods implement DescriptorDatabase interfaces. + // + // Find a file by file name. Fills in in *output and returns true if found. + // Otherwise, returns false, leaving the contents of *output undefined. bool FindFileByName(const string& filename, google::protobuf::FileDescriptorProto* output) GRPC_OVERRIDE; + // Find the file that declares the given fully-qualified symbol name. + // If found, fills in *output and returns true, otherwise returns false + // and leaves *output undefined. bool FindFileContainingSymbol(const string& symbol_name, google::protobuf::FileDescriptorProto* output) GRPC_OVERRIDE; + // Find the file which defines an extension extending the given message type + // with the given field number. If found, fills in *output and returns true, + // otherwise returns false and leaves *output undefined. containing_type + // must be a fully-qualified type name. bool FindFileContainingExtension( const string& containing_type, int field_number, google::protobuf::FileDescriptorProto* output) GRPC_OVERRIDE; + // Finds the tag numbers used by all known extensions of + // extendee_type, and appends them to output in an undefined + // order. This method is best-effort: it's not guaranteed that the + // database will find all extensions, and it's not guaranteed that + // FindFileContainingExtension will return true on all of the found + // numbers. Returns true if the search was successful, otherwise + // returns false and leaves output unchanged. bool FindAllExtensionNumbers(const string& extendee_type, std::vector* output) GRPC_OVERRIDE; + // Provide a list of full names of registered services bool GetServices(std::vector* output); - grpc::reflection::v1alpha::ServerReflection::Stub* stub() { - return stub_.get(); - } - private: typedef ClientReaderWriter< grpc::reflection::v1alpha::ServerReflectionRequest, @@ -92,8 +111,8 @@ class ProtoReflectionDescriptorDatabase const std::shared_ptr GetStream(); void DoOneRequest( - const grpc::reflection::v1alpha::ServerReflectionRequest& request, - grpc::reflection::v1alpha::ServerReflectionResponse& response); + const grpc::reflection::v1alpha::ServerReflectionRequest& request, + grpc::reflection::v1alpha::ServerReflectionResponse& response); std::shared_ptr stream_; grpc::ClientContext ctx_; @@ -108,3 +127,5 @@ class ProtoReflectionDescriptorDatabase }; } // namespace grpc + +#endif // GRPC_TEST_CPP_METRICS_SERVER_H diff --git a/tools/distrib/check_include_guards.py b/tools/distrib/check_include_guards.py index 9c23a70e00..874ddfe53a 100755 --- a/tools/distrib/check_include_guards.py +++ b/tools/distrib/check_include_guards.py @@ -171,6 +171,8 @@ args = argp.parse_args() KNOWN_BAD = set([ 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', + 'include/grpc++/ext/reflection.grpc.pb.h', + 'include/grpc++/ext/reflection.pb.h', ]) diff --git a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh index 6f4155944c..eab7611b3f 100755 --- a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh +++ b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh @@ -44,7 +44,7 @@ for dir in $DIRS do for glob in $GLOB do - files="$files `find /local-code/$dir -name $glob -and -not -name *.generated.* -and -not -name *.pb.h -and -not -name *.pb.c`" + files="$files `find /local-code/$dir -name $glob -and -not -name *.generated.* -and -not -name *.pb.h -and -not -name *.pb.c -and -not -name *.pb.cc`" done done diff --git a/tools/run_tests/sanity/check_sources_and_headers.py b/tools/run_tests/sanity/check_sources_and_headers.py index 0eb804eb5b..c028499ca6 100755 --- a/tools/run_tests/sanity/check_sources_and_headers.py +++ b/tools/run_tests/sanity/check_sources_and_headers.py @@ -57,9 +57,6 @@ def target_has_header(target, name): return True if name == 'src/core/lib/profiling/stap_probes.h': return True - if not name.startswith('extensions') \ - and target_has_header(target, 'extensions/' + name): - return True return False def produces_object(name): -- cgit v1.2.3 From 000aa457dccfb684136635647ff42b1fce58073f Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 7 Jun 2016 13:08:39 -0700 Subject: add a test with empty request --- test/cpp/end2end/end2end_test.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/cpp') diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index f52aa52f39..e3667cf26b 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -1014,6 +1014,16 @@ TEST_P(ProxyEnd2endTest, SimpleRpc) { SendRpc(stub_.get(), 1, false); } +TEST_P(ProxyEnd2endTest, SimpleRpcWithEmptyMessages) { + ResetStub(); + EchoRequest request; + EchoResponse response; + + ClientContext context; + Status s = stub_->Echo(&context, request, &response); + EXPECT_TRUE(s.ok()); +} + TEST_P(ProxyEnd2endTest, MultipleRpcs) { ResetStub(); std::vector threads; -- cgit v1.2.3 From e27d189f2165e904dbb3d61616edf3c643df71f0 Mon Sep 17 00:00:00 2001 From: David Klempner Date: Thu, 19 May 2016 13:50:16 -0700 Subject: Factor out json seriailzation code and move it into parse_json. This is for the same reasons as ParseJson, that is so that we can limit the scope of the proto namespace differences between internal and external. --- Makefile | 6 +++--- build.yaml | 5 ++--- test/cpp/qps/parse_json.cc | 15 +++++++++++++++ test/cpp/qps/parse_json.h | 3 +++ test/cpp/qps/report.cc | 18 +++--------------- tools/run_tests/sources_and_headers.json | 9 ++++----- vsprojects/vcxproj/qps/qps.vcxproj | 3 +++ vsprojects/vcxproj/qps/qps.vcxproj.filters | 6 ++++++ .../test/qps_json_driver/qps_json_driver.vcxproj | 5 ----- .../qps_json_driver/qps_json_driver.vcxproj.filters | 8 -------- 10 files changed, 39 insertions(+), 39 deletions(-) (limited to 'test/cpp') diff --git a/Makefile b/Makefile index fdbedfd276..a2815ff663 100644 --- a/Makefile +++ b/Makefile @@ -4255,6 +4255,7 @@ LIBQPS_SRC = \ test/cpp/qps/client_sync.cc \ test/cpp/qps/driver.cc \ test/cpp/qps/limit_cores.cc \ + test/cpp/qps/parse_json.cc \ test/cpp/qps/qps_worker.cc \ test/cpp/qps/report.cc \ test/cpp/qps/server_async.cc \ @@ -4310,6 +4311,7 @@ $(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/src/proto/grpc/testin $(OBJDIR)/$(CONFIG)/test/cpp/qps/client_sync.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/qps/driver.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/qps/limit_cores.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/qps/parse_json.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_worker.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/qps/report.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/qps/server_async.o: $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/control.pb.cc $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/services.pb.cc $(GENDIR)/src/proto/grpc/testing/services.grpc.pb.cc @@ -11331,7 +11333,6 @@ endif QPS_JSON_DRIVER_SRC = \ - test/cpp/qps/parse_json.cc \ test/cpp/qps/qps_json_driver.cc \ QPS_JSON_DRIVER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(QPS_JSON_DRIVER_SRC)))) @@ -11363,8 +11364,6 @@ endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/parse_json.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a - $(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_json_driver.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a deps_qps_json_driver: $(QPS_JSON_DRIVER_OBJS:.o=.dep) @@ -14577,6 +14576,7 @@ test/cpp/qps/client_async.cc: $(OPENSSL_DEP) test/cpp/qps/client_sync.cc: $(OPENSSL_DEP) test/cpp/qps/driver.cc: $(OPENSSL_DEP) test/cpp/qps/limit_cores.cc: $(OPENSSL_DEP) +test/cpp/qps/parse_json.cc: $(OPENSSL_DEP) test/cpp/qps/qps_worker.cc: $(OPENSSL_DEP) test/cpp/qps/report.cc: $(OPENSSL_DEP) test/cpp/qps/server_async.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 8c09c55335..75d21b556d 100644 --- a/build.yaml +++ b/build.yaml @@ -1120,6 +1120,7 @@ libs: - test/cpp/qps/histogram.h - test/cpp/qps/interarrival.h - test/cpp/qps/limit_cores.h + - test/cpp/qps/parse_json.h - test/cpp/qps/qps_worker.h - test/cpp/qps/report.h - test/cpp/qps/server.h @@ -1136,6 +1137,7 @@ libs: - test/cpp/qps/client_sync.cc - test/cpp/qps/driver.cc - test/cpp/qps/limit_cores.cc + - test/cpp/qps/parse_json.cc - test/cpp/qps/qps_worker.cc - test/cpp/qps/report.cc - test/cpp/qps/server_async.cc @@ -2811,10 +2813,7 @@ targets: build: test run: false language: c++ - headers: - - test/cpp/qps/parse_json.h src: - - test/cpp/qps/parse_json.cc - test/cpp/qps/qps_json_driver.cc deps: - qps diff --git a/test/cpp/qps/parse_json.cc b/test/cpp/qps/parse_json.cc index a90bf6153c..be804281f8 100644 --- a/test/cpp/qps/parse_json.cc +++ b/test/cpp/qps/parse_json.cc @@ -61,5 +61,20 @@ void ParseJson(const grpc::string& json, const grpc::string& type, GPR_ASSERT(msg->ParseFromString(binary)); } +grpc::string SerializeJson(const GRPC_CUSTOM_MESSAGE& msg, + const grpc::string& type) { + std::unique_ptr type_resolver( + google::protobuf::util::NewTypeResolverForDescriptorPool( + "type.googleapis.com", + google::protobuf::DescriptorPool::generated_pool())); + grpc::string binary; + grpc::string json_string; + msg.SerializeToString(&binary); + auto status = + BinaryToJsonString(type_resolver.get(), type, binary, &json_string); + GPR_ASSERT(status.ok()); + return json_string; +} + } // testing } // grpc diff --git a/test/cpp/qps/parse_json.h b/test/cpp/qps/parse_json.h index 42d7d22c53..ce1821f961 100644 --- a/test/cpp/qps/parse_json.h +++ b/test/cpp/qps/parse_json.h @@ -43,6 +43,9 @@ namespace testing { void ParseJson(const grpc::string& json, const grpc::string& type, GRPC_CUSTOM_MESSAGE* msg); +grpc::string SerializeJson(const GRPC_CUSTOM_MESSAGE& msg, + const grpc::string& type); + } // testing } // grpc diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index 3ae41399cf..2ec7d8676c 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -35,11 +35,9 @@ #include -#include -#include - #include #include "test/cpp/qps/driver.h" +#include "test/cpp/qps/parse_json.h" #include "test/cpp/qps/stats.h" namespace grpc { @@ -104,18 +102,8 @@ void GprLogReporter::ReportTimes(const ScenarioResult& result) { } void JsonReporter::ReportQPS(const ScenarioResult& result) { - std::unique_ptr type_resolver( - google::protobuf::util::NewTypeResolverForDescriptorPool( - "type.googleapis.com", - google::protobuf::DescriptorPool::generated_pool())); - grpc::string binary; - grpc::string json_string; - result.SerializeToString(&binary); - auto status = BinaryToJsonString( - type_resolver.get(), "type.googleapis.com/grpc.testing.ScenarioResult", - binary, &json_string); - GPR_ASSERT(status.ok()); - + grpc::string json_string = + SerializeJson(result, "type.googleapis.com/grpc.testing.ScenarioResult"); std::ofstream output_file(report_file_); output_file << json_string; output_file.close(); diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 325aca18a7..b1e0126542 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -2361,14 +2361,10 @@ "grpc_test_util", "qps" ], - "headers": [ - "test/cpp/qps/parse_json.h" - ], + "headers": [], "language": "c++", "name": "qps_json_driver", "src": [ - "test/cpp/qps/parse_json.cc", - "test/cpp/qps/parse_json.h", "test/cpp/qps/qps_json_driver.cc" ], "third_party": false, @@ -4546,6 +4542,7 @@ "test/cpp/qps/histogram.h", "test/cpp/qps/interarrival.h", "test/cpp/qps/limit_cores.h", + "test/cpp/qps/parse_json.h", "test/cpp/qps/qps_worker.h", "test/cpp/qps/report.h", "test/cpp/qps/server.h", @@ -4565,6 +4562,8 @@ "test/cpp/qps/interarrival.h", "test/cpp/qps/limit_cores.cc", "test/cpp/qps/limit_cores.h", + "test/cpp/qps/parse_json.cc", + "test/cpp/qps/parse_json.h", "test/cpp/qps/qps_worker.cc", "test/cpp/qps/qps_worker.h", "test/cpp/qps/report.cc", diff --git a/vsprojects/vcxproj/qps/qps.vcxproj b/vsprojects/vcxproj/qps/qps.vcxproj index 32413625ed..004cf7c9f0 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj +++ b/vsprojects/vcxproj/qps/qps.vcxproj @@ -152,6 +152,7 @@ + @@ -208,6 +209,8 @@ + + diff --git a/vsprojects/vcxproj/qps/qps.vcxproj.filters b/vsprojects/vcxproj/qps/qps.vcxproj.filters index 54d438f536..d3a440ba73 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj.filters +++ b/vsprojects/vcxproj/qps/qps.vcxproj.filters @@ -28,6 +28,9 @@ test\cpp\qps + + test\cpp\qps + test\cpp\qps @@ -63,6 +66,9 @@ test\cpp\qps + + test\cpp\qps + test\cpp\qps diff --git a/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj b/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj index 3884c10236..d1dea3ec4a 100644 --- a/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj +++ b/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj @@ -160,11 +160,6 @@ - - - - - diff --git a/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj.filters b/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj.filters index cde967fc27..62b9be85cc 100644 --- a/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj.filters +++ b/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj.filters @@ -1,18 +1,10 @@ - - test\cpp\qps - test\cpp\qps - - - test\cpp\qps - - -- cgit v1.2.3 From 0ba114408ebb153b29c85dd8be9847095a6a6954 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 10 Jun 2016 15:15:44 -0700 Subject: Fix gpr_log format mismatches in c++ tests --- include/grpc/support/string_util.h | 4 ++-- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 4 ++-- test/cpp/end2end/async_end2end_test.cc | 3 ++- test/cpp/interop/client.cc | 5 +++-- test/cpp/interop/interop_client.cc | 10 ++++++---- test/cpp/interop/metrics_client.cc | 2 +- test/cpp/qps/driver.cc | 8 ++++---- test/cpp/qps/parse_json.cc | 2 +- 8 files changed, 21 insertions(+), 17 deletions(-) (limited to 'test/cpp') diff --git a/include/grpc/support/string_util.h b/include/grpc/support/string_util.h index 05cbd3b8c9..952cbfc26b 100644 --- a/include/grpc/support/string_util.h +++ b/include/grpc/support/string_util.h @@ -54,8 +54,8 @@ GPRAPI char *gpr_strdup(const char *src); On error, returns -1 and sets *strp to NULL. If the format string is bad, the result is undefined. */ -GPRAPI int gpr_asprintf(char **strp, const char *format, - ...) GPRC_PRINT_FORMAT_CHECK(2, 3); +GPRAPI int gpr_asprintf(char **strp, const char *format, ...) + GPRC_PRINT_FORMAT_CHECK(2, 3); #ifdef __cplusplus } diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 047f164eca..c37867a6aa 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -957,7 +957,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, if (metadata_size > metadata_peer_limit) { gpr_log(GPR_DEBUG, "to-be-sent initial metadata size exceeds peer limit " - "(%lu vs. %lu)", + "(%" PRIuPTR " vs. %" PRIuPTR ")", metadata_size, metadata_peer_limit); cancel_from_api(exec_ctx, transport_global, stream_global, GRPC_STATUS_RESOURCE_EXHAUSTED); @@ -1012,7 +1012,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, if (metadata_size > metadata_peer_limit) { gpr_log(GPR_DEBUG, "to-be-sent trailing metadata size exceeds peer limit " - "(%lu vs. %lu)", + "(%" PRIuPTR " vs. %" PRIuPTR ")", metadata_size, metadata_peer_limit); cancel_from_api(exec_ctx, transport_global, stream_global, GRPC_STATUS_RESOURCE_EXHAUSTED); diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index b839801500..5915187d43 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -231,7 +231,8 @@ class TestScenario { void Log() const { gpr_log(GPR_INFO, "Scenario: disable_blocking %d, credentials %s, message size %d", - disable_blocking, credentials_type.c_str(), message_content.size()); + disable_blocking, credentials_type.c_str(), + (int)(message_content.size())); } bool disable_blocking; const grpc::string credentials_type; diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index 7727824979..addaf174f2 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -171,8 +171,9 @@ int main(int argc, char** argv) { "large_unary|large_compressed_unary|client_streaming|server_streaming|" "server_compressed_streaming|half_duplex|ping_pong|cancel_after_begin|" "cancel_after_first_response|timeout_on_sleeping_server|empty_stream|" - "compute_engine_creds|jwt_token_creds|oauth2_auth_token|per_rpc_creds", - "status_code_and_message|custom_metadata", FLAGS_test_case.c_str()); + "compute_engine_creds|jwt_token_creds|oauth2_auth_token|per_rpc_creds|" + "status_code_and_message|custom_metadata", + FLAGS_test_case.c_str()); ret = 1; } diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index a0479e8f68..f9813f38c1 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -433,7 +433,7 @@ bool InteropClient::DoResponseStreaming() { // most likely due to connection failure. gpr_log(GPR_ERROR, "DoResponseStreaming(): Read fewer streams (%d) than " - "response_stream_sizes.size() (%d)", + "response_stream_sizes.size() (%" PRIu64 ")", i, response_stream_sizes.size()); return TransientFailureOrAbort(); } @@ -517,9 +517,11 @@ bool InteropClient::DoResponseCompressedStreaming() { // stream->Read() failed before reading all the expected messages. This // is most likely due to a connection failure. gpr_log(GPR_ERROR, - "DoResponseCompressedStreaming(): Responses read (k=%d) is " + "DoResponseCompressedStreaming(): Responses read (k=%" PRIuPTR + ") is " "less than the expected messages (i.e " - "response_stream_sizes.size() (%d)). (i=%d, j=%d)", + "response_stream_sizes.size() (%" PRIu64 ")). (i=%" PRIuPTR + ", j=%" PRIuPTR ")", k, response_stream_sizes.size(), i, j); return TransientFailureOrAbort(); } @@ -608,7 +610,7 @@ bool InteropClient::DoHalfDuplex() { // most likely due to a connection failure gpr_log(GPR_ERROR, "DoHalfDuplex(): Responses read (i=%d) are less than the expected " - "number of messages response_stream_sizes.size() (%d)", + "number of messages response_stream_sizes.size() (%" PRIu64 ")", i, response_stream_sizes.size()); return TransientFailureOrAbort(); } diff --git a/test/cpp/interop/metrics_client.cc b/test/cpp/interop/metrics_client.cc index c8c2215fab..7a0cb994df 100644 --- a/test/cpp/interop/metrics_client.cc +++ b/test/cpp/interop/metrics_client.cc @@ -76,7 +76,7 @@ bool PrintMetrics(std::unique_ptr stub, bool total_only, while (reader->Read(&gauge_response)) { if (gauge_response.value_case() == GaugeResponse::kLongValue) { if (!total_only) { - gpr_log(GPR_INFO, "%s: %ld", gauge_response.name().c_str(), + gpr_log(GPR_INFO, "%s: %lld", gauge_response.name().c_str(), gauge_response.long_value()); } overall_qps += gauge_response.long_value(); diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 57d8c22a95..83dbdc3e59 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -244,8 +244,8 @@ std::unique_ptr RunScenario( // where class contained in std::vector must have a copy constructor auto* servers = new ServerData[num_servers]; for (size_t i = 0; i < num_servers; i++) { - gpr_log(GPR_INFO, "Starting server on %s (worker #%d)", workers[i].c_str(), - i); + gpr_log(GPR_INFO, "Starting server on %s (worker #%" PRIuPTR ")", + workers[i].c_str(), i); servers[i].stub = WorkerService::NewStub( CreateChannel(workers[i], InsecureChannelCredentials())); @@ -307,8 +307,8 @@ std::unique_ptr RunScenario( auto* clients = new ClientData[num_clients]; for (size_t i = 0; i < num_clients; i++) { const auto& worker = workers[i + num_servers]; - gpr_log(GPR_INFO, "Starting client on %s (worker #%d)", worker.c_str(), - i + num_servers); + gpr_log(GPR_INFO, "Starting client on %s (worker #%" PRIuPTR ")", + worker.c_str(), i + num_servers); clients[i].stub = WorkerService::NewStub( CreateChannel(worker, InsecureChannelCredentials())); ClientConfig per_client_config = client_config; diff --git a/test/cpp/qps/parse_json.cc b/test/cpp/qps/parse_json.cc index be804281f8..e4fc35fa41 100644 --- a/test/cpp/qps/parse_json.cc +++ b/test/cpp/qps/parse_json.cc @@ -55,7 +55,7 @@ void ParseJson(const grpc::string& json, const grpc::string& type, grpc::string errmsg(status.error_message()); gpr_log(GPR_ERROR, "Failed to convert json to binary: errcode=%d msg=%s", status.error_code(), errmsg.c_str()); - gpr_log(GPR_ERROR, "JSON: ", json.c_str()); + gpr_log(GPR_ERROR, "JSON: %s", json.c_str()); abort(); } GPR_ASSERT(msg->ParseFromString(binary)); -- cgit v1.2.3 From beaa35724c4eb67eb5f890d6f66e0fd3b2f50aaa Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 10 Jun 2016 15:46:14 -0700 Subject: Fix type mismatch for type_size --- src/core/ext/transport/chttp2/transport/parsing.c | 6 ++++-- test/cpp/end2end/async_end2end_test.cc | 8 ++++---- test/cpp/end2end/zookeeper_test.cc | 2 +- test/cpp/interop/interop_client.cc | 6 +++--- 4 files changed, 12 insertions(+), 10 deletions(-) (limited to 'test/cpp') diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 8f72a4ff99..3c74258352 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -649,7 +649,8 @@ static void on_initial_header(void *tp, grpc_mdelem *md) { if (new_size > metadata_size_limit) { if (!stream_parsing->exceeded_metadata_size) { gpr_log(GPR_DEBUG, - "received initial metadata size exceeds limit (%lu vs. %lu)", + "received initial metadata size exceeds limit (%" PRIuPTR + " vs. %" PRIuPTR ")", new_size, metadata_size_limit); stream_parsing->seen_error = true; stream_parsing->exceeded_metadata_size = true; @@ -695,7 +696,8 @@ static void on_trailing_header(void *tp, grpc_mdelem *md) { if (new_size > metadata_size_limit) { if (!stream_parsing->exceeded_metadata_size) { gpr_log(GPR_DEBUG, - "received trailing metadata size exceeds limit (%lu vs. %lu)", + "received trailing metadata size exceeds limit (%" PRIuPTR + " vs. %" PRIuPTR ")", new_size, metadata_size_limit); stream_parsing->seen_error = true; stream_parsing->exceeded_metadata_size = true; diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 5915187d43..8229bda6bf 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -229,10 +229,10 @@ class TestScenario { credentials_type(creds_type), message_content(content) {} void Log() const { - gpr_log(GPR_INFO, - "Scenario: disable_blocking %d, credentials %s, message size %d", - disable_blocking, credentials_type.c_str(), - (int)(message_content.size())); + gpr_log( + GPR_INFO, + "Scenario: disable_blocking %d, credentials %s, message size %" PRIuPTR, + disable_blocking, credentials_type.c_str(), message_content.size()); } bool disable_blocking; const grpc::string credentials_type; diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc index 12853a1b98..b44668fe84 100644 --- a/test/cpp/end2end/zookeeper_test.cc +++ b/test/cpp/end2end/zookeeper_test.cc @@ -101,7 +101,7 @@ class ZookeeperTest : public ::testing::Test { zookeeper_address_ = addr_str; gpr_free(addr); } - gpr_log(GPR_DEBUG, zookeeper_address_.c_str()); + gpr_log(GPR_DEBUG, "%s, " zookeeper_address_.c_str()); // Connects to zookeeper server zoo_set_debug_level(ZOO_LOG_LEVEL_WARN); diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index f9813f38c1..0bf1fd6f73 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -433,7 +433,7 @@ bool InteropClient::DoResponseStreaming() { // most likely due to connection failure. gpr_log(GPR_ERROR, "DoResponseStreaming(): Read fewer streams (%d) than " - "response_stream_sizes.size() (%" PRIu64 ")", + "response_stream_sizes.size() (%" PRIuPTR ")", i, response_stream_sizes.size()); return TransientFailureOrAbort(); } @@ -520,7 +520,7 @@ bool InteropClient::DoResponseCompressedStreaming() { "DoResponseCompressedStreaming(): Responses read (k=%" PRIuPTR ") is " "less than the expected messages (i.e " - "response_stream_sizes.size() (%" PRIu64 ")). (i=%" PRIuPTR + "response_stream_sizes.size() (%" PRIuPTR ")). (i=%" PRIuPTR ", j=%" PRIuPTR ")", k, response_stream_sizes.size(), i, j); return TransientFailureOrAbort(); @@ -610,7 +610,7 @@ bool InteropClient::DoHalfDuplex() { // most likely due to a connection failure gpr_log(GPR_ERROR, "DoHalfDuplex(): Responses read (i=%d) are less than the expected " - "number of messages response_stream_sizes.size() (%" PRIu64 ")", + "number of messages response_stream_sizes.size() (%" PRIuPTR ")", i, response_stream_sizes.size()); return TransientFailureOrAbort(); } -- cgit v1.2.3 From bcf5023bb6ad3ddeef99b9a703b2fa245450a77a Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 10 Jun 2016 16:22:57 -0700 Subject: Fix zookeeper_test --- test/cpp/end2end/zookeeper_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/cpp') diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc index b44668fe84..fdc500e535 100644 --- a/test/cpp/end2end/zookeeper_test.cc +++ b/test/cpp/end2end/zookeeper_test.cc @@ -101,7 +101,7 @@ class ZookeeperTest : public ::testing::Test { zookeeper_address_ = addr_str; gpr_free(addr); } - gpr_log(GPR_DEBUG, "%s, " zookeeper_address_.c_str()); + gpr_log(GPR_DEBUG, "%s", zookeeper_address_.c_str()); // Connects to zookeeper server zoo_set_debug_level(ZOO_LOG_LEVEL_WARN); -- cgit v1.2.3