1 | // Generated by the gRPC C++ plugin. |
2 | // If you make any local change, they will be lost. |
3 | // source: tensorflow/core/debug/debug_service.proto |
4 | // Original file comments: |
5 | // Copyright 2016 The TensorFlow Authors. All Rights Reserved. |
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 | // |
20 | #ifndef GRPC_tensorflow_2fcore_2fdebug_2fdebug_5fservice_2eproto__INCLUDED |
21 | #define GRPC_tensorflow_2fcore_2fdebug_2fdebug_5fservice_2eproto__INCLUDED |
22 | |
23 | #include "tensorflow/core/debug/debug_service.pb.h" |
24 | |
25 | #include <functional> |
26 | #include <grpc/impl/codegen/port_platform.h> |
27 | #include <grpcpp/impl/codegen/async_generic_service.h> |
28 | #include <grpcpp/impl/codegen/async_stream.h> |
29 | #include <grpcpp/impl/codegen/async_unary_call.h> |
30 | #include <grpcpp/impl/codegen/client_callback.h> |
31 | #include <grpcpp/impl/codegen/client_context.h> |
32 | #include <grpcpp/impl/codegen/completion_queue.h> |
33 | #include <grpcpp/impl/codegen/message_allocator.h> |
34 | #include <grpcpp/impl/codegen/method_handler.h> |
35 | #include <grpcpp/impl/codegen/proto_utils.h> |
36 | #include <grpcpp/impl/codegen/rpc_method.h> |
37 | #include <grpcpp/impl/codegen/server_callback.h> |
38 | #include <grpcpp/impl/codegen/server_callback_handlers.h> |
39 | #include <grpcpp/impl/codegen/server_context.h> |
40 | #include <grpcpp/impl/codegen/service_type.h> |
41 | #include <grpcpp/impl/codegen/status.h> |
42 | #include <grpcpp/impl/codegen/stub_options.h> |
43 | #include <grpcpp/impl/codegen/sync_stream.h> |
44 | |
45 | namespace tensorflow { |
46 | |
47 | |
48 | namespace grpc { |
49 | |
50 | // EventListener: Receives Event protos, e.g., from debugged TensorFlow |
51 | // runtime(s). |
52 | class EventListener final { |
53 | public: |
54 | static constexpr char const* service_full_name() { |
55 | return "tensorflow.EventListener" ; |
56 | } |
57 | class StubInterface { |
58 | public: |
59 | virtual ~StubInterface() {} |
60 | // Client(s) can use this RPC method to send the EventListener Event protos. |
61 | // The Event protos can hold information such as: |
62 | // 1) intermediate tensors from a debugged graph being executed, which can |
63 | // be sent from DebugIdentity ops configured with grpc URLs. |
64 | // 2) GraphDefs of partition graphs, which can be sent from special debug |
65 | // ops that get executed immediately after the beginning of the graph |
66 | // execution. |
67 | std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::tensorflow::Event, ::tensorflow::EventReply>> SendEvents(::grpc::ClientContext* context) { |
68 | return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::tensorflow::Event, ::tensorflow::EventReply>>(SendEventsRaw(context)); |
69 | } |
70 | std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tensorflow::Event, ::tensorflow::EventReply>> AsyncSendEvents(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { |
71 | return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tensorflow::Event, ::tensorflow::EventReply>>(AsyncSendEventsRaw(context, cq, tag)); |
72 | } |
73 | std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tensorflow::Event, ::tensorflow::EventReply>> PrepareAsyncSendEvents(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { |
74 | return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::tensorflow::Event, ::tensorflow::EventReply>>(PrepareAsyncSendEventsRaw(context, cq)); |
75 | } |
76 | // Send the tracebacks of a TensorFlow execution call. |
77 | virtual ::grpc::Status SendTracebacks(::grpc::ClientContext* context, const ::tensorflow::CallTraceback& request, ::tensorflow::EventReply* response) = 0; |
78 | std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EventReply>> AsyncSendTracebacks(::grpc::ClientContext* context, const ::tensorflow::CallTraceback& request, ::grpc::CompletionQueue* cq) { |
79 | return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EventReply>>(AsyncSendTracebacksRaw(context, request, cq)); |
80 | } |
81 | std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EventReply>> PrepareAsyncSendTracebacks(::grpc::ClientContext* context, const ::tensorflow::CallTraceback& request, ::grpc::CompletionQueue* cq) { |
82 | return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EventReply>>(PrepareAsyncSendTracebacksRaw(context, request, cq)); |
83 | } |
84 | // Send a collection of source code files being debugged. |
85 | virtual ::grpc::Status SendSourceFiles(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles& request, ::tensorflow::EventReply* response) = 0; |
86 | std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EventReply>> AsyncSendSourceFiles(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles& request, ::grpc::CompletionQueue* cq) { |
87 | return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EventReply>>(AsyncSendSourceFilesRaw(context, request, cq)); |
88 | } |
89 | std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EventReply>> PrepareAsyncSendSourceFiles(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles& request, ::grpc::CompletionQueue* cq) { |
90 | return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EventReply>>(PrepareAsyncSendSourceFilesRaw(context, request, cq)); |
91 | } |
92 | class experimental_async_interface { |
93 | public: |
94 | virtual ~experimental_async_interface() {} |
95 | // Client(s) can use this RPC method to send the EventListener Event protos. |
96 | // The Event protos can hold information such as: |
97 | // 1) intermediate tensors from a debugged graph being executed, which can |
98 | // be sent from DebugIdentity ops configured with grpc URLs. |
99 | // 2) GraphDefs of partition graphs, which can be sent from special debug |
100 | // ops that get executed immediately after the beginning of the graph |
101 | // execution. |
102 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
103 | virtual void SendEvents(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::tensorflow::Event,::tensorflow::EventReply>* reactor) = 0; |
104 | #else |
105 | virtual void SendEvents(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::tensorflow::Event,::tensorflow::EventReply>* reactor) = 0; |
106 | #endif |
107 | // Send the tracebacks of a TensorFlow execution call. |
108 | virtual void SendTracebacks(::grpc::ClientContext* context, const ::tensorflow::CallTraceback* request, ::tensorflow::EventReply* response, std::function<void(::grpc::Status)>) = 0; |
109 | virtual void SendTracebacks(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EventReply* response, std::function<void(::grpc::Status)>) = 0; |
110 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
111 | virtual void SendTracebacks(::grpc::ClientContext* context, const ::tensorflow::CallTraceback* request, ::tensorflow::EventReply* response, ::grpc::ClientUnaryReactor* reactor) = 0; |
112 | #else |
113 | virtual void SendTracebacks(::grpc::ClientContext* context, const ::tensorflow::CallTraceback* request, ::tensorflow::EventReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; |
114 | #endif |
115 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
116 | virtual void SendTracebacks(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EventReply* response, ::grpc::ClientUnaryReactor* reactor) = 0; |
117 | #else |
118 | virtual void SendTracebacks(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EventReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; |
119 | #endif |
120 | // Send a collection of source code files being debugged. |
121 | virtual void SendSourceFiles(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles* request, ::tensorflow::EventReply* response, std::function<void(::grpc::Status)>) = 0; |
122 | virtual void SendSourceFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EventReply* response, std::function<void(::grpc::Status)>) = 0; |
123 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
124 | virtual void SendSourceFiles(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles* request, ::tensorflow::EventReply* response, ::grpc::ClientUnaryReactor* reactor) = 0; |
125 | #else |
126 | virtual void SendSourceFiles(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles* request, ::tensorflow::EventReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; |
127 | #endif |
128 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
129 | virtual void SendSourceFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EventReply* response, ::grpc::ClientUnaryReactor* reactor) = 0; |
130 | #else |
131 | virtual void SendSourceFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EventReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; |
132 | #endif |
133 | }; |
134 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
135 | typedef class experimental_async_interface async_interface; |
136 | #endif |
137 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
138 | async_interface* async() { return experimental_async(); } |
139 | #endif |
140 | virtual class experimental_async_interface* experimental_async() { return nullptr; } |
141 | private: |
142 | virtual ::grpc::ClientReaderWriterInterface< ::tensorflow::Event, ::tensorflow::EventReply>* SendEventsRaw(::grpc::ClientContext* context) = 0; |
143 | virtual ::grpc::ClientAsyncReaderWriterInterface< ::tensorflow::Event, ::tensorflow::EventReply>* AsyncSendEventsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; |
144 | virtual ::grpc::ClientAsyncReaderWriterInterface< ::tensorflow::Event, ::tensorflow::EventReply>* PrepareAsyncSendEventsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0; |
145 | virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EventReply>* AsyncSendTracebacksRaw(::grpc::ClientContext* context, const ::tensorflow::CallTraceback& request, ::grpc::CompletionQueue* cq) = 0; |
146 | virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EventReply>* PrepareAsyncSendTracebacksRaw(::grpc::ClientContext* context, const ::tensorflow::CallTraceback& request, ::grpc::CompletionQueue* cq) = 0; |
147 | virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EventReply>* AsyncSendSourceFilesRaw(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles& request, ::grpc::CompletionQueue* cq) = 0; |
148 | virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EventReply>* PrepareAsyncSendSourceFilesRaw(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles& request, ::grpc::CompletionQueue* cq) = 0; |
149 | }; |
150 | class Stub final : public StubInterface { |
151 | public: |
152 | Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); |
153 | std::unique_ptr< ::grpc::ClientReaderWriter< ::tensorflow::Event, ::tensorflow::EventReply>> SendEvents(::grpc::ClientContext* context) { |
154 | return std::unique_ptr< ::grpc::ClientReaderWriter< ::tensorflow::Event, ::tensorflow::EventReply>>(SendEventsRaw(context)); |
155 | } |
156 | std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tensorflow::Event, ::tensorflow::EventReply>> AsyncSendEvents(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { |
157 | return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tensorflow::Event, ::tensorflow::EventReply>>(AsyncSendEventsRaw(context, cq, tag)); |
158 | } |
159 | std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tensorflow::Event, ::tensorflow::EventReply>> PrepareAsyncSendEvents(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) { |
160 | return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::tensorflow::Event, ::tensorflow::EventReply>>(PrepareAsyncSendEventsRaw(context, cq)); |
161 | } |
162 | ::grpc::Status SendTracebacks(::grpc::ClientContext* context, const ::tensorflow::CallTraceback& request, ::tensorflow::EventReply* response) override; |
163 | std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::EventReply>> AsyncSendTracebacks(::grpc::ClientContext* context, const ::tensorflow::CallTraceback& request, ::grpc::CompletionQueue* cq) { |
164 | return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::EventReply>>(AsyncSendTracebacksRaw(context, request, cq)); |
165 | } |
166 | std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::EventReply>> PrepareAsyncSendTracebacks(::grpc::ClientContext* context, const ::tensorflow::CallTraceback& request, ::grpc::CompletionQueue* cq) { |
167 | return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::EventReply>>(PrepareAsyncSendTracebacksRaw(context, request, cq)); |
168 | } |
169 | ::grpc::Status SendSourceFiles(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles& request, ::tensorflow::EventReply* response) override; |
170 | std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::EventReply>> AsyncSendSourceFiles(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles& request, ::grpc::CompletionQueue* cq) { |
171 | return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::EventReply>>(AsyncSendSourceFilesRaw(context, request, cq)); |
172 | } |
173 | std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::EventReply>> PrepareAsyncSendSourceFiles(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles& request, ::grpc::CompletionQueue* cq) { |
174 | return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::EventReply>>(PrepareAsyncSendSourceFilesRaw(context, request, cq)); |
175 | } |
176 | class experimental_async final : |
177 | public StubInterface::experimental_async_interface { |
178 | public: |
179 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
180 | void SendEvents(::grpc::ClientContext* context, ::grpc::ClientBidiReactor< ::tensorflow::Event,::tensorflow::EventReply>* reactor) override; |
181 | #else |
182 | void SendEvents(::grpc::ClientContext* context, ::grpc::experimental::ClientBidiReactor< ::tensorflow::Event,::tensorflow::EventReply>* reactor) override; |
183 | #endif |
184 | void SendTracebacks(::grpc::ClientContext* context, const ::tensorflow::CallTraceback* request, ::tensorflow::EventReply* response, std::function<void(::grpc::Status)>) override; |
185 | void SendTracebacks(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EventReply* response, std::function<void(::grpc::Status)>) override; |
186 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
187 | void SendTracebacks(::grpc::ClientContext* context, const ::tensorflow::CallTraceback* request, ::tensorflow::EventReply* response, ::grpc::ClientUnaryReactor* reactor) override; |
188 | #else |
189 | void SendTracebacks(::grpc::ClientContext* context, const ::tensorflow::CallTraceback* request, ::tensorflow::EventReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; |
190 | #endif |
191 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
192 | void SendTracebacks(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EventReply* response, ::grpc::ClientUnaryReactor* reactor) override; |
193 | #else |
194 | void SendTracebacks(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EventReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; |
195 | #endif |
196 | void SendSourceFiles(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles* request, ::tensorflow::EventReply* response, std::function<void(::grpc::Status)>) override; |
197 | void SendSourceFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EventReply* response, std::function<void(::grpc::Status)>) override; |
198 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
199 | void SendSourceFiles(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles* request, ::tensorflow::EventReply* response, ::grpc::ClientUnaryReactor* reactor) override; |
200 | #else |
201 | void SendSourceFiles(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles* request, ::tensorflow::EventReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; |
202 | #endif |
203 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
204 | void SendSourceFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EventReply* response, ::grpc::ClientUnaryReactor* reactor) override; |
205 | #else |
206 | void SendSourceFiles(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EventReply* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; |
207 | #endif |
208 | private: |
209 | friend class Stub; |
210 | explicit experimental_async(Stub* stub): stub_(stub) { } |
211 | Stub* stub() { return stub_; } |
212 | Stub* stub_; |
213 | }; |
214 | class experimental_async_interface* experimental_async() override { return &async_stub_; } |
215 | |
216 | private: |
217 | std::shared_ptr< ::grpc::ChannelInterface> channel_; |
218 | class experimental_async async_stub_{this}; |
219 | ::grpc::ClientReaderWriter< ::tensorflow::Event, ::tensorflow::EventReply>* SendEventsRaw(::grpc::ClientContext* context) override; |
220 | ::grpc::ClientAsyncReaderWriter< ::tensorflow::Event, ::tensorflow::EventReply>* AsyncSendEventsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override; |
221 | ::grpc::ClientAsyncReaderWriter< ::tensorflow::Event, ::tensorflow::EventReply>* PrepareAsyncSendEventsRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override; |
222 | ::grpc::ClientAsyncResponseReader< ::tensorflow::EventReply>* AsyncSendTracebacksRaw(::grpc::ClientContext* context, const ::tensorflow::CallTraceback& request, ::grpc::CompletionQueue* cq) override; |
223 | ::grpc::ClientAsyncResponseReader< ::tensorflow::EventReply>* PrepareAsyncSendTracebacksRaw(::grpc::ClientContext* context, const ::tensorflow::CallTraceback& request, ::grpc::CompletionQueue* cq) override; |
224 | ::grpc::ClientAsyncResponseReader< ::tensorflow::EventReply>* AsyncSendSourceFilesRaw(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles& request, ::grpc::CompletionQueue* cq) override; |
225 | ::grpc::ClientAsyncResponseReader< ::tensorflow::EventReply>* PrepareAsyncSendSourceFilesRaw(::grpc::ClientContext* context, const ::tensorflow::DebuggedSourceFiles& request, ::grpc::CompletionQueue* cq) override; |
226 | const ::grpc::internal::RpcMethod rpcmethod_SendEvents_; |
227 | const ::grpc::internal::RpcMethod rpcmethod_SendTracebacks_; |
228 | const ::grpc::internal::RpcMethod rpcmethod_SendSourceFiles_; |
229 | }; |
230 | static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); |
231 | |
232 | class Service : public ::grpc::Service { |
233 | public: |
234 | Service(); |
235 | virtual ~Service(); |
236 | // Client(s) can use this RPC method to send the EventListener Event protos. |
237 | // The Event protos can hold information such as: |
238 | // 1) intermediate tensors from a debugged graph being executed, which can |
239 | // be sent from DebugIdentity ops configured with grpc URLs. |
240 | // 2) GraphDefs of partition graphs, which can be sent from special debug |
241 | // ops that get executed immediately after the beginning of the graph |
242 | // execution. |
243 | virtual ::grpc::Status SendEvents(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::tensorflow::EventReply, ::tensorflow::Event>* stream); |
244 | // Send the tracebacks of a TensorFlow execution call. |
245 | virtual ::grpc::Status SendTracebacks(::grpc::ServerContext* context, const ::tensorflow::CallTraceback* request, ::tensorflow::EventReply* response); |
246 | // Send a collection of source code files being debugged. |
247 | virtual ::grpc::Status SendSourceFiles(::grpc::ServerContext* context, const ::tensorflow::DebuggedSourceFiles* request, ::tensorflow::EventReply* response); |
248 | }; |
249 | template <class BaseClass> |
250 | class WithAsyncMethod_SendEvents : public BaseClass { |
251 | private: |
252 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
253 | public: |
254 | WithAsyncMethod_SendEvents() { |
255 | ::grpc::Service::MarkMethodAsync(0); |
256 | } |
257 | ~WithAsyncMethod_SendEvents() override { |
258 | BaseClassMustBeDerivedFromService(this); |
259 | } |
260 | // disable synchronous version of this method |
261 | ::grpc::Status SendEvents(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tensorflow::EventReply, ::tensorflow::Event>* /*stream*/) override { |
262 | abort(); |
263 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
264 | } |
265 | void RequestSendEvents(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::tensorflow::EventReply, ::tensorflow::Event>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { |
266 | ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag); |
267 | } |
268 | }; |
269 | template <class BaseClass> |
270 | class WithAsyncMethod_SendTracebacks : public BaseClass { |
271 | private: |
272 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
273 | public: |
274 | WithAsyncMethod_SendTracebacks() { |
275 | ::grpc::Service::MarkMethodAsync(1); |
276 | } |
277 | ~WithAsyncMethod_SendTracebacks() override { |
278 | BaseClassMustBeDerivedFromService(this); |
279 | } |
280 | // disable synchronous version of this method |
281 | ::grpc::Status SendTracebacks(::grpc::ServerContext* /*context*/, const ::tensorflow::CallTraceback* /*request*/, ::tensorflow::EventReply* /*response*/) override { |
282 | abort(); |
283 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
284 | } |
285 | void RequestSendTracebacks(::grpc::ServerContext* context, ::tensorflow::CallTraceback* request, ::grpc::ServerAsyncResponseWriter< ::tensorflow::EventReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { |
286 | ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); |
287 | } |
288 | }; |
289 | template <class BaseClass> |
290 | class WithAsyncMethod_SendSourceFiles : public BaseClass { |
291 | private: |
292 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
293 | public: |
294 | WithAsyncMethod_SendSourceFiles() { |
295 | ::grpc::Service::MarkMethodAsync(2); |
296 | } |
297 | ~WithAsyncMethod_SendSourceFiles() override { |
298 | BaseClassMustBeDerivedFromService(this); |
299 | } |
300 | // disable synchronous version of this method |
301 | ::grpc::Status SendSourceFiles(::grpc::ServerContext* /*context*/, const ::tensorflow::DebuggedSourceFiles* /*request*/, ::tensorflow::EventReply* /*response*/) override { |
302 | abort(); |
303 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
304 | } |
305 | void RequestSendSourceFiles(::grpc::ServerContext* context, ::tensorflow::DebuggedSourceFiles* request, ::grpc::ServerAsyncResponseWriter< ::tensorflow::EventReply>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { |
306 | ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); |
307 | } |
308 | }; |
309 | typedef WithAsyncMethod_SendEvents<WithAsyncMethod_SendTracebacks<WithAsyncMethod_SendSourceFiles<Service > > > AsyncService; |
310 | template <class BaseClass> |
311 | class ExperimentalWithCallbackMethod_SendEvents : public BaseClass { |
312 | private: |
313 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
314 | public: |
315 | ExperimentalWithCallbackMethod_SendEvents() { |
316 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
317 | ::grpc::Service:: |
318 | #else |
319 | ::grpc::Service::experimental(). |
320 | #endif |
321 | MarkMethodCallback(0, |
322 | new ::grpc_impl::internal::CallbackBidiHandler< ::tensorflow::Event, ::tensorflow::EventReply>( |
323 | [this]( |
324 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
325 | ::grpc::CallbackServerContext* |
326 | #else |
327 | ::grpc::experimental::CallbackServerContext* |
328 | #endif |
329 | context) { return this->SendEvents(context); })); |
330 | } |
331 | ~ExperimentalWithCallbackMethod_SendEvents() override { |
332 | BaseClassMustBeDerivedFromService(this); |
333 | } |
334 | // disable synchronous version of this method |
335 | ::grpc::Status SendEvents(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tensorflow::EventReply, ::tensorflow::Event>* /*stream*/) override { |
336 | abort(); |
337 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
338 | } |
339 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
340 | virtual ::grpc::ServerBidiReactor< ::tensorflow::Event, ::tensorflow::EventReply>* SendEvents( |
341 | ::grpc::CallbackServerContext* /*context*/) |
342 | #else |
343 | virtual ::grpc::experimental::ServerBidiReactor< ::tensorflow::Event, ::tensorflow::EventReply>* SendEvents( |
344 | ::grpc::experimental::CallbackServerContext* /*context*/) |
345 | #endif |
346 | { return nullptr; } |
347 | }; |
348 | template <class BaseClass> |
349 | class ExperimentalWithCallbackMethod_SendTracebacks : public BaseClass { |
350 | private: |
351 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
352 | public: |
353 | ExperimentalWithCallbackMethod_SendTracebacks() { |
354 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
355 | ::grpc::Service:: |
356 | #else |
357 | ::grpc::Service::experimental(). |
358 | #endif |
359 | MarkMethodCallback(1, |
360 | new ::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::CallTraceback, ::tensorflow::EventReply>( |
361 | [this]( |
362 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
363 | ::grpc::CallbackServerContext* |
364 | #else |
365 | ::grpc::experimental::CallbackServerContext* |
366 | #endif |
367 | context, const ::tensorflow::CallTraceback* request, ::tensorflow::EventReply* response) { return this->SendTracebacks(context, request, response); }));} |
368 | void SetMessageAllocatorFor_SendTracebacks( |
369 | ::grpc::experimental::MessageAllocator< ::tensorflow::CallTraceback, ::tensorflow::EventReply>* allocator) { |
370 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
371 | ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1); |
372 | #else |
373 | ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(1); |
374 | #endif |
375 | static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::CallTraceback, ::tensorflow::EventReply>*>(handler) |
376 | ->SetMessageAllocator(allocator); |
377 | } |
378 | ~ExperimentalWithCallbackMethod_SendTracebacks() override { |
379 | BaseClassMustBeDerivedFromService(this); |
380 | } |
381 | // disable synchronous version of this method |
382 | ::grpc::Status SendTracebacks(::grpc::ServerContext* /*context*/, const ::tensorflow::CallTraceback* /*request*/, ::tensorflow::EventReply* /*response*/) override { |
383 | abort(); |
384 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
385 | } |
386 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
387 | virtual ::grpc::ServerUnaryReactor* SendTracebacks( |
388 | ::grpc::CallbackServerContext* /*context*/, const ::tensorflow::CallTraceback* /*request*/, ::tensorflow::EventReply* /*response*/) |
389 | #else |
390 | virtual ::grpc::experimental::ServerUnaryReactor* SendTracebacks( |
391 | ::grpc::experimental::CallbackServerContext* /*context*/, const ::tensorflow::CallTraceback* /*request*/, ::tensorflow::EventReply* /*response*/) |
392 | #endif |
393 | { return nullptr; } |
394 | }; |
395 | template <class BaseClass> |
396 | class ExperimentalWithCallbackMethod_SendSourceFiles : public BaseClass { |
397 | private: |
398 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
399 | public: |
400 | ExperimentalWithCallbackMethod_SendSourceFiles() { |
401 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
402 | ::grpc::Service:: |
403 | #else |
404 | ::grpc::Service::experimental(). |
405 | #endif |
406 | MarkMethodCallback(2, |
407 | new ::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::DebuggedSourceFiles, ::tensorflow::EventReply>( |
408 | [this]( |
409 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
410 | ::grpc::CallbackServerContext* |
411 | #else |
412 | ::grpc::experimental::CallbackServerContext* |
413 | #endif |
414 | context, const ::tensorflow::DebuggedSourceFiles* request, ::tensorflow::EventReply* response) { return this->SendSourceFiles(context, request, response); }));} |
415 | void SetMessageAllocatorFor_SendSourceFiles( |
416 | ::grpc::experimental::MessageAllocator< ::tensorflow::DebuggedSourceFiles, ::tensorflow::EventReply>* allocator) { |
417 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
418 | ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2); |
419 | #else |
420 | ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(2); |
421 | #endif |
422 | static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::DebuggedSourceFiles, ::tensorflow::EventReply>*>(handler) |
423 | ->SetMessageAllocator(allocator); |
424 | } |
425 | ~ExperimentalWithCallbackMethod_SendSourceFiles() override { |
426 | BaseClassMustBeDerivedFromService(this); |
427 | } |
428 | // disable synchronous version of this method |
429 | ::grpc::Status SendSourceFiles(::grpc::ServerContext* /*context*/, const ::tensorflow::DebuggedSourceFiles* /*request*/, ::tensorflow::EventReply* /*response*/) override { |
430 | abort(); |
431 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
432 | } |
433 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
434 | virtual ::grpc::ServerUnaryReactor* SendSourceFiles( |
435 | ::grpc::CallbackServerContext* /*context*/, const ::tensorflow::DebuggedSourceFiles* /*request*/, ::tensorflow::EventReply* /*response*/) |
436 | #else |
437 | virtual ::grpc::experimental::ServerUnaryReactor* SendSourceFiles( |
438 | ::grpc::experimental::CallbackServerContext* /*context*/, const ::tensorflow::DebuggedSourceFiles* /*request*/, ::tensorflow::EventReply* /*response*/) |
439 | #endif |
440 | { return nullptr; } |
441 | }; |
442 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
443 | typedef ExperimentalWithCallbackMethod_SendEvents<ExperimentalWithCallbackMethod_SendTracebacks<ExperimentalWithCallbackMethod_SendSourceFiles<Service > > > CallbackService; |
444 | #endif |
445 | |
446 | typedef ExperimentalWithCallbackMethod_SendEvents<ExperimentalWithCallbackMethod_SendTracebacks<ExperimentalWithCallbackMethod_SendSourceFiles<Service > > > ExperimentalCallbackService; |
447 | template <class BaseClass> |
448 | class WithGenericMethod_SendEvents : public BaseClass { |
449 | private: |
450 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
451 | public: |
452 | WithGenericMethod_SendEvents() { |
453 | ::grpc::Service::MarkMethodGeneric(0); |
454 | } |
455 | ~WithGenericMethod_SendEvents() override { |
456 | BaseClassMustBeDerivedFromService(this); |
457 | } |
458 | // disable synchronous version of this method |
459 | ::grpc::Status SendEvents(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tensorflow::EventReply, ::tensorflow::Event>* /*stream*/) override { |
460 | abort(); |
461 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
462 | } |
463 | }; |
464 | template <class BaseClass> |
465 | class WithGenericMethod_SendTracebacks : public BaseClass { |
466 | private: |
467 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
468 | public: |
469 | WithGenericMethod_SendTracebacks() { |
470 | ::grpc::Service::MarkMethodGeneric(1); |
471 | } |
472 | ~WithGenericMethod_SendTracebacks() override { |
473 | BaseClassMustBeDerivedFromService(this); |
474 | } |
475 | // disable synchronous version of this method |
476 | ::grpc::Status SendTracebacks(::grpc::ServerContext* /*context*/, const ::tensorflow::CallTraceback* /*request*/, ::tensorflow::EventReply* /*response*/) override { |
477 | abort(); |
478 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
479 | } |
480 | }; |
481 | template <class BaseClass> |
482 | class WithGenericMethod_SendSourceFiles : public BaseClass { |
483 | private: |
484 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
485 | public: |
486 | WithGenericMethod_SendSourceFiles() { |
487 | ::grpc::Service::MarkMethodGeneric(2); |
488 | } |
489 | ~WithGenericMethod_SendSourceFiles() override { |
490 | BaseClassMustBeDerivedFromService(this); |
491 | } |
492 | // disable synchronous version of this method |
493 | ::grpc::Status SendSourceFiles(::grpc::ServerContext* /*context*/, const ::tensorflow::DebuggedSourceFiles* /*request*/, ::tensorflow::EventReply* /*response*/) override { |
494 | abort(); |
495 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
496 | } |
497 | }; |
498 | template <class BaseClass> |
499 | class WithRawMethod_SendEvents : public BaseClass { |
500 | private: |
501 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
502 | public: |
503 | WithRawMethod_SendEvents() { |
504 | ::grpc::Service::MarkMethodRaw(0); |
505 | } |
506 | ~WithRawMethod_SendEvents() override { |
507 | BaseClassMustBeDerivedFromService(this); |
508 | } |
509 | // disable synchronous version of this method |
510 | ::grpc::Status SendEvents(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tensorflow::EventReply, ::tensorflow::Event>* /*stream*/) override { |
511 | abort(); |
512 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
513 | } |
514 | void RequestSendEvents(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { |
515 | ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag); |
516 | } |
517 | }; |
518 | template <class BaseClass> |
519 | class WithRawMethod_SendTracebacks : public BaseClass { |
520 | private: |
521 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
522 | public: |
523 | WithRawMethod_SendTracebacks() { |
524 | ::grpc::Service::MarkMethodRaw(1); |
525 | } |
526 | ~WithRawMethod_SendTracebacks() override { |
527 | BaseClassMustBeDerivedFromService(this); |
528 | } |
529 | // disable synchronous version of this method |
530 | ::grpc::Status SendTracebacks(::grpc::ServerContext* /*context*/, const ::tensorflow::CallTraceback* /*request*/, ::tensorflow::EventReply* /*response*/) override { |
531 | abort(); |
532 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
533 | } |
534 | void RequestSendTracebacks(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { |
535 | ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag); |
536 | } |
537 | }; |
538 | template <class BaseClass> |
539 | class WithRawMethod_SendSourceFiles : public BaseClass { |
540 | private: |
541 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
542 | public: |
543 | WithRawMethod_SendSourceFiles() { |
544 | ::grpc::Service::MarkMethodRaw(2); |
545 | } |
546 | ~WithRawMethod_SendSourceFiles() override { |
547 | BaseClassMustBeDerivedFromService(this); |
548 | } |
549 | // disable synchronous version of this method |
550 | ::grpc::Status SendSourceFiles(::grpc::ServerContext* /*context*/, const ::tensorflow::DebuggedSourceFiles* /*request*/, ::tensorflow::EventReply* /*response*/) override { |
551 | abort(); |
552 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
553 | } |
554 | void RequestSendSourceFiles(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { |
555 | ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag); |
556 | } |
557 | }; |
558 | template <class BaseClass> |
559 | class ExperimentalWithRawCallbackMethod_SendEvents : public BaseClass { |
560 | private: |
561 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
562 | public: |
563 | ExperimentalWithRawCallbackMethod_SendEvents() { |
564 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
565 | ::grpc::Service:: |
566 | #else |
567 | ::grpc::Service::experimental(). |
568 | #endif |
569 | MarkMethodRawCallback(0, |
570 | new ::grpc_impl::internal::CallbackBidiHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( |
571 | [this]( |
572 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
573 | ::grpc::CallbackServerContext* |
574 | #else |
575 | ::grpc::experimental::CallbackServerContext* |
576 | #endif |
577 | context) { return this->SendEvents(context); })); |
578 | } |
579 | ~ExperimentalWithRawCallbackMethod_SendEvents() override { |
580 | BaseClassMustBeDerivedFromService(this); |
581 | } |
582 | // disable synchronous version of this method |
583 | ::grpc::Status SendEvents(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter< ::tensorflow::EventReply, ::tensorflow::Event>* /*stream*/) override { |
584 | abort(); |
585 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
586 | } |
587 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
588 | virtual ::grpc::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* SendEvents( |
589 | ::grpc::CallbackServerContext* /*context*/) |
590 | #else |
591 | virtual ::grpc::experimental::ServerBidiReactor< ::grpc::ByteBuffer, ::grpc::ByteBuffer>* SendEvents( |
592 | ::grpc::experimental::CallbackServerContext* /*context*/) |
593 | #endif |
594 | { return nullptr; } |
595 | }; |
596 | template <class BaseClass> |
597 | class ExperimentalWithRawCallbackMethod_SendTracebacks : public BaseClass { |
598 | private: |
599 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
600 | public: |
601 | ExperimentalWithRawCallbackMethod_SendTracebacks() { |
602 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
603 | ::grpc::Service:: |
604 | #else |
605 | ::grpc::Service::experimental(). |
606 | #endif |
607 | MarkMethodRawCallback(1, |
608 | new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( |
609 | [this]( |
610 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
611 | ::grpc::CallbackServerContext* |
612 | #else |
613 | ::grpc::experimental::CallbackServerContext* |
614 | #endif |
615 | context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->SendTracebacks(context, request, response); })); |
616 | } |
617 | ~ExperimentalWithRawCallbackMethod_SendTracebacks() override { |
618 | BaseClassMustBeDerivedFromService(this); |
619 | } |
620 | // disable synchronous version of this method |
621 | ::grpc::Status SendTracebacks(::grpc::ServerContext* /*context*/, const ::tensorflow::CallTraceback* /*request*/, ::tensorflow::EventReply* /*response*/) override { |
622 | abort(); |
623 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
624 | } |
625 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
626 | virtual ::grpc::ServerUnaryReactor* SendTracebacks( |
627 | ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) |
628 | #else |
629 | virtual ::grpc::experimental::ServerUnaryReactor* SendTracebacks( |
630 | ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) |
631 | #endif |
632 | { return nullptr; } |
633 | }; |
634 | template <class BaseClass> |
635 | class ExperimentalWithRawCallbackMethod_SendSourceFiles : public BaseClass { |
636 | private: |
637 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
638 | public: |
639 | ExperimentalWithRawCallbackMethod_SendSourceFiles() { |
640 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
641 | ::grpc::Service:: |
642 | #else |
643 | ::grpc::Service::experimental(). |
644 | #endif |
645 | MarkMethodRawCallback(2, |
646 | new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( |
647 | [this]( |
648 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
649 | ::grpc::CallbackServerContext* |
650 | #else |
651 | ::grpc::experimental::CallbackServerContext* |
652 | #endif |
653 | context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->SendSourceFiles(context, request, response); })); |
654 | } |
655 | ~ExperimentalWithRawCallbackMethod_SendSourceFiles() override { |
656 | BaseClassMustBeDerivedFromService(this); |
657 | } |
658 | // disable synchronous version of this method |
659 | ::grpc::Status SendSourceFiles(::grpc::ServerContext* /*context*/, const ::tensorflow::DebuggedSourceFiles* /*request*/, ::tensorflow::EventReply* /*response*/) override { |
660 | abort(); |
661 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
662 | } |
663 | #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL |
664 | virtual ::grpc::ServerUnaryReactor* SendSourceFiles( |
665 | ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) |
666 | #else |
667 | virtual ::grpc::experimental::ServerUnaryReactor* SendSourceFiles( |
668 | ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/) |
669 | #endif |
670 | { return nullptr; } |
671 | }; |
672 | template <class BaseClass> |
673 | class WithStreamedUnaryMethod_SendTracebacks : public BaseClass { |
674 | private: |
675 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
676 | public: |
677 | WithStreamedUnaryMethod_SendTracebacks() { |
678 | ::grpc::Service::MarkMethodStreamed(1, |
679 | new ::grpc::internal::StreamedUnaryHandler< ::tensorflow::CallTraceback, ::tensorflow::EventReply>(std::bind(&WithStreamedUnaryMethod_SendTracebacks<BaseClass>::StreamedSendTracebacks, this, std::placeholders::_1, std::placeholders::_2))); |
680 | } |
681 | ~WithStreamedUnaryMethod_SendTracebacks() override { |
682 | BaseClassMustBeDerivedFromService(this); |
683 | } |
684 | // disable regular version of this method |
685 | ::grpc::Status SendTracebacks(::grpc::ServerContext* /*context*/, const ::tensorflow::CallTraceback* /*request*/, ::tensorflow::EventReply* /*response*/) override { |
686 | abort(); |
687 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
688 | } |
689 | // replace default version of method with streamed unary |
690 | virtual ::grpc::Status StreamedSendTracebacks(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tensorflow::CallTraceback,::tensorflow::EventReply>* server_unary_streamer) = 0; |
691 | }; |
692 | template <class BaseClass> |
693 | class WithStreamedUnaryMethod_SendSourceFiles : public BaseClass { |
694 | private: |
695 | void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} |
696 | public: |
697 | WithStreamedUnaryMethod_SendSourceFiles() { |
698 | ::grpc::Service::MarkMethodStreamed(2, |
699 | new ::grpc::internal::StreamedUnaryHandler< ::tensorflow::DebuggedSourceFiles, ::tensorflow::EventReply>(std::bind(&WithStreamedUnaryMethod_SendSourceFiles<BaseClass>::StreamedSendSourceFiles, this, std::placeholders::_1, std::placeholders::_2))); |
700 | } |
701 | ~WithStreamedUnaryMethod_SendSourceFiles() override { |
702 | BaseClassMustBeDerivedFromService(this); |
703 | } |
704 | // disable regular version of this method |
705 | ::grpc::Status SendSourceFiles(::grpc::ServerContext* /*context*/, const ::tensorflow::DebuggedSourceFiles* /*request*/, ::tensorflow::EventReply* /*response*/) override { |
706 | abort(); |
707 | return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "" ); |
708 | } |
709 | // replace default version of method with streamed unary |
710 | virtual ::grpc::Status StreamedSendSourceFiles(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tensorflow::DebuggedSourceFiles,::tensorflow::EventReply>* server_unary_streamer) = 0; |
711 | }; |
712 | typedef WithStreamedUnaryMethod_SendTracebacks<WithStreamedUnaryMethod_SendSourceFiles<Service > > StreamedUnaryService; |
713 | typedef Service SplitStreamedService; |
714 | typedef WithStreamedUnaryMethod_SendTracebacks<WithStreamedUnaryMethod_SendSourceFiles<Service > > StreamedService; |
715 | }; |
716 | |
717 | } // namespace grpc |
718 | |
719 | } // namespace tensorflow |
720 | |
721 | |
722 | #endif // GRPC_tensorflow_2fcore_2fdebug_2fdebug_5fservice_2eproto__INCLUDED |
723 | |