normalization.grpc.swift 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061
  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. #if compiler(>=5.6)
  217. @available(*, deprecated)
  218. extension Normalization_NormalizationClient: @unchecked Sendable {}
  219. #endif // compiler(>=5.6)
  220. @available(*, deprecated, renamed: "Normalization_NormalizationNIOClient")
  221. internal final class Normalization_NormalizationClient: Normalization_NormalizationClientProtocol {
  222. private let lock = Lock()
  223. private var _defaultCallOptions: CallOptions
  224. private var _interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol?
  225. internal let channel: GRPCChannel
  226. internal var defaultCallOptions: CallOptions {
  227. get { self.lock.withLock { return self._defaultCallOptions } }
  228. set { self.lock.withLockVoid { self._defaultCallOptions = newValue } }
  229. }
  230. internal var interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol? {
  231. get { self.lock.withLock { return self._interceptors } }
  232. set { self.lock.withLockVoid { self._interceptors = newValue } }
  233. }
  234. /// Creates a client for the normalization.Normalization service.
  235. ///
  236. /// - Parameters:
  237. /// - channel: `GRPCChannel` to the service host.
  238. /// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
  239. /// - interceptors: A factory providing interceptors for each RPC.
  240. internal init(
  241. channel: GRPCChannel,
  242. defaultCallOptions: CallOptions = CallOptions(),
  243. interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol? = nil
  244. ) {
  245. self.channel = channel
  246. self._defaultCallOptions = defaultCallOptions
  247. self._interceptors = interceptors
  248. }
  249. }
  250. internal struct Normalization_NormalizationNIOClient: Normalization_NormalizationClientProtocol {
  251. internal var channel: GRPCChannel
  252. internal var defaultCallOptions: CallOptions
  253. internal var interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol?
  254. /// Creates a client for the normalization.Normalization service.
  255. ///
  256. /// - Parameters:
  257. /// - channel: `GRPCChannel` to the service host.
  258. /// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
  259. /// - interceptors: A factory providing interceptors for each RPC.
  260. internal init(
  261. channel: GRPCChannel,
  262. defaultCallOptions: CallOptions = CallOptions(),
  263. interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol? = nil
  264. ) {
  265. self.channel = channel
  266. self.defaultCallOptions = defaultCallOptions
  267. self.interceptors = interceptors
  268. }
  269. }
  270. #if compiler(>=5.6)
  271. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  272. internal protocol Normalization_NormalizationAsyncClientProtocol: GRPCClient {
  273. static var serviceDescriptor: GRPCServiceDescriptor { get }
  274. var interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol? { get }
  275. func makeUnaryCall(
  276. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  277. callOptions: CallOptions?
  278. ) -> GRPCAsyncUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  279. func makeunaryCall(
  280. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  281. callOptions: CallOptions?
  282. ) -> GRPCAsyncUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  283. func makeServerStreamingCall(
  284. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  285. callOptions: CallOptions?
  286. ) -> GRPCAsyncServerStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  287. func makeserverStreamingCall(
  288. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  289. callOptions: CallOptions?
  290. ) -> GRPCAsyncServerStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  291. func makeClientStreamingCall(
  292. callOptions: CallOptions?
  293. ) -> GRPCAsyncClientStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  294. func makeclientStreamingCall(
  295. callOptions: CallOptions?
  296. ) -> GRPCAsyncClientStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  297. func makeBidirectionalStreamingCall(
  298. callOptions: CallOptions?
  299. ) -> GRPCAsyncBidirectionalStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  300. func makebidirectionalStreamingCall(
  301. callOptions: CallOptions?
  302. ) -> GRPCAsyncBidirectionalStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>
  303. }
  304. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  305. extension Normalization_NormalizationAsyncClientProtocol {
  306. internal static var serviceDescriptor: GRPCServiceDescriptor {
  307. return Normalization_NormalizationClientMetadata.serviceDescriptor
  308. }
  309. internal var interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol? {
  310. return nil
  311. }
  312. internal func makeUnaryCall(
  313. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  314. callOptions: CallOptions? = nil
  315. ) -> GRPCAsyncUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  316. return self.makeAsyncUnaryCall(
  317. path: Normalization_NormalizationClientMetadata.Methods.Unary.path,
  318. request: request,
  319. callOptions: callOptions ?? self.defaultCallOptions,
  320. interceptors: self.interceptors?.makeUnaryInterceptors() ?? []
  321. )
  322. }
  323. internal func makeunaryCall(
  324. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  325. callOptions: CallOptions? = nil
  326. ) -> GRPCAsyncUnaryCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  327. return self.makeAsyncUnaryCall(
  328. path: Normalization_NormalizationClientMetadata.Methods.unary.path,
  329. request: request,
  330. callOptions: callOptions ?? self.defaultCallOptions,
  331. interceptors: self.interceptors?.makeunaryInterceptors() ?? []
  332. )
  333. }
  334. internal func makeServerStreamingCall(
  335. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  336. callOptions: CallOptions? = nil
  337. ) -> GRPCAsyncServerStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  338. return self.makeAsyncServerStreamingCall(
  339. path: Normalization_NormalizationClientMetadata.Methods.ServerStreaming.path,
  340. request: request,
  341. callOptions: callOptions ?? self.defaultCallOptions,
  342. interceptors: self.interceptors?.makeServerStreamingInterceptors() ?? []
  343. )
  344. }
  345. internal func makeserverStreamingCall(
  346. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  347. callOptions: CallOptions? = nil
  348. ) -> GRPCAsyncServerStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  349. return self.makeAsyncServerStreamingCall(
  350. path: Normalization_NormalizationClientMetadata.Methods.serverStreaming.path,
  351. request: request,
  352. callOptions: callOptions ?? self.defaultCallOptions,
  353. interceptors: self.interceptors?.makeserverStreamingInterceptors() ?? []
  354. )
  355. }
  356. internal func makeClientStreamingCall(
  357. callOptions: CallOptions? = nil
  358. ) -> GRPCAsyncClientStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  359. return self.makeAsyncClientStreamingCall(
  360. path: Normalization_NormalizationClientMetadata.Methods.ClientStreaming.path,
  361. callOptions: callOptions ?? self.defaultCallOptions,
  362. interceptors: self.interceptors?.makeClientStreamingInterceptors() ?? []
  363. )
  364. }
  365. internal func makeclientStreamingCall(
  366. callOptions: CallOptions? = nil
  367. ) -> GRPCAsyncClientStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  368. return self.makeAsyncClientStreamingCall(
  369. path: Normalization_NormalizationClientMetadata.Methods.clientStreaming.path,
  370. callOptions: callOptions ?? self.defaultCallOptions,
  371. interceptors: self.interceptors?.makeclientStreamingInterceptors() ?? []
  372. )
  373. }
  374. internal func makeBidirectionalStreamingCall(
  375. callOptions: CallOptions? = nil
  376. ) -> GRPCAsyncBidirectionalStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  377. return self.makeAsyncBidirectionalStreamingCall(
  378. path: Normalization_NormalizationClientMetadata.Methods.BidirectionalStreaming.path,
  379. callOptions: callOptions ?? self.defaultCallOptions,
  380. interceptors: self.interceptors?.makeBidirectionalStreamingInterceptors() ?? []
  381. )
  382. }
  383. internal func makebidirectionalStreamingCall(
  384. callOptions: CallOptions? = nil
  385. ) -> GRPCAsyncBidirectionalStreamingCall<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName> {
  386. return self.makeAsyncBidirectionalStreamingCall(
  387. path: Normalization_NormalizationClientMetadata.Methods.bidirectionalStreaming.path,
  388. callOptions: callOptions ?? self.defaultCallOptions,
  389. interceptors: self.interceptors?.makebidirectionalStreamingInterceptors() ?? []
  390. )
  391. }
  392. }
  393. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  394. extension Normalization_NormalizationAsyncClientProtocol {
  395. internal func Unary(
  396. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  397. callOptions: CallOptions? = nil
  398. ) async throws -> Normalization_FunctionName {
  399. return try await self.performAsyncUnaryCall(
  400. path: Normalization_NormalizationClientMetadata.Methods.Unary.path,
  401. request: request,
  402. callOptions: callOptions ?? self.defaultCallOptions,
  403. interceptors: self.interceptors?.makeUnaryInterceptors() ?? []
  404. )
  405. }
  406. internal func unary(
  407. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  408. callOptions: CallOptions? = nil
  409. ) async throws -> Normalization_FunctionName {
  410. return try await self.performAsyncUnaryCall(
  411. path: Normalization_NormalizationClientMetadata.Methods.unary.path,
  412. request: request,
  413. callOptions: callOptions ?? self.defaultCallOptions,
  414. interceptors: self.interceptors?.makeunaryInterceptors() ?? []
  415. )
  416. }
  417. internal func ServerStreaming(
  418. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  419. callOptions: CallOptions? = nil
  420. ) -> GRPCAsyncResponseStream<Normalization_FunctionName> {
  421. return self.performAsyncServerStreamingCall(
  422. path: Normalization_NormalizationClientMetadata.Methods.ServerStreaming.path,
  423. request: request,
  424. callOptions: callOptions ?? self.defaultCallOptions,
  425. interceptors: self.interceptors?.makeServerStreamingInterceptors() ?? []
  426. )
  427. }
  428. internal func serverStreaming(
  429. _ request: SwiftProtobuf.Google_Protobuf_Empty,
  430. callOptions: CallOptions? = nil
  431. ) -> GRPCAsyncResponseStream<Normalization_FunctionName> {
  432. return self.performAsyncServerStreamingCall(
  433. path: Normalization_NormalizationClientMetadata.Methods.serverStreaming.path,
  434. request: request,
  435. callOptions: callOptions ?? self.defaultCallOptions,
  436. interceptors: self.interceptors?.makeserverStreamingInterceptors() ?? []
  437. )
  438. }
  439. internal func ClientStreaming<RequestStream>(
  440. _ requests: RequestStream,
  441. callOptions: CallOptions? = nil
  442. ) async throws -> Normalization_FunctionName where RequestStream: Sequence, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  443. return try await self.performAsyncClientStreamingCall(
  444. path: Normalization_NormalizationClientMetadata.Methods.ClientStreaming.path,
  445. requests: requests,
  446. callOptions: callOptions ?? self.defaultCallOptions,
  447. interceptors: self.interceptors?.makeClientStreamingInterceptors() ?? []
  448. )
  449. }
  450. internal func ClientStreaming<RequestStream>(
  451. _ requests: RequestStream,
  452. callOptions: CallOptions? = nil
  453. ) async throws -> Normalization_FunctionName where RequestStream: AsyncSequence & Sendable, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  454. return try await self.performAsyncClientStreamingCall(
  455. path: Normalization_NormalizationClientMetadata.Methods.ClientStreaming.path,
  456. requests: requests,
  457. callOptions: callOptions ?? self.defaultCallOptions,
  458. interceptors: self.interceptors?.makeClientStreamingInterceptors() ?? []
  459. )
  460. }
  461. internal func clientStreaming<RequestStream>(
  462. _ requests: RequestStream,
  463. callOptions: CallOptions? = nil
  464. ) async throws -> Normalization_FunctionName where RequestStream: Sequence, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  465. return try await self.performAsyncClientStreamingCall(
  466. path: Normalization_NormalizationClientMetadata.Methods.clientStreaming.path,
  467. requests: requests,
  468. callOptions: callOptions ?? self.defaultCallOptions,
  469. interceptors: self.interceptors?.makeclientStreamingInterceptors() ?? []
  470. )
  471. }
  472. internal func clientStreaming<RequestStream>(
  473. _ requests: RequestStream,
  474. callOptions: CallOptions? = nil
  475. ) async throws -> Normalization_FunctionName where RequestStream: AsyncSequence & Sendable, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  476. return try await self.performAsyncClientStreamingCall(
  477. path: Normalization_NormalizationClientMetadata.Methods.clientStreaming.path,
  478. requests: requests,
  479. callOptions: callOptions ?? self.defaultCallOptions,
  480. interceptors: self.interceptors?.makeclientStreamingInterceptors() ?? []
  481. )
  482. }
  483. internal func BidirectionalStreaming<RequestStream>(
  484. _ requests: RequestStream,
  485. callOptions: CallOptions? = nil
  486. ) -> GRPCAsyncResponseStream<Normalization_FunctionName> where RequestStream: Sequence, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  487. return self.performAsyncBidirectionalStreamingCall(
  488. path: Normalization_NormalizationClientMetadata.Methods.BidirectionalStreaming.path,
  489. requests: requests,
  490. callOptions: callOptions ?? self.defaultCallOptions,
  491. interceptors: self.interceptors?.makeBidirectionalStreamingInterceptors() ?? []
  492. )
  493. }
  494. internal func BidirectionalStreaming<RequestStream>(
  495. _ requests: RequestStream,
  496. callOptions: CallOptions? = nil
  497. ) -> GRPCAsyncResponseStream<Normalization_FunctionName> where RequestStream: AsyncSequence & Sendable, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  498. return self.performAsyncBidirectionalStreamingCall(
  499. path: Normalization_NormalizationClientMetadata.Methods.BidirectionalStreaming.path,
  500. requests: requests,
  501. callOptions: callOptions ?? self.defaultCallOptions,
  502. interceptors: self.interceptors?.makeBidirectionalStreamingInterceptors() ?? []
  503. )
  504. }
  505. internal func bidirectionalStreaming<RequestStream>(
  506. _ requests: RequestStream,
  507. callOptions: CallOptions? = nil
  508. ) -> GRPCAsyncResponseStream<Normalization_FunctionName> where RequestStream: Sequence, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  509. return self.performAsyncBidirectionalStreamingCall(
  510. path: Normalization_NormalizationClientMetadata.Methods.bidirectionalStreaming.path,
  511. requests: requests,
  512. callOptions: callOptions ?? self.defaultCallOptions,
  513. interceptors: self.interceptors?.makebidirectionalStreamingInterceptors() ?? []
  514. )
  515. }
  516. internal func bidirectionalStreaming<RequestStream>(
  517. _ requests: RequestStream,
  518. callOptions: CallOptions? = nil
  519. ) -> GRPCAsyncResponseStream<Normalization_FunctionName> where RequestStream: AsyncSequence & Sendable, RequestStream.Element == SwiftProtobuf.Google_Protobuf_Empty {
  520. return self.performAsyncBidirectionalStreamingCall(
  521. path: Normalization_NormalizationClientMetadata.Methods.bidirectionalStreaming.path,
  522. requests: requests,
  523. callOptions: callOptions ?? self.defaultCallOptions,
  524. interceptors: self.interceptors?.makebidirectionalStreamingInterceptors() ?? []
  525. )
  526. }
  527. }
  528. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  529. internal struct Normalization_NormalizationAsyncClient: Normalization_NormalizationAsyncClientProtocol {
  530. internal var channel: GRPCChannel
  531. internal var defaultCallOptions: CallOptions
  532. internal var interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol?
  533. internal init(
  534. channel: GRPCChannel,
  535. defaultCallOptions: CallOptions = CallOptions(),
  536. interceptors: Normalization_NormalizationClientInterceptorFactoryProtocol? = nil
  537. ) {
  538. self.channel = channel
  539. self.defaultCallOptions = defaultCallOptions
  540. self.interceptors = interceptors
  541. }
  542. }
  543. #endif // compiler(>=5.6)
  544. internal protocol Normalization_NormalizationClientInterceptorFactoryProtocol: GRPCSendable {
  545. /// - Returns: Interceptors to use when invoking 'Unary'.
  546. func makeUnaryInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  547. /// - Returns: Interceptors to use when invoking 'unary'.
  548. func makeunaryInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  549. /// - Returns: Interceptors to use when invoking 'ServerStreaming'.
  550. func makeServerStreamingInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  551. /// - Returns: Interceptors to use when invoking 'serverStreaming'.
  552. func makeserverStreamingInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  553. /// - Returns: Interceptors to use when invoking 'ClientStreaming'.
  554. func makeClientStreamingInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  555. /// - Returns: Interceptors to use when invoking 'clientStreaming'.
  556. func makeclientStreamingInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  557. /// - Returns: Interceptors to use when invoking 'BidirectionalStreaming'.
  558. func makeBidirectionalStreamingInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  559. /// - Returns: Interceptors to use when invoking 'bidirectionalStreaming'.
  560. func makebidirectionalStreamingInterceptors() -> [ClientInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  561. }
  562. internal enum Normalization_NormalizationClientMetadata {
  563. internal static let serviceDescriptor = GRPCServiceDescriptor(
  564. name: "Normalization",
  565. fullName: "normalization.Normalization",
  566. methods: [
  567. Normalization_NormalizationClientMetadata.Methods.Unary,
  568. Normalization_NormalizationClientMetadata.Methods.unary,
  569. Normalization_NormalizationClientMetadata.Methods.ServerStreaming,
  570. Normalization_NormalizationClientMetadata.Methods.serverStreaming,
  571. Normalization_NormalizationClientMetadata.Methods.ClientStreaming,
  572. Normalization_NormalizationClientMetadata.Methods.clientStreaming,
  573. Normalization_NormalizationClientMetadata.Methods.BidirectionalStreaming,
  574. Normalization_NormalizationClientMetadata.Methods.bidirectionalStreaming,
  575. ]
  576. )
  577. internal enum Methods {
  578. internal static let Unary = GRPCMethodDescriptor(
  579. name: "Unary",
  580. path: "/normalization.Normalization/Unary",
  581. type: GRPCCallType.unary
  582. )
  583. internal static let unary = GRPCMethodDescriptor(
  584. name: "unary",
  585. path: "/normalization.Normalization/unary",
  586. type: GRPCCallType.unary
  587. )
  588. internal static let ServerStreaming = GRPCMethodDescriptor(
  589. name: "ServerStreaming",
  590. path: "/normalization.Normalization/ServerStreaming",
  591. type: GRPCCallType.serverStreaming
  592. )
  593. internal static let serverStreaming = GRPCMethodDescriptor(
  594. name: "serverStreaming",
  595. path: "/normalization.Normalization/serverStreaming",
  596. type: GRPCCallType.serverStreaming
  597. )
  598. internal static let ClientStreaming = GRPCMethodDescriptor(
  599. name: "ClientStreaming",
  600. path: "/normalization.Normalization/ClientStreaming",
  601. type: GRPCCallType.clientStreaming
  602. )
  603. internal static let clientStreaming = GRPCMethodDescriptor(
  604. name: "clientStreaming",
  605. path: "/normalization.Normalization/clientStreaming",
  606. type: GRPCCallType.clientStreaming
  607. )
  608. internal static let BidirectionalStreaming = GRPCMethodDescriptor(
  609. name: "BidirectionalStreaming",
  610. path: "/normalization.Normalization/BidirectionalStreaming",
  611. type: GRPCCallType.bidirectionalStreaming
  612. )
  613. internal static let bidirectionalStreaming = GRPCMethodDescriptor(
  614. name: "bidirectionalStreaming",
  615. path: "/normalization.Normalization/bidirectionalStreaming",
  616. type: GRPCCallType.bidirectionalStreaming
  617. )
  618. }
  619. }
  620. /// To build a server, implement a class that conforms to this protocol.
  621. internal protocol Normalization_NormalizationProvider: CallHandlerProvider {
  622. var interceptors: Normalization_NormalizationServerInterceptorFactoryProtocol? { get }
  623. func Unary(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture<Normalization_FunctionName>
  624. func unary(request: SwiftProtobuf.Google_Protobuf_Empty, context: StatusOnlyCallContext) -> EventLoopFuture<Normalization_FunctionName>
  625. func ServerStreaming(request: SwiftProtobuf.Google_Protobuf_Empty, context: StreamingResponseCallContext<Normalization_FunctionName>) -> EventLoopFuture<GRPCStatus>
  626. func serverStreaming(request: SwiftProtobuf.Google_Protobuf_Empty, context: StreamingResponseCallContext<Normalization_FunctionName>) -> EventLoopFuture<GRPCStatus>
  627. func ClientStreaming(context: UnaryResponseCallContext<Normalization_FunctionName>) -> EventLoopFuture<(StreamEvent<SwiftProtobuf.Google_Protobuf_Empty>) -> Void>
  628. func clientStreaming(context: UnaryResponseCallContext<Normalization_FunctionName>) -> EventLoopFuture<(StreamEvent<SwiftProtobuf.Google_Protobuf_Empty>) -> Void>
  629. func BidirectionalStreaming(context: StreamingResponseCallContext<Normalization_FunctionName>) -> EventLoopFuture<(StreamEvent<SwiftProtobuf.Google_Protobuf_Empty>) -> Void>
  630. func bidirectionalStreaming(context: StreamingResponseCallContext<Normalization_FunctionName>) -> EventLoopFuture<(StreamEvent<SwiftProtobuf.Google_Protobuf_Empty>) -> Void>
  631. }
  632. extension Normalization_NormalizationProvider {
  633. internal var serviceName: Substring {
  634. return Normalization_NormalizationServerMetadata.serviceDescriptor.fullName[...]
  635. }
  636. /// Determines, calls and returns the appropriate request handler, depending on the request's method.
  637. /// Returns nil for methods not handled by this service.
  638. internal func handle(
  639. method name: Substring,
  640. context: CallHandlerContext
  641. ) -> GRPCServerHandlerProtocol? {
  642. switch name {
  643. case "Unary":
  644. return UnaryServerHandler(
  645. context: context,
  646. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  647. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  648. interceptors: self.interceptors?.makeUnaryInterceptors() ?? [],
  649. userFunction: self.Unary(request:context:)
  650. )
  651. case "unary":
  652. return UnaryServerHandler(
  653. context: context,
  654. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  655. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  656. interceptors: self.interceptors?.makeunaryInterceptors() ?? [],
  657. userFunction: self.unary(request:context:)
  658. )
  659. case "ServerStreaming":
  660. return ServerStreamingServerHandler(
  661. context: context,
  662. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  663. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  664. interceptors: self.interceptors?.makeServerStreamingInterceptors() ?? [],
  665. userFunction: self.ServerStreaming(request:context:)
  666. )
  667. case "serverStreaming":
  668. return ServerStreamingServerHandler(
  669. context: context,
  670. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  671. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  672. interceptors: self.interceptors?.makeserverStreamingInterceptors() ?? [],
  673. userFunction: self.serverStreaming(request:context:)
  674. )
  675. case "ClientStreaming":
  676. return ClientStreamingServerHandler(
  677. context: context,
  678. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  679. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  680. interceptors: self.interceptors?.makeClientStreamingInterceptors() ?? [],
  681. observerFactory: self.ClientStreaming(context:)
  682. )
  683. case "clientStreaming":
  684. return ClientStreamingServerHandler(
  685. context: context,
  686. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  687. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  688. interceptors: self.interceptors?.makeclientStreamingInterceptors() ?? [],
  689. observerFactory: self.clientStreaming(context:)
  690. )
  691. case "BidirectionalStreaming":
  692. return BidirectionalStreamingServerHandler(
  693. context: context,
  694. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  695. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  696. interceptors: self.interceptors?.makeBidirectionalStreamingInterceptors() ?? [],
  697. observerFactory: self.BidirectionalStreaming(context:)
  698. )
  699. case "bidirectionalStreaming":
  700. return BidirectionalStreamingServerHandler(
  701. context: context,
  702. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  703. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  704. interceptors: self.interceptors?.makebidirectionalStreamingInterceptors() ?? [],
  705. observerFactory: self.bidirectionalStreaming(context:)
  706. )
  707. default:
  708. return nil
  709. }
  710. }
  711. }
  712. #if compiler(>=5.6)
  713. /// To implement a server, implement an object which conforms to this protocol.
  714. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  715. internal protocol Normalization_NormalizationAsyncProvider: CallHandlerProvider {
  716. static var serviceDescriptor: GRPCServiceDescriptor { get }
  717. var interceptors: Normalization_NormalizationServerInterceptorFactoryProtocol? { get }
  718. @Sendable func Unary(
  719. request: SwiftProtobuf.Google_Protobuf_Empty,
  720. context: GRPCAsyncServerCallContext
  721. ) async throws -> Normalization_FunctionName
  722. @Sendable func unary(
  723. request: SwiftProtobuf.Google_Protobuf_Empty,
  724. context: GRPCAsyncServerCallContext
  725. ) async throws -> Normalization_FunctionName
  726. @Sendable func ServerStreaming(
  727. request: SwiftProtobuf.Google_Protobuf_Empty,
  728. responseStream: GRPCAsyncResponseStreamWriter<Normalization_FunctionName>,
  729. context: GRPCAsyncServerCallContext
  730. ) async throws
  731. @Sendable func serverStreaming(
  732. request: SwiftProtobuf.Google_Protobuf_Empty,
  733. responseStream: GRPCAsyncResponseStreamWriter<Normalization_FunctionName>,
  734. context: GRPCAsyncServerCallContext
  735. ) async throws
  736. @Sendable func ClientStreaming(
  737. requestStream: GRPCAsyncRequestStream<SwiftProtobuf.Google_Protobuf_Empty>,
  738. context: GRPCAsyncServerCallContext
  739. ) async throws -> Normalization_FunctionName
  740. @Sendable func clientStreaming(
  741. requestStream: GRPCAsyncRequestStream<SwiftProtobuf.Google_Protobuf_Empty>,
  742. context: GRPCAsyncServerCallContext
  743. ) async throws -> Normalization_FunctionName
  744. @Sendable func BidirectionalStreaming(
  745. requestStream: GRPCAsyncRequestStream<SwiftProtobuf.Google_Protobuf_Empty>,
  746. responseStream: GRPCAsyncResponseStreamWriter<Normalization_FunctionName>,
  747. context: GRPCAsyncServerCallContext
  748. ) async throws
  749. @Sendable func bidirectionalStreaming(
  750. requestStream: GRPCAsyncRequestStream<SwiftProtobuf.Google_Protobuf_Empty>,
  751. responseStream: GRPCAsyncResponseStreamWriter<Normalization_FunctionName>,
  752. context: GRPCAsyncServerCallContext
  753. ) async throws
  754. }
  755. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  756. extension Normalization_NormalizationAsyncProvider {
  757. internal static var serviceDescriptor: GRPCServiceDescriptor {
  758. return Normalization_NormalizationServerMetadata.serviceDescriptor
  759. }
  760. internal var serviceName: Substring {
  761. return Normalization_NormalizationServerMetadata.serviceDescriptor.fullName[...]
  762. }
  763. internal var interceptors: Normalization_NormalizationServerInterceptorFactoryProtocol? {
  764. return nil
  765. }
  766. internal func handle(
  767. method name: Substring,
  768. context: CallHandlerContext
  769. ) -> GRPCServerHandlerProtocol? {
  770. switch name {
  771. case "Unary":
  772. return GRPCAsyncServerHandler(
  773. context: context,
  774. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  775. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  776. interceptors: self.interceptors?.makeUnaryInterceptors() ?? [],
  777. wrapping: self.Unary(request:context:)
  778. )
  779. case "unary":
  780. return GRPCAsyncServerHandler(
  781. context: context,
  782. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  783. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  784. interceptors: self.interceptors?.makeunaryInterceptors() ?? [],
  785. wrapping: self.unary(request:context:)
  786. )
  787. case "ServerStreaming":
  788. return GRPCAsyncServerHandler(
  789. context: context,
  790. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  791. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  792. interceptors: self.interceptors?.makeServerStreamingInterceptors() ?? [],
  793. wrapping: self.ServerStreaming(request:responseStream:context:)
  794. )
  795. case "serverStreaming":
  796. return GRPCAsyncServerHandler(
  797. context: context,
  798. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  799. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  800. interceptors: self.interceptors?.makeserverStreamingInterceptors() ?? [],
  801. wrapping: self.serverStreaming(request:responseStream:context:)
  802. )
  803. case "ClientStreaming":
  804. return GRPCAsyncServerHandler(
  805. context: context,
  806. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  807. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  808. interceptors: self.interceptors?.makeClientStreamingInterceptors() ?? [],
  809. wrapping: self.ClientStreaming(requestStream:context:)
  810. )
  811. case "clientStreaming":
  812. return GRPCAsyncServerHandler(
  813. context: context,
  814. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  815. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  816. interceptors: self.interceptors?.makeclientStreamingInterceptors() ?? [],
  817. wrapping: self.clientStreaming(requestStream:context:)
  818. )
  819. case "BidirectionalStreaming":
  820. return GRPCAsyncServerHandler(
  821. context: context,
  822. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  823. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  824. interceptors: self.interceptors?.makeBidirectionalStreamingInterceptors() ?? [],
  825. wrapping: self.BidirectionalStreaming(requestStream:responseStream:context:)
  826. )
  827. case "bidirectionalStreaming":
  828. return GRPCAsyncServerHandler(
  829. context: context,
  830. requestDeserializer: ProtobufDeserializer<SwiftProtobuf.Google_Protobuf_Empty>(),
  831. responseSerializer: ProtobufSerializer<Normalization_FunctionName>(),
  832. interceptors: self.interceptors?.makebidirectionalStreamingInterceptors() ?? [],
  833. wrapping: self.bidirectionalStreaming(requestStream:responseStream:context:)
  834. )
  835. default:
  836. return nil
  837. }
  838. }
  839. }
  840. #endif // compiler(>=5.6)
  841. internal protocol Normalization_NormalizationServerInterceptorFactoryProtocol {
  842. /// - Returns: Interceptors to use when handling 'Unary'.
  843. /// Defaults to calling `self.makeInterceptors()`.
  844. func makeUnaryInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  845. /// - Returns: Interceptors to use when handling 'unary'.
  846. /// Defaults to calling `self.makeInterceptors()`.
  847. func makeunaryInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  848. /// - Returns: Interceptors to use when handling 'ServerStreaming'.
  849. /// Defaults to calling `self.makeInterceptors()`.
  850. func makeServerStreamingInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  851. /// - Returns: Interceptors to use when handling 'serverStreaming'.
  852. /// Defaults to calling `self.makeInterceptors()`.
  853. func makeserverStreamingInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  854. /// - Returns: Interceptors to use when handling 'ClientStreaming'.
  855. /// Defaults to calling `self.makeInterceptors()`.
  856. func makeClientStreamingInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  857. /// - Returns: Interceptors to use when handling 'clientStreaming'.
  858. /// Defaults to calling `self.makeInterceptors()`.
  859. func makeclientStreamingInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  860. /// - Returns: Interceptors to use when handling 'BidirectionalStreaming'.
  861. /// Defaults to calling `self.makeInterceptors()`.
  862. func makeBidirectionalStreamingInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  863. /// - Returns: Interceptors to use when handling 'bidirectionalStreaming'.
  864. /// Defaults to calling `self.makeInterceptors()`.
  865. func makebidirectionalStreamingInterceptors() -> [ServerInterceptor<SwiftProtobuf.Google_Protobuf_Empty, Normalization_FunctionName>]
  866. }
  867. internal enum Normalization_NormalizationServerMetadata {
  868. internal static let serviceDescriptor = GRPCServiceDescriptor(
  869. name: "Normalization",
  870. fullName: "normalization.Normalization",
  871. methods: [
  872. Normalization_NormalizationServerMetadata.Methods.Unary,
  873. Normalization_NormalizationServerMetadata.Methods.unary,
  874. Normalization_NormalizationServerMetadata.Methods.ServerStreaming,
  875. Normalization_NormalizationServerMetadata.Methods.serverStreaming,
  876. Normalization_NormalizationServerMetadata.Methods.ClientStreaming,
  877. Normalization_NormalizationServerMetadata.Methods.clientStreaming,
  878. Normalization_NormalizationServerMetadata.Methods.BidirectionalStreaming,
  879. Normalization_NormalizationServerMetadata.Methods.bidirectionalStreaming,
  880. ]
  881. )
  882. internal enum Methods {
  883. internal static let Unary = GRPCMethodDescriptor(
  884. name: "Unary",
  885. path: "/normalization.Normalization/Unary",
  886. type: GRPCCallType.unary
  887. )
  888. internal static let unary = GRPCMethodDescriptor(
  889. name: "unary",
  890. path: "/normalization.Normalization/unary",
  891. type: GRPCCallType.unary
  892. )
  893. internal static let ServerStreaming = GRPCMethodDescriptor(
  894. name: "ServerStreaming",
  895. path: "/normalization.Normalization/ServerStreaming",
  896. type: GRPCCallType.serverStreaming
  897. )
  898. internal static let serverStreaming = GRPCMethodDescriptor(
  899. name: "serverStreaming",
  900. path: "/normalization.Normalization/serverStreaming",
  901. type: GRPCCallType.serverStreaming
  902. )
  903. internal static let ClientStreaming = GRPCMethodDescriptor(
  904. name: "ClientStreaming",
  905. path: "/normalization.Normalization/ClientStreaming",
  906. type: GRPCCallType.clientStreaming
  907. )
  908. internal static let clientStreaming = GRPCMethodDescriptor(
  909. name: "clientStreaming",
  910. path: "/normalization.Normalization/clientStreaming",
  911. type: GRPCCallType.clientStreaming
  912. )
  913. internal static let BidirectionalStreaming = GRPCMethodDescriptor(
  914. name: "BidirectionalStreaming",
  915. path: "/normalization.Normalization/BidirectionalStreaming",
  916. type: GRPCCallType.bidirectionalStreaming
  917. )
  918. internal static let bidirectionalStreaming = GRPCMethodDescriptor(
  919. name: "bidirectionalStreaming",
  920. path: "/normalization.Normalization/bidirectionalStreaming",
  921. type: GRPCCallType.bidirectionalStreaming
  922. )
  923. }
  924. }