normalization.grpc.swift 45 KB

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