blob: 943da9f2a6bb0320cf96df8d6583a07bf4d8f3b9 [file] [log] [blame]
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001// Generated by the gRPC C++ plugin.
2// If you make any local change, they will be lost.
3// source: dmi/sw_management_service.proto
4#ifndef GRPC_dmi_2fsw_5fmanagement_5fservice_2eproto__INCLUDED
5#define GRPC_dmi_2fsw_5fmanagement_5fservice_2eproto__INCLUDED
6
7#include "dmi/sw_management_service.pb.h"
8
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02009#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>
Andrea Campanellac795b7d2021-04-14 13:24:44 +020028
29namespace dmi {
30
31class NativeSoftwareManagementService final {
32 public:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +020033 static constexpr char const* service_full_name() {
34 return "dmi.NativeSoftwareManagementService";
35 }
Andrea Campanellac795b7d2021-04-14 13:24:44 +020036 class StubInterface {
37 public:
38 virtual ~StubInterface() {}
39 // Get the software version information of the Active and Standby images
40 virtual ::grpc::Status GetSoftwareVersion(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::dmi::GetSoftwareVersionInformationResponse* response) = 0;
41 std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::GetSoftwareVersionInformationResponse>> AsyncGetSoftwareVersion(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
42 return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::GetSoftwareVersionInformationResponse>>(AsyncGetSoftwareVersionRaw(context, request, cq));
43 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +020044 std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::GetSoftwareVersionInformationResponse>> PrepareAsyncGetSoftwareVersion(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
45 return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::GetSoftwareVersionInformationResponse>>(PrepareAsyncGetSoftwareVersionRaw(context, request, cq));
46 }
Andrea Campanellac795b7d2021-04-14 13:24:44 +020047 // Downloads and installs the image in the standby partition, returns the status/progress of the Install
48 std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::ImageStatus>> DownloadImage(::grpc::ClientContext* context, const ::dmi::DownloadImageRequest& request) {
49 return std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::ImageStatus>>(DownloadImageRaw(context, request));
50 }
51 std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>> AsyncDownloadImage(::grpc::ClientContext* context, const ::dmi::DownloadImageRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
52 return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>>(AsyncDownloadImageRaw(context, request, cq, tag));
53 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +020054 std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>> PrepareAsyncDownloadImage(::grpc::ClientContext* context, const ::dmi::DownloadImageRequest& request, ::grpc::CompletionQueue* cq) {
55 return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>>(PrepareAsyncDownloadImageRaw(context, request, cq));
56 }
Andrea Campanellac795b7d2021-04-14 13:24:44 +020057 // Activates and runs the OLT with the image in the standby partition. If things are fine this image will
58 // henceforth be marked as the Active Partition. The old working image would remain on the Standby partition.
59 // Any possibly required (sub-)steps like "commit" are left to the "Device Manager"
60 std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::ImageStatus>> ActivateImage(::grpc::ClientContext* context, const ::dmi::HardwareID& request) {
61 return std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::ImageStatus>>(ActivateImageRaw(context, request));
62 }
63 std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>> AsyncActivateImage(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq, void* tag) {
64 return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>>(AsyncActivateImageRaw(context, request, cq, tag));
65 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +020066 std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>> PrepareAsyncActivateImage(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
67 return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>>(PrepareAsyncActivateImageRaw(context, request, cq));
68 }
Andrea Campanellac795b7d2021-04-14 13:24:44 +020069 // Marks the image in the Standby as Active and reboots the device, so that it boots from that image which was in the standby.
70 // This API is to be used if operator wants to go back to the previous software
71 std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::ImageStatus>> RevertToStandbyImage(::grpc::ClientContext* context, const ::dmi::HardwareID& request) {
72 return std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::ImageStatus>>(RevertToStandbyImageRaw(context, request));
73 }
74 std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>> AsyncRevertToStandbyImage(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq, void* tag) {
75 return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>>(AsyncRevertToStandbyImageRaw(context, request, cq, tag));
76 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +020077 std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>> PrepareAsyncRevertToStandbyImage(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
78 return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>>(PrepareAsyncRevertToStandbyImageRaw(context, request, cq));
79 }
Andrea Campanellac795b7d2021-04-14 13:24:44 +020080 // This API can be used to let the devices pickup their properitary configuration which they need at startup.
81 std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::ConfigResponse>> UpdateStartupConfiguration(::grpc::ClientContext* context, const ::dmi::ConfigRequest& request) {
82 return std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::ConfigResponse>>(UpdateStartupConfigurationRaw(context, request));
83 }
84 std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ConfigResponse>> AsyncUpdateStartupConfiguration(::grpc::ClientContext* context, const ::dmi::ConfigRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
85 return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ConfigResponse>>(AsyncUpdateStartupConfigurationRaw(context, request, cq, tag));
86 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +020087 std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ConfigResponse>> PrepareAsyncUpdateStartupConfiguration(::grpc::ClientContext* context, const ::dmi::ConfigRequest& request, ::grpc::CompletionQueue* cq) {
88 return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::ConfigResponse>>(PrepareAsyncUpdateStartupConfigurationRaw(context, request, cq));
89 }
Andrea Campanellac795b7d2021-04-14 13:24:44 +020090 // This API can be used to retrieve information about the current startup configuration that a device is using
91 virtual ::grpc::Status GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest& request, ::dmi::StartupConfigInfoResponse* response) = 0;
92 std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::StartupConfigInfoResponse>> AsyncGetStartupConfigurationInfo(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest& request, ::grpc::CompletionQueue* cq) {
93 return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::StartupConfigInfoResponse>>(AsyncGetStartupConfigurationInfoRaw(context, request, cq));
94 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +020095 std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::StartupConfigInfoResponse>> PrepareAsyncGetStartupConfigurationInfo(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest& request, ::grpc::CompletionQueue* cq) {
96 return std::unique_ptr< ::grpc::ClientAsyncResponseReaderInterface< ::dmi::StartupConfigInfoResponse>>(PrepareAsyncGetStartupConfigurationInfoRaw(context, request, cq));
97 }
amit.ghosh5a689802022-09-12 14:26:10 +020098 // This API can be used to upload to a remote location, information useful for troubleshooting problems on the hardware
99 std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::UploadDebugInfoStatus>> UploadDebugInfo(::grpc::ClientContext* context, const ::dmi::UploadDebugInfoRequest& request) {
100 return std::unique_ptr< ::grpc::ClientReaderInterface< ::dmi::UploadDebugInfoStatus>>(UploadDebugInfoRaw(context, request));
101 }
102 std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::UploadDebugInfoStatus>> AsyncUploadDebugInfo(::grpc::ClientContext* context, const ::dmi::UploadDebugInfoRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
103 return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::UploadDebugInfoStatus>>(AsyncUploadDebugInfoRaw(context, request, cq, tag));
104 }
105 std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::UploadDebugInfoStatus>> PrepareAsyncUploadDebugInfo(::grpc::ClientContext* context, const ::dmi::UploadDebugInfoRequest& request, ::grpc::CompletionQueue* cq) {
106 return std::unique_ptr< ::grpc::ClientAsyncReaderInterface< ::dmi::UploadDebugInfoStatus>>(PrepareAsyncUploadDebugInfoRaw(context, request, cq));
107 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200108 class experimental_async_interface {
109 public:
110 virtual ~experimental_async_interface() {}
111 // Get the software version information of the Active and Standby images
112 virtual void GetSoftwareVersion(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::GetSoftwareVersionInformationResponse* response, std::function<void(::grpc::Status)>) = 0;
113 virtual void GetSoftwareVersion(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::GetSoftwareVersionInformationResponse* response, std::function<void(::grpc::Status)>) = 0;
114 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
115 virtual void GetSoftwareVersion(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::GetSoftwareVersionInformationResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0;
116 #else
117 virtual void GetSoftwareVersion(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::GetSoftwareVersionInformationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
118 #endif
119 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
120 virtual void GetSoftwareVersion(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::GetSoftwareVersionInformationResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0;
121 #else
122 virtual void GetSoftwareVersion(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::GetSoftwareVersionInformationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
123 #endif
124 // Downloads and installs the image in the standby partition, returns the status/progress of the Install
125 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
126 virtual void DownloadImage(::grpc::ClientContext* context, ::dmi::DownloadImageRequest* request, ::grpc::ClientReadReactor< ::dmi::ImageStatus>* reactor) = 0;
127 #else
128 virtual void DownloadImage(::grpc::ClientContext* context, ::dmi::DownloadImageRequest* request, ::grpc::experimental::ClientReadReactor< ::dmi::ImageStatus>* reactor) = 0;
129 #endif
130 // Activates and runs the OLT with the image in the standby partition. If things are fine this image will
131 // henceforth be marked as the Active Partition. The old working image would remain on the Standby partition.
132 // Any possibly required (sub-)steps like "commit" are left to the "Device Manager"
133 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
134 virtual void ActivateImage(::grpc::ClientContext* context, ::dmi::HardwareID* request, ::grpc::ClientReadReactor< ::dmi::ImageStatus>* reactor) = 0;
135 #else
136 virtual void ActivateImage(::grpc::ClientContext* context, ::dmi::HardwareID* request, ::grpc::experimental::ClientReadReactor< ::dmi::ImageStatus>* reactor) = 0;
137 #endif
138 // Marks the image in the Standby as Active and reboots the device, so that it boots from that image which was in the standby.
139 // This API is to be used if operator wants to go back to the previous software
140 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
141 virtual void RevertToStandbyImage(::grpc::ClientContext* context, ::dmi::HardwareID* request, ::grpc::ClientReadReactor< ::dmi::ImageStatus>* reactor) = 0;
142 #else
143 virtual void RevertToStandbyImage(::grpc::ClientContext* context, ::dmi::HardwareID* request, ::grpc::experimental::ClientReadReactor< ::dmi::ImageStatus>* reactor) = 0;
144 #endif
145 // This API can be used to let the devices pickup their properitary configuration which they need at startup.
146 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
147 virtual void UpdateStartupConfiguration(::grpc::ClientContext* context, ::dmi::ConfigRequest* request, ::grpc::ClientReadReactor< ::dmi::ConfigResponse>* reactor) = 0;
148 #else
149 virtual void UpdateStartupConfiguration(::grpc::ClientContext* context, ::dmi::ConfigRequest* request, ::grpc::experimental::ClientReadReactor< ::dmi::ConfigResponse>* reactor) = 0;
150 #endif
151 // This API can be used to retrieve information about the current startup configuration that a device is using
152 virtual void GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest* request, ::dmi::StartupConfigInfoResponse* response, std::function<void(::grpc::Status)>) = 0;
153 virtual void GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::StartupConfigInfoResponse* response, std::function<void(::grpc::Status)>) = 0;
154 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
155 virtual void GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest* request, ::dmi::StartupConfigInfoResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0;
156 #else
157 virtual void GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest* request, ::dmi::StartupConfigInfoResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
158 #endif
159 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
160 virtual void GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::StartupConfigInfoResponse* response, ::grpc::ClientUnaryReactor* reactor) = 0;
161 #else
162 virtual void GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::StartupConfigInfoResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0;
163 #endif
amit.ghosh5a689802022-09-12 14:26:10 +0200164 // This API can be used to upload to a remote location, information useful for troubleshooting problems on the hardware
165 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
166 virtual void UploadDebugInfo(::grpc::ClientContext* context, ::dmi::UploadDebugInfoRequest* request, ::grpc::ClientReadReactor< ::dmi::UploadDebugInfoStatus>* reactor) = 0;
167 #else
168 virtual void UploadDebugInfo(::grpc::ClientContext* context, ::dmi::UploadDebugInfoRequest* request, ::grpc::experimental::ClientReadReactor< ::dmi::UploadDebugInfoStatus>* reactor) = 0;
169 #endif
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200170 };
171 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
172 typedef class experimental_async_interface async_interface;
173 #endif
174 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
175 async_interface* async() { return experimental_async(); }
176 #endif
177 virtual class experimental_async_interface* experimental_async() { return nullptr; }
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200178 private:
179 virtual ::grpc::ClientAsyncResponseReaderInterface< ::dmi::GetSoftwareVersionInformationResponse>* AsyncGetSoftwareVersionRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) = 0;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200180 virtual ::grpc::ClientAsyncResponseReaderInterface< ::dmi::GetSoftwareVersionInformationResponse>* PrepareAsyncGetSoftwareVersionRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) = 0;
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200181 virtual ::grpc::ClientReaderInterface< ::dmi::ImageStatus>* DownloadImageRaw(::grpc::ClientContext* context, const ::dmi::DownloadImageRequest& request) = 0;
182 virtual ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>* AsyncDownloadImageRaw(::grpc::ClientContext* context, const ::dmi::DownloadImageRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200183 virtual ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>* PrepareAsyncDownloadImageRaw(::grpc::ClientContext* context, const ::dmi::DownloadImageRequest& request, ::grpc::CompletionQueue* cq) = 0;
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200184 virtual ::grpc::ClientReaderInterface< ::dmi::ImageStatus>* ActivateImageRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request) = 0;
185 virtual ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>* AsyncActivateImageRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200186 virtual ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>* PrepareAsyncActivateImageRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) = 0;
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200187 virtual ::grpc::ClientReaderInterface< ::dmi::ImageStatus>* RevertToStandbyImageRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request) = 0;
188 virtual ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>* AsyncRevertToStandbyImageRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200189 virtual ::grpc::ClientAsyncReaderInterface< ::dmi::ImageStatus>* PrepareAsyncRevertToStandbyImageRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) = 0;
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200190 virtual ::grpc::ClientReaderInterface< ::dmi::ConfigResponse>* UpdateStartupConfigurationRaw(::grpc::ClientContext* context, const ::dmi::ConfigRequest& request) = 0;
191 virtual ::grpc::ClientAsyncReaderInterface< ::dmi::ConfigResponse>* AsyncUpdateStartupConfigurationRaw(::grpc::ClientContext* context, const ::dmi::ConfigRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200192 virtual ::grpc::ClientAsyncReaderInterface< ::dmi::ConfigResponse>* PrepareAsyncUpdateStartupConfigurationRaw(::grpc::ClientContext* context, const ::dmi::ConfigRequest& request, ::grpc::CompletionQueue* cq) = 0;
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200193 virtual ::grpc::ClientAsyncResponseReaderInterface< ::dmi::StartupConfigInfoResponse>* AsyncGetStartupConfigurationInfoRaw(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest& request, ::grpc::CompletionQueue* cq) = 0;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200194 virtual ::grpc::ClientAsyncResponseReaderInterface< ::dmi::StartupConfigInfoResponse>* PrepareAsyncGetStartupConfigurationInfoRaw(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest& request, ::grpc::CompletionQueue* cq) = 0;
amit.ghosh5a689802022-09-12 14:26:10 +0200195 virtual ::grpc::ClientReaderInterface< ::dmi::UploadDebugInfoStatus>* UploadDebugInfoRaw(::grpc::ClientContext* context, const ::dmi::UploadDebugInfoRequest& request) = 0;
196 virtual ::grpc::ClientAsyncReaderInterface< ::dmi::UploadDebugInfoStatus>* AsyncUploadDebugInfoRaw(::grpc::ClientContext* context, const ::dmi::UploadDebugInfoRequest& request, ::grpc::CompletionQueue* cq, void* tag) = 0;
197 virtual ::grpc::ClientAsyncReaderInterface< ::dmi::UploadDebugInfoStatus>* PrepareAsyncUploadDebugInfoRaw(::grpc::ClientContext* context, const ::dmi::UploadDebugInfoRequest& request, ::grpc::CompletionQueue* cq) = 0;
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200198 };
199 class Stub final : public StubInterface {
200 public:
201 Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel);
202 ::grpc::Status GetSoftwareVersion(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::dmi::GetSoftwareVersionInformationResponse* response) override;
203 std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::GetSoftwareVersionInformationResponse>> AsyncGetSoftwareVersion(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
204 return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::GetSoftwareVersionInformationResponse>>(AsyncGetSoftwareVersionRaw(context, request, cq));
205 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200206 std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::GetSoftwareVersionInformationResponse>> PrepareAsyncGetSoftwareVersion(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
207 return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::GetSoftwareVersionInformationResponse>>(PrepareAsyncGetSoftwareVersionRaw(context, request, cq));
208 }
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200209 std::unique_ptr< ::grpc::ClientReader< ::dmi::ImageStatus>> DownloadImage(::grpc::ClientContext* context, const ::dmi::DownloadImageRequest& request) {
210 return std::unique_ptr< ::grpc::ClientReader< ::dmi::ImageStatus>>(DownloadImageRaw(context, request));
211 }
212 std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ImageStatus>> AsyncDownloadImage(::grpc::ClientContext* context, const ::dmi::DownloadImageRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
213 return std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ImageStatus>>(AsyncDownloadImageRaw(context, request, cq, tag));
214 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200215 std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ImageStatus>> PrepareAsyncDownloadImage(::grpc::ClientContext* context, const ::dmi::DownloadImageRequest& request, ::grpc::CompletionQueue* cq) {
216 return std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ImageStatus>>(PrepareAsyncDownloadImageRaw(context, request, cq));
217 }
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200218 std::unique_ptr< ::grpc::ClientReader< ::dmi::ImageStatus>> ActivateImage(::grpc::ClientContext* context, const ::dmi::HardwareID& request) {
219 return std::unique_ptr< ::grpc::ClientReader< ::dmi::ImageStatus>>(ActivateImageRaw(context, request));
220 }
221 std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ImageStatus>> AsyncActivateImage(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq, void* tag) {
222 return std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ImageStatus>>(AsyncActivateImageRaw(context, request, cq, tag));
223 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200224 std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ImageStatus>> PrepareAsyncActivateImage(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
225 return std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ImageStatus>>(PrepareAsyncActivateImageRaw(context, request, cq));
226 }
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200227 std::unique_ptr< ::grpc::ClientReader< ::dmi::ImageStatus>> RevertToStandbyImage(::grpc::ClientContext* context, const ::dmi::HardwareID& request) {
228 return std::unique_ptr< ::grpc::ClientReader< ::dmi::ImageStatus>>(RevertToStandbyImageRaw(context, request));
229 }
230 std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ImageStatus>> AsyncRevertToStandbyImage(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq, void* tag) {
231 return std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ImageStatus>>(AsyncRevertToStandbyImageRaw(context, request, cq, tag));
232 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200233 std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ImageStatus>> PrepareAsyncRevertToStandbyImage(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) {
234 return std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ImageStatus>>(PrepareAsyncRevertToStandbyImageRaw(context, request, cq));
235 }
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200236 std::unique_ptr< ::grpc::ClientReader< ::dmi::ConfigResponse>> UpdateStartupConfiguration(::grpc::ClientContext* context, const ::dmi::ConfigRequest& request) {
237 return std::unique_ptr< ::grpc::ClientReader< ::dmi::ConfigResponse>>(UpdateStartupConfigurationRaw(context, request));
238 }
239 std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ConfigResponse>> AsyncUpdateStartupConfiguration(::grpc::ClientContext* context, const ::dmi::ConfigRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
240 return std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ConfigResponse>>(AsyncUpdateStartupConfigurationRaw(context, request, cq, tag));
241 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200242 std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ConfigResponse>> PrepareAsyncUpdateStartupConfiguration(::grpc::ClientContext* context, const ::dmi::ConfigRequest& request, ::grpc::CompletionQueue* cq) {
243 return std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::ConfigResponse>>(PrepareAsyncUpdateStartupConfigurationRaw(context, request, cq));
244 }
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200245 ::grpc::Status GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest& request, ::dmi::StartupConfigInfoResponse* response) override;
246 std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::StartupConfigInfoResponse>> AsyncGetStartupConfigurationInfo(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest& request, ::grpc::CompletionQueue* cq) {
247 return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::StartupConfigInfoResponse>>(AsyncGetStartupConfigurationInfoRaw(context, request, cq));
248 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200249 std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::StartupConfigInfoResponse>> PrepareAsyncGetStartupConfigurationInfo(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest& request, ::grpc::CompletionQueue* cq) {
250 return std::unique_ptr< ::grpc::ClientAsyncResponseReader< ::dmi::StartupConfigInfoResponse>>(PrepareAsyncGetStartupConfigurationInfoRaw(context, request, cq));
251 }
amit.ghosh5a689802022-09-12 14:26:10 +0200252 std::unique_ptr< ::grpc::ClientReader< ::dmi::UploadDebugInfoStatus>> UploadDebugInfo(::grpc::ClientContext* context, const ::dmi::UploadDebugInfoRequest& request) {
253 return std::unique_ptr< ::grpc::ClientReader< ::dmi::UploadDebugInfoStatus>>(UploadDebugInfoRaw(context, request));
254 }
255 std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::UploadDebugInfoStatus>> AsyncUploadDebugInfo(::grpc::ClientContext* context, const ::dmi::UploadDebugInfoRequest& request, ::grpc::CompletionQueue* cq, void* tag) {
256 return std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::UploadDebugInfoStatus>>(AsyncUploadDebugInfoRaw(context, request, cq, tag));
257 }
258 std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::UploadDebugInfoStatus>> PrepareAsyncUploadDebugInfo(::grpc::ClientContext* context, const ::dmi::UploadDebugInfoRequest& request, ::grpc::CompletionQueue* cq) {
259 return std::unique_ptr< ::grpc::ClientAsyncReader< ::dmi::UploadDebugInfoStatus>>(PrepareAsyncUploadDebugInfoRaw(context, request, cq));
260 }
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200261 class experimental_async final :
262 public StubInterface::experimental_async_interface {
263 public:
264 void GetSoftwareVersion(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::GetSoftwareVersionInformationResponse* response, std::function<void(::grpc::Status)>) override;
265 void GetSoftwareVersion(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::GetSoftwareVersionInformationResponse* response, std::function<void(::grpc::Status)>) override;
266 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
267 void GetSoftwareVersion(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::GetSoftwareVersionInformationResponse* response, ::grpc::ClientUnaryReactor* reactor) override;
268 #else
269 void GetSoftwareVersion(::grpc::ClientContext* context, const ::dmi::HardwareID* request, ::dmi::GetSoftwareVersionInformationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
270 #endif
271 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
272 void GetSoftwareVersion(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::GetSoftwareVersionInformationResponse* response, ::grpc::ClientUnaryReactor* reactor) override;
273 #else
274 void GetSoftwareVersion(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::GetSoftwareVersionInformationResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
275 #endif
276 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
277 void DownloadImage(::grpc::ClientContext* context, ::dmi::DownloadImageRequest* request, ::grpc::ClientReadReactor< ::dmi::ImageStatus>* reactor) override;
278 #else
279 void DownloadImage(::grpc::ClientContext* context, ::dmi::DownloadImageRequest* request, ::grpc::experimental::ClientReadReactor< ::dmi::ImageStatus>* reactor) override;
280 #endif
281 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
282 void ActivateImage(::grpc::ClientContext* context, ::dmi::HardwareID* request, ::grpc::ClientReadReactor< ::dmi::ImageStatus>* reactor) override;
283 #else
284 void ActivateImage(::grpc::ClientContext* context, ::dmi::HardwareID* request, ::grpc::experimental::ClientReadReactor< ::dmi::ImageStatus>* reactor) override;
285 #endif
286 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
287 void RevertToStandbyImage(::grpc::ClientContext* context, ::dmi::HardwareID* request, ::grpc::ClientReadReactor< ::dmi::ImageStatus>* reactor) override;
288 #else
289 void RevertToStandbyImage(::grpc::ClientContext* context, ::dmi::HardwareID* request, ::grpc::experimental::ClientReadReactor< ::dmi::ImageStatus>* reactor) override;
290 #endif
291 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
292 void UpdateStartupConfiguration(::grpc::ClientContext* context, ::dmi::ConfigRequest* request, ::grpc::ClientReadReactor< ::dmi::ConfigResponse>* reactor) override;
293 #else
294 void UpdateStartupConfiguration(::grpc::ClientContext* context, ::dmi::ConfigRequest* request, ::grpc::experimental::ClientReadReactor< ::dmi::ConfigResponse>* reactor) override;
295 #endif
296 void GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest* request, ::dmi::StartupConfigInfoResponse* response, std::function<void(::grpc::Status)>) override;
297 void GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::StartupConfigInfoResponse* response, std::function<void(::grpc::Status)>) override;
298 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
299 void GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest* request, ::dmi::StartupConfigInfoResponse* response, ::grpc::ClientUnaryReactor* reactor) override;
300 #else
301 void GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest* request, ::dmi::StartupConfigInfoResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
302 #endif
303 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
304 void GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::StartupConfigInfoResponse* response, ::grpc::ClientUnaryReactor* reactor) override;
305 #else
306 void GetStartupConfigurationInfo(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::dmi::StartupConfigInfoResponse* response, ::grpc::experimental::ClientUnaryReactor* reactor) override;
307 #endif
amit.ghosh5a689802022-09-12 14:26:10 +0200308 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
309 void UploadDebugInfo(::grpc::ClientContext* context, ::dmi::UploadDebugInfoRequest* request, ::grpc::ClientReadReactor< ::dmi::UploadDebugInfoStatus>* reactor) override;
310 #else
311 void UploadDebugInfo(::grpc::ClientContext* context, ::dmi::UploadDebugInfoRequest* request, ::grpc::experimental::ClientReadReactor< ::dmi::UploadDebugInfoStatus>* reactor) override;
312 #endif
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200313 private:
314 friend class Stub;
315 explicit experimental_async(Stub* stub): stub_(stub) { }
316 Stub* stub() { return stub_; }
317 Stub* stub_;
318 };
319 class experimental_async_interface* experimental_async() override { return &async_stub_; }
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200320
321 private:
322 std::shared_ptr< ::grpc::ChannelInterface> channel_;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200323 class experimental_async async_stub_{this};
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200324 ::grpc::ClientAsyncResponseReader< ::dmi::GetSoftwareVersionInformationResponse>* AsyncGetSoftwareVersionRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) override;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200325 ::grpc::ClientAsyncResponseReader< ::dmi::GetSoftwareVersionInformationResponse>* PrepareAsyncGetSoftwareVersionRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) override;
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200326 ::grpc::ClientReader< ::dmi::ImageStatus>* DownloadImageRaw(::grpc::ClientContext* context, const ::dmi::DownloadImageRequest& request) override;
327 ::grpc::ClientAsyncReader< ::dmi::ImageStatus>* AsyncDownloadImageRaw(::grpc::ClientContext* context, const ::dmi::DownloadImageRequest& request, ::grpc::CompletionQueue* cq, void* tag) override;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200328 ::grpc::ClientAsyncReader< ::dmi::ImageStatus>* PrepareAsyncDownloadImageRaw(::grpc::ClientContext* context, const ::dmi::DownloadImageRequest& request, ::grpc::CompletionQueue* cq) override;
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200329 ::grpc::ClientReader< ::dmi::ImageStatus>* ActivateImageRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request) override;
330 ::grpc::ClientAsyncReader< ::dmi::ImageStatus>* AsyncActivateImageRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq, void* tag) override;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200331 ::grpc::ClientAsyncReader< ::dmi::ImageStatus>* PrepareAsyncActivateImageRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) override;
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200332 ::grpc::ClientReader< ::dmi::ImageStatus>* RevertToStandbyImageRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request) override;
333 ::grpc::ClientAsyncReader< ::dmi::ImageStatus>* AsyncRevertToStandbyImageRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq, void* tag) override;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200334 ::grpc::ClientAsyncReader< ::dmi::ImageStatus>* PrepareAsyncRevertToStandbyImageRaw(::grpc::ClientContext* context, const ::dmi::HardwareID& request, ::grpc::CompletionQueue* cq) override;
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200335 ::grpc::ClientReader< ::dmi::ConfigResponse>* UpdateStartupConfigurationRaw(::grpc::ClientContext* context, const ::dmi::ConfigRequest& request) override;
336 ::grpc::ClientAsyncReader< ::dmi::ConfigResponse>* AsyncUpdateStartupConfigurationRaw(::grpc::ClientContext* context, const ::dmi::ConfigRequest& request, ::grpc::CompletionQueue* cq, void* tag) override;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200337 ::grpc::ClientAsyncReader< ::dmi::ConfigResponse>* PrepareAsyncUpdateStartupConfigurationRaw(::grpc::ClientContext* context, const ::dmi::ConfigRequest& request, ::grpc::CompletionQueue* cq) override;
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200338 ::grpc::ClientAsyncResponseReader< ::dmi::StartupConfigInfoResponse>* AsyncGetStartupConfigurationInfoRaw(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest& request, ::grpc::CompletionQueue* cq) override;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200339 ::grpc::ClientAsyncResponseReader< ::dmi::StartupConfigInfoResponse>* PrepareAsyncGetStartupConfigurationInfoRaw(::grpc::ClientContext* context, const ::dmi::StartupConfigInfoRequest& request, ::grpc::CompletionQueue* cq) override;
amit.ghosh5a689802022-09-12 14:26:10 +0200340 ::grpc::ClientReader< ::dmi::UploadDebugInfoStatus>* UploadDebugInfoRaw(::grpc::ClientContext* context, const ::dmi::UploadDebugInfoRequest& request) override;
341 ::grpc::ClientAsyncReader< ::dmi::UploadDebugInfoStatus>* AsyncUploadDebugInfoRaw(::grpc::ClientContext* context, const ::dmi::UploadDebugInfoRequest& request, ::grpc::CompletionQueue* cq, void* tag) override;
342 ::grpc::ClientAsyncReader< ::dmi::UploadDebugInfoStatus>* PrepareAsyncUploadDebugInfoRaw(::grpc::ClientContext* context, const ::dmi::UploadDebugInfoRequest& request, ::grpc::CompletionQueue* cq) override;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200343 const ::grpc::internal::RpcMethod rpcmethod_GetSoftwareVersion_;
344 const ::grpc::internal::RpcMethod rpcmethod_DownloadImage_;
345 const ::grpc::internal::RpcMethod rpcmethod_ActivateImage_;
346 const ::grpc::internal::RpcMethod rpcmethod_RevertToStandbyImage_;
347 const ::grpc::internal::RpcMethod rpcmethod_UpdateStartupConfiguration_;
348 const ::grpc::internal::RpcMethod rpcmethod_GetStartupConfigurationInfo_;
amit.ghosh5a689802022-09-12 14:26:10 +0200349 const ::grpc::internal::RpcMethod rpcmethod_UploadDebugInfo_;
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200350 };
351 static std::unique_ptr<Stub> NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions());
352
353 class Service : public ::grpc::Service {
354 public:
355 Service();
356 virtual ~Service();
357 // Get the software version information of the Active and Standby images
358 virtual ::grpc::Status GetSoftwareVersion(::grpc::ServerContext* context, const ::dmi::HardwareID* request, ::dmi::GetSoftwareVersionInformationResponse* response);
359 // Downloads and installs the image in the standby partition, returns the status/progress of the Install
360 virtual ::grpc::Status DownloadImage(::grpc::ServerContext* context, const ::dmi::DownloadImageRequest* request, ::grpc::ServerWriter< ::dmi::ImageStatus>* writer);
361 // Activates and runs the OLT with the image in the standby partition. If things are fine this image will
362 // henceforth be marked as the Active Partition. The old working image would remain on the Standby partition.
363 // Any possibly required (sub-)steps like "commit" are left to the "Device Manager"
364 virtual ::grpc::Status ActivateImage(::grpc::ServerContext* context, const ::dmi::HardwareID* request, ::grpc::ServerWriter< ::dmi::ImageStatus>* writer);
365 // Marks the image in the Standby as Active and reboots the device, so that it boots from that image which was in the standby.
366 // This API is to be used if operator wants to go back to the previous software
367 virtual ::grpc::Status RevertToStandbyImage(::grpc::ServerContext* context, const ::dmi::HardwareID* request, ::grpc::ServerWriter< ::dmi::ImageStatus>* writer);
368 // This API can be used to let the devices pickup their properitary configuration which they need at startup.
369 virtual ::grpc::Status UpdateStartupConfiguration(::grpc::ServerContext* context, const ::dmi::ConfigRequest* request, ::grpc::ServerWriter< ::dmi::ConfigResponse>* writer);
370 // This API can be used to retrieve information about the current startup configuration that a device is using
371 virtual ::grpc::Status GetStartupConfigurationInfo(::grpc::ServerContext* context, const ::dmi::StartupConfigInfoRequest* request, ::dmi::StartupConfigInfoResponse* response);
amit.ghosh5a689802022-09-12 14:26:10 +0200372 // This API can be used to upload to a remote location, information useful for troubleshooting problems on the hardware
373 virtual ::grpc::Status UploadDebugInfo(::grpc::ServerContext* context, const ::dmi::UploadDebugInfoRequest* request, ::grpc::ServerWriter< ::dmi::UploadDebugInfoStatus>* writer);
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200374 };
375 template <class BaseClass>
376 class WithAsyncMethod_GetSoftwareVersion : public BaseClass {
377 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200378 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200379 public:
380 WithAsyncMethod_GetSoftwareVersion() {
381 ::grpc::Service::MarkMethodAsync(0);
382 }
383 ~WithAsyncMethod_GetSoftwareVersion() override {
384 BaseClassMustBeDerivedFromService(this);
385 }
386 // disable synchronous version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200387 ::grpc::Status GetSoftwareVersion(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::GetSoftwareVersionInformationResponse* /*response*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200388 abort();
389 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
390 }
391 void RequestGetSoftwareVersion(::grpc::ServerContext* context, ::dmi::HardwareID* request, ::grpc::ServerAsyncResponseWriter< ::dmi::GetSoftwareVersionInformationResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
392 ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
393 }
394 };
395 template <class BaseClass>
396 class WithAsyncMethod_DownloadImage : public BaseClass {
397 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200398 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200399 public:
400 WithAsyncMethod_DownloadImage() {
401 ::grpc::Service::MarkMethodAsync(1);
402 }
403 ~WithAsyncMethod_DownloadImage() override {
404 BaseClassMustBeDerivedFromService(this);
405 }
406 // disable synchronous version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200407 ::grpc::Status DownloadImage(::grpc::ServerContext* /*context*/, const ::dmi::DownloadImageRequest* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200408 abort();
409 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
410 }
411 void RequestDownloadImage(::grpc::ServerContext* context, ::dmi::DownloadImageRequest* request, ::grpc::ServerAsyncWriter< ::dmi::ImageStatus>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
412 ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag);
413 }
414 };
415 template <class BaseClass>
416 class WithAsyncMethod_ActivateImage : public BaseClass {
417 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200418 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200419 public:
420 WithAsyncMethod_ActivateImage() {
421 ::grpc::Service::MarkMethodAsync(2);
422 }
423 ~WithAsyncMethod_ActivateImage() override {
424 BaseClassMustBeDerivedFromService(this);
425 }
426 // disable synchronous version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200427 ::grpc::Status ActivateImage(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200428 abort();
429 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
430 }
431 void RequestActivateImage(::grpc::ServerContext* context, ::dmi::HardwareID* request, ::grpc::ServerAsyncWriter< ::dmi::ImageStatus>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
432 ::grpc::Service::RequestAsyncServerStreaming(2, context, request, writer, new_call_cq, notification_cq, tag);
433 }
434 };
435 template <class BaseClass>
436 class WithAsyncMethod_RevertToStandbyImage : public BaseClass {
437 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200438 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200439 public:
440 WithAsyncMethod_RevertToStandbyImage() {
441 ::grpc::Service::MarkMethodAsync(3);
442 }
443 ~WithAsyncMethod_RevertToStandbyImage() override {
444 BaseClassMustBeDerivedFromService(this);
445 }
446 // disable synchronous version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200447 ::grpc::Status RevertToStandbyImage(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200448 abort();
449 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
450 }
451 void RequestRevertToStandbyImage(::grpc::ServerContext* context, ::dmi::HardwareID* request, ::grpc::ServerAsyncWriter< ::dmi::ImageStatus>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
452 ::grpc::Service::RequestAsyncServerStreaming(3, context, request, writer, new_call_cq, notification_cq, tag);
453 }
454 };
455 template <class BaseClass>
456 class WithAsyncMethod_UpdateStartupConfiguration : public BaseClass {
457 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200458 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200459 public:
460 WithAsyncMethod_UpdateStartupConfiguration() {
461 ::grpc::Service::MarkMethodAsync(4);
462 }
463 ~WithAsyncMethod_UpdateStartupConfiguration() override {
464 BaseClassMustBeDerivedFromService(this);
465 }
466 // disable synchronous version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200467 ::grpc::Status UpdateStartupConfiguration(::grpc::ServerContext* /*context*/, const ::dmi::ConfigRequest* /*request*/, ::grpc::ServerWriter< ::dmi::ConfigResponse>* /*writer*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200468 abort();
469 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
470 }
471 void RequestUpdateStartupConfiguration(::grpc::ServerContext* context, ::dmi::ConfigRequest* request, ::grpc::ServerAsyncWriter< ::dmi::ConfigResponse>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
472 ::grpc::Service::RequestAsyncServerStreaming(4, context, request, writer, new_call_cq, notification_cq, tag);
473 }
474 };
475 template <class BaseClass>
476 class WithAsyncMethod_GetStartupConfigurationInfo : public BaseClass {
477 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200478 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200479 public:
480 WithAsyncMethod_GetStartupConfigurationInfo() {
481 ::grpc::Service::MarkMethodAsync(5);
482 }
483 ~WithAsyncMethod_GetStartupConfigurationInfo() override {
484 BaseClassMustBeDerivedFromService(this);
485 }
486 // disable synchronous version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200487 ::grpc::Status GetStartupConfigurationInfo(::grpc::ServerContext* /*context*/, const ::dmi::StartupConfigInfoRequest* /*request*/, ::dmi::StartupConfigInfoResponse* /*response*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200488 abort();
489 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
490 }
491 void RequestGetStartupConfigurationInfo(::grpc::ServerContext* context, ::dmi::StartupConfigInfoRequest* request, ::grpc::ServerAsyncResponseWriter< ::dmi::StartupConfigInfoResponse>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
492 ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag);
493 }
494 };
amit.ghosh5a689802022-09-12 14:26:10 +0200495 template <class BaseClass>
496 class WithAsyncMethod_UploadDebugInfo : public BaseClass {
497 private:
498 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
499 public:
500 WithAsyncMethod_UploadDebugInfo() {
501 ::grpc::Service::MarkMethodAsync(6);
502 }
503 ~WithAsyncMethod_UploadDebugInfo() override {
504 BaseClassMustBeDerivedFromService(this);
505 }
506 // disable synchronous version of this method
507 ::grpc::Status UploadDebugInfo(::grpc::ServerContext* /*context*/, const ::dmi::UploadDebugInfoRequest* /*request*/, ::grpc::ServerWriter< ::dmi::UploadDebugInfoStatus>* /*writer*/) override {
508 abort();
509 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
510 }
511 void RequestUploadDebugInfo(::grpc::ServerContext* context, ::dmi::UploadDebugInfoRequest* request, ::grpc::ServerAsyncWriter< ::dmi::UploadDebugInfoStatus>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
512 ::grpc::Service::RequestAsyncServerStreaming(6, context, request, writer, new_call_cq, notification_cq, tag);
513 }
514 };
515 typedef WithAsyncMethod_GetSoftwareVersion<WithAsyncMethod_DownloadImage<WithAsyncMethod_ActivateImage<WithAsyncMethod_RevertToStandbyImage<WithAsyncMethod_UpdateStartupConfiguration<WithAsyncMethod_GetStartupConfigurationInfo<WithAsyncMethod_UploadDebugInfo<Service > > > > > > > AsyncService;
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200516 template <class BaseClass>
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200517 class ExperimentalWithCallbackMethod_GetSoftwareVersion : public BaseClass {
518 private:
519 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
520 public:
521 ExperimentalWithCallbackMethod_GetSoftwareVersion() {
522 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
523 ::grpc::Service::
524 #else
525 ::grpc::Service::experimental().
526 #endif
527 MarkMethodCallback(0,
528 new ::grpc_impl::internal::CallbackUnaryHandler< ::dmi::HardwareID, ::dmi::GetSoftwareVersionInformationResponse>(
529 [this](
530 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
531 ::grpc::CallbackServerContext*
532 #else
533 ::grpc::experimental::CallbackServerContext*
534 #endif
535 context, const ::dmi::HardwareID* request, ::dmi::GetSoftwareVersionInformationResponse* response) { return this->GetSoftwareVersion(context, request, response); }));}
536 void SetMessageAllocatorFor_GetSoftwareVersion(
537 ::grpc::experimental::MessageAllocator< ::dmi::HardwareID, ::dmi::GetSoftwareVersionInformationResponse>* allocator) {
538 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
539 ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(0);
540 #else
541 ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(0);
542 #endif
543 static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::dmi::HardwareID, ::dmi::GetSoftwareVersionInformationResponse>*>(handler)
544 ->SetMessageAllocator(allocator);
545 }
546 ~ExperimentalWithCallbackMethod_GetSoftwareVersion() override {
547 BaseClassMustBeDerivedFromService(this);
548 }
549 // disable synchronous version of this method
550 ::grpc::Status GetSoftwareVersion(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::GetSoftwareVersionInformationResponse* /*response*/) override {
551 abort();
552 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
553 }
554 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
555 virtual ::grpc::ServerUnaryReactor* GetSoftwareVersion(
556 ::grpc::CallbackServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::GetSoftwareVersionInformationResponse* /*response*/)
557 #else
558 virtual ::grpc::experimental::ServerUnaryReactor* GetSoftwareVersion(
559 ::grpc::experimental::CallbackServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::GetSoftwareVersionInformationResponse* /*response*/)
560 #endif
561 { return nullptr; }
562 };
563 template <class BaseClass>
564 class ExperimentalWithCallbackMethod_DownloadImage : public BaseClass {
565 private:
566 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
567 public:
568 ExperimentalWithCallbackMethod_DownloadImage() {
569 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
570 ::grpc::Service::
571 #else
572 ::grpc::Service::experimental().
573 #endif
574 MarkMethodCallback(1,
575 new ::grpc_impl::internal::CallbackServerStreamingHandler< ::dmi::DownloadImageRequest, ::dmi::ImageStatus>(
576 [this](
577 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
578 ::grpc::CallbackServerContext*
579 #else
580 ::grpc::experimental::CallbackServerContext*
581 #endif
582 context, const ::dmi::DownloadImageRequest* request) { return this->DownloadImage(context, request); }));
583 }
584 ~ExperimentalWithCallbackMethod_DownloadImage() override {
585 BaseClassMustBeDerivedFromService(this);
586 }
587 // disable synchronous version of this method
588 ::grpc::Status DownloadImage(::grpc::ServerContext* /*context*/, const ::dmi::DownloadImageRequest* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
589 abort();
590 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
591 }
592 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
593 virtual ::grpc::ServerWriteReactor< ::dmi::ImageStatus>* DownloadImage(
594 ::grpc::CallbackServerContext* /*context*/, const ::dmi::DownloadImageRequest* /*request*/)
595 #else
596 virtual ::grpc::experimental::ServerWriteReactor< ::dmi::ImageStatus>* DownloadImage(
597 ::grpc::experimental::CallbackServerContext* /*context*/, const ::dmi::DownloadImageRequest* /*request*/)
598 #endif
599 { return nullptr; }
600 };
601 template <class BaseClass>
602 class ExperimentalWithCallbackMethod_ActivateImage : public BaseClass {
603 private:
604 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
605 public:
606 ExperimentalWithCallbackMethod_ActivateImage() {
607 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
608 ::grpc::Service::
609 #else
610 ::grpc::Service::experimental().
611 #endif
612 MarkMethodCallback(2,
613 new ::grpc_impl::internal::CallbackServerStreamingHandler< ::dmi::HardwareID, ::dmi::ImageStatus>(
614 [this](
615 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
616 ::grpc::CallbackServerContext*
617 #else
618 ::grpc::experimental::CallbackServerContext*
619 #endif
620 context, const ::dmi::HardwareID* request) { return this->ActivateImage(context, request); }));
621 }
622 ~ExperimentalWithCallbackMethod_ActivateImage() override {
623 BaseClassMustBeDerivedFromService(this);
624 }
625 // disable synchronous version of this method
626 ::grpc::Status ActivateImage(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
627 abort();
628 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
629 }
630 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
631 virtual ::grpc::ServerWriteReactor< ::dmi::ImageStatus>* ActivateImage(
632 ::grpc::CallbackServerContext* /*context*/, const ::dmi::HardwareID* /*request*/)
633 #else
634 virtual ::grpc::experimental::ServerWriteReactor< ::dmi::ImageStatus>* ActivateImage(
635 ::grpc::experimental::CallbackServerContext* /*context*/, const ::dmi::HardwareID* /*request*/)
636 #endif
637 { return nullptr; }
638 };
639 template <class BaseClass>
640 class ExperimentalWithCallbackMethod_RevertToStandbyImage : public BaseClass {
641 private:
642 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
643 public:
644 ExperimentalWithCallbackMethod_RevertToStandbyImage() {
645 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
646 ::grpc::Service::
647 #else
648 ::grpc::Service::experimental().
649 #endif
650 MarkMethodCallback(3,
651 new ::grpc_impl::internal::CallbackServerStreamingHandler< ::dmi::HardwareID, ::dmi::ImageStatus>(
652 [this](
653 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
654 ::grpc::CallbackServerContext*
655 #else
656 ::grpc::experimental::CallbackServerContext*
657 #endif
658 context, const ::dmi::HardwareID* request) { return this->RevertToStandbyImage(context, request); }));
659 }
660 ~ExperimentalWithCallbackMethod_RevertToStandbyImage() override {
661 BaseClassMustBeDerivedFromService(this);
662 }
663 // disable synchronous version of this method
664 ::grpc::Status RevertToStandbyImage(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
665 abort();
666 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
667 }
668 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
669 virtual ::grpc::ServerWriteReactor< ::dmi::ImageStatus>* RevertToStandbyImage(
670 ::grpc::CallbackServerContext* /*context*/, const ::dmi::HardwareID* /*request*/)
671 #else
672 virtual ::grpc::experimental::ServerWriteReactor< ::dmi::ImageStatus>* RevertToStandbyImage(
673 ::grpc::experimental::CallbackServerContext* /*context*/, const ::dmi::HardwareID* /*request*/)
674 #endif
675 { return nullptr; }
676 };
677 template <class BaseClass>
678 class ExperimentalWithCallbackMethod_UpdateStartupConfiguration : public BaseClass {
679 private:
680 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
681 public:
682 ExperimentalWithCallbackMethod_UpdateStartupConfiguration() {
683 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
684 ::grpc::Service::
685 #else
686 ::grpc::Service::experimental().
687 #endif
688 MarkMethodCallback(4,
689 new ::grpc_impl::internal::CallbackServerStreamingHandler< ::dmi::ConfigRequest, ::dmi::ConfigResponse>(
690 [this](
691 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
692 ::grpc::CallbackServerContext*
693 #else
694 ::grpc::experimental::CallbackServerContext*
695 #endif
696 context, const ::dmi::ConfigRequest* request) { return this->UpdateStartupConfiguration(context, request); }));
697 }
698 ~ExperimentalWithCallbackMethod_UpdateStartupConfiguration() override {
699 BaseClassMustBeDerivedFromService(this);
700 }
701 // disable synchronous version of this method
702 ::grpc::Status UpdateStartupConfiguration(::grpc::ServerContext* /*context*/, const ::dmi::ConfigRequest* /*request*/, ::grpc::ServerWriter< ::dmi::ConfigResponse>* /*writer*/) override {
703 abort();
704 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
705 }
706 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
707 virtual ::grpc::ServerWriteReactor< ::dmi::ConfigResponse>* UpdateStartupConfiguration(
708 ::grpc::CallbackServerContext* /*context*/, const ::dmi::ConfigRequest* /*request*/)
709 #else
710 virtual ::grpc::experimental::ServerWriteReactor< ::dmi::ConfigResponse>* UpdateStartupConfiguration(
711 ::grpc::experimental::CallbackServerContext* /*context*/, const ::dmi::ConfigRequest* /*request*/)
712 #endif
713 { return nullptr; }
714 };
715 template <class BaseClass>
716 class ExperimentalWithCallbackMethod_GetStartupConfigurationInfo : public BaseClass {
717 private:
718 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
719 public:
720 ExperimentalWithCallbackMethod_GetStartupConfigurationInfo() {
721 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
722 ::grpc::Service::
723 #else
724 ::grpc::Service::experimental().
725 #endif
726 MarkMethodCallback(5,
727 new ::grpc_impl::internal::CallbackUnaryHandler< ::dmi::StartupConfigInfoRequest, ::dmi::StartupConfigInfoResponse>(
728 [this](
729 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
730 ::grpc::CallbackServerContext*
731 #else
732 ::grpc::experimental::CallbackServerContext*
733 #endif
734 context, const ::dmi::StartupConfigInfoRequest* request, ::dmi::StartupConfigInfoResponse* response) { return this->GetStartupConfigurationInfo(context, request, response); }));}
735 void SetMessageAllocatorFor_GetStartupConfigurationInfo(
736 ::grpc::experimental::MessageAllocator< ::dmi::StartupConfigInfoRequest, ::dmi::StartupConfigInfoResponse>* allocator) {
737 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
738 ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(5);
739 #else
740 ::grpc::internal::MethodHandler* const handler = ::grpc::Service::experimental().GetHandler(5);
741 #endif
742 static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::dmi::StartupConfigInfoRequest, ::dmi::StartupConfigInfoResponse>*>(handler)
743 ->SetMessageAllocator(allocator);
744 }
745 ~ExperimentalWithCallbackMethod_GetStartupConfigurationInfo() override {
746 BaseClassMustBeDerivedFromService(this);
747 }
748 // disable synchronous version of this method
749 ::grpc::Status GetStartupConfigurationInfo(::grpc::ServerContext* /*context*/, const ::dmi::StartupConfigInfoRequest* /*request*/, ::dmi::StartupConfigInfoResponse* /*response*/) override {
750 abort();
751 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
752 }
753 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
754 virtual ::grpc::ServerUnaryReactor* GetStartupConfigurationInfo(
755 ::grpc::CallbackServerContext* /*context*/, const ::dmi::StartupConfigInfoRequest* /*request*/, ::dmi::StartupConfigInfoResponse* /*response*/)
756 #else
757 virtual ::grpc::experimental::ServerUnaryReactor* GetStartupConfigurationInfo(
758 ::grpc::experimental::CallbackServerContext* /*context*/, const ::dmi::StartupConfigInfoRequest* /*request*/, ::dmi::StartupConfigInfoResponse* /*response*/)
759 #endif
760 { return nullptr; }
761 };
amit.ghosh5a689802022-09-12 14:26:10 +0200762 template <class BaseClass>
763 class ExperimentalWithCallbackMethod_UploadDebugInfo : public BaseClass {
764 private:
765 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
766 public:
767 ExperimentalWithCallbackMethod_UploadDebugInfo() {
768 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
769 ::grpc::Service::
770 #else
771 ::grpc::Service::experimental().
772 #endif
773 MarkMethodCallback(6,
774 new ::grpc_impl::internal::CallbackServerStreamingHandler< ::dmi::UploadDebugInfoRequest, ::dmi::UploadDebugInfoStatus>(
775 [this](
776 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
777 ::grpc::CallbackServerContext*
778 #else
779 ::grpc::experimental::CallbackServerContext*
780 #endif
781 context, const ::dmi::UploadDebugInfoRequest* request) { return this->UploadDebugInfo(context, request); }));
782 }
783 ~ExperimentalWithCallbackMethod_UploadDebugInfo() override {
784 BaseClassMustBeDerivedFromService(this);
785 }
786 // disable synchronous version of this method
787 ::grpc::Status UploadDebugInfo(::grpc::ServerContext* /*context*/, const ::dmi::UploadDebugInfoRequest* /*request*/, ::grpc::ServerWriter< ::dmi::UploadDebugInfoStatus>* /*writer*/) override {
788 abort();
789 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
790 }
791 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
792 virtual ::grpc::ServerWriteReactor< ::dmi::UploadDebugInfoStatus>* UploadDebugInfo(
793 ::grpc::CallbackServerContext* /*context*/, const ::dmi::UploadDebugInfoRequest* /*request*/)
794 #else
795 virtual ::grpc::experimental::ServerWriteReactor< ::dmi::UploadDebugInfoStatus>* UploadDebugInfo(
796 ::grpc::experimental::CallbackServerContext* /*context*/, const ::dmi::UploadDebugInfoRequest* /*request*/)
797 #endif
798 { return nullptr; }
799 };
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200800 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
amit.ghosh5a689802022-09-12 14:26:10 +0200801 typedef ExperimentalWithCallbackMethod_GetSoftwareVersion<ExperimentalWithCallbackMethod_DownloadImage<ExperimentalWithCallbackMethod_ActivateImage<ExperimentalWithCallbackMethod_RevertToStandbyImage<ExperimentalWithCallbackMethod_UpdateStartupConfiguration<ExperimentalWithCallbackMethod_GetStartupConfigurationInfo<ExperimentalWithCallbackMethod_UploadDebugInfo<Service > > > > > > > CallbackService;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200802 #endif
803
amit.ghosh5a689802022-09-12 14:26:10 +0200804 typedef ExperimentalWithCallbackMethod_GetSoftwareVersion<ExperimentalWithCallbackMethod_DownloadImage<ExperimentalWithCallbackMethod_ActivateImage<ExperimentalWithCallbackMethod_RevertToStandbyImage<ExperimentalWithCallbackMethod_UpdateStartupConfiguration<ExperimentalWithCallbackMethod_GetStartupConfigurationInfo<ExperimentalWithCallbackMethod_UploadDebugInfo<Service > > > > > > > ExperimentalCallbackService;
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200805 template <class BaseClass>
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200806 class WithGenericMethod_GetSoftwareVersion : public BaseClass {
807 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200808 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200809 public:
810 WithGenericMethod_GetSoftwareVersion() {
811 ::grpc::Service::MarkMethodGeneric(0);
812 }
813 ~WithGenericMethod_GetSoftwareVersion() override {
814 BaseClassMustBeDerivedFromService(this);
815 }
816 // disable synchronous version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200817 ::grpc::Status GetSoftwareVersion(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::GetSoftwareVersionInformationResponse* /*response*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200818 abort();
819 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
820 }
821 };
822 template <class BaseClass>
823 class WithGenericMethod_DownloadImage : public BaseClass {
824 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200825 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200826 public:
827 WithGenericMethod_DownloadImage() {
828 ::grpc::Service::MarkMethodGeneric(1);
829 }
830 ~WithGenericMethod_DownloadImage() override {
831 BaseClassMustBeDerivedFromService(this);
832 }
833 // disable synchronous version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200834 ::grpc::Status DownloadImage(::grpc::ServerContext* /*context*/, const ::dmi::DownloadImageRequest* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200835 abort();
836 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
837 }
838 };
839 template <class BaseClass>
840 class WithGenericMethod_ActivateImage : public BaseClass {
841 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200842 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200843 public:
844 WithGenericMethod_ActivateImage() {
845 ::grpc::Service::MarkMethodGeneric(2);
846 }
847 ~WithGenericMethod_ActivateImage() override {
848 BaseClassMustBeDerivedFromService(this);
849 }
850 // disable synchronous version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200851 ::grpc::Status ActivateImage(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200852 abort();
853 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
854 }
855 };
856 template <class BaseClass>
857 class WithGenericMethod_RevertToStandbyImage : public BaseClass {
858 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200859 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200860 public:
861 WithGenericMethod_RevertToStandbyImage() {
862 ::grpc::Service::MarkMethodGeneric(3);
863 }
864 ~WithGenericMethod_RevertToStandbyImage() override {
865 BaseClassMustBeDerivedFromService(this);
866 }
867 // disable synchronous version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200868 ::grpc::Status RevertToStandbyImage(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200869 abort();
870 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
871 }
872 };
873 template <class BaseClass>
874 class WithGenericMethod_UpdateStartupConfiguration : public BaseClass {
875 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200876 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200877 public:
878 WithGenericMethod_UpdateStartupConfiguration() {
879 ::grpc::Service::MarkMethodGeneric(4);
880 }
881 ~WithGenericMethod_UpdateStartupConfiguration() override {
882 BaseClassMustBeDerivedFromService(this);
883 }
884 // disable synchronous version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200885 ::grpc::Status UpdateStartupConfiguration(::grpc::ServerContext* /*context*/, const ::dmi::ConfigRequest* /*request*/, ::grpc::ServerWriter< ::dmi::ConfigResponse>* /*writer*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200886 abort();
887 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
888 }
889 };
890 template <class BaseClass>
891 class WithGenericMethod_GetStartupConfigurationInfo : public BaseClass {
892 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200893 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200894 public:
895 WithGenericMethod_GetStartupConfigurationInfo() {
896 ::grpc::Service::MarkMethodGeneric(5);
897 }
898 ~WithGenericMethod_GetStartupConfigurationInfo() override {
899 BaseClassMustBeDerivedFromService(this);
900 }
901 // disable synchronous version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200902 ::grpc::Status GetStartupConfigurationInfo(::grpc::ServerContext* /*context*/, const ::dmi::StartupConfigInfoRequest* /*request*/, ::dmi::StartupConfigInfoResponse* /*response*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +0200903 abort();
904 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
905 }
906 };
907 template <class BaseClass>
amit.ghosh5a689802022-09-12 14:26:10 +0200908 class WithGenericMethod_UploadDebugInfo : public BaseClass {
909 private:
910 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
911 public:
912 WithGenericMethod_UploadDebugInfo() {
913 ::grpc::Service::MarkMethodGeneric(6);
914 }
915 ~WithGenericMethod_UploadDebugInfo() override {
916 BaseClassMustBeDerivedFromService(this);
917 }
918 // disable synchronous version of this method
919 ::grpc::Status UploadDebugInfo(::grpc::ServerContext* /*context*/, const ::dmi::UploadDebugInfoRequest* /*request*/, ::grpc::ServerWriter< ::dmi::UploadDebugInfoStatus>* /*writer*/) override {
920 abort();
921 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
922 }
923 };
924 template <class BaseClass>
Andrea Campanella03d4e7a2021-04-28 15:34:46 +0200925 class WithRawMethod_GetSoftwareVersion : public BaseClass {
926 private:
927 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
928 public:
929 WithRawMethod_GetSoftwareVersion() {
930 ::grpc::Service::MarkMethodRaw(0);
931 }
932 ~WithRawMethod_GetSoftwareVersion() override {
933 BaseClassMustBeDerivedFromService(this);
934 }
935 // disable synchronous version of this method
936 ::grpc::Status GetSoftwareVersion(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::GetSoftwareVersionInformationResponse* /*response*/) override {
937 abort();
938 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
939 }
940 void RequestGetSoftwareVersion(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
941 ::grpc::Service::RequestAsyncUnary(0, context, request, response, new_call_cq, notification_cq, tag);
942 }
943 };
944 template <class BaseClass>
945 class WithRawMethod_DownloadImage : public BaseClass {
946 private:
947 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
948 public:
949 WithRawMethod_DownloadImage() {
950 ::grpc::Service::MarkMethodRaw(1);
951 }
952 ~WithRawMethod_DownloadImage() override {
953 BaseClassMustBeDerivedFromService(this);
954 }
955 // disable synchronous version of this method
956 ::grpc::Status DownloadImage(::grpc::ServerContext* /*context*/, const ::dmi::DownloadImageRequest* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
957 abort();
958 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
959 }
960 void RequestDownloadImage(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
961 ::grpc::Service::RequestAsyncServerStreaming(1, context, request, writer, new_call_cq, notification_cq, tag);
962 }
963 };
964 template <class BaseClass>
965 class WithRawMethod_ActivateImage : public BaseClass {
966 private:
967 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
968 public:
969 WithRawMethod_ActivateImage() {
970 ::grpc::Service::MarkMethodRaw(2);
971 }
972 ~WithRawMethod_ActivateImage() override {
973 BaseClassMustBeDerivedFromService(this);
974 }
975 // disable synchronous version of this method
976 ::grpc::Status ActivateImage(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
977 abort();
978 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
979 }
980 void RequestActivateImage(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
981 ::grpc::Service::RequestAsyncServerStreaming(2, context, request, writer, new_call_cq, notification_cq, tag);
982 }
983 };
984 template <class BaseClass>
985 class WithRawMethod_RevertToStandbyImage : public BaseClass {
986 private:
987 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
988 public:
989 WithRawMethod_RevertToStandbyImage() {
990 ::grpc::Service::MarkMethodRaw(3);
991 }
992 ~WithRawMethod_RevertToStandbyImage() override {
993 BaseClassMustBeDerivedFromService(this);
994 }
995 // disable synchronous version of this method
996 ::grpc::Status RevertToStandbyImage(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
997 abort();
998 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
999 }
1000 void RequestRevertToStandbyImage(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
1001 ::grpc::Service::RequestAsyncServerStreaming(3, context, request, writer, new_call_cq, notification_cq, tag);
1002 }
1003 };
1004 template <class BaseClass>
1005 class WithRawMethod_UpdateStartupConfiguration : public BaseClass {
1006 private:
1007 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
1008 public:
1009 WithRawMethod_UpdateStartupConfiguration() {
1010 ::grpc::Service::MarkMethodRaw(4);
1011 }
1012 ~WithRawMethod_UpdateStartupConfiguration() override {
1013 BaseClassMustBeDerivedFromService(this);
1014 }
1015 // disable synchronous version of this method
1016 ::grpc::Status UpdateStartupConfiguration(::grpc::ServerContext* /*context*/, const ::dmi::ConfigRequest* /*request*/, ::grpc::ServerWriter< ::dmi::ConfigResponse>* /*writer*/) override {
1017 abort();
1018 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1019 }
1020 void RequestUpdateStartupConfiguration(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
1021 ::grpc::Service::RequestAsyncServerStreaming(4, context, request, writer, new_call_cq, notification_cq, tag);
1022 }
1023 };
1024 template <class BaseClass>
1025 class WithRawMethod_GetStartupConfigurationInfo : public BaseClass {
1026 private:
1027 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
1028 public:
1029 WithRawMethod_GetStartupConfigurationInfo() {
1030 ::grpc::Service::MarkMethodRaw(5);
1031 }
1032 ~WithRawMethod_GetStartupConfigurationInfo() override {
1033 BaseClassMustBeDerivedFromService(this);
1034 }
1035 // disable synchronous version of this method
1036 ::grpc::Status GetStartupConfigurationInfo(::grpc::ServerContext* /*context*/, const ::dmi::StartupConfigInfoRequest* /*request*/, ::dmi::StartupConfigInfoResponse* /*response*/) override {
1037 abort();
1038 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1039 }
1040 void RequestGetStartupConfigurationInfo(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter< ::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
1041 ::grpc::Service::RequestAsyncUnary(5, context, request, response, new_call_cq, notification_cq, tag);
1042 }
1043 };
1044 template <class BaseClass>
amit.ghosh5a689802022-09-12 14:26:10 +02001045 class WithRawMethod_UploadDebugInfo : public BaseClass {
1046 private:
1047 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
1048 public:
1049 WithRawMethod_UploadDebugInfo() {
1050 ::grpc::Service::MarkMethodRaw(6);
1051 }
1052 ~WithRawMethod_UploadDebugInfo() override {
1053 BaseClassMustBeDerivedFromService(this);
1054 }
1055 // disable synchronous version of this method
1056 ::grpc::Status UploadDebugInfo(::grpc::ServerContext* /*context*/, const ::dmi::UploadDebugInfoRequest* /*request*/, ::grpc::ServerWriter< ::dmi::UploadDebugInfoStatus>* /*writer*/) override {
1057 abort();
1058 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1059 }
1060 void RequestUploadDebugInfo(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncWriter< ::grpc::ByteBuffer>* writer, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) {
1061 ::grpc::Service::RequestAsyncServerStreaming(6, context, request, writer, new_call_cq, notification_cq, tag);
1062 }
1063 };
1064 template <class BaseClass>
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001065 class ExperimentalWithRawCallbackMethod_GetSoftwareVersion : public BaseClass {
1066 private:
1067 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
1068 public:
1069 ExperimentalWithRawCallbackMethod_GetSoftwareVersion() {
1070 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1071 ::grpc::Service::
1072 #else
1073 ::grpc::Service::experimental().
1074 #endif
1075 MarkMethodRawCallback(0,
1076 new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
1077 [this](
1078 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1079 ::grpc::CallbackServerContext*
1080 #else
1081 ::grpc::experimental::CallbackServerContext*
1082 #endif
1083 context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->GetSoftwareVersion(context, request, response); }));
1084 }
1085 ~ExperimentalWithRawCallbackMethod_GetSoftwareVersion() override {
1086 BaseClassMustBeDerivedFromService(this);
1087 }
1088 // disable synchronous version of this method
1089 ::grpc::Status GetSoftwareVersion(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::GetSoftwareVersionInformationResponse* /*response*/) override {
1090 abort();
1091 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1092 }
1093 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1094 virtual ::grpc::ServerUnaryReactor* GetSoftwareVersion(
1095 ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/)
1096 #else
1097 virtual ::grpc::experimental::ServerUnaryReactor* GetSoftwareVersion(
1098 ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/)
1099 #endif
1100 { return nullptr; }
1101 };
1102 template <class BaseClass>
1103 class ExperimentalWithRawCallbackMethod_DownloadImage : public BaseClass {
1104 private:
1105 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
1106 public:
1107 ExperimentalWithRawCallbackMethod_DownloadImage() {
1108 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1109 ::grpc::Service::
1110 #else
1111 ::grpc::Service::experimental().
1112 #endif
1113 MarkMethodRawCallback(1,
1114 new ::grpc_impl::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
1115 [this](
1116 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1117 ::grpc::CallbackServerContext*
1118 #else
1119 ::grpc::experimental::CallbackServerContext*
1120 #endif
1121 context, const::grpc::ByteBuffer* request) { return this->DownloadImage(context, request); }));
1122 }
1123 ~ExperimentalWithRawCallbackMethod_DownloadImage() override {
1124 BaseClassMustBeDerivedFromService(this);
1125 }
1126 // disable synchronous version of this method
1127 ::grpc::Status DownloadImage(::grpc::ServerContext* /*context*/, const ::dmi::DownloadImageRequest* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
1128 abort();
1129 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1130 }
1131 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1132 virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* DownloadImage(
1133 ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/)
1134 #else
1135 virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer>* DownloadImage(
1136 ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/)
1137 #endif
1138 { return nullptr; }
1139 };
1140 template <class BaseClass>
1141 class ExperimentalWithRawCallbackMethod_ActivateImage : public BaseClass {
1142 private:
1143 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
1144 public:
1145 ExperimentalWithRawCallbackMethod_ActivateImage() {
1146 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1147 ::grpc::Service::
1148 #else
1149 ::grpc::Service::experimental().
1150 #endif
1151 MarkMethodRawCallback(2,
1152 new ::grpc_impl::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
1153 [this](
1154 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1155 ::grpc::CallbackServerContext*
1156 #else
1157 ::grpc::experimental::CallbackServerContext*
1158 #endif
1159 context, const::grpc::ByteBuffer* request) { return this->ActivateImage(context, request); }));
1160 }
1161 ~ExperimentalWithRawCallbackMethod_ActivateImage() override {
1162 BaseClassMustBeDerivedFromService(this);
1163 }
1164 // disable synchronous version of this method
1165 ::grpc::Status ActivateImage(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
1166 abort();
1167 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1168 }
1169 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1170 virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* ActivateImage(
1171 ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/)
1172 #else
1173 virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer>* ActivateImage(
1174 ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/)
1175 #endif
1176 { return nullptr; }
1177 };
1178 template <class BaseClass>
1179 class ExperimentalWithRawCallbackMethod_RevertToStandbyImage : public BaseClass {
1180 private:
1181 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
1182 public:
1183 ExperimentalWithRawCallbackMethod_RevertToStandbyImage() {
1184 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1185 ::grpc::Service::
1186 #else
1187 ::grpc::Service::experimental().
1188 #endif
1189 MarkMethodRawCallback(3,
1190 new ::grpc_impl::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
1191 [this](
1192 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1193 ::grpc::CallbackServerContext*
1194 #else
1195 ::grpc::experimental::CallbackServerContext*
1196 #endif
1197 context, const::grpc::ByteBuffer* request) { return this->RevertToStandbyImage(context, request); }));
1198 }
1199 ~ExperimentalWithRawCallbackMethod_RevertToStandbyImage() override {
1200 BaseClassMustBeDerivedFromService(this);
1201 }
1202 // disable synchronous version of this method
1203 ::grpc::Status RevertToStandbyImage(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
1204 abort();
1205 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1206 }
1207 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1208 virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* RevertToStandbyImage(
1209 ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/)
1210 #else
1211 virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer>* RevertToStandbyImage(
1212 ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/)
1213 #endif
1214 { return nullptr; }
1215 };
1216 template <class BaseClass>
1217 class ExperimentalWithRawCallbackMethod_UpdateStartupConfiguration : public BaseClass {
1218 private:
1219 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
1220 public:
1221 ExperimentalWithRawCallbackMethod_UpdateStartupConfiguration() {
1222 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1223 ::grpc::Service::
1224 #else
1225 ::grpc::Service::experimental().
1226 #endif
1227 MarkMethodRawCallback(4,
1228 new ::grpc_impl::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
1229 [this](
1230 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1231 ::grpc::CallbackServerContext*
1232 #else
1233 ::grpc::experimental::CallbackServerContext*
1234 #endif
1235 context, const::grpc::ByteBuffer* request) { return this->UpdateStartupConfiguration(context, request); }));
1236 }
1237 ~ExperimentalWithRawCallbackMethod_UpdateStartupConfiguration() override {
1238 BaseClassMustBeDerivedFromService(this);
1239 }
1240 // disable synchronous version of this method
1241 ::grpc::Status UpdateStartupConfiguration(::grpc::ServerContext* /*context*/, const ::dmi::ConfigRequest* /*request*/, ::grpc::ServerWriter< ::dmi::ConfigResponse>* /*writer*/) override {
1242 abort();
1243 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1244 }
1245 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1246 virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* UpdateStartupConfiguration(
1247 ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/)
1248 #else
1249 virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer>* UpdateStartupConfiguration(
1250 ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/)
1251 #endif
1252 { return nullptr; }
1253 };
1254 template <class BaseClass>
1255 class ExperimentalWithRawCallbackMethod_GetStartupConfigurationInfo : public BaseClass {
1256 private:
1257 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
1258 public:
1259 ExperimentalWithRawCallbackMethod_GetStartupConfigurationInfo() {
1260 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1261 ::grpc::Service::
1262 #else
1263 ::grpc::Service::experimental().
1264 #endif
1265 MarkMethodRawCallback(5,
1266 new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
1267 [this](
1268 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1269 ::grpc::CallbackServerContext*
1270 #else
1271 ::grpc::experimental::CallbackServerContext*
1272 #endif
1273 context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->GetStartupConfigurationInfo(context, request, response); }));
1274 }
1275 ~ExperimentalWithRawCallbackMethod_GetStartupConfigurationInfo() override {
1276 BaseClassMustBeDerivedFromService(this);
1277 }
1278 // disable synchronous version of this method
1279 ::grpc::Status GetStartupConfigurationInfo(::grpc::ServerContext* /*context*/, const ::dmi::StartupConfigInfoRequest* /*request*/, ::dmi::StartupConfigInfoResponse* /*response*/) override {
1280 abort();
1281 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1282 }
1283 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1284 virtual ::grpc::ServerUnaryReactor* GetStartupConfigurationInfo(
1285 ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/)
1286 #else
1287 virtual ::grpc::experimental::ServerUnaryReactor* GetStartupConfigurationInfo(
1288 ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/)
1289 #endif
1290 { return nullptr; }
1291 };
1292 template <class BaseClass>
amit.ghosh5a689802022-09-12 14:26:10 +02001293 class ExperimentalWithRawCallbackMethod_UploadDebugInfo : public BaseClass {
1294 private:
1295 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
1296 public:
1297 ExperimentalWithRawCallbackMethod_UploadDebugInfo() {
1298 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1299 ::grpc::Service::
1300 #else
1301 ::grpc::Service::experimental().
1302 #endif
1303 MarkMethodRawCallback(6,
1304 new ::grpc_impl::internal::CallbackServerStreamingHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>(
1305 [this](
1306 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1307 ::grpc::CallbackServerContext*
1308 #else
1309 ::grpc::experimental::CallbackServerContext*
1310 #endif
1311 context, const::grpc::ByteBuffer* request) { return this->UploadDebugInfo(context, request); }));
1312 }
1313 ~ExperimentalWithRawCallbackMethod_UploadDebugInfo() override {
1314 BaseClassMustBeDerivedFromService(this);
1315 }
1316 // disable synchronous version of this method
1317 ::grpc::Status UploadDebugInfo(::grpc::ServerContext* /*context*/, const ::dmi::UploadDebugInfoRequest* /*request*/, ::grpc::ServerWriter< ::dmi::UploadDebugInfoStatus>* /*writer*/) override {
1318 abort();
1319 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1320 }
1321 #ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
1322 virtual ::grpc::ServerWriteReactor< ::grpc::ByteBuffer>* UploadDebugInfo(
1323 ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/)
1324 #else
1325 virtual ::grpc::experimental::ServerWriteReactor< ::grpc::ByteBuffer>* UploadDebugInfo(
1326 ::grpc::experimental::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/)
1327 #endif
1328 { return nullptr; }
1329 };
1330 template <class BaseClass>
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001331 class WithStreamedUnaryMethod_GetSoftwareVersion : public BaseClass {
1332 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001333 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001334 public:
1335 WithStreamedUnaryMethod_GetSoftwareVersion() {
1336 ::grpc::Service::MarkMethodStreamed(0,
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001337 new ::grpc::internal::StreamedUnaryHandler<
1338 ::dmi::HardwareID, ::dmi::GetSoftwareVersionInformationResponse>(
1339 [this](::grpc_impl::ServerContext* context,
1340 ::grpc_impl::ServerUnaryStreamer<
1341 ::dmi::HardwareID, ::dmi::GetSoftwareVersionInformationResponse>* streamer) {
1342 return this->StreamedGetSoftwareVersion(context,
1343 streamer);
1344 }));
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001345 }
1346 ~WithStreamedUnaryMethod_GetSoftwareVersion() override {
1347 BaseClassMustBeDerivedFromService(this);
1348 }
1349 // disable regular version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001350 ::grpc::Status GetSoftwareVersion(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::dmi::GetSoftwareVersionInformationResponse* /*response*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001351 abort();
1352 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1353 }
1354 // replace default version of method with streamed unary
1355 virtual ::grpc::Status StreamedGetSoftwareVersion(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::dmi::HardwareID,::dmi::GetSoftwareVersionInformationResponse>* server_unary_streamer) = 0;
1356 };
1357 template <class BaseClass>
1358 class WithStreamedUnaryMethod_GetStartupConfigurationInfo : public BaseClass {
1359 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001360 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001361 public:
1362 WithStreamedUnaryMethod_GetStartupConfigurationInfo() {
1363 ::grpc::Service::MarkMethodStreamed(5,
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001364 new ::grpc::internal::StreamedUnaryHandler<
1365 ::dmi::StartupConfigInfoRequest, ::dmi::StartupConfigInfoResponse>(
1366 [this](::grpc_impl::ServerContext* context,
1367 ::grpc_impl::ServerUnaryStreamer<
1368 ::dmi::StartupConfigInfoRequest, ::dmi::StartupConfigInfoResponse>* streamer) {
1369 return this->StreamedGetStartupConfigurationInfo(context,
1370 streamer);
1371 }));
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001372 }
1373 ~WithStreamedUnaryMethod_GetStartupConfigurationInfo() override {
1374 BaseClassMustBeDerivedFromService(this);
1375 }
1376 // disable regular version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001377 ::grpc::Status GetStartupConfigurationInfo(::grpc::ServerContext* /*context*/, const ::dmi::StartupConfigInfoRequest* /*request*/, ::dmi::StartupConfigInfoResponse* /*response*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001378 abort();
1379 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1380 }
1381 // replace default version of method with streamed unary
1382 virtual ::grpc::Status StreamedGetStartupConfigurationInfo(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer< ::dmi::StartupConfigInfoRequest,::dmi::StartupConfigInfoResponse>* server_unary_streamer) = 0;
1383 };
1384 typedef WithStreamedUnaryMethod_GetSoftwareVersion<WithStreamedUnaryMethod_GetStartupConfigurationInfo<Service > > StreamedUnaryService;
1385 template <class BaseClass>
1386 class WithSplitStreamingMethod_DownloadImage : public BaseClass {
1387 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001388 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001389 public:
1390 WithSplitStreamingMethod_DownloadImage() {
1391 ::grpc::Service::MarkMethodStreamed(1,
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001392 new ::grpc::internal::SplitServerStreamingHandler<
1393 ::dmi::DownloadImageRequest, ::dmi::ImageStatus>(
1394 [this](::grpc_impl::ServerContext* context,
1395 ::grpc_impl::ServerSplitStreamer<
1396 ::dmi::DownloadImageRequest, ::dmi::ImageStatus>* streamer) {
1397 return this->StreamedDownloadImage(context,
1398 streamer);
1399 }));
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001400 }
1401 ~WithSplitStreamingMethod_DownloadImage() override {
1402 BaseClassMustBeDerivedFromService(this);
1403 }
1404 // disable regular version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001405 ::grpc::Status DownloadImage(::grpc::ServerContext* /*context*/, const ::dmi::DownloadImageRequest* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001406 abort();
1407 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1408 }
1409 // replace default version of method with split streamed
1410 virtual ::grpc::Status StreamedDownloadImage(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::dmi::DownloadImageRequest,::dmi::ImageStatus>* server_split_streamer) = 0;
1411 };
1412 template <class BaseClass>
1413 class WithSplitStreamingMethod_ActivateImage : public BaseClass {
1414 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001415 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001416 public:
1417 WithSplitStreamingMethod_ActivateImage() {
1418 ::grpc::Service::MarkMethodStreamed(2,
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001419 new ::grpc::internal::SplitServerStreamingHandler<
1420 ::dmi::HardwareID, ::dmi::ImageStatus>(
1421 [this](::grpc_impl::ServerContext* context,
1422 ::grpc_impl::ServerSplitStreamer<
1423 ::dmi::HardwareID, ::dmi::ImageStatus>* streamer) {
1424 return this->StreamedActivateImage(context,
1425 streamer);
1426 }));
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001427 }
1428 ~WithSplitStreamingMethod_ActivateImage() override {
1429 BaseClassMustBeDerivedFromService(this);
1430 }
1431 // disable regular version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001432 ::grpc::Status ActivateImage(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001433 abort();
1434 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1435 }
1436 // replace default version of method with split streamed
1437 virtual ::grpc::Status StreamedActivateImage(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::dmi::HardwareID,::dmi::ImageStatus>* server_split_streamer) = 0;
1438 };
1439 template <class BaseClass>
1440 class WithSplitStreamingMethod_RevertToStandbyImage : public BaseClass {
1441 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001442 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001443 public:
1444 WithSplitStreamingMethod_RevertToStandbyImage() {
1445 ::grpc::Service::MarkMethodStreamed(3,
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001446 new ::grpc::internal::SplitServerStreamingHandler<
1447 ::dmi::HardwareID, ::dmi::ImageStatus>(
1448 [this](::grpc_impl::ServerContext* context,
1449 ::grpc_impl::ServerSplitStreamer<
1450 ::dmi::HardwareID, ::dmi::ImageStatus>* streamer) {
1451 return this->StreamedRevertToStandbyImage(context,
1452 streamer);
1453 }));
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001454 }
1455 ~WithSplitStreamingMethod_RevertToStandbyImage() override {
1456 BaseClassMustBeDerivedFromService(this);
1457 }
1458 // disable regular version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001459 ::grpc::Status RevertToStandbyImage(::grpc::ServerContext* /*context*/, const ::dmi::HardwareID* /*request*/, ::grpc::ServerWriter< ::dmi::ImageStatus>* /*writer*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001460 abort();
1461 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1462 }
1463 // replace default version of method with split streamed
1464 virtual ::grpc::Status StreamedRevertToStandbyImage(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::dmi::HardwareID,::dmi::ImageStatus>* server_split_streamer) = 0;
1465 };
1466 template <class BaseClass>
1467 class WithSplitStreamingMethod_UpdateStartupConfiguration : public BaseClass {
1468 private:
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001469 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001470 public:
1471 WithSplitStreamingMethod_UpdateStartupConfiguration() {
1472 ::grpc::Service::MarkMethodStreamed(4,
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001473 new ::grpc::internal::SplitServerStreamingHandler<
1474 ::dmi::ConfigRequest, ::dmi::ConfigResponse>(
1475 [this](::grpc_impl::ServerContext* context,
1476 ::grpc_impl::ServerSplitStreamer<
1477 ::dmi::ConfigRequest, ::dmi::ConfigResponse>* streamer) {
1478 return this->StreamedUpdateStartupConfiguration(context,
1479 streamer);
1480 }));
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001481 }
1482 ~WithSplitStreamingMethod_UpdateStartupConfiguration() override {
1483 BaseClassMustBeDerivedFromService(this);
1484 }
1485 // disable regular version of this method
Andrea Campanella03d4e7a2021-04-28 15:34:46 +02001486 ::grpc::Status UpdateStartupConfiguration(::grpc::ServerContext* /*context*/, const ::dmi::ConfigRequest* /*request*/, ::grpc::ServerWriter< ::dmi::ConfigResponse>* /*writer*/) override {
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001487 abort();
1488 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1489 }
1490 // replace default version of method with split streamed
1491 virtual ::grpc::Status StreamedUpdateStartupConfiguration(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::dmi::ConfigRequest,::dmi::ConfigResponse>* server_split_streamer) = 0;
1492 };
amit.ghosh5a689802022-09-12 14:26:10 +02001493 template <class BaseClass>
1494 class WithSplitStreamingMethod_UploadDebugInfo : public BaseClass {
1495 private:
1496 void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
1497 public:
1498 WithSplitStreamingMethod_UploadDebugInfo() {
1499 ::grpc::Service::MarkMethodStreamed(6,
1500 new ::grpc::internal::SplitServerStreamingHandler<
1501 ::dmi::UploadDebugInfoRequest, ::dmi::UploadDebugInfoStatus>(
1502 [this](::grpc_impl::ServerContext* context,
1503 ::grpc_impl::ServerSplitStreamer<
1504 ::dmi::UploadDebugInfoRequest, ::dmi::UploadDebugInfoStatus>* streamer) {
1505 return this->StreamedUploadDebugInfo(context,
1506 streamer);
1507 }));
1508 }
1509 ~WithSplitStreamingMethod_UploadDebugInfo() override {
1510 BaseClassMustBeDerivedFromService(this);
1511 }
1512 // disable regular version of this method
1513 ::grpc::Status UploadDebugInfo(::grpc::ServerContext* /*context*/, const ::dmi::UploadDebugInfoRequest* /*request*/, ::grpc::ServerWriter< ::dmi::UploadDebugInfoStatus>* /*writer*/) override {
1514 abort();
1515 return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "");
1516 }
1517 // replace default version of method with split streamed
1518 virtual ::grpc::Status StreamedUploadDebugInfo(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer< ::dmi::UploadDebugInfoRequest,::dmi::UploadDebugInfoStatus>* server_split_streamer) = 0;
1519 };
1520 typedef WithSplitStreamingMethod_DownloadImage<WithSplitStreamingMethod_ActivateImage<WithSplitStreamingMethod_RevertToStandbyImage<WithSplitStreamingMethod_UpdateStartupConfiguration<WithSplitStreamingMethod_UploadDebugInfo<Service > > > > > SplitStreamedService;
1521 typedef WithStreamedUnaryMethod_GetSoftwareVersion<WithSplitStreamingMethod_DownloadImage<WithSplitStreamingMethod_ActivateImage<WithSplitStreamingMethod_RevertToStandbyImage<WithSplitStreamingMethod_UpdateStartupConfiguration<WithStreamedUnaryMethod_GetStartupConfigurationInfo<WithSplitStreamingMethod_UploadDebugInfo<Service > > > > > > > StreamedService;
Andrea Campanellac795b7d2021-04-14 13:24:44 +02001522};
1523
1524} // namespace dmi
1525
1526
1527#endif // GRPC_dmi_2fsw_5fmanagement_5fservice_2eproto__INCLUDED