1// Generated by the gRPC C++ plugin.
2// If you make any local change, they will be lost.
3// source: tensorflow/core/profiler/profiler_analysis.proto
4#ifndef GRPC_tensorflow_2fcore_2fprofiler_2fprofiler_5fanalysis_2eproto__INCLUDED
5#define GRPC_tensorflow_2fcore_2fprofiler_2fprofiler_5fanalysis_2eproto__INCLUDED
6
7#include "tensorflow/core/profiler/profiler_analysis.pb.h"
8
9#include <functional>
10#include <grpc/impl/codegen/port_platform.h>
11#include <grpcpp/impl/codegen/async_generic_service.h>
12#include <grpcpp/impl/codegen/async_stream.h>
13#include <grpcpp/impl/codegen/async_unary_call.h>
14#include <grpcpp/impl/codegen/client_callback.h>
15#include <grpcpp/impl/codegen/client_context.h>
16#include <grpcpp/impl/codegen/completion_queue.h>
17#include <grpcpp/impl/codegen/message_allocator.h>
18#include <grpcpp/impl/codegen/method_handler.h>
19#include <grpcpp/impl/codegen/proto_utils.h>
20#include <grpcpp/impl/codegen/rpc_method.h>
21#include <grpcpp/impl/codegen/server_callback.h>
22#include <grpcpp/impl/codegen/server_callback_handlers.h>
23#include <grpcpp/impl/codegen/server_context.h>
24#include <grpcpp/impl/codegen/service_type.h>
25#include <grpcpp/impl/codegen/status.h>
26#include <grpcpp/impl/codegen/stub_options.h>
27#include <grpcpp/impl/codegen/sync_stream.h>
28
29namespace tensorflow {
30
31
32namespace grpc {
33
34// //////////////////////////////////////////////////////////////////////////////
35// ProfileAnalysis service provide entry point for profiling TPU and for
36// serving profiled data to Tensorboard through GRPC
37// //////////////////////////////////////////////////////////////////////////////
38class ProfileAnalysis final {
39 public:
40 static constexpr char const* service_full_name() {
41 return "tensorflow.ProfileAnalysis";
42 }
43 class StubInterface {
44 public:
45 virtual ~StubInterface() {}
46 // Starts a profiling session, blocks until it completes.
47 // TPUProfileAnalysis service delegate this to TPUProfiler service.
48 // Populate the profiled data in repository, then return status to caller.
49 virtual ::grpc::Status NewSession(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest& request, ::tensorflow::NewProfileSessionResponse* response) = 0;
50 std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::NewProfileSessionResponse>> AsyncNewSession(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest& request, ::grpc::CompletionQueue* cq) {
51 return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::NewProfileSessionResponse>>(AsyncNewSessionRaw(context, request, cq));
52 }
53 std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::NewProfileSessionResponse>> PrepareAsyncNewSession(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest& request, ::grpc::CompletionQueue* cq) {
54 return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::NewProfileSessionResponse>>(PrepareAsyncNewSessionRaw(context, request, cq));
55 }
56 // Enumerate existing sessions and return available profile tools.
57 virtual ::grpc::Status EnumSessions(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest& request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response) = 0;
58 std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EnumProfileSessionsAndToolsResponse>> AsyncEnumSessions(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest& request, ::grpc::CompletionQueue* cq) {
59 return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EnumProfileSessionsAndToolsResponse>>(AsyncEnumSessionsRaw(context, request, cq));
60 }
61 std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EnumProfileSessionsAndToolsResponse>> PrepareAsyncEnumSessions(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest& request, ::grpc::CompletionQueue* cq) {
62 return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EnumProfileSessionsAndToolsResponse>>(PrepareAsyncEnumSessionsRaw(context, request, cq));
63 }
64 // Retrieve specific tool's data for specific session.
65 virtual ::grpc::Status GetSessionToolData(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest& request, ::tensorflow::ProfileSessionDataResponse* response) = 0;
66 std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::ProfileSessionDataResponse>> AsyncGetSessionToolData(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest& request, ::grpc::CompletionQueue* cq) {
67 return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::ProfileSessionDataResponse>>(AsyncGetSessionToolDataRaw(context, request, cq));
68 }
69 std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::ProfileSessionDataResponse>> PrepareAsyncGetSessionToolData(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest& request, ::grpc::CompletionQueue* cq) {
70 return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::ProfileSessionDataResponse>>(PrepareAsyncGetSessionToolDataRaw(context, request, cq));
71 }
72 class experimental_async_interface {
73 public:
74 virtual ~experimental_async_interface() {}
75 // Starts a profiling session, blocks until it completes.
76 // TPUProfileAnalysis service delegate this to TPUProfiler service.
77 // Populate the profiled data in repository, then return status to caller.
78 virtual void NewSession(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest* request, ::tensorflow::NewProfileSessionResponse* response, std::function<void(::grpc::Status)>) = 0;
79 virtual void NewSession(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::NewProfileSessionResponse* response, std::function<void(::grpc::Status)>) = 0;
80 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
81 virtual void NewSession(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest* request, ::tensorflow::NewProfileSessionResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0;
82 #else
83 virtual void NewSession(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest* request, ::tensorflow::NewProfileSessionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
84 #endif
85 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
86 virtual void NewSession(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::NewProfileSessionResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0;
87 #else
88 virtual void NewSession(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::NewProfileSessionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
89 #endif
90 // Enumerate existing sessions and return available profile tools.
91 virtual void EnumSessions(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response, std::function<void(::grpc::Status)>) = 0;
92 virtual void EnumSessions(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response, std::function<void(::grpc::Status)>) = 0;
93 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
94 virtual void EnumSessions(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0;
95 #else
96 virtual void EnumSessions(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
97 #endif
98 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
99 virtual void EnumSessions(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0;
100 #else
101 virtual void EnumSessions(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
102 #endif
103 // Retrieve specific tool's data for specific session.
104 virtual void GetSessionToolData(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest* request, ::tensorflow::ProfileSessionDataResponse* response, std::function<void(::grpc::Status)>) = 0;
105 virtual void GetSessionToolData(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::ProfileSessionDataResponse* response, std::function<void(::grpc::Status)>) = 0;
106 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
107 virtual void GetSessionToolData(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest* request, ::tensorflow::ProfileSessionDataResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0;
108 #else
109 virtual void GetSessionToolData(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest* request, ::tensorflow::ProfileSessionDataResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
110 #endif
111 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
112 virtual void GetSessionToolData(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::ProfileSessionDataResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0;
113 #else
114 virtual void GetSessionToolData(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::ProfileSessionDataResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
115 #endif
116 };
117 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
118 typedef class experimental_async_interface async_interface;
119 #endif
120 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
121 async_interface* async() { return experimental_async(); }
122 #endif
123 virtual class experimental_async_interface* experimental_async() { return nullptr; }
124 private:
125 virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::NewProfileSessionResponse>* AsyncNewSessionRaw(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest& request, ::grpc::CompletionQueue* cq) = 0;
126 virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::NewProfileSessionResponse>* PrepareAsyncNewSessionRaw(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest& request, ::grpc::CompletionQueue* cq) = 0;
127 virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EnumProfileSessionsAndToolsResponse>* AsyncEnumSessionsRaw(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest& request, ::grpc::CompletionQueue* cq) = 0;
128 virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::EnumProfileSessionsAndToolsResponse>* PrepareAsyncEnumSessionsRaw(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest& request, ::grpc::CompletionQueue* cq) = 0;
129 virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::ProfileSessionDataResponse>* AsyncGetSessionToolDataRaw(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest& request, ::grpc::CompletionQueue* cq) = 0;
130 virtual ::grpc::ClientAsyncResponseReaderInterface< ::tensorflow::ProfileSessionDataResponse>* PrepareAsyncGetSessionToolDataRaw(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest& request, ::grpc::CompletionQueue* cq) = 0;
131 };
132 class Stub final : public StubInterface {
133 public:
134 Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
135 ::grpc::Status NewSession(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest& request, ::tensorflow::NewProfileSessionResponse* response) override;
136 std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::NewProfileSessionResponse>> AsyncNewSession(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest& request, ::grpc::CompletionQueue* cq) {
137 return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::NewProfileSessionResponse>>(AsyncNewSessionRaw(context, request, cq));
138 }
139 std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::NewProfileSessionResponse>> PrepareAsyncNewSession(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest& request, ::grpc::CompletionQueue* cq) {
140 return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::NewProfileSessionResponse>>(PrepareAsyncNewSessionRaw(context, request, cq));
141 }
142 ::grpc::Status EnumSessions(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest& request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response) override;
143 std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::EnumProfileSessionsAndToolsResponse>> AsyncEnumSessions(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest& request, ::grpc::CompletionQueue* cq) {
144 return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::EnumProfileSessionsAndToolsResponse>>(AsyncEnumSessionsRaw(context, request, cq));
145 }
146 std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::EnumProfileSessionsAndToolsResponse>> PrepareAsyncEnumSessions(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest& request, ::grpc::CompletionQueue* cq) {
147 return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::EnumProfileSessionsAndToolsResponse>>(PrepareAsyncEnumSessionsRaw(context, request, cq));
148 }
149 ::grpc::Status GetSessionToolData(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest& request, ::tensorflow::ProfileSessionDataResponse* response) override;
150 std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::ProfileSessionDataResponse>> AsyncGetSessionToolData(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest& request, ::grpc::CompletionQueue* cq) {
151 return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::ProfileSessionDataResponse>>(AsyncGetSessionToolDataRaw(context, request, cq));
152 }
153 std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::ProfileSessionDataResponse>> PrepareAsyncGetSessionToolData(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest& request, ::grpc::CompletionQueue* cq) {
154 return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::tensorflow::ProfileSessionDataResponse>>(PrepareAsyncGetSessionToolDataRaw(context, request, cq));
155 }
156 class experimental_async final :
157 public StubInterface::experimental_async_interface {
158 public:
159 void NewSession(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest* request, ::tensorflow::NewProfileSessionResponse* response, std::function<void(::grpc::Status)>) override;
160 void NewSession(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::NewProfileSessionResponse* response, std::function<void(::grpc::Status)>) override;
161 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
162 void NewSession(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest* request, ::tensorflow::NewProfileSessionResponse* response, ::grpc::ClientUnaryReactor* reactor) override;
163 #else
164 void NewSession(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest* request, ::tensorflow::NewProfileSessionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
165 #endif
166 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
167 void NewSession(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::NewProfileSessionResponse* response, ::grpc::ClientUnaryReactor* reactor) override;
168 #else
169 void NewSession(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::NewProfileSessionResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
170 #endif
171 void EnumSessions(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response, std::function<void(::grpc::Status)>) override;
172 void EnumSessions(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response, std::function<void(::grpc::Status)>) override;
173 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
174 void EnumSessions(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response, ::grpc::ClientUnaryReactor* reactor) override;
175 #else
176 void EnumSessions(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
177 #endif
178 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
179 void EnumSessions(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response, ::grpc::ClientUnaryReactor* reactor) override;
180 #else
181 void EnumSessions(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
182 #endif
183 void GetSessionToolData(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest* request, ::tensorflow::ProfileSessionDataResponse* response, std::function<void(::grpc::Status)>) override;
184 void GetSessionToolData(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::ProfileSessionDataResponse* response, std::function<void(::grpc::Status)>) override;
185 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
186 void GetSessionToolData(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest* request, ::tensorflow::ProfileSessionDataResponse* response, ::grpc::ClientUnaryReactor* reactor) override;
187 #else
188 void GetSessionToolData(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest* request, ::tensorflow::ProfileSessionDataResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
189 #endif
190 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
191 void GetSessionToolData(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::ProfileSessionDataResponse* response, ::grpc::ClientUnaryReactor* reactor) override;
192 #else
193 void GetSessionToolData(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::tensorflow::ProfileSessionDataResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
194 #endif
195 private:
196 friend class Stub;
197 explicit experimental_async(Stub* stub): stub_(stub) { }
198 Stub* stub() { return stub_; }
199 Stub* stub_;
200 };
201 class experimental_async_interface* experimental_async() override { return &async_stub_; }
202
203 private:
204 std::shared_ptr< ::grpc::ChannelInterface> channel_;
205 class experimental_async async_stub_{this};
206 ::grpc::ClientAsyncResponseReader< ::tensorflow::NewProfileSessionResponse>* AsyncNewSessionRaw(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest& request, ::grpc::CompletionQueue* cq) override;
207 ::grpc::ClientAsyncResponseReader< ::tensorflow::NewProfileSessionResponse>* PrepareAsyncNewSessionRaw(::grpc::ClientContext* context, const ::tensorflow::NewProfileSessionRequest& request, ::grpc::CompletionQueue* cq) override;
208 ::grpc::ClientAsyncResponseReader< ::tensorflow::EnumProfileSessionsAndToolsResponse>* AsyncEnumSessionsRaw(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest& request, ::grpc::CompletionQueue* cq) override;
209 ::grpc::ClientAsyncResponseReader< ::tensorflow::EnumProfileSessionsAndToolsResponse>* PrepareAsyncEnumSessionsRaw(::grpc::ClientContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest& request, ::grpc::CompletionQueue* cq) override;
210 ::grpc::ClientAsyncResponseReader< ::tensorflow::ProfileSessionDataResponse>* AsyncGetSessionToolDataRaw(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest& request, ::grpc::CompletionQueue* cq) override;
211 ::grpc::ClientAsyncResponseReader< ::tensorflow::ProfileSessionDataResponse>* PrepareAsyncGetSessionToolDataRaw(::grpc::ClientContext* context, const ::tensorflow::ProfileSessionDataRequest& request, ::grpc::CompletionQueue* cq) override;
212 const ::grpc::internal::RpcMethod rpcmethod_NewSession_;
213 const ::grpc::internal::RpcMethod rpcmethod_EnumSessions_;
214 const ::grpc::internal::RpcMethod rpcmethod_GetSessionToolData_;
215 };
216 static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
217
218 class Service : public ::grpc::Service {
219 public:
220 Service();
221 virtual ~Service();
222 // Starts a profiling session, blocks until it completes.
223 // TPUProfileAnalysis service delegate this to TPUProfiler service.
224 // Populate the profiled data in repository, then return status to caller.
225 virtual ::grpc::Status NewSession(::grpc::ServerContext* context, const ::tensorflow::NewProfileSessionRequest* request, ::tensorflow::NewProfileSessionResponse* response);
226 // Enumerate existing sessions and return available profile tools.
227 virtual ::grpc::Status EnumSessions(::grpc::ServerContext* context, const ::tensorflow::EnumProfileSessionsAndToolsRequest* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response);
228 // Retrieve specific tool's data for specific session.
229 virtual ::grpc::Status GetSessionToolData(::grpc::ServerContext* context, const ::tensorflow::ProfileSessionDataRequest* request, ::tensorflow::ProfileSessionDataResponse* response);
230 };
231 template <class BaseClass>
232 class WithAsyncMethod_NewSession : public BaseClass {
233 private:
234 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
235 public:
236 WithAsyncMethod_NewSession() {
237 ::grpc::Service::MarkMethodAsync(0);
238 }
239 ~WithAsyncMethod_NewSession() override {
240 BaseClassMustBeDerivedFromService(this);
241 }
242 // disable synchronous version of this method
243 ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tensorflow::NewProfileSessionRequest* /*request*/, ::tensorflow::NewProfileSessionResponse* /*response*/) override {
244 abort();
245 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
246 }
247 void RequestNewSession(::grpc::ServerContext* context, ::tensorflow::NewProfileSessionRequest* request, ::grpc::ServerAsyncResponseWriter< ::tensorflow::NewProfileSessionResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
248 ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
249 }
250 };
251 template <class BaseClass>
252 class WithAsyncMethod_EnumSessions : public BaseClass {
253 private:
254 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
255 public:
256 WithAsyncMethod_EnumSessions() {
257 ::grpc::Service::MarkMethodAsync(1);
258 }
259 ~WithAsyncMethod_EnumSessions() override {
260 BaseClassMustBeDerivedFromService(this);
261 }
262 // disable synchronous version of this method
263 ::grpc::Status EnumSessions(::grpc::ServerContext* /*context*/, const ::tensorflow::EnumProfileSessionsAndToolsRequest* /*request*/, ::tensorflow::EnumProfileSessionsAndToolsResponse* /*response*/) override {
264 abort();
265 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
266 }
267 void RequestEnumSessions(::grpc::ServerContext* context, ::tensorflow::EnumProfileSessionsAndToolsRequest* request, ::grpc::ServerAsyncResponseWriter< ::tensorflow::EnumProfileSessionsAndToolsResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
268 ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag);
269 }
270 };
271 template <class BaseClass>
272 class WithAsyncMethod_GetSessionToolData : public BaseClass {
273 private:
274 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
275 public:
276 WithAsyncMethod_GetSessionToolData() {
277 ::grpc::Service::MarkMethodAsync(2);
278 }
279 ~WithAsyncMethod_GetSessionToolData() override {
280 BaseClassMustBeDerivedFromService(this);
281 }
282 // disable synchronous version of this method
283 ::grpc::Status GetSessionToolData(::grpc::ServerContext* /*context*/, const ::tensorflow::ProfileSessionDataRequest* /*request*/, ::tensorflow::ProfileSessionDataResponse* /*response*/) override {
284 abort();
285 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
286 }
287 void RequestGetSessionToolData(::grpc::ServerContext* context, ::tensorflow::ProfileSessionDataRequest* request, ::grpc::ServerAsyncResponseWriter< ::tensorflow::ProfileSessionDataResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
288 ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag);
289 }
290 };
291 typedef WithAsyncMethod_NewSession<WithAsyncMethod_EnumSessions<WithAsyncMethod_GetSessionToolData<Service > > > AsyncService;
292 template <class BaseClass>
293 class ExperimentalWithCallbackMethod_NewSession : public BaseClass {
294 private:
295 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
296 public:
297 ExperimentalWithCallbackMethod_NewSession() {
298 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
299 ::grpc::Service::
300 #else
301 ::grpc::Service::experimental().
302 #endif
303 MarkMethodCallback(0,
304 new ::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::NewProfileSessionRequest, ::tensorflow::NewProfileSessionResponse>(
305 [this](
306 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
307 ::grpc::CallbackServerContext*
308 #else
309 ::grpc::experimental::CallbackServerContext*
310 #endif
311 context, const ::tensorflow::NewProfileSessionRequest* request, ::tensorflow::NewProfileSessionResponse* response) { return this->NewSession(context, request, response); }));}
312 void SetMessageAllocatorFor_NewSession(
313 ::grpc::experimental::MessageAllocator< ::tensorflow::NewProfileSessionRequest, ::tensorflow::NewProfileSessionResponse>* allocator) {
314 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
315 ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0);
316 #else
317 ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(0);
318 #endif
319 static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::NewProfileSessionRequest, ::tensorflow::NewProfileSessionResponse>*>(handler)
320 ->SetMessageAllocator(allocator);
321 }
322 ~ExperimentalWithCallbackMethod_NewSession() override {
323 BaseClassMustBeDerivedFromService(this);
324 }
325 // disable synchronous version of this method
326 ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tensorflow::NewProfileSessionRequest* /*request*/, ::tensorflow::NewProfileSessionResponse* /*response*/) override {
327 abort();
328 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
329 }
330 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
331 virtual ::grpc::ServerUnaryReactor* NewSession(
332 ::grpc::CallbackServerContext* /*context*/, const ::tensorflow::NewProfileSessionRequest* /*request*/, ::tensorflow::NewProfileSessionResponse* /*response*/)
333 #else
334 virtual ::grpc::experimental::ServerUnaryReactor* NewSession(
335 ::grpc::experimental::CallbackServerContext* /*context*/, const ::tensorflow::NewProfileSessionRequest* /*request*/, ::tensorflow::NewProfileSessionResponse* /*response*/)
336 #endif
337 { return nullptr; }
338 };
339 template <class BaseClass>
340 class ExperimentalWithCallbackMethod_EnumSessions : public BaseClass {
341 private:
342 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
343 public:
344 ExperimentalWithCallbackMethod_EnumSessions() {
345 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
346 ::grpc::Service::
347 #else
348 ::grpc::Service::experimental().
349 #endif
350 MarkMethodCallback(1,
351 new ::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::EnumProfileSessionsAndToolsRequest, ::tensorflow::EnumProfileSessionsAndToolsResponse>(
352 [this](
353 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
354 ::grpc::CallbackServerContext*
355 #else
356 ::grpc::experimental::CallbackServerContext*
357 #endif
358 context, const ::tensorflow::EnumProfileSessionsAndToolsRequest* request, ::tensorflow::EnumProfileSessionsAndToolsResponse* response) { return this->EnumSessions(context, request, response); }));}
359 void SetMessageAllocatorFor_EnumSessions(
360 ::grpc::experimental::MessageAllocator< ::tensorflow::EnumProfileSessionsAndToolsRequest, ::tensorflow::EnumProfileSessionsAndToolsResponse>* allocator) {
361 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
362 ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(1);
363 #else
364 ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(1);
365 #endif
366 static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::EnumProfileSessionsAndToolsRequest, ::tensorflow::EnumProfileSessionsAndToolsResponse>*>(handler)
367 ->SetMessageAllocator(allocator);
368 }
369 ~ExperimentalWithCallbackMethod_EnumSessions() override {
370 BaseClassMustBeDerivedFromService(this);
371 }
372 // disable synchronous version of this method
373 ::grpc::Status EnumSessions(::grpc::ServerContext* /*context*/, const ::tensorflow::EnumProfileSessionsAndToolsRequest* /*request*/, ::tensorflow::EnumProfileSessionsAndToolsResponse* /*response*/) override {
374 abort();
375 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
376 }
377 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
378 virtual ::grpc::ServerUnaryReactor* EnumSessions(
379 ::grpc::CallbackServerContext* /*context*/, const ::tensorflow::EnumProfileSessionsAndToolsRequest* /*request*/, ::tensorflow::EnumProfileSessionsAndToolsResponse* /*response*/)
380 #else
381 virtual ::grpc::experimental::ServerUnaryReactor* EnumSessions(
382 ::grpc::experimental::CallbackServerContext* /*context*/, const ::tensorflow::EnumProfileSessionsAndToolsRequest* /*request*/, ::tensorflow::EnumProfileSessionsAndToolsResponse* /*response*/)
383 #endif
384 { return nullptr; }
385 };
386 template <class BaseClass>
387 class ExperimentalWithCallbackMethod_GetSessionToolData : public BaseClass {
388 private:
389 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
390 public:
391 ExperimentalWithCallbackMethod_GetSessionToolData() {
392 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
393 ::grpc::Service::
394 #else
395 ::grpc::Service::experimental().
396 #endif
397 MarkMethodCallback(2,
398 new ::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::ProfileSessionDataRequest, ::tensorflow::ProfileSessionDataResponse>(
399 [this](
400 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
401 ::grpc::CallbackServerContext*
402 #else
403 ::grpc::experimental::CallbackServerContext*
404 #endif
405 context, const ::tensorflow::ProfileSessionDataRequest* request, ::tensorflow::ProfileSessionDataResponse* response) { return this->GetSessionToolData(context, request, response); }));}
406 void SetMessageAllocatorFor_GetSessionToolData(
407 ::grpc::experimental::MessageAllocator< ::tensorflow::ProfileSessionDataRequest, ::tensorflow::ProfileSessionDataResponse>* allocator) {
408 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
409 ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(2);
410 #else
411 ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(2);
412 #endif
413 static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::tensorflow::ProfileSessionDataRequest, ::tensorflow::ProfileSessionDataResponse>*>(handler)
414 ->SetMessageAllocator(allocator);
415 }
416 ~ExperimentalWithCallbackMethod_GetSessionToolData() override {
417 BaseClassMustBeDerivedFromService(this);
418 }
419 // disable synchronous version of this method
420 ::grpc::Status GetSessionToolData(::grpc::ServerContext* /*context*/, const ::tensorflow::ProfileSessionDataRequest* /*request*/, ::tensorflow::ProfileSessionDataResponse* /*response*/) override {
421 abort();
422 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
423 }
424 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
425 virtual ::grpc::ServerUnaryReactor* GetSessionToolData(
426 ::grpc::CallbackServerContext* /*context*/, const ::tensorflow::ProfileSessionDataRequest* /*request*/, ::tensorflow::ProfileSessionDataResponse* /*response*/)
427 #else
428 virtual ::grpc::experimental::ServerUnaryReactor* GetSessionToolData(
429 ::grpc::experimental::CallbackServerContext* /*context*/, const ::tensorflow::ProfileSessionDataRequest* /*request*/, ::tensorflow::ProfileSessionDataResponse* /*response*/)
430 #endif
431 { return nullptr; }
432 };
433 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
434 typedef ExperimentalWithCallbackMethod_NewSession<ExperimentalWithCallbackMethod_EnumSessions<ExperimentalWithCallbackMethod_GetSessionToolData<Service > > > CallbackService;
435 #endif
436
437 typedef ExperimentalWithCallbackMethod_NewSession<ExperimentalWithCallbackMethod_EnumSessions<ExperimentalWithCallbackMethod_GetSessionToolData<Service > > > ExperimentalCallbackService;
438 template <class BaseClass>
439 class WithGenericMethod_NewSession : public BaseClass {
440 private:
441 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
442 public:
443 WithGenericMethod_NewSession() {
444 ::grpc::Service::MarkMethodGeneric(0);
445 }
446 ~WithGenericMethod_NewSession() override {
447 BaseClassMustBeDerivedFromService(this);
448 }
449 // disable synchronous version of this method
450 ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tensorflow::NewProfileSessionRequest* /*request*/, ::tensorflow::NewProfileSessionResponse* /*response*/) override {
451 abort();
452 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
453 }
454 };
455 template <class BaseClass>
456 class WithGenericMethod_EnumSessions : public BaseClass {
457 private:
458 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
459 public:
460 WithGenericMethod_EnumSessions() {
461 ::grpc::Service::MarkMethodGeneric(1);
462 }
463 ~WithGenericMethod_EnumSessions() override {
464 BaseClassMustBeDerivedFromService(this);
465 }
466 // disable synchronous version of this method
467 ::grpc::Status EnumSessions(::grpc::ServerContext* /*context*/, const ::tensorflow::EnumProfileSessionsAndToolsRequest* /*request*/, ::tensorflow::EnumProfileSessionsAndToolsResponse* /*response*/) override {
468 abort();
469 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
470 }
471 };
472 template <class BaseClass>
473 class WithGenericMethod_GetSessionToolData : public BaseClass {
474 private:
475 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
476 public:
477 WithGenericMethod_GetSessionToolData() {
478 ::grpc::Service::MarkMethodGeneric(2);
479 }
480 ~WithGenericMethod_GetSessionToolData() override {
481 BaseClassMustBeDerivedFromService(this);
482 }
483 // disable synchronous version of this method
484 ::grpc::Status GetSessionToolData(::grpc::ServerContext* /*context*/, const ::tensorflow::ProfileSessionDataRequest* /*request*/, ::tensorflow::ProfileSessionDataResponse* /*response*/) override {
485 abort();
486 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
487 }
488 };
489 template <class BaseClass>
490 class WithRawMethod_NewSession : public BaseClass {
491 private:
492 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
493 public:
494 WithRawMethod_NewSession() {
495 ::grpc::Service::MarkMethodRaw(0);
496 }
497 ~WithRawMethod_NewSession() override {
498 BaseClassMustBeDerivedFromService(this);
499 }
500 // disable synchronous version of this method
501 ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tensorflow::NewProfileSessionRequest* /*request*/, ::tensorflow::NewProfileSessionResponse* /*response*/) override {
502 abort();
503 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
504 }
505 void RequestNewSession(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
506 ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
507 }
508 };
509 template <class BaseClass>
510 class WithRawMethod_EnumSessions : public BaseClass {
511 private:
512 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
513 public:
514 WithRawMethod_EnumSessions() {
515 ::grpc::Service::MarkMethodRaw(1);
516 }
517 ~WithRawMethod_EnumSessions() override {
518 BaseClassMustBeDerivedFromService(this);
519 }
520 // disable synchronous version of this method
521 ::grpc::Status EnumSessions(::grpc::ServerContext* /*context*/, const ::tensorflow::EnumProfileSessionsAndToolsRequest* /*request*/, ::tensorflow::EnumProfileSessionsAndToolsResponse* /*response*/) override {
522 abort();
523 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
524 }
525 void RequestEnumSessions(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
526 ::grpc::Service::RequestAsyncUnary(1, context, request, response, new_call_cq, notification_cq, tag);
527 }
528 };
529 template <class BaseClass>
530 class WithRawMethod_GetSessionToolData : public BaseClass {
531 private:
532 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
533 public:
534 WithRawMethod_GetSessionToolData() {
535 ::grpc::Service::MarkMethodRaw(2);
536 }
537 ~WithRawMethod_GetSessionToolData() override {
538 BaseClassMustBeDerivedFromService(this);
539 }
540 // disable synchronous version of this method
541 ::grpc::Status GetSessionToolData(::grpc::ServerContext* /*context*/, const ::tensorflow::ProfileSessionDataRequest* /*request*/, ::tensorflow::ProfileSessionDataResponse* /*response*/) override {
542 abort();
543 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
544 }
545 void RequestGetSessionToolData(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
546 ::grpc::Service::RequestAsyncUnary(2, context, request, response, new_call_cq, notification_cq, tag);
547 }
548 };
549 template <class BaseClass>
550 class ExperimentalWithRawCallbackMethod_NewSession : public BaseClass {
551 private:
552 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
553 public:
554 ExperimentalWithRawCallbackMethod_NewSession() {
555 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
556 ::grpc::Service::
557 #else
558 ::grpc::Service::experimental().
559 #endif
560 MarkMethodRawCallback(0,
561 new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
562 [this](
563 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
564 ::grpc::CallbackServerContext*
565 #else
566 ::grpc::experimental::CallbackServerContext*
567 #endif
568 context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->NewSession(context, request, response); }));
569 }
570 ~ExperimentalWithRawCallbackMethod_NewSession() override {
571 BaseClassMustBeDerivedFromService(this);
572 }
573 // disable synchronous version of this method
574 ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tensorflow::NewProfileSessionRequest* /*request*/, ::tensorflow::NewProfileSessionResponse* /*response*/) override {
575 abort();
576 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
577 }
578 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
579 virtual ::grpc::ServerUnaryReactor* NewSession(
580 ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/)
581 #else
582 virtual ::grpc::experimental::ServerUnaryReactor* NewSession(
583 ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/)
584 #endif
585 { return nullptr; }
586 };
587 template <class BaseClass>
588 class ExperimentalWithRawCallbackMethod_EnumSessions : public BaseClass {
589 private:
590 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
591 public:
592 ExperimentalWithRawCallbackMethod_EnumSessions() {
593 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
594 ::grpc::Service::
595 #else
596 ::grpc::Service::experimental().
597 #endif
598 MarkMethodRawCallback(1,
599 new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
600 [this](
601 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
602 ::grpc::CallbackServerContext*
603 #else
604 ::grpc::experimental::CallbackServerContext*
605 #endif
606 context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->EnumSessions(context, request, response); }));
607 }
608 ~ExperimentalWithRawCallbackMethod_EnumSessions() override {
609 BaseClassMustBeDerivedFromService(this);
610 }
611 // disable synchronous version of this method
612 ::grpc::Status EnumSessions(::grpc::ServerContext* /*context*/, const ::tensorflow::EnumProfileSessionsAndToolsRequest* /*request*/, ::tensorflow::EnumProfileSessionsAndToolsResponse* /*response*/) override {
613 abort();
614 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
615 }
616 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
617 virtual ::grpc::ServerUnaryReactor* EnumSessions(
618 ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/)
619 #else
620 virtual ::grpc::experimental::ServerUnaryReactor* EnumSessions(
621 ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/)
622 #endif
623 { return nullptr; }
624 };
625 template <class BaseClass>
626 class ExperimentalWithRawCallbackMethod_GetSessionToolData : public BaseClass {
627 private:
628 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
629 public:
630 ExperimentalWithRawCallbackMethod_GetSessionToolData() {
631 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
632 ::grpc::Service::
633 #else
634 ::grpc::Service::experimental().
635 #endif
636 MarkMethodRawCallback(2,
637 new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
638 [this](
639 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
640 ::grpc::CallbackServerContext*
641 #else
642 ::grpc::experimental::CallbackServerContext*
643 #endif
644 context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->GetSessionToolData(context, request, response); }));
645 }
646 ~ExperimentalWithRawCallbackMethod_GetSessionToolData() override {
647 BaseClassMustBeDerivedFromService(this);
648 }
649 // disable synchronous version of this method
650 ::grpc::Status GetSessionToolData(::grpc::ServerContext* /*context*/, const ::tensorflow::ProfileSessionDataRequest* /*request*/, ::tensorflow::ProfileSessionDataResponse* /*response*/) override {
651 abort();
652 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
653 }
654 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
655 virtual ::grpc::ServerUnaryReactor* GetSessionToolData(
656 ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/)
657 #else
658 virtual ::grpc::experimental::ServerUnaryReactor* GetSessionToolData(
659 ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/)
660 #endif
661 { return nullptr; }
662 };
663 template <class BaseClass>
664 class WithStreamedUnaryMethod_NewSession : public BaseClass {
665 private:
666 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
667 public:
668 WithStreamedUnaryMethod_NewSession() {
669 ::grpc::Service::MarkMethodStreamed(0,
670 new ::grpc::internal::StreamedUnaryHandler< ::tensorflow::NewProfileSessionRequest, ::tensorflow::NewProfileSessionResponse>(std::bind(&WithStreamedUnaryMethod_NewSession<BaseClass>::StreamedNewSession, this, std::placeholders::_1, std::placeholders::_2)));
671 }
672 ~WithStreamedUnaryMethod_NewSession() override {
673 BaseClassMustBeDerivedFromService(this);
674 }
675 // disable regular version of this method
676 ::grpc::Status NewSession(::grpc::ServerContext* /*context*/, const ::tensorflow::NewProfileSessionRequest* /*request*/, ::tensorflow::NewProfileSessionResponse* /*response*/) override {
677 abort();
678 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
679 }
680 // replace default version of method with streamed unary
681 virtual ::grpc::Status StreamedNewSession(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tensorflow::NewProfileSessionRequest,::tensorflow::NewProfileSessionResponse>* server_unary_streamer) = 0;
682 };
683 template <class BaseClass>
684 class WithStreamedUnaryMethod_EnumSessions : public BaseClass {
685 private:
686 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
687 public:
688 WithStreamedUnaryMethod_EnumSessions() {
689 ::grpc::Service::MarkMethodStreamed(1,
690 new ::grpc::internal::StreamedUnaryHandler< ::tensorflow::EnumProfileSessionsAndToolsRequest, ::tensorflow::EnumProfileSessionsAndToolsResponse>(std::bind(&WithStreamedUnaryMethod_EnumSessions<BaseClass>::StreamedEnumSessions, this, std::placeholders::_1, std::placeholders::_2)));
691 }
692 ~WithStreamedUnaryMethod_EnumSessions() override {
693 BaseClassMustBeDerivedFromService(this);
694 }
695 // disable regular version of this method
696 ::grpc::Status EnumSessions(::grpc::ServerContext* /*context*/, const ::tensorflow::EnumProfileSessionsAndToolsRequest* /*request*/, ::tensorflow::EnumProfileSessionsAndToolsResponse* /*response*/) override {
697 abort();
698 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
699 }
700 // replace default version of method with streamed unary
701 virtual ::grpc::Status StreamedEnumSessions(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tensorflow::EnumProfileSessionsAndToolsRequest,::tensorflow::EnumProfileSessionsAndToolsResponse>* server_unary_streamer) = 0;
702 };
703 template <class BaseClass>
704 class WithStreamedUnaryMethod_GetSessionToolData : public BaseClass {
705 private:
706 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
707 public:
708 WithStreamedUnaryMethod_GetSessionToolData() {
709 ::grpc::Service::MarkMethodStreamed(2,
710 new ::grpc::internal::StreamedUnaryHandler< ::tensorflow::ProfileSessionDataRequest, ::tensorflow::ProfileSessionDataResponse>(std::bind(&WithStreamedUnaryMethod_GetSessionToolData<BaseClass>::StreamedGetSessionToolData, this, std::placeholders::_1, std::placeholders::_2)));
711 }
712 ~WithStreamedUnaryMethod_GetSessionToolData() override {
713 BaseClassMustBeDerivedFromService(this);
714 }
715 // disable regular version of this method
716 ::grpc::Status GetSessionToolData(::grpc::ServerContext* /*context*/, const ::tensorflow::ProfileSessionDataRequest* /*request*/, ::tensorflow::ProfileSessionDataResponse* /*response*/) override {
717 abort();
718 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
719 }
720 // replace default version of method with streamed unary
721 virtual ::grpc::Status StreamedGetSessionToolData(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::tensorflow::ProfileSessionDataRequest,::tensorflow::ProfileSessionDataResponse>* server_unary_streamer) = 0;
722 };
723 typedef WithStreamedUnaryMethod_NewSession<WithStreamedUnaryMethod_EnumSessions<WithStreamedUnaryMethod_GetSessionToolData<Service > > > StreamedUnaryService;
724 typedef Service SplitStreamedService;
725 typedef WithStreamedUnaryMethod_NewSession<WithStreamedUnaryMethod_EnumSessions<WithStreamedUnaryMethod_GetSessionToolData<Service > > > StreamedService;
726};
727
728} // namespace grpc
729
730} // namespace tensorflow
731
732
733#endif // GRPC_tensorflow_2fcore_2fprofiler_2fprofiler_5fanalysis_2eproto__INCLUDED
734