language_service.grpc.swift 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861
  1. //
  2. // DO NOT EDIT.
  3. // swift-format-ignore-file
  4. //
  5. // Generated by the protocol buffer compiler.
  6. // Source: google/cloud/language/v1/language_service.proto
  7. //
  8. //
  9. // Copyright 2018, gRPC Authors All rights reserved.
  10. //
  11. // Licensed under the Apache License, Version 2.0 (the "License");
  12. // you may not use this file except in compliance with the License.
  13. // You may obtain a copy of the License at
  14. //
  15. // http://www.apache.org/licenses/LICENSE-2.0
  16. //
  17. // Unless required by applicable law or agreed to in writing, software
  18. // distributed under the License is distributed on an "AS IS" BASIS,
  19. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  20. // See the License for the specific language governing permissions and
  21. // limitations under the License.
  22. //
  23. import GRPC
  24. import NIO
  25. import NIOConcurrencyHelpers
  26. import SwiftProtobuf
  27. /// Provides text analysis operations such as sentiment analysis and entity
  28. /// recognition.
  29. ///
  30. /// Usage: instantiate `Google_Cloud_Language_V1_LanguageServiceClient`, then call methods of this protocol to make API calls.
  31. internal protocol Google_Cloud_Language_V1_LanguageServiceClientProtocol: GRPCClient {
  32. var serviceName: String { get }
  33. var interceptors: Google_Cloud_Language_V1_LanguageServiceClientInterceptorFactoryProtocol? { get }
  34. func analyzeSentiment(
  35. _ request: Google_Cloud_Language_V1_AnalyzeSentimentRequest,
  36. callOptions: CallOptions?
  37. ) -> UnaryCall<Google_Cloud_Language_V1_AnalyzeSentimentRequest, Google_Cloud_Language_V1_AnalyzeSentimentResponse>
  38. func analyzeEntities(
  39. _ request: Google_Cloud_Language_V1_AnalyzeEntitiesRequest,
  40. callOptions: CallOptions?
  41. ) -> UnaryCall<Google_Cloud_Language_V1_AnalyzeEntitiesRequest, Google_Cloud_Language_V1_AnalyzeEntitiesResponse>
  42. func analyzeEntitySentiment(
  43. _ request: Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest,
  44. callOptions: CallOptions?
  45. ) -> UnaryCall<Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest, Google_Cloud_Language_V1_AnalyzeEntitySentimentResponse>
  46. func analyzeSyntax(
  47. _ request: Google_Cloud_Language_V1_AnalyzeSyntaxRequest,
  48. callOptions: CallOptions?
  49. ) -> UnaryCall<Google_Cloud_Language_V1_AnalyzeSyntaxRequest, Google_Cloud_Language_V1_AnalyzeSyntaxResponse>
  50. func classifyText(
  51. _ request: Google_Cloud_Language_V1_ClassifyTextRequest,
  52. callOptions: CallOptions?
  53. ) -> UnaryCall<Google_Cloud_Language_V1_ClassifyTextRequest, Google_Cloud_Language_V1_ClassifyTextResponse>
  54. func annotateText(
  55. _ request: Google_Cloud_Language_V1_AnnotateTextRequest,
  56. callOptions: CallOptions?
  57. ) -> UnaryCall<Google_Cloud_Language_V1_AnnotateTextRequest, Google_Cloud_Language_V1_AnnotateTextResponse>
  58. }
  59. extension Google_Cloud_Language_V1_LanguageServiceClientProtocol {
  60. internal var serviceName: String {
  61. return "google.cloud.language.v1.LanguageService"
  62. }
  63. /// Analyzes the sentiment of the provided text.
  64. ///
  65. /// - Parameters:
  66. /// - request: Request to send to AnalyzeSentiment.
  67. /// - callOptions: Call options.
  68. /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  69. internal func analyzeSentiment(
  70. _ request: Google_Cloud_Language_V1_AnalyzeSentimentRequest,
  71. callOptions: CallOptions? = nil
  72. ) -> UnaryCall<Google_Cloud_Language_V1_AnalyzeSentimentRequest, Google_Cloud_Language_V1_AnalyzeSentimentResponse> {
  73. return self.makeUnaryCall(
  74. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeSentiment.path,
  75. request: request,
  76. callOptions: callOptions ?? self.defaultCallOptions,
  77. interceptors: self.interceptors?.makeAnalyzeSentimentInterceptors() ?? []
  78. )
  79. }
  80. /// Finds named entities (currently proper names and common nouns) in the text
  81. /// along with entity types, salience, mentions for each entity, and
  82. /// other properties.
  83. ///
  84. /// - Parameters:
  85. /// - request: Request to send to AnalyzeEntities.
  86. /// - callOptions: Call options.
  87. /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  88. internal func analyzeEntities(
  89. _ request: Google_Cloud_Language_V1_AnalyzeEntitiesRequest,
  90. callOptions: CallOptions? = nil
  91. ) -> UnaryCall<Google_Cloud_Language_V1_AnalyzeEntitiesRequest, Google_Cloud_Language_V1_AnalyzeEntitiesResponse> {
  92. return self.makeUnaryCall(
  93. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeEntities.path,
  94. request: request,
  95. callOptions: callOptions ?? self.defaultCallOptions,
  96. interceptors: self.interceptors?.makeAnalyzeEntitiesInterceptors() ?? []
  97. )
  98. }
  99. /// Finds entities, similar to
  100. /// [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities]
  101. /// in the text and analyzes sentiment associated with each entity and its
  102. /// mentions.
  103. ///
  104. /// - Parameters:
  105. /// - request: Request to send to AnalyzeEntitySentiment.
  106. /// - callOptions: Call options.
  107. /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  108. internal func analyzeEntitySentiment(
  109. _ request: Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest,
  110. callOptions: CallOptions? = nil
  111. ) -> UnaryCall<Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest, Google_Cloud_Language_V1_AnalyzeEntitySentimentResponse> {
  112. return self.makeUnaryCall(
  113. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeEntitySentiment.path,
  114. request: request,
  115. callOptions: callOptions ?? self.defaultCallOptions,
  116. interceptors: self.interceptors?.makeAnalyzeEntitySentimentInterceptors() ?? []
  117. )
  118. }
  119. /// Analyzes the syntax of the text and provides sentence boundaries and
  120. /// tokenization along with part of speech tags, dependency trees, and other
  121. /// properties.
  122. ///
  123. /// - Parameters:
  124. /// - request: Request to send to AnalyzeSyntax.
  125. /// - callOptions: Call options.
  126. /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  127. internal func analyzeSyntax(
  128. _ request: Google_Cloud_Language_V1_AnalyzeSyntaxRequest,
  129. callOptions: CallOptions? = nil
  130. ) -> UnaryCall<Google_Cloud_Language_V1_AnalyzeSyntaxRequest, Google_Cloud_Language_V1_AnalyzeSyntaxResponse> {
  131. return self.makeUnaryCall(
  132. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeSyntax.path,
  133. request: request,
  134. callOptions: callOptions ?? self.defaultCallOptions,
  135. interceptors: self.interceptors?.makeAnalyzeSyntaxInterceptors() ?? []
  136. )
  137. }
  138. /// Classifies a document into categories.
  139. ///
  140. /// - Parameters:
  141. /// - request: Request to send to ClassifyText.
  142. /// - callOptions: Call options.
  143. /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  144. internal func classifyText(
  145. _ request: Google_Cloud_Language_V1_ClassifyTextRequest,
  146. callOptions: CallOptions? = nil
  147. ) -> UnaryCall<Google_Cloud_Language_V1_ClassifyTextRequest, Google_Cloud_Language_V1_ClassifyTextResponse> {
  148. return self.makeUnaryCall(
  149. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.classifyText.path,
  150. request: request,
  151. callOptions: callOptions ?? self.defaultCallOptions,
  152. interceptors: self.interceptors?.makeClassifyTextInterceptors() ?? []
  153. )
  154. }
  155. /// A convenience method that provides all the features that analyzeSentiment,
  156. /// analyzeEntities, and analyzeSyntax provide in one call.
  157. ///
  158. /// - Parameters:
  159. /// - request: Request to send to AnnotateText.
  160. /// - callOptions: Call options.
  161. /// - Returns: A `UnaryCall` with futures for the metadata, status and response.
  162. internal func annotateText(
  163. _ request: Google_Cloud_Language_V1_AnnotateTextRequest,
  164. callOptions: CallOptions? = nil
  165. ) -> UnaryCall<Google_Cloud_Language_V1_AnnotateTextRequest, Google_Cloud_Language_V1_AnnotateTextResponse> {
  166. return self.makeUnaryCall(
  167. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.annotateText.path,
  168. request: request,
  169. callOptions: callOptions ?? self.defaultCallOptions,
  170. interceptors: self.interceptors?.makeAnnotateTextInterceptors() ?? []
  171. )
  172. }
  173. }
  174. #if compiler(>=5.6)
  175. @available(*, deprecated)
  176. extension Google_Cloud_Language_V1_LanguageServiceClient: @unchecked Sendable {}
  177. #endif // compiler(>=5.6)
  178. @available(*, deprecated, renamed: "Google_Cloud_Language_V1_LanguageServiceNIOClient")
  179. internal final class Google_Cloud_Language_V1_LanguageServiceClient: Google_Cloud_Language_V1_LanguageServiceClientProtocol {
  180. private let lock = Lock()
  181. private var _defaultCallOptions: CallOptions
  182. private var _interceptors: Google_Cloud_Language_V1_LanguageServiceClientInterceptorFactoryProtocol?
  183. internal let channel: GRPCChannel
  184. internal var defaultCallOptions: CallOptions {
  185. get { self.lock.withLock { return self._defaultCallOptions } }
  186. set { self.lock.withLockVoid { self._defaultCallOptions = newValue } }
  187. }
  188. internal var interceptors: Google_Cloud_Language_V1_LanguageServiceClientInterceptorFactoryProtocol? {
  189. get { self.lock.withLock { return self._interceptors } }
  190. set { self.lock.withLockVoid { self._interceptors = newValue } }
  191. }
  192. /// Creates a client for the google.cloud.language.v1.LanguageService service.
  193. ///
  194. /// - Parameters:
  195. /// - channel: `GRPCChannel` to the service host.
  196. /// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
  197. /// - interceptors: A factory providing interceptors for each RPC.
  198. internal init(
  199. channel: GRPCChannel,
  200. defaultCallOptions: CallOptions = CallOptions(),
  201. interceptors: Google_Cloud_Language_V1_LanguageServiceClientInterceptorFactoryProtocol? = nil
  202. ) {
  203. self.channel = channel
  204. self._defaultCallOptions = defaultCallOptions
  205. self._interceptors = interceptors
  206. }
  207. }
  208. internal struct Google_Cloud_Language_V1_LanguageServiceNIOClient: Google_Cloud_Language_V1_LanguageServiceClientProtocol {
  209. internal var channel: GRPCChannel
  210. internal var defaultCallOptions: CallOptions
  211. internal var interceptors: Google_Cloud_Language_V1_LanguageServiceClientInterceptorFactoryProtocol?
  212. /// Creates a client for the google.cloud.language.v1.LanguageService service.
  213. ///
  214. /// - Parameters:
  215. /// - channel: `GRPCChannel` to the service host.
  216. /// - defaultCallOptions: Options to use for each service call if the user doesn't provide them.
  217. /// - interceptors: A factory providing interceptors for each RPC.
  218. internal init(
  219. channel: GRPCChannel,
  220. defaultCallOptions: CallOptions = CallOptions(),
  221. interceptors: Google_Cloud_Language_V1_LanguageServiceClientInterceptorFactoryProtocol? = nil
  222. ) {
  223. self.channel = channel
  224. self.defaultCallOptions = defaultCallOptions
  225. self.interceptors = interceptors
  226. }
  227. }
  228. #if compiler(>=5.6)
  229. /// Provides text analysis operations such as sentiment analysis and entity
  230. /// recognition.
  231. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  232. internal protocol Google_Cloud_Language_V1_LanguageServiceAsyncClientProtocol: GRPCClient {
  233. static var serviceDescriptor: GRPCServiceDescriptor { get }
  234. var interceptors: Google_Cloud_Language_V1_LanguageServiceClientInterceptorFactoryProtocol? { get }
  235. func makeAnalyzeSentimentCall(
  236. _ request: Google_Cloud_Language_V1_AnalyzeSentimentRequest,
  237. callOptions: CallOptions?
  238. ) -> GRPCAsyncUnaryCall<Google_Cloud_Language_V1_AnalyzeSentimentRequest, Google_Cloud_Language_V1_AnalyzeSentimentResponse>
  239. func makeAnalyzeEntitiesCall(
  240. _ request: Google_Cloud_Language_V1_AnalyzeEntitiesRequest,
  241. callOptions: CallOptions?
  242. ) -> GRPCAsyncUnaryCall<Google_Cloud_Language_V1_AnalyzeEntitiesRequest, Google_Cloud_Language_V1_AnalyzeEntitiesResponse>
  243. func makeAnalyzeEntitySentimentCall(
  244. _ request: Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest,
  245. callOptions: CallOptions?
  246. ) -> GRPCAsyncUnaryCall<Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest, Google_Cloud_Language_V1_AnalyzeEntitySentimentResponse>
  247. func makeAnalyzeSyntaxCall(
  248. _ request: Google_Cloud_Language_V1_AnalyzeSyntaxRequest,
  249. callOptions: CallOptions?
  250. ) -> GRPCAsyncUnaryCall<Google_Cloud_Language_V1_AnalyzeSyntaxRequest, Google_Cloud_Language_V1_AnalyzeSyntaxResponse>
  251. func makeClassifyTextCall(
  252. _ request: Google_Cloud_Language_V1_ClassifyTextRequest,
  253. callOptions: CallOptions?
  254. ) -> GRPCAsyncUnaryCall<Google_Cloud_Language_V1_ClassifyTextRequest, Google_Cloud_Language_V1_ClassifyTextResponse>
  255. func makeAnnotateTextCall(
  256. _ request: Google_Cloud_Language_V1_AnnotateTextRequest,
  257. callOptions: CallOptions?
  258. ) -> GRPCAsyncUnaryCall<Google_Cloud_Language_V1_AnnotateTextRequest, Google_Cloud_Language_V1_AnnotateTextResponse>
  259. }
  260. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  261. extension Google_Cloud_Language_V1_LanguageServiceAsyncClientProtocol {
  262. internal static var serviceDescriptor: GRPCServiceDescriptor {
  263. return Google_Cloud_Language_V1_LanguageServiceClientMetadata.serviceDescriptor
  264. }
  265. internal var interceptors: Google_Cloud_Language_V1_LanguageServiceClientInterceptorFactoryProtocol? {
  266. return nil
  267. }
  268. internal func makeAnalyzeSentimentCall(
  269. _ request: Google_Cloud_Language_V1_AnalyzeSentimentRequest,
  270. callOptions: CallOptions? = nil
  271. ) -> GRPCAsyncUnaryCall<Google_Cloud_Language_V1_AnalyzeSentimentRequest, Google_Cloud_Language_V1_AnalyzeSentimentResponse> {
  272. return self.makeAsyncUnaryCall(
  273. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeSentiment.path,
  274. request: request,
  275. callOptions: callOptions ?? self.defaultCallOptions,
  276. interceptors: self.interceptors?.makeAnalyzeSentimentInterceptors() ?? []
  277. )
  278. }
  279. internal func makeAnalyzeEntitiesCall(
  280. _ request: Google_Cloud_Language_V1_AnalyzeEntitiesRequest,
  281. callOptions: CallOptions? = nil
  282. ) -> GRPCAsyncUnaryCall<Google_Cloud_Language_V1_AnalyzeEntitiesRequest, Google_Cloud_Language_V1_AnalyzeEntitiesResponse> {
  283. return self.makeAsyncUnaryCall(
  284. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeEntities.path,
  285. request: request,
  286. callOptions: callOptions ?? self.defaultCallOptions,
  287. interceptors: self.interceptors?.makeAnalyzeEntitiesInterceptors() ?? []
  288. )
  289. }
  290. internal func makeAnalyzeEntitySentimentCall(
  291. _ request: Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest,
  292. callOptions: CallOptions? = nil
  293. ) -> GRPCAsyncUnaryCall<Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest, Google_Cloud_Language_V1_AnalyzeEntitySentimentResponse> {
  294. return self.makeAsyncUnaryCall(
  295. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeEntitySentiment.path,
  296. request: request,
  297. callOptions: callOptions ?? self.defaultCallOptions,
  298. interceptors: self.interceptors?.makeAnalyzeEntitySentimentInterceptors() ?? []
  299. )
  300. }
  301. internal func makeAnalyzeSyntaxCall(
  302. _ request: Google_Cloud_Language_V1_AnalyzeSyntaxRequest,
  303. callOptions: CallOptions? = nil
  304. ) -> GRPCAsyncUnaryCall<Google_Cloud_Language_V1_AnalyzeSyntaxRequest, Google_Cloud_Language_V1_AnalyzeSyntaxResponse> {
  305. return self.makeAsyncUnaryCall(
  306. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeSyntax.path,
  307. request: request,
  308. callOptions: callOptions ?? self.defaultCallOptions,
  309. interceptors: self.interceptors?.makeAnalyzeSyntaxInterceptors() ?? []
  310. )
  311. }
  312. internal func makeClassifyTextCall(
  313. _ request: Google_Cloud_Language_V1_ClassifyTextRequest,
  314. callOptions: CallOptions? = nil
  315. ) -> GRPCAsyncUnaryCall<Google_Cloud_Language_V1_ClassifyTextRequest, Google_Cloud_Language_V1_ClassifyTextResponse> {
  316. return self.makeAsyncUnaryCall(
  317. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.classifyText.path,
  318. request: request,
  319. callOptions: callOptions ?? self.defaultCallOptions,
  320. interceptors: self.interceptors?.makeClassifyTextInterceptors() ?? []
  321. )
  322. }
  323. internal func makeAnnotateTextCall(
  324. _ request: Google_Cloud_Language_V1_AnnotateTextRequest,
  325. callOptions: CallOptions? = nil
  326. ) -> GRPCAsyncUnaryCall<Google_Cloud_Language_V1_AnnotateTextRequest, Google_Cloud_Language_V1_AnnotateTextResponse> {
  327. return self.makeAsyncUnaryCall(
  328. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.annotateText.path,
  329. request: request,
  330. callOptions: callOptions ?? self.defaultCallOptions,
  331. interceptors: self.interceptors?.makeAnnotateTextInterceptors() ?? []
  332. )
  333. }
  334. }
  335. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  336. extension Google_Cloud_Language_V1_LanguageServiceAsyncClientProtocol {
  337. internal func analyzeSentiment(
  338. _ request: Google_Cloud_Language_V1_AnalyzeSentimentRequest,
  339. callOptions: CallOptions? = nil
  340. ) async throws -> Google_Cloud_Language_V1_AnalyzeSentimentResponse {
  341. return try await self.performAsyncUnaryCall(
  342. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeSentiment.path,
  343. request: request,
  344. callOptions: callOptions ?? self.defaultCallOptions,
  345. interceptors: self.interceptors?.makeAnalyzeSentimentInterceptors() ?? []
  346. )
  347. }
  348. internal func analyzeEntities(
  349. _ request: Google_Cloud_Language_V1_AnalyzeEntitiesRequest,
  350. callOptions: CallOptions? = nil
  351. ) async throws -> Google_Cloud_Language_V1_AnalyzeEntitiesResponse {
  352. return try await self.performAsyncUnaryCall(
  353. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeEntities.path,
  354. request: request,
  355. callOptions: callOptions ?? self.defaultCallOptions,
  356. interceptors: self.interceptors?.makeAnalyzeEntitiesInterceptors() ?? []
  357. )
  358. }
  359. internal func analyzeEntitySentiment(
  360. _ request: Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest,
  361. callOptions: CallOptions? = nil
  362. ) async throws -> Google_Cloud_Language_V1_AnalyzeEntitySentimentResponse {
  363. return try await self.performAsyncUnaryCall(
  364. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeEntitySentiment.path,
  365. request: request,
  366. callOptions: callOptions ?? self.defaultCallOptions,
  367. interceptors: self.interceptors?.makeAnalyzeEntitySentimentInterceptors() ?? []
  368. )
  369. }
  370. internal func analyzeSyntax(
  371. _ request: Google_Cloud_Language_V1_AnalyzeSyntaxRequest,
  372. callOptions: CallOptions? = nil
  373. ) async throws -> Google_Cloud_Language_V1_AnalyzeSyntaxResponse {
  374. return try await self.performAsyncUnaryCall(
  375. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeSyntax.path,
  376. request: request,
  377. callOptions: callOptions ?? self.defaultCallOptions,
  378. interceptors: self.interceptors?.makeAnalyzeSyntaxInterceptors() ?? []
  379. )
  380. }
  381. internal func classifyText(
  382. _ request: Google_Cloud_Language_V1_ClassifyTextRequest,
  383. callOptions: CallOptions? = nil
  384. ) async throws -> Google_Cloud_Language_V1_ClassifyTextResponse {
  385. return try await self.performAsyncUnaryCall(
  386. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.classifyText.path,
  387. request: request,
  388. callOptions: callOptions ?? self.defaultCallOptions,
  389. interceptors: self.interceptors?.makeClassifyTextInterceptors() ?? []
  390. )
  391. }
  392. internal func annotateText(
  393. _ request: Google_Cloud_Language_V1_AnnotateTextRequest,
  394. callOptions: CallOptions? = nil
  395. ) async throws -> Google_Cloud_Language_V1_AnnotateTextResponse {
  396. return try await self.performAsyncUnaryCall(
  397. path: Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.annotateText.path,
  398. request: request,
  399. callOptions: callOptions ?? self.defaultCallOptions,
  400. interceptors: self.interceptors?.makeAnnotateTextInterceptors() ?? []
  401. )
  402. }
  403. }
  404. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  405. internal struct Google_Cloud_Language_V1_LanguageServiceAsyncClient: Google_Cloud_Language_V1_LanguageServiceAsyncClientProtocol {
  406. internal var channel: GRPCChannel
  407. internal var defaultCallOptions: CallOptions
  408. internal var interceptors: Google_Cloud_Language_V1_LanguageServiceClientInterceptorFactoryProtocol?
  409. internal init(
  410. channel: GRPCChannel,
  411. defaultCallOptions: CallOptions = CallOptions(),
  412. interceptors: Google_Cloud_Language_V1_LanguageServiceClientInterceptorFactoryProtocol? = nil
  413. ) {
  414. self.channel = channel
  415. self.defaultCallOptions = defaultCallOptions
  416. self.interceptors = interceptors
  417. }
  418. }
  419. #endif // compiler(>=5.6)
  420. internal protocol Google_Cloud_Language_V1_LanguageServiceClientInterceptorFactoryProtocol: GRPCSendable {
  421. /// - Returns: Interceptors to use when invoking 'analyzeSentiment'.
  422. func makeAnalyzeSentimentInterceptors() -> [ClientInterceptor<Google_Cloud_Language_V1_AnalyzeSentimentRequest, Google_Cloud_Language_V1_AnalyzeSentimentResponse>]
  423. /// - Returns: Interceptors to use when invoking 'analyzeEntities'.
  424. func makeAnalyzeEntitiesInterceptors() -> [ClientInterceptor<Google_Cloud_Language_V1_AnalyzeEntitiesRequest, Google_Cloud_Language_V1_AnalyzeEntitiesResponse>]
  425. /// - Returns: Interceptors to use when invoking 'analyzeEntitySentiment'.
  426. func makeAnalyzeEntitySentimentInterceptors() -> [ClientInterceptor<Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest, Google_Cloud_Language_V1_AnalyzeEntitySentimentResponse>]
  427. /// - Returns: Interceptors to use when invoking 'analyzeSyntax'.
  428. func makeAnalyzeSyntaxInterceptors() -> [ClientInterceptor<Google_Cloud_Language_V1_AnalyzeSyntaxRequest, Google_Cloud_Language_V1_AnalyzeSyntaxResponse>]
  429. /// - Returns: Interceptors to use when invoking 'classifyText'.
  430. func makeClassifyTextInterceptors() -> [ClientInterceptor<Google_Cloud_Language_V1_ClassifyTextRequest, Google_Cloud_Language_V1_ClassifyTextResponse>]
  431. /// - Returns: Interceptors to use when invoking 'annotateText'.
  432. func makeAnnotateTextInterceptors() -> [ClientInterceptor<Google_Cloud_Language_V1_AnnotateTextRequest, Google_Cloud_Language_V1_AnnotateTextResponse>]
  433. }
  434. internal enum Google_Cloud_Language_V1_LanguageServiceClientMetadata {
  435. internal static let serviceDescriptor = GRPCServiceDescriptor(
  436. name: "LanguageService",
  437. fullName: "google.cloud.language.v1.LanguageService",
  438. methods: [
  439. Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeSentiment,
  440. Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeEntities,
  441. Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeEntitySentiment,
  442. Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.analyzeSyntax,
  443. Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.classifyText,
  444. Google_Cloud_Language_V1_LanguageServiceClientMetadata.Methods.annotateText,
  445. ]
  446. )
  447. internal enum Methods {
  448. internal static let analyzeSentiment = GRPCMethodDescriptor(
  449. name: "AnalyzeSentiment",
  450. path: "/google.cloud.language.v1.LanguageService/AnalyzeSentiment",
  451. type: GRPCCallType.unary
  452. )
  453. internal static let analyzeEntities = GRPCMethodDescriptor(
  454. name: "AnalyzeEntities",
  455. path: "/google.cloud.language.v1.LanguageService/AnalyzeEntities",
  456. type: GRPCCallType.unary
  457. )
  458. internal static let analyzeEntitySentiment = GRPCMethodDescriptor(
  459. name: "AnalyzeEntitySentiment",
  460. path: "/google.cloud.language.v1.LanguageService/AnalyzeEntitySentiment",
  461. type: GRPCCallType.unary
  462. )
  463. internal static let analyzeSyntax = GRPCMethodDescriptor(
  464. name: "AnalyzeSyntax",
  465. path: "/google.cloud.language.v1.LanguageService/AnalyzeSyntax",
  466. type: GRPCCallType.unary
  467. )
  468. internal static let classifyText = GRPCMethodDescriptor(
  469. name: "ClassifyText",
  470. path: "/google.cloud.language.v1.LanguageService/ClassifyText",
  471. type: GRPCCallType.unary
  472. )
  473. internal static let annotateText = GRPCMethodDescriptor(
  474. name: "AnnotateText",
  475. path: "/google.cloud.language.v1.LanguageService/AnnotateText",
  476. type: GRPCCallType.unary
  477. )
  478. }
  479. }
  480. /// Provides text analysis operations such as sentiment analysis and entity
  481. /// recognition.
  482. ///
  483. /// To build a server, implement a class that conforms to this protocol.
  484. internal protocol Google_Cloud_Language_V1_LanguageServiceProvider: CallHandlerProvider {
  485. var interceptors: Google_Cloud_Language_V1_LanguageServiceServerInterceptorFactoryProtocol? { get }
  486. /// Analyzes the sentiment of the provided text.
  487. func analyzeSentiment(request: Google_Cloud_Language_V1_AnalyzeSentimentRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Google_Cloud_Language_V1_AnalyzeSentimentResponse>
  488. /// Finds named entities (currently proper names and common nouns) in the text
  489. /// along with entity types, salience, mentions for each entity, and
  490. /// other properties.
  491. func analyzeEntities(request: Google_Cloud_Language_V1_AnalyzeEntitiesRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Google_Cloud_Language_V1_AnalyzeEntitiesResponse>
  492. /// Finds entities, similar to
  493. /// [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities]
  494. /// in the text and analyzes sentiment associated with each entity and its
  495. /// mentions.
  496. func analyzeEntitySentiment(request: Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Google_Cloud_Language_V1_AnalyzeEntitySentimentResponse>
  497. /// Analyzes the syntax of the text and provides sentence boundaries and
  498. /// tokenization along with part of speech tags, dependency trees, and other
  499. /// properties.
  500. func analyzeSyntax(request: Google_Cloud_Language_V1_AnalyzeSyntaxRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Google_Cloud_Language_V1_AnalyzeSyntaxResponse>
  501. /// Classifies a document into categories.
  502. func classifyText(request: Google_Cloud_Language_V1_ClassifyTextRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Google_Cloud_Language_V1_ClassifyTextResponse>
  503. /// A convenience method that provides all the features that analyzeSentiment,
  504. /// analyzeEntities, and analyzeSyntax provide in one call.
  505. func annotateText(request: Google_Cloud_Language_V1_AnnotateTextRequest, context: StatusOnlyCallContext) -> EventLoopFuture<Google_Cloud_Language_V1_AnnotateTextResponse>
  506. }
  507. extension Google_Cloud_Language_V1_LanguageServiceProvider {
  508. internal var serviceName: Substring {
  509. return Google_Cloud_Language_V1_LanguageServiceServerMetadata.serviceDescriptor.fullName[...]
  510. }
  511. /// Determines, calls and returns the appropriate request handler, depending on the request's method.
  512. /// Returns nil for methods not handled by this service.
  513. internal func handle(
  514. method name: Substring,
  515. context: CallHandlerContext
  516. ) -> GRPCServerHandlerProtocol? {
  517. switch name {
  518. case "AnalyzeSentiment":
  519. return UnaryServerHandler(
  520. context: context,
  521. requestDeserializer: ProtobufDeserializer<Google_Cloud_Language_V1_AnalyzeSentimentRequest>(),
  522. responseSerializer: ProtobufSerializer<Google_Cloud_Language_V1_AnalyzeSentimentResponse>(),
  523. interceptors: self.interceptors?.makeAnalyzeSentimentInterceptors() ?? [],
  524. userFunction: self.analyzeSentiment(request:context:)
  525. )
  526. case "AnalyzeEntities":
  527. return UnaryServerHandler(
  528. context: context,
  529. requestDeserializer: ProtobufDeserializer<Google_Cloud_Language_V1_AnalyzeEntitiesRequest>(),
  530. responseSerializer: ProtobufSerializer<Google_Cloud_Language_V1_AnalyzeEntitiesResponse>(),
  531. interceptors: self.interceptors?.makeAnalyzeEntitiesInterceptors() ?? [],
  532. userFunction: self.analyzeEntities(request:context:)
  533. )
  534. case "AnalyzeEntitySentiment":
  535. return UnaryServerHandler(
  536. context: context,
  537. requestDeserializer: ProtobufDeserializer<Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest>(),
  538. responseSerializer: ProtobufSerializer<Google_Cloud_Language_V1_AnalyzeEntitySentimentResponse>(),
  539. interceptors: self.interceptors?.makeAnalyzeEntitySentimentInterceptors() ?? [],
  540. userFunction: self.analyzeEntitySentiment(request:context:)
  541. )
  542. case "AnalyzeSyntax":
  543. return UnaryServerHandler(
  544. context: context,
  545. requestDeserializer: ProtobufDeserializer<Google_Cloud_Language_V1_AnalyzeSyntaxRequest>(),
  546. responseSerializer: ProtobufSerializer<Google_Cloud_Language_V1_AnalyzeSyntaxResponse>(),
  547. interceptors: self.interceptors?.makeAnalyzeSyntaxInterceptors() ?? [],
  548. userFunction: self.analyzeSyntax(request:context:)
  549. )
  550. case "ClassifyText":
  551. return UnaryServerHandler(
  552. context: context,
  553. requestDeserializer: ProtobufDeserializer<Google_Cloud_Language_V1_ClassifyTextRequest>(),
  554. responseSerializer: ProtobufSerializer<Google_Cloud_Language_V1_ClassifyTextResponse>(),
  555. interceptors: self.interceptors?.makeClassifyTextInterceptors() ?? [],
  556. userFunction: self.classifyText(request:context:)
  557. )
  558. case "AnnotateText":
  559. return UnaryServerHandler(
  560. context: context,
  561. requestDeserializer: ProtobufDeserializer<Google_Cloud_Language_V1_AnnotateTextRequest>(),
  562. responseSerializer: ProtobufSerializer<Google_Cloud_Language_V1_AnnotateTextResponse>(),
  563. interceptors: self.interceptors?.makeAnnotateTextInterceptors() ?? [],
  564. userFunction: self.annotateText(request:context:)
  565. )
  566. default:
  567. return nil
  568. }
  569. }
  570. }
  571. #if compiler(>=5.6)
  572. /// Provides text analysis operations such as sentiment analysis and entity
  573. /// recognition.
  574. ///
  575. /// To implement a server, implement an object which conforms to this protocol.
  576. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  577. internal protocol Google_Cloud_Language_V1_LanguageServiceAsyncProvider: CallHandlerProvider {
  578. static var serviceDescriptor: GRPCServiceDescriptor { get }
  579. var interceptors: Google_Cloud_Language_V1_LanguageServiceServerInterceptorFactoryProtocol? { get }
  580. /// Analyzes the sentiment of the provided text.
  581. @Sendable func analyzeSentiment(
  582. request: Google_Cloud_Language_V1_AnalyzeSentimentRequest,
  583. context: GRPCAsyncServerCallContext
  584. ) async throws -> Google_Cloud_Language_V1_AnalyzeSentimentResponse
  585. /// Finds named entities (currently proper names and common nouns) in the text
  586. /// along with entity types, salience, mentions for each entity, and
  587. /// other properties.
  588. @Sendable func analyzeEntities(
  589. request: Google_Cloud_Language_V1_AnalyzeEntitiesRequest,
  590. context: GRPCAsyncServerCallContext
  591. ) async throws -> Google_Cloud_Language_V1_AnalyzeEntitiesResponse
  592. /// Finds entities, similar to
  593. /// [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities]
  594. /// in the text and analyzes sentiment associated with each entity and its
  595. /// mentions.
  596. @Sendable func analyzeEntitySentiment(
  597. request: Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest,
  598. context: GRPCAsyncServerCallContext
  599. ) async throws -> Google_Cloud_Language_V1_AnalyzeEntitySentimentResponse
  600. /// Analyzes the syntax of the text and provides sentence boundaries and
  601. /// tokenization along with part of speech tags, dependency trees, and other
  602. /// properties.
  603. @Sendable func analyzeSyntax(
  604. request: Google_Cloud_Language_V1_AnalyzeSyntaxRequest,
  605. context: GRPCAsyncServerCallContext
  606. ) async throws -> Google_Cloud_Language_V1_AnalyzeSyntaxResponse
  607. /// Classifies a document into categories.
  608. @Sendable func classifyText(
  609. request: Google_Cloud_Language_V1_ClassifyTextRequest,
  610. context: GRPCAsyncServerCallContext
  611. ) async throws -> Google_Cloud_Language_V1_ClassifyTextResponse
  612. /// A convenience method that provides all the features that analyzeSentiment,
  613. /// analyzeEntities, and analyzeSyntax provide in one call.
  614. @Sendable func annotateText(
  615. request: Google_Cloud_Language_V1_AnnotateTextRequest,
  616. context: GRPCAsyncServerCallContext
  617. ) async throws -> Google_Cloud_Language_V1_AnnotateTextResponse
  618. }
  619. @available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
  620. extension Google_Cloud_Language_V1_LanguageServiceAsyncProvider {
  621. internal static var serviceDescriptor: GRPCServiceDescriptor {
  622. return Google_Cloud_Language_V1_LanguageServiceServerMetadata.serviceDescriptor
  623. }
  624. internal var serviceName: Substring {
  625. return Google_Cloud_Language_V1_LanguageServiceServerMetadata.serviceDescriptor.fullName[...]
  626. }
  627. internal var interceptors: Google_Cloud_Language_V1_LanguageServiceServerInterceptorFactoryProtocol? {
  628. return nil
  629. }
  630. internal func handle(
  631. method name: Substring,
  632. context: CallHandlerContext
  633. ) -> GRPCServerHandlerProtocol? {
  634. switch name {
  635. case "AnalyzeSentiment":
  636. return GRPCAsyncServerHandler(
  637. context: context,
  638. requestDeserializer: ProtobufDeserializer<Google_Cloud_Language_V1_AnalyzeSentimentRequest>(),
  639. responseSerializer: ProtobufSerializer<Google_Cloud_Language_V1_AnalyzeSentimentResponse>(),
  640. interceptors: self.interceptors?.makeAnalyzeSentimentInterceptors() ?? [],
  641. wrapping: self.analyzeSentiment(request:context:)
  642. )
  643. case "AnalyzeEntities":
  644. return GRPCAsyncServerHandler(
  645. context: context,
  646. requestDeserializer: ProtobufDeserializer<Google_Cloud_Language_V1_AnalyzeEntitiesRequest>(),
  647. responseSerializer: ProtobufSerializer<Google_Cloud_Language_V1_AnalyzeEntitiesResponse>(),
  648. interceptors: self.interceptors?.makeAnalyzeEntitiesInterceptors() ?? [],
  649. wrapping: self.analyzeEntities(request:context:)
  650. )
  651. case "AnalyzeEntitySentiment":
  652. return GRPCAsyncServerHandler(
  653. context: context,
  654. requestDeserializer: ProtobufDeserializer<Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest>(),
  655. responseSerializer: ProtobufSerializer<Google_Cloud_Language_V1_AnalyzeEntitySentimentResponse>(),
  656. interceptors: self.interceptors?.makeAnalyzeEntitySentimentInterceptors() ?? [],
  657. wrapping: self.analyzeEntitySentiment(request:context:)
  658. )
  659. case "AnalyzeSyntax":
  660. return GRPCAsyncServerHandler(
  661. context: context,
  662. requestDeserializer: ProtobufDeserializer<Google_Cloud_Language_V1_AnalyzeSyntaxRequest>(),
  663. responseSerializer: ProtobufSerializer<Google_Cloud_Language_V1_AnalyzeSyntaxResponse>(),
  664. interceptors: self.interceptors?.makeAnalyzeSyntaxInterceptors() ?? [],
  665. wrapping: self.analyzeSyntax(request:context:)
  666. )
  667. case "ClassifyText":
  668. return GRPCAsyncServerHandler(
  669. context: context,
  670. requestDeserializer: ProtobufDeserializer<Google_Cloud_Language_V1_ClassifyTextRequest>(),
  671. responseSerializer: ProtobufSerializer<Google_Cloud_Language_V1_ClassifyTextResponse>(),
  672. interceptors: self.interceptors?.makeClassifyTextInterceptors() ?? [],
  673. wrapping: self.classifyText(request:context:)
  674. )
  675. case "AnnotateText":
  676. return GRPCAsyncServerHandler(
  677. context: context,
  678. requestDeserializer: ProtobufDeserializer<Google_Cloud_Language_V1_AnnotateTextRequest>(),
  679. responseSerializer: ProtobufSerializer<Google_Cloud_Language_V1_AnnotateTextResponse>(),
  680. interceptors: self.interceptors?.makeAnnotateTextInterceptors() ?? [],
  681. wrapping: self.annotateText(request:context:)
  682. )
  683. default:
  684. return nil
  685. }
  686. }
  687. }
  688. #endif // compiler(>=5.6)
  689. internal protocol Google_Cloud_Language_V1_LanguageServiceServerInterceptorFactoryProtocol {
  690. /// - Returns: Interceptors to use when handling 'analyzeSentiment'.
  691. /// Defaults to calling `self.makeInterceptors()`.
  692. func makeAnalyzeSentimentInterceptors() -> [ServerInterceptor<Google_Cloud_Language_V1_AnalyzeSentimentRequest, Google_Cloud_Language_V1_AnalyzeSentimentResponse>]
  693. /// - Returns: Interceptors to use when handling 'analyzeEntities'.
  694. /// Defaults to calling `self.makeInterceptors()`.
  695. func makeAnalyzeEntitiesInterceptors() -> [ServerInterceptor<Google_Cloud_Language_V1_AnalyzeEntitiesRequest, Google_Cloud_Language_V1_AnalyzeEntitiesResponse>]
  696. /// - Returns: Interceptors to use when handling 'analyzeEntitySentiment'.
  697. /// Defaults to calling `self.makeInterceptors()`.
  698. func makeAnalyzeEntitySentimentInterceptors() -> [ServerInterceptor<Google_Cloud_Language_V1_AnalyzeEntitySentimentRequest, Google_Cloud_Language_V1_AnalyzeEntitySentimentResponse>]
  699. /// - Returns: Interceptors to use when handling 'analyzeSyntax'.
  700. /// Defaults to calling `self.makeInterceptors()`.
  701. func makeAnalyzeSyntaxInterceptors() -> [ServerInterceptor<Google_Cloud_Language_V1_AnalyzeSyntaxRequest, Google_Cloud_Language_V1_AnalyzeSyntaxResponse>]
  702. /// - Returns: Interceptors to use when handling 'classifyText'.
  703. /// Defaults to calling `self.makeInterceptors()`.
  704. func makeClassifyTextInterceptors() -> [ServerInterceptor<Google_Cloud_Language_V1_ClassifyTextRequest, Google_Cloud_Language_V1_ClassifyTextResponse>]
  705. /// - Returns: Interceptors to use when handling 'annotateText'.
  706. /// Defaults to calling `self.makeInterceptors()`.
  707. func makeAnnotateTextInterceptors() -> [ServerInterceptor<Google_Cloud_Language_V1_AnnotateTextRequest, Google_Cloud_Language_V1_AnnotateTextResponse>]
  708. }
  709. internal enum Google_Cloud_Language_V1_LanguageServiceServerMetadata {
  710. internal static let serviceDescriptor = GRPCServiceDescriptor(
  711. name: "LanguageService",
  712. fullName: "google.cloud.language.v1.LanguageService",
  713. methods: [
  714. Google_Cloud_Language_V1_LanguageServiceServerMetadata.Methods.analyzeSentiment,
  715. Google_Cloud_Language_V1_LanguageServiceServerMetadata.Methods.analyzeEntities,
  716. Google_Cloud_Language_V1_LanguageServiceServerMetadata.Methods.analyzeEntitySentiment,
  717. Google_Cloud_Language_V1_LanguageServiceServerMetadata.Methods.analyzeSyntax,
  718. Google_Cloud_Language_V1_LanguageServiceServerMetadata.Methods.classifyText,
  719. Google_Cloud_Language_V1_LanguageServiceServerMetadata.Methods.annotateText,
  720. ]
  721. )
  722. internal enum Methods {
  723. internal static let analyzeSentiment = GRPCMethodDescriptor(
  724. name: "AnalyzeSentiment",
  725. path: "/google.cloud.language.v1.LanguageService/AnalyzeSentiment",
  726. type: GRPCCallType.unary
  727. )
  728. internal static let analyzeEntities = GRPCMethodDescriptor(
  729. name: "AnalyzeEntities",
  730. path: "/google.cloud.language.v1.LanguageService/AnalyzeEntities",
  731. type: GRPCCallType.unary
  732. )
  733. internal static let analyzeEntitySentiment = GRPCMethodDescriptor(
  734. name: "AnalyzeEntitySentiment",
  735. path: "/google.cloud.language.v1.LanguageService/AnalyzeEntitySentiment",
  736. type: GRPCCallType.unary
  737. )
  738. internal static let analyzeSyntax = GRPCMethodDescriptor(
  739. name: "AnalyzeSyntax",
  740. path: "/google.cloud.language.v1.LanguageService/AnalyzeSyntax",
  741. type: GRPCCallType.unary
  742. )
  743. internal static let classifyText = GRPCMethodDescriptor(
  744. name: "ClassifyText",
  745. path: "/google.cloud.language.v1.LanguageService/ClassifyText",
  746. type: GRPCCallType.unary
  747. )
  748. internal static let annotateText = GRPCMethodDescriptor(
  749. name: "AnnotateText",
  750. path: "/google.cloud.language.v1.LanguageService/AnnotateText",
  751. type: GRPCCallType.unary
  752. )
  753. }
  754. }