• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Generated by the gRPC C++ plugin.
2// If you make any local change, they will be lost.
3// source: src/proto/grpc/testing/compiler_test.proto
4// Original file comments:
5// Copyright 2016 gRPC authors.
6//
7// Licensed under the Apache License, Version 2.0 (the "License");
8// you may not use this file except in compliance with the License.
9// You may obtain a copy of the License at
10//
11//     http://www.apache.org/licenses/LICENSE-2.0
12//
13// Unless required by applicable law or agreed to in writing, software
14// distributed under the License is distributed on an "AS IS" BASIS,
15// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16// See the License for the specific language governing permissions and
17// limitations under the License.
18//
19// File detached comment 1
20//
21// File detached comment 2
22//
23// File leading comment 1
24#ifndef GRPC_src_2fproto_2fgrpc_2ftesting_2fcompiler_5ftest_2eproto__INCLUDED
25#define GRPC_src_2fproto_2fgrpc_2ftesting_2fcompiler_5ftest_2eproto__INCLUDED
26
27#include "src/proto/grpc/testing/compiler_test.pb.h"
28
29#include <functional>
30#include <grpcpp/impl/codegen/async_generic_service.h>
31#include <grpcpp/impl/codegen/async_stream.h>
32#include <grpcpp/impl/codegen/async_unary_call.h>
33#include <grpcpp/impl/codegen/method_handler_impl.h>
34#include <grpcpp/impl/codegen/proto_utils.h>
35#include <grpcpp/impl/codegen/rpc_method.h>
36#include <grpcpp/impl/codegen/service_type.h>
37#include <grpcpp/impl/codegen/status.h>
38#include <grpcpp/impl/codegen/stub_options.h>
39#include <grpcpp/impl/codegen/sync_stream.h>
40
41namespace grpc {
42class CompletionQueue;
43class Channel;
44class ServerCompletionQueue;
45class ServerContext;
46}  // namespace grpc
47
48namespace grpc {
49namespace testing {
50
51// ServiceA detached comment 1
52//
53// ServiceA detached comment 2
54//
55// ServiceA leading comment 1
56class ServiceA final {
57 public:
58  static constexpr char const* service_full_name() {
59    return "grpc.testing.ServiceA";
60  }
61  class StubInterface {
62   public:
63    virtual ~StubInterface() {}
64    // MethodA1 leading comment 1
65    virtual ::grpc::Status MethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::testing::Response* response) = 0;
66    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>> AsyncMethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
67      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>>(AsyncMethodA1Raw(context, request, cq));
68    }
69    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>> PrepareAsyncMethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
70      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>>(PrepareAsyncMethodA1Raw(context, request, cq));
71    }
72    // MethodA1 trailing comment 1
73    // MethodA2 detached leading comment 1
74    //
75    // Method A2 leading comment 1
76    // Method A2 leading comment 2
77    std::unique_ptr< ::grpc::ClientWriterInterface< ::grpc::testing::Request>> MethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response) {
78      return std::unique_ptr< ::grpc::ClientWriterInterface< ::grpc::testing::Request>>(MethodA2Raw(context, response));
79    }
80    std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::grpc::testing::Request>> AsyncMethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq, void* tag) {
81      return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::grpc::testing::Request>>(AsyncMethodA2Raw(context, response, cq, tag));
82    }
83    std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::grpc::testing::Request>> PrepareAsyncMethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq) {
84      return std::unique_ptr< ::grpc::ClientAsyncWriterInterface< ::grpc::testing::Request>>(PrepareAsyncMethodA2Raw(context, response, cq));
85    }
86    // MethodA2 trailing comment 1
87    // Method A3 leading comment 1
88    std::unique_ptr< ::grpc::ClientReaderInterface< ::grpc::testing::Response>> MethodA3(::grpc::ClientContext* context, const ::grpc::testing::Request& request) {
89      return std::unique_ptr< ::grpc::ClientReaderInterface< ::grpc::testing::Response>>(MethodA3Raw(context, request));
90    }
91    std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::testing::Response>> AsyncMethodA3(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq, void* tag) {
92      return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::testing::Response>>(AsyncMethodA3Raw(context, request, cq, tag));
93    }
94    std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::testing::Response>> PrepareAsyncMethodA3(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
95      return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::grpc::testing::Response>>(PrepareAsyncMethodA3Raw(context, request, cq));
96    }
97    // Method A3 trailing comment 1
98    // Method A4 leading comment 1
99    std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>> MethodA4(::grpc::ClientContext* context) {
100      return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>>(MethodA4Raw(context));
101    }
102    std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>> AsyncMethodA4(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
103      return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>>(AsyncMethodA4Raw(context, cq, tag));
104    }
105    std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>> PrepareAsyncMethodA4(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
106      return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>>(PrepareAsyncMethodA4Raw(context, cq));
107    }
108    // Method A4 trailing comment 1
109    class experimental_async_interface {
110     public:
111      virtual ~experimental_async_interface() {}
112      // MethodA1 leading comment 1
113      virtual void MethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response, std::function<void(::grpc::Status)>) = 0;
114      // MethodA1 trailing comment 1
115      // MethodA2 detached leading comment 1
116      //
117      // Method A2 leading comment 1
118      // Method A2 leading comment 2
119      // MethodA2 trailing comment 1
120      // Method A3 leading comment 1
121      // Method A3 trailing comment 1
122      // Method A4 leading comment 1
123      // Method A4 trailing comment 1
124    };
125    virtual class experimental_async_interface* experimental_async() { return nullptr; }
126  private:
127    virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>* AsyncMethodA1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) = 0;
128    virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>* PrepareAsyncMethodA1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) = 0;
129    virtual ::grpc::ClientWriterInterface< ::grpc::testing::Request>* MethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response) = 0;
130    virtual ::grpc::ClientAsyncWriterInterface< ::grpc::testing::Request>* AsyncMethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq, void* tag) = 0;
131    virtual ::grpc::ClientAsyncWriterInterface< ::grpc::testing::Request>* PrepareAsyncMethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq) = 0;
132    virtual ::grpc::ClientReaderInterface< ::grpc::testing::Response>* MethodA3Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request) = 0;
133    virtual ::grpc::ClientAsyncReaderInterface< ::grpc::testing::Response>* AsyncMethodA3Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
134    virtual ::grpc::ClientAsyncReaderInterface< ::grpc::testing::Response>* PrepareAsyncMethodA3Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) = 0;
135    virtual ::grpc::ClientReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>* MethodA4Raw(::grpc::ClientContext* context) = 0;
136    virtual ::grpc::ClientAsyncReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>* AsyncMethodA4Raw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0;
137    virtual ::grpc::ClientAsyncReaderWriterInterface< ::grpc::testing::Request, ::grpc::testing::Response>* PrepareAsyncMethodA4Raw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0;
138  };
139  class Stub final : public StubInterface {
140   public:
141    Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
142    ::grpc::Status MethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::testing::Response* response) override;
143    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>> AsyncMethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
144      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>>(AsyncMethodA1Raw(context, request, cq));
145    }
146    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>> PrepareAsyncMethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
147      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>>(PrepareAsyncMethodA1Raw(context, request, cq));
148    }
149    std::unique_ptr< ::grpc::ClientWriter< ::grpc::testing::Request>> MethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response) {
150      return std::unique_ptr< ::grpc::ClientWriter< ::grpc::testing::Request>>(MethodA2Raw(context, response));
151    }
152    std::unique_ptr< ::grpc::ClientAsyncWriter< ::grpc::testing::Request>> AsyncMethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq, void* tag) {
153      return std::unique_ptr< ::grpc::ClientAsyncWriter< ::grpc::testing::Request>>(AsyncMethodA2Raw(context, response, cq, tag));
154    }
155    std::unique_ptr< ::grpc::ClientAsyncWriter< ::grpc::testing::Request>> PrepareAsyncMethodA2(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq) {
156      return std::unique_ptr< ::grpc::ClientAsyncWriter< ::grpc::testing::Request>>(PrepareAsyncMethodA2Raw(context, response, cq));
157    }
158    std::unique_ptr< ::grpc::ClientReader< ::grpc::testing::Response>> MethodA3(::grpc::ClientContext* context, const ::grpc::testing::Request& request) {
159      return std::unique_ptr< ::grpc::ClientReader< ::grpc::testing::Response>>(MethodA3Raw(context, request));
160    }
161    std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::testing::Response>> AsyncMethodA3(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq, void* tag) {
162      return std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::testing::Response>>(AsyncMethodA3Raw(context, request, cq, tag));
163    }
164    std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::testing::Response>> PrepareAsyncMethodA3(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
165      return std::unique_ptr< ::grpc::ClientAsyncReader< ::grpc::testing::Response>>(PrepareAsyncMethodA3Raw(context, request, cq));
166    }
167    std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>> MethodA4(::grpc::ClientContext* context) {
168      return std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>>(MethodA4Raw(context));
169    }
170    std::unique_ptr<  ::grpc::ClientAsyncReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>> AsyncMethodA4(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) {
171      return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>>(AsyncMethodA4Raw(context, cq, tag));
172    }
173    std::unique_ptr<  ::grpc::ClientAsyncReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>> PrepareAsyncMethodA4(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) {
174      return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>>(PrepareAsyncMethodA4Raw(context, cq));
175    }
176    class experimental_async final :
177      public StubInterface::experimental_async_interface {
178     public:
179      void MethodA1(::grpc::ClientContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response, std::function<void(::grpc::Status)>) override;
180     private:
181      friend class Stub;
182      explicit experimental_async(Stub* stub): stub_(stub) { }
183      Stub* stub() { return stub_; }
184      Stub* stub_;
185    };
186    class experimental_async_interface* experimental_async() override { return &async_stub_; }
187
188   private:
189    std::shared_ptr< ::grpc::ChannelInterface> channel_;
190    class experimental_async async_stub_{this};
191    ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>* AsyncMethodA1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) override;
192    ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>* PrepareAsyncMethodA1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) override;
193    ::grpc::ClientWriter< ::grpc::testing::Request>* MethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response) override;
194    ::grpc::ClientAsyncWriter< ::grpc::testing::Request>* AsyncMethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq, void* tag) override;
195    ::grpc::ClientAsyncWriter< ::grpc::testing::Request>* PrepareAsyncMethodA2Raw(::grpc::ClientContext* context, ::grpc::testing::Response* response, ::grpc::CompletionQueue* cq) override;
196    ::grpc::ClientReader< ::grpc::testing::Response>* MethodA3Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request) override;
197    ::grpc::ClientAsyncReader< ::grpc::testing::Response>* AsyncMethodA3Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq, void* tag) override;
198    ::grpc::ClientAsyncReader< ::grpc::testing::Response>* PrepareAsyncMethodA3Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) override;
199    ::grpc::ClientReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>* MethodA4Raw(::grpc::ClientContext* context) override;
200    ::grpc::ClientAsyncReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>* AsyncMethodA4Raw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override;
201    ::grpc::ClientAsyncReaderWriter< ::grpc::testing::Request, ::grpc::testing::Response>* PrepareAsyncMethodA4Raw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override;
202    const ::grpc::internal::RpcMethod rpcmethod_MethodA1_;
203    const ::grpc::internal::RpcMethod rpcmethod_MethodA2_;
204    const ::grpc::internal::RpcMethod rpcmethod_MethodA3_;
205    const ::grpc::internal::RpcMethod rpcmethod_MethodA4_;
206  };
207  static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
208
209  class Service : public ::grpc::Service {
210   public:
211    Service();
212    virtual ~Service();
213    // MethodA1 leading comment 1
214    virtual ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response);
215    // MethodA1 trailing comment 1
216    // MethodA2 detached leading comment 1
217    //
218    // Method A2 leading comment 1
219    // Method A2 leading comment 2
220    virtual ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response);
221    // MethodA2 trailing comment 1
222    // Method A3 leading comment 1
223    virtual ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer);
224    // Method A3 trailing comment 1
225    // Method A4 leading comment 1
226    virtual ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream);
227    // Method A4 trailing comment 1
228  };
229  template <class BaseClass>
230  class WithAsyncMethod_MethodA1 : public BaseClass {
231   private:
232    void BaseClassMustBeDerivedFromService(const Service *service) {}
233   public:
234    WithAsyncMethod_MethodA1() {
235      ::grpc::Service::MarkMethodAsync(0);
236    }
237    ~WithAsyncMethod_MethodA1() override {
238      BaseClassMustBeDerivedFromService(this);
239    }
240    // disable synchronous version of this method
241    ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
242      abort();
243      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
244    }
245    void RequestMethodA1(::grpc::ServerContext* context, ::grpc::testing::Request* request, ::grpc::ServerAsyncResponseWriter< ::grpc::testing::Response>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
246      ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
247    }
248  };
249  template <class BaseClass>
250  class WithAsyncMethod_MethodA2 : public BaseClass {
251   private:
252    void BaseClassMustBeDerivedFromService(const Service *service) {}
253   public:
254    WithAsyncMethod_MethodA2() {
255      ::grpc::Service::MarkMethodAsync(1);
256    }
257    ~WithAsyncMethod_MethodA2() override {
258      BaseClassMustBeDerivedFromService(this);
259    }
260    // disable synchronous version of this method
261    ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) override {
262      abort();
263      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
264    }
265    void RequestMethodA2(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::grpc::testing::Response, ::grpc::testing::Request>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
266      ::grpc::Service::RequestAsyncClientStreaming(1, context, reader, new_call_cq, notification_cq, tag);
267    }
268  };
269  template <class BaseClass>
270  class WithAsyncMethod_MethodA3 : public BaseClass {
271   private:
272    void BaseClassMustBeDerivedFromService(const Service *service) {}
273   public:
274    WithAsyncMethod_MethodA3() {
275      ::grpc::Service::MarkMethodAsync(2);
276    }
277    ~WithAsyncMethod_MethodA3() override {
278      BaseClassMustBeDerivedFromService(this);
279    }
280    // disable synchronous version of this method
281    ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override {
282      abort();
283      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
284    }
285    void RequestMethodA3(::grpc::ServerContext* context, ::grpc::testing::Request* request, ::grpc::ServerAsyncWriter< ::grpc::testing::Response>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
286      ::grpc::Service::RequestAsyncServerStreaming(2, context, request, writer, new_call_cq, notification_cq, tag);
287    }
288  };
289  template <class BaseClass>
290  class WithAsyncMethod_MethodA4 : public BaseClass {
291   private:
292    void BaseClassMustBeDerivedFromService(const Service *service) {}
293   public:
294    WithAsyncMethod_MethodA4() {
295      ::grpc::Service::MarkMethodAsync(3);
296    }
297    ~WithAsyncMethod_MethodA4() override {
298      BaseClassMustBeDerivedFromService(this);
299    }
300    // disable synchronous version of this method
301    ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream)  override {
302      abort();
303      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
304    }
305    void RequestMethodA4(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
306      ::grpc::Service::RequestAsyncBidiStreaming(3, context, stream, new_call_cq, notification_cq, tag);
307    }
308  };
309  typedef WithAsyncMethod_MethodA1<WithAsyncMethod_MethodA2<WithAsyncMethod_MethodA3<WithAsyncMethod_MethodA4<Service > > > > AsyncService;
310  template <class BaseClass>
311  class WithGenericMethod_MethodA1 : public BaseClass {
312   private:
313    void BaseClassMustBeDerivedFromService(const Service *service) {}
314   public:
315    WithGenericMethod_MethodA1() {
316      ::grpc::Service::MarkMethodGeneric(0);
317    }
318    ~WithGenericMethod_MethodA1() override {
319      BaseClassMustBeDerivedFromService(this);
320    }
321    // disable synchronous version of this method
322    ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
323      abort();
324      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
325    }
326  };
327  template <class BaseClass>
328  class WithGenericMethod_MethodA2 : public BaseClass {
329   private:
330    void BaseClassMustBeDerivedFromService(const Service *service) {}
331   public:
332    WithGenericMethod_MethodA2() {
333      ::grpc::Service::MarkMethodGeneric(1);
334    }
335    ~WithGenericMethod_MethodA2() override {
336      BaseClassMustBeDerivedFromService(this);
337    }
338    // disable synchronous version of this method
339    ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) override {
340      abort();
341      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
342    }
343  };
344  template <class BaseClass>
345  class WithGenericMethod_MethodA3 : public BaseClass {
346   private:
347    void BaseClassMustBeDerivedFromService(const Service *service) {}
348   public:
349    WithGenericMethod_MethodA3() {
350      ::grpc::Service::MarkMethodGeneric(2);
351    }
352    ~WithGenericMethod_MethodA3() override {
353      BaseClassMustBeDerivedFromService(this);
354    }
355    // disable synchronous version of this method
356    ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override {
357      abort();
358      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
359    }
360  };
361  template <class BaseClass>
362  class WithGenericMethod_MethodA4 : public BaseClass {
363   private:
364    void BaseClassMustBeDerivedFromService(const Service *service) {}
365   public:
366    WithGenericMethod_MethodA4() {
367      ::grpc::Service::MarkMethodGeneric(3);
368    }
369    ~WithGenericMethod_MethodA4() override {
370      BaseClassMustBeDerivedFromService(this);
371    }
372    // disable synchronous version of this method
373    ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream)  override {
374      abort();
375      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
376    }
377  };
378  template <class BaseClass>
379  class WithRawMethod_MethodA1 : public BaseClass {
380   private:
381    void BaseClassMustBeDerivedFromService(const Service *service) {}
382   public:
383    WithRawMethod_MethodA1() {
384      ::grpc::Service::MarkMethodRaw(0);
385    }
386    ~WithRawMethod_MethodA1() override {
387      BaseClassMustBeDerivedFromService(this);
388    }
389    // disable synchronous version of this method
390    ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
391      abort();
392      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
393    }
394    void RequestMethodA1(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
395      ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
396    }
397  };
398  template <class BaseClass>
399  class WithRawMethod_MethodA2 : public BaseClass {
400   private:
401    void BaseClassMustBeDerivedFromService(const Service *service) {}
402   public:
403    WithRawMethod_MethodA2() {
404      ::grpc::Service::MarkMethodRaw(1);
405    }
406    ~WithRawMethod_MethodA2() override {
407      BaseClassMustBeDerivedFromService(this);
408    }
409    // disable synchronous version of this method
410    ::grpc::Status MethodA2(::grpc::ServerContext* context, ::grpc::ServerReader< ::grpc::testing::Request>* reader, ::grpc::testing::Response* response) override {
411      abort();
412      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
413    }
414    void RequestMethodA2(::grpc::ServerContext* context, ::grpc::ServerAsyncReader< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* reader, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
415      ::grpc::Service::RequestAsyncClientStreaming(1, context, reader, new_call_cq, notification_cq, tag);
416    }
417  };
418  template <class BaseClass>
419  class WithRawMethod_MethodA3 : public BaseClass {
420   private:
421    void BaseClassMustBeDerivedFromService(const Service *service) {}
422   public:
423    WithRawMethod_MethodA3() {
424      ::grpc::Service::MarkMethodRaw(2);
425    }
426    ~WithRawMethod_MethodA3() override {
427      BaseClassMustBeDerivedFromService(this);
428    }
429    // disable synchronous version of this method
430    ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override {
431      abort();
432      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
433    }
434    void RequestMethodA3(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
435      ::grpc::Service::RequestAsyncServerStreaming(2, context, request, writer, new_call_cq, notification_cq, tag);
436    }
437  };
438  template <class BaseClass>
439  class WithRawMethod_MethodA4 : public BaseClass {
440   private:
441    void BaseClassMustBeDerivedFromService(const Service *service) {}
442   public:
443    WithRawMethod_MethodA4() {
444      ::grpc::Service::MarkMethodRaw(3);
445    }
446    ~WithRawMethod_MethodA4() override {
447      BaseClassMustBeDerivedFromService(this);
448    }
449    // disable synchronous version of this method
450    ::grpc::Status MethodA4(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::testing::Response, ::grpc::testing::Request>* stream)  override {
451      abort();
452      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
453    }
454    void RequestMethodA4(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
455      ::grpc::Service::RequestAsyncBidiStreaming(3, context, stream, new_call_cq, notification_cq, tag);
456    }
457  };
458  template <class BaseClass>
459  class WithStreamedUnaryMethod_MethodA1 : public BaseClass {
460   private:
461    void BaseClassMustBeDerivedFromService(const Service *service) {}
462   public:
463    WithStreamedUnaryMethod_MethodA1() {
464      ::grpc::Service::MarkMethodStreamed(0,
465        new ::grpc::internal::StreamedUnaryHandler< ::grpc::testing::Request, ::grpc::testing::Response>(std::bind(&WithStreamedUnaryMethod_MethodA1<BaseClass>::StreamedMethodA1, this, std::placeholders::_1, std::placeholders::_2)));
466    }
467    ~WithStreamedUnaryMethod_MethodA1() override {
468      BaseClassMustBeDerivedFromService(this);
469    }
470    // disable regular version of this method
471    ::grpc::Status MethodA1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
472      abort();
473      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
474    }
475    // replace default version of method with streamed unary
476    virtual ::grpc::Status StreamedMethodA1(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::grpc::testing::Request,::grpc::testing::Response>* server_unary_streamer) = 0;
477  };
478  typedef WithStreamedUnaryMethod_MethodA1<Service > StreamedUnaryService;
479  template <class BaseClass>
480  class WithSplitStreamingMethod_MethodA3 : public BaseClass {
481   private:
482    void BaseClassMustBeDerivedFromService(const Service *service) {}
483   public:
484    WithSplitStreamingMethod_MethodA3() {
485      ::grpc::Service::MarkMethodStreamed(2,
486        new ::grpc::internal::SplitServerStreamingHandler< ::grpc::testing::Request, ::grpc::testing::Response>(std::bind(&WithSplitStreamingMethod_MethodA3<BaseClass>::StreamedMethodA3, this, std::placeholders::_1, std::placeholders::_2)));
487    }
488    ~WithSplitStreamingMethod_MethodA3() override {
489      BaseClassMustBeDerivedFromService(this);
490    }
491    // disable regular version of this method
492    ::grpc::Status MethodA3(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::ServerWriter< ::grpc::testing::Response>* writer) override {
493      abort();
494      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
495    }
496    // replace default version of method with split streamed
497    virtual ::grpc::Status StreamedMethodA3(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::grpc::testing::Request,::grpc::testing::Response>* server_split_streamer) = 0;
498  };
499  typedef WithSplitStreamingMethod_MethodA3<Service > SplitStreamedService;
500  typedef WithStreamedUnaryMethod_MethodA1<WithSplitStreamingMethod_MethodA3<Service > > StreamedService;
501};
502
503// ServiceB leading comment 1
504class ServiceB final {
505 public:
506  static constexpr char const* service_full_name() {
507    return "grpc.testing.ServiceB";
508  }
509  class StubInterface {
510   public:
511    virtual ~StubInterface() {}
512    // MethodB1 leading comment 1
513    virtual ::grpc::Status MethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::testing::Response* response) = 0;
514    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>> AsyncMethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
515      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>>(AsyncMethodB1Raw(context, request, cq));
516    }
517    std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>> PrepareAsyncMethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
518      return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>>(PrepareAsyncMethodB1Raw(context, request, cq));
519    }
520    // MethodB1 trailing comment 1
521    class experimental_async_interface {
522     public:
523      virtual ~experimental_async_interface() {}
524      // MethodB1 leading comment 1
525      virtual void MethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response, std::function<void(::grpc::Status)>) = 0;
526      // MethodB1 trailing comment 1
527    };
528    virtual class experimental_async_interface* experimental_async() { return nullptr; }
529  private:
530    virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>* AsyncMethodB1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) = 0;
531    virtual ::grpc::ClientAsyncResponseReaderInterface< ::grpc::testing::Response>* PrepareAsyncMethodB1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) = 0;
532  };
533  class Stub final : public StubInterface {
534   public:
535    Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
536    ::grpc::Status MethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::testing::Response* response) override;
537    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>> AsyncMethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
538      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>>(AsyncMethodB1Raw(context, request, cq));
539    }
540    std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>> PrepareAsyncMethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) {
541      return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>>(PrepareAsyncMethodB1Raw(context, request, cq));
542    }
543    class experimental_async final :
544      public StubInterface::experimental_async_interface {
545     public:
546      void MethodB1(::grpc::ClientContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response, std::function<void(::grpc::Status)>) override;
547     private:
548      friend class Stub;
549      explicit experimental_async(Stub* stub): stub_(stub) { }
550      Stub* stub() { return stub_; }
551      Stub* stub_;
552    };
553    class experimental_async_interface* experimental_async() override { return &async_stub_; }
554
555   private:
556    std::shared_ptr< ::grpc::ChannelInterface> channel_;
557    class experimental_async async_stub_{this};
558    ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>* AsyncMethodB1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) override;
559    ::grpc::ClientAsyncResponseReader< ::grpc::testing::Response>* PrepareAsyncMethodB1Raw(::grpc::ClientContext* context, const ::grpc::testing::Request& request, ::grpc::CompletionQueue* cq) override;
560    const ::grpc::internal::RpcMethod rpcmethod_MethodB1_;
561  };
562  static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
563
564  class Service : public ::grpc::Service {
565   public:
566    Service();
567    virtual ~Service();
568    // MethodB1 leading comment 1
569    virtual ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response);
570    // MethodB1 trailing comment 1
571  };
572  template <class BaseClass>
573  class WithAsyncMethod_MethodB1 : public BaseClass {
574   private:
575    void BaseClassMustBeDerivedFromService(const Service *service) {}
576   public:
577    WithAsyncMethod_MethodB1() {
578      ::grpc::Service::MarkMethodAsync(0);
579    }
580    ~WithAsyncMethod_MethodB1() override {
581      BaseClassMustBeDerivedFromService(this);
582    }
583    // disable synchronous version of this method
584    ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
585      abort();
586      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
587    }
588    void RequestMethodB1(::grpc::ServerContext* context, ::grpc::testing::Request* request, ::grpc::ServerAsyncResponseWriter< ::grpc::testing::Response>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
589      ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
590    }
591  };
592  typedef WithAsyncMethod_MethodB1<Service > AsyncService;
593  template <class BaseClass>
594  class WithGenericMethod_MethodB1 : public BaseClass {
595   private:
596    void BaseClassMustBeDerivedFromService(const Service *service) {}
597   public:
598    WithGenericMethod_MethodB1() {
599      ::grpc::Service::MarkMethodGeneric(0);
600    }
601    ~WithGenericMethod_MethodB1() override {
602      BaseClassMustBeDerivedFromService(this);
603    }
604    // disable synchronous version of this method
605    ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
606      abort();
607      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
608    }
609  };
610  template <class BaseClass>
611  class WithRawMethod_MethodB1 : public BaseClass {
612   private:
613    void BaseClassMustBeDerivedFromService(const Service *service) {}
614   public:
615    WithRawMethod_MethodB1() {
616      ::grpc::Service::MarkMethodRaw(0);
617    }
618    ~WithRawMethod_MethodB1() override {
619      BaseClassMustBeDerivedFromService(this);
620    }
621    // disable synchronous version of this method
622    ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
623      abort();
624      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
625    }
626    void RequestMethodB1(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
627      ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
628    }
629  };
630  template <class BaseClass>
631  class WithStreamedUnaryMethod_MethodB1 : public BaseClass {
632   private:
633    void BaseClassMustBeDerivedFromService(const Service *service) {}
634   public:
635    WithStreamedUnaryMethod_MethodB1() {
636      ::grpc::Service::MarkMethodStreamed(0,
637        new ::grpc::internal::StreamedUnaryHandler< ::grpc::testing::Request, ::grpc::testing::Response>(std::bind(&WithStreamedUnaryMethod_MethodB1<BaseClass>::StreamedMethodB1, this, std::placeholders::_1, std::placeholders::_2)));
638    }
639    ~WithStreamedUnaryMethod_MethodB1() override {
640      BaseClassMustBeDerivedFromService(this);
641    }
642    // disable regular version of this method
643    ::grpc::Status MethodB1(::grpc::ServerContext* context, const ::grpc::testing::Request* request, ::grpc::testing::Response* response) override {
644      abort();
645      return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
646    }
647    // replace default version of method with streamed unary
648    virtual ::grpc::Status StreamedMethodB1(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::grpc::testing::Request,::grpc::testing::Response>* server_unary_streamer) = 0;
649  };
650  typedef WithStreamedUnaryMethod_MethodB1<Service > StreamedUnaryService;
651  typedef Service SplitStreamedService;
652  typedef WithStreamedUnaryMethod_MethodB1<Service > StreamedService;
653};
654// ServiceB trailing comment 1
655
656}  // namespace testing
657}  // namespace grpc
658
659
660#endif  // GRPC_src_2fproto_2fgrpc_2ftesting_2fcompiler_5ftest_2eproto__INCLUDED
661