normalization.grpc.swift 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053
  1. //
  2. // DO NOT EDIT.
  3. // swift-format-ignore-file
  4. //
  5. // Generated by the protocol buffer compiler.
  6. // Source: normalization.proto
  7. //
  8. //
  9. // Copyright 2018, gRPC Authors All rights reserved.
  10. //
  11. // Licensed under the Apache License, Version 2.0 (the "License");
  12. // you may not use this file except in compliance with the License.
  13. // You may obtain a copy of the License at
  14. //
  15. // http://www.apache.org/licenses/LICENSE-2.0
  16. //
  17. // Unless required by applicable law or agreed to in writing, software
  18. // distributed under the License is distributed on an "AS IS" BASIS,
  19. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  20. // See the License for the specific language governing permissions and
  21. // limitations under the License.
  22. //
  23. import GRPC
  24. import NIO
  25. import NIOConcurrencyHelpers
  26. import SwiftProtobuf
  27. /// Usage: instantiate `Normalization_NormalizationClient`, then call methods of this protocol to make API calls.
  28. internal protocol Normalization_NormalizationClientProtocol: GRPCClient {
  29. var serviceName: String { get }
  30. var interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol? { get }
  31. func Unary(
  32. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  33. callOptions: CallOptions?
  34. ) -> UnaryCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  35. func unary(
  36. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  37. callOptions: CallOptions?
  38. ) -> UnaryCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  39. func ServerStreaming(
  40. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  41. callOptions: CallOptions?,
  42. handler: @escaping (Normalization_FunctionName) -> Void
  43. ) -> ServerStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  44. func serverStreaming(
  45. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  46. callOptions: CallOptions?,
  47. handler: @escaping (Normalization_FunctionName) -> Void
  48. ) -> ServerStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  49. func ClientStreaming(
  50. callOptions: CallOptions?
  51. ) -> ClientStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  52. func clientStreaming(
  53. callOptions: CallOptions?
  54. ) -> ClientStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  55. func BidirectionalStreaming(
  56. callOptions: CallOptions?,
  57. handler: @escaping (Normalization_FunctionName) -> Void
  58. ) -> BidirectionalStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  59. func bidirectionalStreaming(
  60. callOptions: CallOptions?,
  61. handler: @escaping (Normalization_FunctionName) -> Void
  62. ) -> BidirectionalStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  63. }
  64. extension Normalization_NormalizationClientProtocol {
  65. internal var serviceName: String {
  66. return "normalization.Normalization"
  67. }
  68. /// Unary call to Unary
  69. ///
  70. /// - Parameters:
  71. /// - request: Request to send to Unary.
  72. /// - callOptions: Call options.
  73. /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  74. internal func Unary(
  75. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  76. callOptions: CallOptions? = nil
  77. ) -> UnaryCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  78. return self.makeUnaryCall(
  79. path: Normalization_NormalizationClientMetadata.Methods.Unary.path,
  80. request: request,
  81. callOptions: callOptions ?? self.defaultCallOptions,
  82. interceptors: self.interceptors?.makeUnaryInterceptors() ?? []
  83. )
  84. }
  85. /// Unary call to unary
  86. ///
  87. /// - Parameters:
  88. /// - request: Request to send to unary.
  89. /// - callOptions: Call options.
  90. /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  91. internal func unary(
  92. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  93. callOptions: CallOptions? = nil
  94. ) -> UnaryCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  95. return self.makeUnaryCall(
  96. path: Normalization_NormalizationClientMetadata.Methods.unary.path,
  97. request: request,
  98. callOptions: callOptions ?? self.defaultCallOptions,
  99. interceptors: self.interceptors?.makeunaryInterceptors() ?? []
  100. )
  101. }
  102. /// Server streaming call to ServerStreaming
  103. ///
  104. /// - Parameters:
  105. /// - request: Request to send to ServerStreaming.
  106. /// - callOptions: Call options.
  107. /// - handler: A closure called when each response is received from the server.
  108. /// - Returns: A `ServerStreamingCall` with futures for the metadata and status.
  109. internal func ServerStreaming(
  110. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  111. callOptions: CallOptions? = nil,
  112. handler: @escaping (Normalization_FunctionName) -> Void
  113. ) -> ServerStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  114. return self.makeServerStreamingCall(
  115. path: Normalization_NormalizationClientMetadata.Methods.ServerStreaming.path,
  116. request: request,
  117. callOptions: callOptions ?? self.defaultCallOptions,
  118. interceptors: self.interceptors?.makeServerStreamingInterceptors() ?? [],
  119. handler: handler
  120. )
  121. }
  122. /// Server streaming call to serverStreaming
  123. ///
  124. /// - Parameters:
  125. /// - request: Request to send to serverStreaming.
  126. /// - callOptions: Call options.
  127. /// - handler: A closure called when each response is received from the server.
  128. /// - Returns: A `ServerStreamingCall` with futures for the metadata and status.
  129. internal func serverStreaming(
  130. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  131. callOptions: CallOptions? = nil,
  132. handler: @escaping (Normalization_FunctionName) -> Void
  133. ) -> ServerStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  134. return self.makeServerStreamingCall(
  135. path: Normalization_NormalizationClientMetadata.Methods.serverStreaming.path,
  136. request: request,
  137. callOptions: callOptions ?? self.defaultCallOptions,
  138. interceptors: self.interceptors?.makeserverStreamingInterceptors() ?? [],
  139. handler: handler
  140. )
  141. }
  142. /// Client streaming call to ClientStreaming
  143. ///
  144. /// Callers should use the `send` method on the returned object to send messages
  145. /// to the server. The caller should send an `.end` after the final message has been sent.
  146. ///
  147. /// - Parameters:
  148. /// - callOptions: Call options.
  149. /// - Returns: A `ClientStreamingCall` with futures for the metadata, status and response.
  150. internal func ClientStreaming(
  151. callOptions: CallOptions? = nil
  152. ) -> ClientStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  153. return self.makeClientStreamingCall(
  154. path: Normalization_NormalizationClientMetadata.Methods.ClientStreaming.path,
  155. callOptions: callOptions ?? self.defaultCallOptions,
  156. interceptors: self.interceptors?.makeClientStreamingInterceptors() ?? []
  157. )
  158. }
  159. /// Client streaming call to clientStreaming
  160. ///
  161. /// Callers should use the `send` method on the returned object to send messages
  162. /// to the server. The caller should send an `.end` after the final message has been sent.
  163. ///
  164. /// - Parameters:
  165. /// - callOptions: Call options.
  166. /// - Returns: A `ClientStreamingCall` with futures for the metadata, status and response.
  167. internal func clientStreaming(
  168. callOptions: CallOptions? = nil
  169. ) -> ClientStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  170. return self.makeClientStreamingCall(
  171. path: Normalization_NormalizationClientMetadata.Methods.clientStreaming.path,
  172. callOptions: callOptions ?? self.defaultCallOptions,
  173. interceptors: self.interceptors?.makeclientStreamingInterceptors() ?? []
  174. )
  175. }
  176. /// Bidirectional streaming call to BidirectionalStreaming
  177. ///
  178. /// Callers should use the `send` method on the returned object to send messages
  179. /// to the server. The caller should send an `.end` after the final message has been sent.
  180. ///
  181. /// - Parameters:
  182. /// - callOptions: Call options.
  183. /// - handler: A closure called when each response is received from the server.
  184. /// - Returns: A `ClientStreamingCall` with futures for the metadata and status.
  185. internal func BidirectionalStreaming(
  186. callOptions: CallOptions? = nil,
  187. handler: @escaping (Normalization_FunctionName) -> Void
  188. ) -> BidirectionalStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  189. return self.makeBidirectionalStreamingCall(
  190. path: Normalization_NormalizationClientMetadata.Methods.BidirectionalStreaming.path,
  191. callOptions: callOptions ?? self.defaultCallOptions,
  192. interceptors: self.interceptors?.makeBidirectionalStreamingInterceptors() ?? [],
  193. handler: handler
  194. )
  195. }
  196. /// Bidirectional streaming call to bidirectionalStreaming
  197. ///
  198. /// Callers should use the `send` method on the returned object to send messages
  199. /// to the server. The caller should send an `.end` after the final message has been sent.
  200. ///
  201. /// - Parameters:
  202. /// - callOptions: Call options.
  203. /// - handler: A closure called when each response is received from the server.
  204. /// - Returns: A `ClientStreamingCall` with futures for the metadata and status.
  205. internal func bidirectionalStreaming(
  206. callOptions: CallOptions? = nil,
  207. handler: @escaping (Normalization_FunctionName) -> Void
  208. ) -> BidirectionalStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  209. return self.makeBidirectionalStreamingCall(
  210. path: Normalization_NormalizationClientMetadata.Methods.bidirectionalStreaming.path,
  211. callOptions: callOptions ?? self.defaultCallOptions,
  212. interceptors: self.interceptors?.makebidirectionalStreamingInterceptors() ?? [],
  213. handler: handler
  214. )
  215. }
  216. }
  217. @available(*, deprecated)
  218. extension Normalization_NormalizationClient: @unchecked Sendable {}
  219. @available(*, deprecated, renamed: "Normalization_NormalizationNIOClient")
  220. internal final class Normalization_NormalizationClient: Normalization_NormalizationClientProtocol {
  221. private let lock = Lock()
  222. private var _defaultCallOptions: CallOptions
  223. private var _interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol?
  224. internal let channel: GRPCChannel
  225. internal var defaultCallOptions: CallOptions {
  226. get { self.lock.withLock { return self._defaultCallOptions } }
  227. set { self.lock.withLockVoid { self._defaultCallOptions = newValue } }
  228. }
  229. internal var interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol? {
  230. get { self.lock.withLock { return self._interceptors } }
  231. set { self.lock.withLockVoid { self._interceptors = newValue } }
  232. }
  233. /// Creates a client for the normalization.Normalization service.
  234. ///
  235. /// - Parameters:
  236. /// - channel: `GRPCChannel` to the service host.
  237. /// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
  238. /// - interceptors: A factory providing interceptors for each RPC.
  239. internal init(
  240. channel: GRPCChannel,
  241. defaultCallOptions: CallOptions = CallOptions(),
  242. interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol? = nil
  243. ) {
  244. self.channel = channel
  245. self._defaultCallOptions = defaultCallOptions
  246. self._interceptors = interceptors
  247. }
  248. }
  249. internal struct Normalization_NormalizationNIOClient: Normalization_NormalizationClientProtocol {
  250. internal var channel: GRPCChannel
  251. internal var defaultCallOptions: CallOptions
  252. internal var interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol?
  253. /// Creates a client for the normalization.Normalization service.
  254. ///
  255. /// - Parameters:
  256. /// - channel: `GRPCChannel` to the service host.
  257. /// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
  258. /// - interceptors: A factory providing interceptors for each RPC.
  259. internal init(
  260. channel: GRPCChannel,
  261. defaultCallOptions: CallOptions = CallOptions(),
  262. interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol? = nil
  263. ) {
  264. self.channel = channel
  265. self.defaultCallOptions = defaultCallOptions
  266. self.interceptors = interceptors
  267. }
  268. }
  269. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  270. internal protocol Normalization_NormalizationAsyncClientProtocol: GRPCClient {
  271. static var serviceDescriptor: GRPCServiceDescriptor { get }
  272. var interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol? { get }
  273. func makeUnaryCall(
  274. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  275. callOptions: CallOptions?
  276. ) -> GRPCAsyncUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  277. func makeunaryCall(
  278. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  279. callOptions: CallOptions?
  280. ) -> GRPCAsyncUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  281. func makeServerStreamingCall(
  282. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  283. callOptions: CallOptions?
  284. ) -> GRPCAsyncServerStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  285. func makeserverStreamingCall(
  286. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  287. callOptions: CallOptions?
  288. ) -> GRPCAsyncServerStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  289. func makeClientStreamingCall(
  290. callOptions: CallOptions?
  291. ) -> GRPCAsyncClientStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  292. func makeclientStreamingCall(
  293. callOptions: CallOptions?
  294. ) -> GRPCAsyncClientStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  295. func makeBidirectionalStreamingCall(
  296. callOptions: CallOptions?
  297. ) -> GRPCAsyncBidirectionalStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  298. func makebidirectionalStreamingCall(
  299. callOptions: CallOptions?
  300. ) -> GRPCAsyncBidirectionalStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  301. }
  302. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  303. extension Normalization_NormalizationAsyncClientProtocol {
  304. internal static var serviceDescriptor: GRPCServiceDescriptor {
  305. return Normalization_NormalizationClientMetadata.serviceDescriptor
  306. }
  307. internal var interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol? {
  308. return nil
  309. }
  310. internal func makeUnaryCall(
  311. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  312. callOptions: CallOptions? = nil
  313. ) -> GRPCAsyncUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  314. return self.makeAsyncUnaryCall(
  315. path: Normalization_NormalizationClientMetadata.Methods.Unary.path,
  316. request: request,
  317. callOptions: callOptions ?? self.defaultCallOptions,
  318. interceptors: self.interceptors?.makeUnaryInterceptors() ?? []
  319. )
  320. }
  321. internal func makeunaryCall(
  322. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  323. callOptions: CallOptions? = nil
  324. ) -> GRPCAsyncUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  325. return self.makeAsyncUnaryCall(
  326. path: Normalization_NormalizationClientMetadata.Methods.unary.path,
  327. request: request,
  328. callOptions: callOptions ?? self.defaultCallOptions,
  329. interceptors: self.interceptors?.makeunaryInterceptors() ?? []
  330. )
  331. }
  332. internal func makeServerStreamingCall(
  333. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  334. callOptions: CallOptions? = nil
  335. ) -> GRPCAsyncServerStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  336. return self.makeAsyncServerStreamingCall(
  337. path: Normalization_NormalizationClientMetadata.Methods.ServerStreaming.path,
  338. request: request,
  339. callOptions: callOptions ?? self.defaultCallOptions,
  340. interceptors: self.interceptors?.makeServerStreamingInterceptors() ?? []
  341. )
  342. }
  343. internal func makeserverStreamingCall(
  344. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  345. callOptions: CallOptions? = nil
  346. ) -> GRPCAsyncServerStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  347. return self.makeAsyncServerStreamingCall(
  348. path: Normalization_NormalizationClientMetadata.Methods.serverStreaming.path,
  349. request: request,
  350. callOptions: callOptions ?? self.defaultCallOptions,
  351. interceptors: self.interceptors?.makeserverStreamingInterceptors() ?? []
  352. )
  353. }
  354. internal func makeClientStreamingCall(
  355. callOptions: CallOptions? = nil
  356. ) -> GRPCAsyncClientStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  357. return self.makeAsyncClientStreamingCall(
  358. path: Normalization_NormalizationClientMetadata.Methods.ClientStreaming.path,
  359. callOptions: callOptions ?? self.defaultCallOptions,
  360. interceptors: self.interceptors?.makeClientStreamingInterceptors() ?? []
  361. )
  362. }
  363. internal func makeclientStreamingCall(
  364. callOptions: CallOptions? = nil
  365. ) -> GRPCAsyncClientStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  366. return self.makeAsyncClientStreamingCall(
  367. path: Normalization_NormalizationClientMetadata.Methods.clientStreaming.path,
  368. callOptions: callOptions ?? self.defaultCallOptions,
  369. interceptors: self.interceptors?.makeclientStreamingInterceptors() ?? []
  370. )
  371. }
  372. internal func makeBidirectionalStreamingCall(
  373. callOptions: CallOptions? = nil
  374. ) -> GRPCAsyncBidirectionalStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  375. return self.makeAsyncBidirectionalStreamingCall(
  376. path: Normalization_NormalizationClientMetadata.Methods.BidirectionalStreaming.path,
  377. callOptions: callOptions ?? self.defaultCallOptions,
  378. interceptors: self.interceptors?.makeBidirectionalStreamingInterceptors() ?? []
  379. )
  380. }
  381. internal func makebidirectionalStreamingCall(
  382. callOptions: CallOptions? = nil
  383. ) -> GRPCAsyncBidirectionalStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  384. return self.makeAsyncBidirectionalStreamingCall(
  385. path: Normalization_NormalizationClientMetadata.Methods.bidirectionalStreaming.path,
  386. callOptions: callOptions ?? self.defaultCallOptions,
  387. interceptors: self.interceptors?.makebidirectionalStreamingInterceptors() ?? []
  388. )
  389. }
  390. }
  391. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  392. extension Normalization_NormalizationAsyncClientProtocol {
  393. internal func Unary(
  394. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  395. callOptions: CallOptions? = nil
  396. ) async throws -> Normalization_FunctionName {
  397. return try await self.performAsyncUnaryCall(
  398. path: Normalization_NormalizationClientMetadata.Methods.Unary.path,
  399. request: request,
  400. callOptions: callOptions ?? self.defaultCallOptions,
  401. interceptors: self.interceptors?.makeUnaryInterceptors() ?? []
  402. )
  403. }
  404. internal func unary(
  405. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  406. callOptions: CallOptions? = nil
  407. ) async throws -> Normalization_FunctionName {
  408. return try await self.performAsyncUnaryCall(
  409. path: Normalization_NormalizationClientMetadata.Methods.unary.path,
  410. request: request,
  411. callOptions: callOptions ?? self.defaultCallOptions,
  412. interceptors: self.interceptors?.makeunaryInterceptors() ?? []
  413. )
  414. }
  415. internal func ServerStreaming(
  416. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  417. callOptions: CallOptions? = nil
  418. ) -> GRPCAsyncResponseStream<Normalization_FunctionName> {
  419. return self.performAsyncServerStreamingCall(
  420. path: Normalization_NormalizationClientMetadata.Methods.ServerStreaming.path,
  421. request: request,
  422. callOptions: callOptions ?? self.defaultCallOptions,
  423. interceptors: self.interceptors?.makeServerStreamingInterceptors() ?? []
  424. )
  425. }
  426. internal func serverStreaming(
  427. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  428. callOptions: CallOptions? = nil
  429. ) -> GRPCAsyncResponseStream<Normalization_FunctionName> {
  430. return self.performAsyncServerStreamingCall(
  431. path: Normalization_NormalizationClientMetadata.Methods.serverStreaming.path,
  432. request: request,
  433. callOptions: callOptions ?? self.defaultCallOptions,
  434. interceptors: self.interceptors?.makeserverStreamingInterceptors() ?? []
  435. )
  436. }
  437. internal func ClientStreaming<RequestStream>(
  438. _ requests: RequestStream,
  439. callOptions: CallOptions? = nil
  440. ) async throws -> Normalization_FunctionName where RequestStream: Sequence, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  441. return try await self.performAsyncClientStreamingCall(
  442. path: Normalization_NormalizationClientMetadata.Methods.ClientStreaming.path,
  443. requests: requests,
  444. callOptions: callOptions ?? self.defaultCallOptions,
  445. interceptors: self.interceptors?.makeClientStreamingInterceptors() ?? []
  446. )
  447. }
  448. internal func ClientStreaming<RequestStream>(
  449. _ requests: RequestStream,
  450. callOptions: CallOptions? = nil
  451. ) async throws -> Normalization_FunctionName where RequestStream: AsyncSequence & Sendable, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  452. return try await self.performAsyncClientStreamingCall(
  453. path: Normalization_NormalizationClientMetadata.Methods.ClientStreaming.path,
  454. requests: requests,
  455. callOptions: callOptions ?? self.defaultCallOptions,
  456. interceptors: self.interceptors?.makeClientStreamingInterceptors() ?? []
  457. )
  458. }
  459. internal func clientStreaming<RequestStream>(
  460. _ requests: RequestStream,
  461. callOptions: CallOptions? = nil
  462. ) async throws -> Normalization_FunctionName where RequestStream: Sequence, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  463. return try await self.performAsyncClientStreamingCall(
  464. path: Normalization_NormalizationClientMetadata.Methods.clientStreaming.path,
  465. requests: requests,
  466. callOptions: callOptions ?? self.defaultCallOptions,
  467. interceptors: self.interceptors?.makeclientStreamingInterceptors() ?? []
  468. )
  469. }
  470. internal func clientStreaming<RequestStream>(
  471. _ requests: RequestStream,
  472. callOptions: CallOptions? = nil
  473. ) async throws -> Normalization_FunctionName where RequestStream: AsyncSequence & Sendable, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  474. return try await self.performAsyncClientStreamingCall(
  475. path: Normalization_NormalizationClientMetadata.Methods.clientStreaming.path,
  476. requests: requests,
  477. callOptions: callOptions ?? self.defaultCallOptions,
  478. interceptors: self.interceptors?.makeclientStreamingInterceptors() ?? []
  479. )
  480. }
  481. internal func BidirectionalStreaming<RequestStream>(
  482. _ requests: RequestStream,
  483. callOptions: CallOptions? = nil
  484. ) -> GRPCAsyncResponseStream<Normalization_FunctionName> where RequestStream: Sequence, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  485. return self.performAsyncBidirectionalStreamingCall(
  486. path: Normalization_NormalizationClientMetadata.Methods.BidirectionalStreaming.path,
  487. requests: requests,
  488. callOptions: callOptions ?? self.defaultCallOptions,
  489. interceptors: self.interceptors?.makeBidirectionalStreamingInterceptors() ?? []
  490. )
  491. }
  492. internal func BidirectionalStreaming<RequestStream>(
  493. _ requests: RequestStream,
  494. callOptions: CallOptions? = nil
  495. ) -> GRPCAsyncResponseStream<Normalization_FunctionName> where RequestStream: AsyncSequence & Sendable, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  496. return self.performAsyncBidirectionalStreamingCall(
  497. path: Normalization_NormalizationClientMetadata.Methods.BidirectionalStreaming.path,
  498. requests: requests,
  499. callOptions: callOptions ?? self.defaultCallOptions,
  500. interceptors: self.interceptors?.makeBidirectionalStreamingInterceptors() ?? []
  501. )
  502. }
  503. internal func bidirectionalStreaming<RequestStream>(
  504. _ requests: RequestStream,
  505. callOptions: CallOptions? = nil
  506. ) -> GRPCAsyncResponseStream<Normalization_FunctionName> where RequestStream: Sequence, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  507. return self.performAsyncBidirectionalStreamingCall(
  508. path: Normalization_NormalizationClientMetadata.Methods.bidirectionalStreaming.path,
  509. requests: requests,
  510. callOptions: callOptions ?? self.defaultCallOptions,
  511. interceptors: self.interceptors?.makebidirectionalStreamingInterceptors() ?? []
  512. )
  513. }
  514. internal func bidirectionalStreaming<RequestStream>(
  515. _ requests: RequestStream,
  516. callOptions: CallOptions? = nil
  517. ) -> GRPCAsyncResponseStream<Normalization_FunctionName> where RequestStream: AsyncSequence & Sendable, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  518. return self.performAsyncBidirectionalStreamingCall(
  519. path: Normalization_NormalizationClientMetadata.Methods.bidirectionalStreaming.path,
  520. requests: requests,
  521. callOptions: callOptions ?? self.defaultCallOptions,
  522. interceptors: self.interceptors?.makebidirectionalStreamingInterceptors() ?? []
  523. )
  524. }
  525. }
  526. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  527. internal struct Normalization_NormalizationAsyncClient: Normalization_NormalizationAsyncClientProtocol {
  528. internal var channel: GRPCChannel
  529. internal var defaultCallOptions: CallOptions
  530. internal var interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol?
  531. internal init(
  532. channel: GRPCChannel,
  533. defaultCallOptions: CallOptions = CallOptions(),
  534. interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol? = nil
  535. ) {
  536. self.channel = channel
  537. self.defaultCallOptions = defaultCallOptions
  538. self.interceptors = interceptors
  539. }
  540. }
  541. internal protocol Normalization_NormalizationClientInterceptorFactoryProtocol: Sendable {
  542. /// - Returns: Interceptors to use when invoking 'Unary'.
  543. func makeUnaryInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  544. /// - Returns: Interceptors to use when invoking 'unary'.
  545. func makeunaryInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  546. /// - Returns: Interceptors to use when invoking 'ServerStreaming'.
  547. func makeServerStreamingInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  548. /// - Returns: Interceptors to use when invoking 'serverStreaming'.
  549. func makeserverStreamingInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  550. /// - Returns: Interceptors to use when invoking 'ClientStreaming'.
  551. func makeClientStreamingInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  552. /// - Returns: Interceptors to use when invoking 'clientStreaming'.
  553. func makeclientStreamingInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  554. /// - Returns: Interceptors to use when invoking 'BidirectionalStreaming'.
  555. func makeBidirectionalStreamingInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  556. /// - Returns: Interceptors to use when invoking 'bidirectionalStreaming'.
  557. func makebidirectionalStreamingInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  558. }
  559. internal enum Normalization_NormalizationClientMetadata {
  560. internal static let serviceDescriptor = GRPCServiceDescriptor(
  561. name: "Normalization",
  562. fullName: "normalization.Normalization",
  563. methods: [
  564. Normalization_NormalizationClientMetadata.Methods.Unary,
  565. Normalization_NormalizationClientMetadata.Methods.unary,
  566. Normalization_NormalizationClientMetadata.Methods.ServerStreaming,
  567. Normalization_NormalizationClientMetadata.Methods.serverStreaming,
  568. Normalization_NormalizationClientMetadata.Methods.ClientStreaming,
  569. Normalization_NormalizationClientMetadata.Methods.clientStreaming,
  570. Normalization_NormalizationClientMetadata.Methods.BidirectionalStreaming,
  571. Normalization_NormalizationClientMetadata.Methods.bidirectionalStreaming,
  572. ]
  573. )
  574. internal enum Methods {
  575. internal static let Unary = GRPCMethodDescriptor(
  576. name: "Unary",
  577. path: "/normalization.Normalization/Unary",
  578. type: GRPCCallType.unary
  579. )
  580. internal static let unary = GRPCMethodDescriptor(
  581. name: "unary",
  582. path: "/normalization.Normalization/unary",
  583. type: GRPCCallType.unary
  584. )
  585. internal static let ServerStreaming = GRPCMethodDescriptor(
  586. name: "ServerStreaming",
  587. path: "/normalization.Normalization/ServerStreaming",
  588. type: GRPCCallType.serverStreaming
  589. )
  590. internal static let serverStreaming = GRPCMethodDescriptor(
  591. name: "serverStreaming",
  592. path: "/normalization.Normalization/serverStreaming",
  593. type: GRPCCallType.serverStreaming
  594. )
  595. internal static let ClientStreaming = GRPCMethodDescriptor(
  596. name: "ClientStreaming",
  597. path: "/normalization.Normalization/ClientStreaming",
  598. type: GRPCCallType.clientStreaming
  599. )
  600. internal static let clientStreaming = GRPCMethodDescriptor(
  601. name: "clientStreaming",
  602. path: "/normalization.Normalization/clientStreaming",
  603. type: GRPCCallType.clientStreaming
  604. )
  605. internal static let BidirectionalStreaming = GRPCMethodDescriptor(
  606. name: "BidirectionalStreaming",
  607. path: "/normalization.Normalization/BidirectionalStreaming",
  608. type: GRPCCallType.bidirectionalStreaming
  609. )
  610. internal static let bidirectionalStreaming = GRPCMethodDescriptor(
  611. name: "bidirectionalStreaming",
  612. path: "/normalization.Normalization/bidirectionalStreaming",
  613. type: GRPCCallType.bidirectionalStreaming
  614. )
  615. }
  616. }
  617. /// To build a server, implement a class that conforms to this protocol.
  618. internal protocol Normalization_NormalizationProvider: CallHandlerProvider {
  619. var interceptors: Normalization_NormalizationServerInterceptorFactoryProtocol? { get }
  620. func Unary(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture<Normalization_FunctionName>
  621. func unary(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture<Normalization_FunctionName>
  622. func ServerStreaming(request: SwiftProtobuf.Google_Protobuf_Empty, context: StreamingResponseCallContext<Normalization_FunctionName>) -> EventLoopFuture<GRPCStatus>
  623. func serverStreaming(request: SwiftProtobuf.Google_Protobuf_Empty, context: StreamingResponseCallContext<Normalization_FunctionName>) -> EventLoopFuture<GRPCStatus>
  624. func ClientStreaming(context: UnaryResponseCallContext<Normalization_FunctionName>) -> EventLoopFuture<(StreamEvent<SwiftProtobuf.Google_Protobuf_Empty>) -> Void>
  625. func clientStreaming(context: UnaryResponseCallContext<Normalization_FunctionName>) -> EventLoopFuture<(StreamEvent<SwiftProtobuf.Google_Protobuf_Empty>) -> Void>
  626. func BidirectionalStreaming(context: StreamingResponseCallContext<Normalization_FunctionName>) -> EventLoopFuture<(StreamEvent<SwiftProtobuf.Google_Protobuf_Empty>) -> Void>
  627. func bidirectionalStreaming(context: StreamingResponseCallContext<Normalization_FunctionName>) -> EventLoopFuture<(StreamEvent<SwiftProtobuf.Google_Protobuf_Empty>) -> Void>
  628. }
  629. extension Normalization_NormalizationProvider {
  630. internal var serviceName: Substring {
  631. return Normalization_NormalizationServerMetadata.serviceDescriptor.fullName[...]
  632. }
  633. /// Determines, calls and returns the appropriate request handler, depending on the request's method.
  634. /// Returns nil for methods not handled by this service.
  635. internal func handle(
  636. method name: Substring,
  637. context: CallHandlerContext
  638. ) -> GRPCServerHandlerProtocol? {
  639. switch name {
  640. case "Unary":
  641. return UnaryServerHandler(
  642. context: context,
  643. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  644. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  645. interceptors: self.interceptors?.makeUnaryInterceptors() ?? [],
  646. userFunction: self.Unary(request:context:)
  647. )
  648. case "unary":
  649. return UnaryServerHandler(
  650. context: context,
  651. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  652. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  653. interceptors: self.interceptors?.makeunaryInterceptors() ?? [],
  654. userFunction: self.unary(request:context:)
  655. )
  656. case "ServerStreaming":
  657. return ServerStreamingServerHandler(
  658. context: context,
  659. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  660. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  661. interceptors: self.interceptors?.makeServerStreamingInterceptors() ?? [],
  662. userFunction: self.ServerStreaming(request:context:)
  663. )
  664. case "serverStreaming":
  665. return ServerStreamingServerHandler(
  666. context: context,
  667. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  668. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  669. interceptors: self.interceptors?.makeserverStreamingInterceptors() ?? [],
  670. userFunction: self.serverStreaming(request:context:)
  671. )
  672. case "ClientStreaming":
  673. return ClientStreamingServerHandler(
  674. context: context,
  675. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  676. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  677. interceptors: self.interceptors?.makeClientStreamingInterceptors() ?? [],
  678. observerFactory: self.ClientStreaming(context:)
  679. )
  680. case "clientStreaming":
  681. return ClientStreamingServerHandler(
  682. context: context,
  683. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  684. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  685. interceptors: self.interceptors?.makeclientStreamingInterceptors() ?? [],
  686. observerFactory: self.clientStreaming(context:)
  687. )
  688. case "BidirectionalStreaming":
  689. return BidirectionalStreamingServerHandler(
  690. context: context,
  691. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  692. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  693. interceptors: self.interceptors?.makeBidirectionalStreamingInterceptors() ?? [],
  694. observerFactory: self.BidirectionalStreaming(context:)
  695. )
  696. case "bidirectionalStreaming":
  697. return BidirectionalStreamingServerHandler(
  698. context: context,
  699. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  700. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  701. interceptors: self.interceptors?.makebidirectionalStreamingInterceptors() ?? [],
  702. observerFactory: self.bidirectionalStreaming(context:)
  703. )
  704. default:
  705. return nil
  706. }
  707. }
  708. }
  709. /// To implement a server, implement an object which conforms to this protocol.
  710. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  711. internal protocol Normalization_NormalizationAsyncProvider: CallHandlerProvider, Sendable {
  712. static var serviceDescriptor: GRPCServiceDescriptor { get }
  713. var interceptors: Normalization_NormalizationServerInterceptorFactoryProtocol? { get }
  714. func Unary(
  715. request: SwiftProtobuf.Google_Protobuf_Empty,
  716. context: GRPCAsyncServerCallContext
  717. ) async throws -> Normalization_FunctionName
  718. func unary(
  719. request: SwiftProtobuf.Google_Protobuf_Empty,
  720. context: GRPCAsyncServerCallContext
  721. ) async throws -> Normalization_FunctionName
  722. func ServerStreaming(
  723. request: SwiftProtobuf.Google_Protobuf_Empty,
  724. responseStream: GRPCAsyncResponseStreamWriter<Normalization_FunctionName>,
  725. context: GRPCAsyncServerCallContext
  726. ) async throws
  727. func serverStreaming(
  728. request: SwiftProtobuf.Google_Protobuf_Empty,
  729. responseStream: GRPCAsyncResponseStreamWriter<Normalization_FunctionName>,
  730. context: GRPCAsyncServerCallContext
  731. ) async throws
  732. func ClientStreaming(
  733. requestStream: GRPCAsyncRequestStream<SwiftProtobuf.Google_Protobuf_Empty>,
  734. context: GRPCAsyncServerCallContext
  735. ) async throws -> Normalization_FunctionName
  736. func clientStreaming(
  737. requestStream: GRPCAsyncRequestStream<SwiftProtobuf.Google_Protobuf_Empty>,
  738. context: GRPCAsyncServerCallContext
  739. ) async throws -> Normalization_FunctionName
  740. func BidirectionalStreaming(
  741. requestStream: GRPCAsyncRequestStream<SwiftProtobuf.Google_Protobuf_Empty>,
  742. responseStream: GRPCAsyncResponseStreamWriter<Normalization_FunctionName>,
  743. context: GRPCAsyncServerCallContext
  744. ) async throws
  745. func bidirectionalStreaming(
  746. requestStream: GRPCAsyncRequestStream<SwiftProtobuf.Google_Protobuf_Empty>,
  747. responseStream: GRPCAsyncResponseStreamWriter<Normalization_FunctionName>,
  748. context: GRPCAsyncServerCallContext
  749. ) async throws
  750. }
  751. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  752. extension Normalization_NormalizationAsyncProvider {
  753. internal static var serviceDescriptor: GRPCServiceDescriptor {
  754. return Normalization_NormalizationServerMetadata.serviceDescriptor
  755. }
  756. internal var serviceName: Substring {
  757. return Normalization_NormalizationServerMetadata.serviceDescriptor.fullName[...]
  758. }
  759. internal var interceptors: Normalization_NormalizationServerInterceptorFactoryProtocol? {
  760. return nil
  761. }
  762. internal func handle(
  763. method name: Substring,
  764. context: CallHandlerContext
  765. ) -> GRPCServerHandlerProtocol? {
  766. switch name {
  767. case "Unary":
  768. return GRPCAsyncServerHandler(
  769. context: context,
  770. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  771. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  772. interceptors: self.interceptors?.makeUnaryInterceptors() ?? [],
  773. wrapping: { try await self.Unary(request: $0, context: $1) }
  774. )
  775. case "unary":
  776. return GRPCAsyncServerHandler(
  777. context: context,
  778. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  779. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  780. interceptors: self.interceptors?.makeunaryInterceptors() ?? [],
  781. wrapping: { try await self.unary(request: $0, context: $1) }
  782. )
  783. case "ServerStreaming":
  784. return GRPCAsyncServerHandler(
  785. context: context,
  786. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  787. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  788. interceptors: self.interceptors?.makeServerStreamingInterceptors() ?? [],
  789. wrapping: { try await self.ServerStreaming(request: $0, responseStream: $1, context: $2) }
  790. )
  791. case "serverStreaming":
  792. return GRPCAsyncServerHandler(
  793. context: context,
  794. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  795. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  796. interceptors: self.interceptors?.makeserverStreamingInterceptors() ?? [],
  797. wrapping: { try await self.serverStreaming(request: $0, responseStream: $1, context: $2) }
  798. )
  799. case "ClientStreaming":
  800. return GRPCAsyncServerHandler(
  801. context: context,
  802. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  803. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  804. interceptors: self.interceptors?.makeClientStreamingInterceptors() ?? [],
  805. wrapping: { try await self.ClientStreaming(requestStream: $0, context: $1) }
  806. )
  807. case "clientStreaming":
  808. return GRPCAsyncServerHandler(
  809. context: context,
  810. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  811. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  812. interceptors: self.interceptors?.makeclientStreamingInterceptors() ?? [],
  813. wrapping: { try await self.clientStreaming(requestStream: $0, context: $1) }
  814. )
  815. case "BidirectionalStreaming":
  816. return GRPCAsyncServerHandler(
  817. context: context,
  818. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  819. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  820. interceptors: self.interceptors?.makeBidirectionalStreamingInterceptors() ?? [],
  821. wrapping: { try await self.BidirectionalStreaming(requestStream: $0, responseStream: $1, context: $2) }
  822. )
  823. case "bidirectionalStreaming":
  824. return GRPCAsyncServerHandler(
  825. context: context,
  826. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  827. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  828. interceptors: self.interceptors?.makebidirectionalStreamingInterceptors() ?? [],
  829. wrapping: { try await self.bidirectionalStreaming(requestStream: $0, responseStream: $1, context: $2) }
  830. )
  831. default:
  832. return nil
  833. }
  834. }
  835. }
  836. internal protocol Normalization_NormalizationServerInterceptorFactoryProtocol: Sendable {
  837. /// - Returns: Interceptors to use when handling 'Unary'.
  838. /// Defaults to calling `self.makeInterceptors()`.
  839. func makeUnaryInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  840. /// - Returns: Interceptors to use when handling 'unary'.
  841. /// Defaults to calling `self.makeInterceptors()`.
  842. func makeunaryInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  843. /// - Returns: Interceptors to use when handling 'ServerStreaming'.
  844. /// Defaults to calling `self.makeInterceptors()`.
  845. func makeServerStreamingInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  846. /// - Returns: Interceptors to use when handling 'serverStreaming'.
  847. /// Defaults to calling `self.makeInterceptors()`.
  848. func makeserverStreamingInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  849. /// - Returns: Interceptors to use when handling 'ClientStreaming'.
  850. /// Defaults to calling `self.makeInterceptors()`.
  851. func makeClientStreamingInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  852. /// - Returns: Interceptors to use when handling 'clientStreaming'.
  853. /// Defaults to calling `self.makeInterceptors()`.
  854. func makeclientStreamingInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  855. /// - Returns: Interceptors to use when handling 'BidirectionalStreaming'.
  856. /// Defaults to calling `self.makeInterceptors()`.
  857. func makeBidirectionalStreamingInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  858. /// - Returns: Interceptors to use when handling 'bidirectionalStreaming'.
  859. /// Defaults to calling `self.makeInterceptors()`.
  860. func makebidirectionalStreamingInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  861. }
  862. internal enum Normalization_NormalizationServerMetadata {
  863. internal static let serviceDescriptor = GRPCServiceDescriptor(
  864. name: "Normalization",
  865. fullName: "normalization.Normalization",
  866. methods: [
  867. Normalization_NormalizationServerMetadata.Methods.Unary,
  868. Normalization_NormalizationServerMetadata.Methods.unary,
  869. Normalization_NormalizationServerMetadata.Methods.ServerStreaming,
  870. Normalization_NormalizationServerMetadata.Methods.serverStreaming,
  871. Normalization_NormalizationServerMetadata.Methods.ClientStreaming,
  872. Normalization_NormalizationServerMetadata.Methods.clientStreaming,
  873. Normalization_NormalizationServerMetadata.Methods.BidirectionalStreaming,
  874. Normalization_NormalizationServerMetadata.Methods.bidirectionalStreaming,
  875. ]
  876. )
  877. internal enum Methods {
  878. internal static let Unary = GRPCMethodDescriptor(
  879. name: "Unary",
  880. path: "/normalization.Normalization/Unary",
  881. type: GRPCCallType.unary
  882. )
  883. internal static let unary = GRPCMethodDescriptor(
  884. name: "unary",
  885. path: "/normalization.Normalization/unary",
  886. type: GRPCCallType.unary
  887. )
  888. internal static let ServerStreaming = GRPCMethodDescriptor(
  889. name: "ServerStreaming",
  890. path: "/normalization.Normalization/ServerStreaming",
  891. type: GRPCCallType.serverStreaming
  892. )
  893. internal static let serverStreaming = GRPCMethodDescriptor(
  894. name: "serverStreaming",
  895. path: "/normalization.Normalization/serverStreaming",
  896. type: GRPCCallType.serverStreaming
  897. )
  898. internal static let ClientStreaming = GRPCMethodDescriptor(
  899. name: "ClientStreaming",
  900. path: "/normalization.Normalization/ClientStreaming",
  901. type: GRPCCallType.clientStreaming
  902. )
  903. internal static let clientStreaming = GRPCMethodDescriptor(
  904. name: "clientStreaming",
  905. path: "/normalization.Normalization/clientStreaming",
  906. type: GRPCCallType.clientStreaming
  907. )
  908. internal static let BidirectionalStreaming = GRPCMethodDescriptor(
  909. name: "BidirectionalStreaming",
  910. path: "/normalization.Normalization/BidirectionalStreaming",
  911. type: GRPCCallType.bidirectionalStreaming
  912. )
  913. internal static let bidirectionalStreaming = GRPCMethodDescriptor(
  914. name: "bidirectionalStreaming",
  915. path: "/normalization.Normalization/bidirectionalStreaming",
  916. type: GRPCCallType.bidirectionalStreaming
  917. )
  918. }
  919. }