2
0

grpc_testing_benchmark_service.grpc.swift 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. // Copyright 2015 gRPC authors.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. /// An integration test service that covers all the method signature permutations
  15. /// of unary/streaming requests/responses.
  16. // DO NOT EDIT.
  17. // swift-format-ignore-file
  18. //
  19. // Generated by the gRPC Swift generator plugin for the protocol buffer compiler.
  20. // Source: grpc/testing/benchmark_service.proto
  21. //
  22. // For information on using the generated types, please see the documentation:
  23. // https://github.com/grpc/grpc-swift
  24. import GRPCCore
  25. import GRPCProtobuf
  26. internal enum Grpc_Testing_BenchmarkService {
  27. internal enum Method {
  28. internal enum UnaryCall {
  29. internal typealias Input = Grpc_Testing_SimpleRequest
  30. internal typealias Output = Grpc_Testing_SimpleResponse
  31. internal static let descriptor = MethodDescriptor(
  32. service: "grpc.testing.BenchmarkService",
  33. method: "UnaryCall"
  34. )
  35. }
  36. internal enum StreamingCall {
  37. internal typealias Input = Grpc_Testing_SimpleRequest
  38. internal typealias Output = Grpc_Testing_SimpleResponse
  39. internal static let descriptor = MethodDescriptor(
  40. service: "grpc.testing.BenchmarkService",
  41. method: "StreamingCall"
  42. )
  43. }
  44. internal enum StreamingFromClient {
  45. internal typealias Input = Grpc_Testing_SimpleRequest
  46. internal typealias Output = Grpc_Testing_SimpleResponse
  47. internal static let descriptor = MethodDescriptor(
  48. service: "grpc.testing.BenchmarkService",
  49. method: "StreamingFromClient"
  50. )
  51. }
  52. internal enum StreamingFromServer {
  53. internal typealias Input = Grpc_Testing_SimpleRequest
  54. internal typealias Output = Grpc_Testing_SimpleResponse
  55. internal static let descriptor = MethodDescriptor(
  56. service: "grpc.testing.BenchmarkService",
  57. method: "StreamingFromServer"
  58. )
  59. }
  60. internal enum StreamingBothWays {
  61. internal typealias Input = Grpc_Testing_SimpleRequest
  62. internal typealias Output = Grpc_Testing_SimpleResponse
  63. internal static let descriptor = MethodDescriptor(
  64. service: "grpc.testing.BenchmarkService",
  65. method: "StreamingBothWays"
  66. )
  67. }
  68. internal static let descriptors: [MethodDescriptor] = [
  69. UnaryCall.descriptor,
  70. StreamingCall.descriptor,
  71. StreamingFromClient.descriptor,
  72. StreamingFromServer.descriptor,
  73. StreamingBothWays.descriptor
  74. ]
  75. }
  76. @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
  77. internal typealias StreamingServiceProtocol = Grpc_Testing_BenchmarkServiceStreamingServiceProtocol
  78. @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
  79. internal typealias ServiceProtocol = Grpc_Testing_BenchmarkServiceServiceProtocol
  80. @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
  81. internal typealias ClientProtocol = Grpc_Testing_BenchmarkServiceClientProtocol
  82. @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
  83. internal typealias Client = Grpc_Testing_BenchmarkServiceClient
  84. }
  85. @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
  86. internal protocol Grpc_Testing_BenchmarkServiceStreamingServiceProtocol: GRPCCore.RegistrableRPCService {
  87. /// One request followed by one response.
  88. /// The server returns the client payload as-is.
  89. func unaryCall(request: ServerRequest.Stream<Grpc_Testing_BenchmarkService.Method.UnaryCall.Input>) async throws -> ServerResponse.Stream<Grpc_Testing_BenchmarkService.Method.UnaryCall.Output>
  90. /// Repeated sequence of one request followed by one response.
  91. /// Should be called streaming ping-pong
  92. /// The server returns the client payload as-is on each response
  93. func streamingCall(request: ServerRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingCall.Input>) async throws -> ServerResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingCall.Output>
  94. /// Single-sided unbounded streaming from client to server
  95. /// The server returns the client payload as-is once the client does WritesDone
  96. func streamingFromClient(request: ServerRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Input>) async throws -> ServerResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Output>
  97. /// Single-sided unbounded streaming from server to client
  98. /// The server repeatedly returns the client payload as-is
  99. func streamingFromServer(request: ServerRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Input>) async throws -> ServerResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Output>
  100. /// Two-sided unbounded streaming between server to client
  101. /// Both sides send the content of their own choice to the other
  102. func streamingBothWays(request: ServerRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Input>) async throws -> ServerResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Output>
  103. }
  104. /// Conformance to `GRPCCore.RegistrableRPCService`.
  105. @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
  106. extension Grpc_Testing_BenchmarkService.StreamingServiceProtocol {
  107. @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
  108. internal func registerMethods(with router: inout GRPCCore.RPCRouter) {
  109. router.registerHandler(
  110. forMethod: Grpc_Testing_BenchmarkService.Method.UnaryCall.descriptor,
  111. deserializer: ProtobufDeserializer<Grpc_Testing_BenchmarkService.Method.UnaryCall.Input>(),
  112. serializer: ProtobufSerializer<Grpc_Testing_BenchmarkService.Method.UnaryCall.Output>(),
  113. handler: { request in
  114. try await self.unaryCall(request: request)
  115. }
  116. )
  117. router.registerHandler(
  118. forMethod: Grpc_Testing_BenchmarkService.Method.StreamingCall.descriptor,
  119. deserializer: ProtobufDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingCall.Input>(),
  120. serializer: ProtobufSerializer<Grpc_Testing_BenchmarkService.Method.StreamingCall.Output>(),
  121. handler: { request in
  122. try await self.streamingCall(request: request)
  123. }
  124. )
  125. router.registerHandler(
  126. forMethod: Grpc_Testing_BenchmarkService.Method.StreamingFromClient.descriptor,
  127. deserializer: ProtobufDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Input>(),
  128. serializer: ProtobufSerializer<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Output>(),
  129. handler: { request in
  130. try await self.streamingFromClient(request: request)
  131. }
  132. )
  133. router.registerHandler(
  134. forMethod: Grpc_Testing_BenchmarkService.Method.StreamingFromServer.descriptor,
  135. deserializer: ProtobufDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Input>(),
  136. serializer: ProtobufSerializer<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Output>(),
  137. handler: { request in
  138. try await self.streamingFromServer(request: request)
  139. }
  140. )
  141. router.registerHandler(
  142. forMethod: Grpc_Testing_BenchmarkService.Method.StreamingBothWays.descriptor,
  143. deserializer: ProtobufDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Input>(),
  144. serializer: ProtobufSerializer<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Output>(),
  145. handler: { request in
  146. try await self.streamingBothWays(request: request)
  147. }
  148. )
  149. }
  150. }
  151. @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
  152. internal protocol Grpc_Testing_BenchmarkServiceServiceProtocol: Grpc_Testing_BenchmarkService.StreamingServiceProtocol {
  153. /// One request followed by one response.
  154. /// The server returns the client payload as-is.
  155. func unaryCall(request: ServerRequest.Single<Grpc_Testing_BenchmarkService.Method.UnaryCall.Input>) async throws -> ServerResponse.Single<Grpc_Testing_BenchmarkService.Method.UnaryCall.Output>
  156. /// Repeated sequence of one request followed by one response.
  157. /// Should be called streaming ping-pong
  158. /// The server returns the client payload as-is on each response
  159. func streamingCall(request: ServerRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingCall.Input>) async throws -> ServerResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingCall.Output>
  160. /// Single-sided unbounded streaming from client to server
  161. /// The server returns the client payload as-is once the client does WritesDone
  162. func streamingFromClient(request: ServerRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Input>) async throws -> ServerResponse.Single<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Output>
  163. /// Single-sided unbounded streaming from server to client
  164. /// The server repeatedly returns the client payload as-is
  165. func streamingFromServer(request: ServerRequest.Single<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Input>) async throws -> ServerResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Output>
  166. /// Two-sided unbounded streaming between server to client
  167. /// Both sides send the content of their own choice to the other
  168. func streamingBothWays(request: ServerRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Input>) async throws -> ServerResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Output>
  169. }
  170. /// Partial conformance to `Grpc_Testing_BenchmarkServiceStreamingServiceProtocol`.
  171. @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
  172. extension Grpc_Testing_BenchmarkService.ServiceProtocol {
  173. internal func unaryCall(request: ServerRequest.Stream<Grpc_Testing_BenchmarkService.Method.UnaryCall.Input>) async throws -> ServerResponse.Stream<Grpc_Testing_BenchmarkService.Method.UnaryCall.Output> {
  174. let response = try await self.unaryCall(request: ServerRequest.Single(stream: request))
  175. return ServerResponse.Stream(single: response)
  176. }
  177. internal func streamingFromClient(request: ServerRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Input>) async throws -> ServerResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Output> {
  178. let response = try await self.streamingFromClient(request: request)
  179. return ServerResponse.Stream(single: response)
  180. }
  181. internal func streamingFromServer(request: ServerRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Input>) async throws -> ServerResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Output> {
  182. let response = try await self.streamingFromServer(request: ServerRequest.Single(stream: request))
  183. return response
  184. }
  185. }
  186. @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
  187. internal protocol Grpc_Testing_BenchmarkServiceClientProtocol: Sendable {
  188. /// One request followed by one response.
  189. /// The server returns the client payload as-is.
  190. func unaryCall<R>(
  191. request: ClientRequest.Single<Grpc_Testing_BenchmarkService.Method.UnaryCall.Input>,
  192. serializer: some MessageSerializer<Grpc_Testing_BenchmarkService.Method.UnaryCall.Input>,
  193. deserializer: some MessageDeserializer<Grpc_Testing_BenchmarkService.Method.UnaryCall.Output>,
  194. _ body: @Sendable @escaping (ClientResponse.Single<Grpc_Testing_BenchmarkService.Method.UnaryCall.Output>) async throws -> R
  195. ) async throws -> R where R: Sendable
  196. /// Repeated sequence of one request followed by one response.
  197. /// Should be called streaming ping-pong
  198. /// The server returns the client payload as-is on each response
  199. func streamingCall<R>(
  200. request: ClientRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingCall.Input>,
  201. serializer: some MessageSerializer<Grpc_Testing_BenchmarkService.Method.StreamingCall.Input>,
  202. deserializer: some MessageDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingCall.Output>,
  203. _ body: @Sendable @escaping (ClientResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingCall.Output>) async throws -> R
  204. ) async throws -> R where R: Sendable
  205. /// Single-sided unbounded streaming from client to server
  206. /// The server returns the client payload as-is once the client does WritesDone
  207. func streamingFromClient<R>(
  208. request: ClientRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Input>,
  209. serializer: some MessageSerializer<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Input>,
  210. deserializer: some MessageDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Output>,
  211. _ body: @Sendable @escaping (ClientResponse.Single<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Output>) async throws -> R
  212. ) async throws -> R where R: Sendable
  213. /// Single-sided unbounded streaming from server to client
  214. /// The server repeatedly returns the client payload as-is
  215. func streamingFromServer<R>(
  216. request: ClientRequest.Single<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Input>,
  217. serializer: some MessageSerializer<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Input>,
  218. deserializer: some MessageDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Output>,
  219. _ body: @Sendable @escaping (ClientResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Output>) async throws -> R
  220. ) async throws -> R where R: Sendable
  221. /// Two-sided unbounded streaming between server to client
  222. /// Both sides send the content of their own choice to the other
  223. func streamingBothWays<R>(
  224. request: ClientRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Input>,
  225. serializer: some MessageSerializer<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Input>,
  226. deserializer: some MessageDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Output>,
  227. _ body: @Sendable @escaping (ClientResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Output>) async throws -> R
  228. ) async throws -> R where R: Sendable
  229. }
  230. @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
  231. extension Grpc_Testing_BenchmarkService.ClientProtocol {
  232. internal func unaryCall<R>(
  233. request: ClientRequest.Single<Grpc_Testing_BenchmarkService.Method.UnaryCall.Input>,
  234. _ body: @Sendable @escaping (ClientResponse.Single<Grpc_Testing_BenchmarkService.Method.UnaryCall.Output>) async throws -> R
  235. ) async throws -> R where R: Sendable {
  236. try await self.unaryCall(
  237. request: request,
  238. serializer: ProtobufSerializer<Grpc_Testing_BenchmarkService.Method.UnaryCall.Input>(),
  239. deserializer: ProtobufDeserializer<Grpc_Testing_BenchmarkService.Method.UnaryCall.Output>(),
  240. body
  241. )
  242. }
  243. internal func streamingCall<R>(
  244. request: ClientRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingCall.Input>,
  245. _ body: @Sendable @escaping (ClientResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingCall.Output>) async throws -> R
  246. ) async throws -> R where R: Sendable {
  247. try await self.streamingCall(
  248. request: request,
  249. serializer: ProtobufSerializer<Grpc_Testing_BenchmarkService.Method.StreamingCall.Input>(),
  250. deserializer: ProtobufDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingCall.Output>(),
  251. body
  252. )
  253. }
  254. internal func streamingFromClient<R>(
  255. request: ClientRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Input>,
  256. _ body: @Sendable @escaping (ClientResponse.Single<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Output>) async throws -> R
  257. ) async throws -> R where R: Sendable {
  258. try await self.streamingFromClient(
  259. request: request,
  260. serializer: ProtobufSerializer<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Input>(),
  261. deserializer: ProtobufDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Output>(),
  262. body
  263. )
  264. }
  265. internal func streamingFromServer<R>(
  266. request: ClientRequest.Single<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Input>,
  267. _ body: @Sendable @escaping (ClientResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Output>) async throws -> R
  268. ) async throws -> R where R: Sendable {
  269. try await self.streamingFromServer(
  270. request: request,
  271. serializer: ProtobufSerializer<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Input>(),
  272. deserializer: ProtobufDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Output>(),
  273. body
  274. )
  275. }
  276. internal func streamingBothWays<R>(
  277. request: ClientRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Input>,
  278. _ body: @Sendable @escaping (ClientResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Output>) async throws -> R
  279. ) async throws -> R where R: Sendable {
  280. try await self.streamingBothWays(
  281. request: request,
  282. serializer: ProtobufSerializer<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Input>(),
  283. deserializer: ProtobufDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Output>(),
  284. body
  285. )
  286. }
  287. }
  288. @available(macOS 13.0, iOS 16.0, watchOS 9.0, tvOS 16.0, *)
  289. internal struct Grpc_Testing_BenchmarkServiceClient: Grpc_Testing_BenchmarkService.ClientProtocol {
  290. private let client: GRPCCore.GRPCClient
  291. internal init(client: GRPCCore.GRPCClient) {
  292. self.client = client
  293. }
  294. /// One request followed by one response.
  295. /// The server returns the client payload as-is.
  296. internal func unaryCall<R>(
  297. request: ClientRequest.Single<Grpc_Testing_BenchmarkService.Method.UnaryCall.Input>,
  298. serializer: some MessageSerializer<Grpc_Testing_BenchmarkService.Method.UnaryCall.Input>,
  299. deserializer: some MessageDeserializer<Grpc_Testing_BenchmarkService.Method.UnaryCall.Output>,
  300. _ body: @Sendable @escaping (ClientResponse.Single<Grpc_Testing_BenchmarkService.Method.UnaryCall.Output>) async throws -> R
  301. ) async throws -> R where R: Sendable {
  302. try await self.client.unary(
  303. request: request,
  304. descriptor: Grpc_Testing_BenchmarkService.Method.UnaryCall.descriptor,
  305. serializer: serializer,
  306. deserializer: deserializer,
  307. handler: body
  308. )
  309. }
  310. /// Repeated sequence of one request followed by one response.
  311. /// Should be called streaming ping-pong
  312. /// The server returns the client payload as-is on each response
  313. internal func streamingCall<R>(
  314. request: ClientRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingCall.Input>,
  315. serializer: some MessageSerializer<Grpc_Testing_BenchmarkService.Method.StreamingCall.Input>,
  316. deserializer: some MessageDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingCall.Output>,
  317. _ body: @Sendable @escaping (ClientResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingCall.Output>) async throws -> R
  318. ) async throws -> R where R: Sendable {
  319. try await self.client.bidirectionalStreaming(
  320. request: request,
  321. descriptor: Grpc_Testing_BenchmarkService.Method.StreamingCall.descriptor,
  322. serializer: serializer,
  323. deserializer: deserializer,
  324. handler: body
  325. )
  326. }
  327. /// Single-sided unbounded streaming from client to server
  328. /// The server returns the client payload as-is once the client does WritesDone
  329. internal func streamingFromClient<R>(
  330. request: ClientRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Input>,
  331. serializer: some MessageSerializer<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Input>,
  332. deserializer: some MessageDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Output>,
  333. _ body: @Sendable @escaping (ClientResponse.Single<Grpc_Testing_BenchmarkService.Method.StreamingFromClient.Output>) async throws -> R
  334. ) async throws -> R where R: Sendable {
  335. try await self.client.clientStreaming(
  336. request: request,
  337. descriptor: Grpc_Testing_BenchmarkService.Method.StreamingFromClient.descriptor,
  338. serializer: serializer,
  339. deserializer: deserializer,
  340. handler: body
  341. )
  342. }
  343. /// Single-sided unbounded streaming from server to client
  344. /// The server repeatedly returns the client payload as-is
  345. internal func streamingFromServer<R>(
  346. request: ClientRequest.Single<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Input>,
  347. serializer: some MessageSerializer<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Input>,
  348. deserializer: some MessageDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Output>,
  349. _ body: @Sendable @escaping (ClientResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingFromServer.Output>) async throws -> R
  350. ) async throws -> R where R: Sendable {
  351. try await self.client.serverStreaming(
  352. request: request,
  353. descriptor: Grpc_Testing_BenchmarkService.Method.StreamingFromServer.descriptor,
  354. serializer: serializer,
  355. deserializer: deserializer,
  356. handler: body
  357. )
  358. }
  359. /// Two-sided unbounded streaming between server to client
  360. /// Both sides send the content of their own choice to the other
  361. internal func streamingBothWays<R>(
  362. request: ClientRequest.Stream<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Input>,
  363. serializer: some MessageSerializer<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Input>,
  364. deserializer: some MessageDeserializer<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Output>,
  365. _ body: @Sendable @escaping (ClientResponse.Stream<Grpc_Testing_BenchmarkService.Method.StreamingBothWays.Output>) async throws -> R
  366. ) async throws -> R where R: Sendable {
  367. try await self.client.bidirectionalStreaming(
  368. request: request,
  369. descriptor: Grpc_Testing_BenchmarkService.Method.StreamingBothWays.descriptor,
  370. serializer: serializer,
  371. deserializer: deserializer,
  372. handler: body
  373. )
  374. }
  375. }