diff --git a/extensions/include/grpc++/impl/reflection.grpc.pb.h b/extensions/include/grpc++/impl/reflection.grpc.pb.h index f6009296366..7c6e7b2b78a 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 b054e28de97..3b1f0a11a2c 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 0662bb595a1..1befb1d2f5b 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 5fe23191ff8..c32ee9ff54b 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 c098e52752f..83a63529fcb 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 97b3cb87916..0c9bfe79a4c 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 4b13bd1e51c..6e6a0b08644 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 c2ed93c12b6..4ed069ffc26 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 bf94654c3de..f37135e681f 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 fb406275148..a1e97f7edec 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 f0bb6e5ccc6..26f9e4711ae 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}