language_service.grpc.swift 38 KB

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