• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package com.google.cloud.language.v1;
17 
18 import static io.grpc.MethodDescriptor.generateFullMethodName;
19 
20 /**
21  *
22  *
23  * <pre>
24  * Provides text analysis operations such as sentiment analysis and entity
25  * recognition.
26  * </pre>
27  */
28 @javax.annotation.Generated(
29     value = "by gRPC proto compiler",
30     comments = "Source: google/cloud/language/v1/language_service.proto")
31 @io.grpc.stub.annotations.GrpcGenerated
32 public final class LanguageServiceGrpc {
33 
LanguageServiceGrpc()34   private LanguageServiceGrpc() {}
35 
36   public static final String SERVICE_NAME = "google.cloud.language.v1.LanguageService";
37 
38   // Static method descriptors that strictly reflect the proto.
39   private static volatile io.grpc.MethodDescriptor<
40           com.google.cloud.language.v1.AnalyzeSentimentRequest,
41           com.google.cloud.language.v1.AnalyzeSentimentResponse>
42       getAnalyzeSentimentMethod;
43 
44   @io.grpc.stub.annotations.RpcMethod(
45       fullMethodName = SERVICE_NAME + '/' + "AnalyzeSentiment",
46       requestType = com.google.cloud.language.v1.AnalyzeSentimentRequest.class,
47       responseType = com.google.cloud.language.v1.AnalyzeSentimentResponse.class,
48       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
49   public static io.grpc.MethodDescriptor<
50           com.google.cloud.language.v1.AnalyzeSentimentRequest,
51           com.google.cloud.language.v1.AnalyzeSentimentResponse>
getAnalyzeSentimentMethod()52       getAnalyzeSentimentMethod() {
53     io.grpc.MethodDescriptor<
54             com.google.cloud.language.v1.AnalyzeSentimentRequest,
55             com.google.cloud.language.v1.AnalyzeSentimentResponse>
56         getAnalyzeSentimentMethod;
57     if ((getAnalyzeSentimentMethod = LanguageServiceGrpc.getAnalyzeSentimentMethod) == null) {
58       synchronized (LanguageServiceGrpc.class) {
59         if ((getAnalyzeSentimentMethod = LanguageServiceGrpc.getAnalyzeSentimentMethod) == null) {
60           LanguageServiceGrpc.getAnalyzeSentimentMethod =
61               getAnalyzeSentimentMethod =
62                   io.grpc.MethodDescriptor
63                       .<com.google.cloud.language.v1.AnalyzeSentimentRequest,
64                           com.google.cloud.language.v1.AnalyzeSentimentResponse>
65                           newBuilder()
66                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
67                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AnalyzeSentiment"))
68                       .setSampledToLocalTracing(true)
69                       .setRequestMarshaller(
70                           io.grpc.protobuf.ProtoUtils.marshaller(
71                               com.google.cloud.language.v1.AnalyzeSentimentRequest
72                                   .getDefaultInstance()))
73                       .setResponseMarshaller(
74                           io.grpc.protobuf.ProtoUtils.marshaller(
75                               com.google.cloud.language.v1.AnalyzeSentimentResponse
76                                   .getDefaultInstance()))
77                       .setSchemaDescriptor(
78                           new LanguageServiceMethodDescriptorSupplier("AnalyzeSentiment"))
79                       .build();
80         }
81       }
82     }
83     return getAnalyzeSentimentMethod;
84   }
85 
86   private static volatile io.grpc.MethodDescriptor<
87           com.google.cloud.language.v1.AnalyzeEntitiesRequest,
88           com.google.cloud.language.v1.AnalyzeEntitiesResponse>
89       getAnalyzeEntitiesMethod;
90 
91   @io.grpc.stub.annotations.RpcMethod(
92       fullMethodName = SERVICE_NAME + '/' + "AnalyzeEntities",
93       requestType = com.google.cloud.language.v1.AnalyzeEntitiesRequest.class,
94       responseType = com.google.cloud.language.v1.AnalyzeEntitiesResponse.class,
95       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
96   public static io.grpc.MethodDescriptor<
97           com.google.cloud.language.v1.AnalyzeEntitiesRequest,
98           com.google.cloud.language.v1.AnalyzeEntitiesResponse>
getAnalyzeEntitiesMethod()99       getAnalyzeEntitiesMethod() {
100     io.grpc.MethodDescriptor<
101             com.google.cloud.language.v1.AnalyzeEntitiesRequest,
102             com.google.cloud.language.v1.AnalyzeEntitiesResponse>
103         getAnalyzeEntitiesMethod;
104     if ((getAnalyzeEntitiesMethod = LanguageServiceGrpc.getAnalyzeEntitiesMethod) == null) {
105       synchronized (LanguageServiceGrpc.class) {
106         if ((getAnalyzeEntitiesMethod = LanguageServiceGrpc.getAnalyzeEntitiesMethod) == null) {
107           LanguageServiceGrpc.getAnalyzeEntitiesMethod =
108               getAnalyzeEntitiesMethod =
109                   io.grpc.MethodDescriptor
110                       .<com.google.cloud.language.v1.AnalyzeEntitiesRequest,
111                           com.google.cloud.language.v1.AnalyzeEntitiesResponse>
112                           newBuilder()
113                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
114                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AnalyzeEntities"))
115                       .setSampledToLocalTracing(true)
116                       .setRequestMarshaller(
117                           io.grpc.protobuf.ProtoUtils.marshaller(
118                               com.google.cloud.language.v1.AnalyzeEntitiesRequest
119                                   .getDefaultInstance()))
120                       .setResponseMarshaller(
121                           io.grpc.protobuf.ProtoUtils.marshaller(
122                               com.google.cloud.language.v1.AnalyzeEntitiesResponse
123                                   .getDefaultInstance()))
124                       .setSchemaDescriptor(
125                           new LanguageServiceMethodDescriptorSupplier("AnalyzeEntities"))
126                       .build();
127         }
128       }
129     }
130     return getAnalyzeEntitiesMethod;
131   }
132 
133   private static volatile io.grpc.MethodDescriptor<
134           com.google.cloud.language.v1.AnalyzeEntitySentimentRequest,
135           com.google.cloud.language.v1.AnalyzeEntitySentimentResponse>
136       getAnalyzeEntitySentimentMethod;
137 
138   @io.grpc.stub.annotations.RpcMethod(
139       fullMethodName = SERVICE_NAME + '/' + "AnalyzeEntitySentiment",
140       requestType = com.google.cloud.language.v1.AnalyzeEntitySentimentRequest.class,
141       responseType = com.google.cloud.language.v1.AnalyzeEntitySentimentResponse.class,
142       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
143   public static io.grpc.MethodDescriptor<
144           com.google.cloud.language.v1.AnalyzeEntitySentimentRequest,
145           com.google.cloud.language.v1.AnalyzeEntitySentimentResponse>
getAnalyzeEntitySentimentMethod()146       getAnalyzeEntitySentimentMethod() {
147     io.grpc.MethodDescriptor<
148             com.google.cloud.language.v1.AnalyzeEntitySentimentRequest,
149             com.google.cloud.language.v1.AnalyzeEntitySentimentResponse>
150         getAnalyzeEntitySentimentMethod;
151     if ((getAnalyzeEntitySentimentMethod = LanguageServiceGrpc.getAnalyzeEntitySentimentMethod)
152         == null) {
153       synchronized (LanguageServiceGrpc.class) {
154         if ((getAnalyzeEntitySentimentMethod = LanguageServiceGrpc.getAnalyzeEntitySentimentMethod)
155             == null) {
156           LanguageServiceGrpc.getAnalyzeEntitySentimentMethod =
157               getAnalyzeEntitySentimentMethod =
158                   io.grpc.MethodDescriptor
159                       .<com.google.cloud.language.v1.AnalyzeEntitySentimentRequest,
160                           com.google.cloud.language.v1.AnalyzeEntitySentimentResponse>
161                           newBuilder()
162                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
163                       .setFullMethodName(
164                           generateFullMethodName(SERVICE_NAME, "AnalyzeEntitySentiment"))
165                       .setSampledToLocalTracing(true)
166                       .setRequestMarshaller(
167                           io.grpc.protobuf.ProtoUtils.marshaller(
168                               com.google.cloud.language.v1.AnalyzeEntitySentimentRequest
169                                   .getDefaultInstance()))
170                       .setResponseMarshaller(
171                           io.grpc.protobuf.ProtoUtils.marshaller(
172                               com.google.cloud.language.v1.AnalyzeEntitySentimentResponse
173                                   .getDefaultInstance()))
174                       .setSchemaDescriptor(
175                           new LanguageServiceMethodDescriptorSupplier("AnalyzeEntitySentiment"))
176                       .build();
177         }
178       }
179     }
180     return getAnalyzeEntitySentimentMethod;
181   }
182 
183   private static volatile io.grpc.MethodDescriptor<
184           com.google.cloud.language.v1.AnalyzeSyntaxRequest,
185           com.google.cloud.language.v1.AnalyzeSyntaxResponse>
186       getAnalyzeSyntaxMethod;
187 
188   @io.grpc.stub.annotations.RpcMethod(
189       fullMethodName = SERVICE_NAME + '/' + "AnalyzeSyntax",
190       requestType = com.google.cloud.language.v1.AnalyzeSyntaxRequest.class,
191       responseType = com.google.cloud.language.v1.AnalyzeSyntaxResponse.class,
192       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
193   public static io.grpc.MethodDescriptor<
194           com.google.cloud.language.v1.AnalyzeSyntaxRequest,
195           com.google.cloud.language.v1.AnalyzeSyntaxResponse>
getAnalyzeSyntaxMethod()196       getAnalyzeSyntaxMethod() {
197     io.grpc.MethodDescriptor<
198             com.google.cloud.language.v1.AnalyzeSyntaxRequest,
199             com.google.cloud.language.v1.AnalyzeSyntaxResponse>
200         getAnalyzeSyntaxMethod;
201     if ((getAnalyzeSyntaxMethod = LanguageServiceGrpc.getAnalyzeSyntaxMethod) == null) {
202       synchronized (LanguageServiceGrpc.class) {
203         if ((getAnalyzeSyntaxMethod = LanguageServiceGrpc.getAnalyzeSyntaxMethod) == null) {
204           LanguageServiceGrpc.getAnalyzeSyntaxMethod =
205               getAnalyzeSyntaxMethod =
206                   io.grpc.MethodDescriptor
207                       .<com.google.cloud.language.v1.AnalyzeSyntaxRequest,
208                           com.google.cloud.language.v1.AnalyzeSyntaxResponse>
209                           newBuilder()
210                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
211                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AnalyzeSyntax"))
212                       .setSampledToLocalTracing(true)
213                       .setRequestMarshaller(
214                           io.grpc.protobuf.ProtoUtils.marshaller(
215                               com.google.cloud.language.v1.AnalyzeSyntaxRequest
216                                   .getDefaultInstance()))
217                       .setResponseMarshaller(
218                           io.grpc.protobuf.ProtoUtils.marshaller(
219                               com.google.cloud.language.v1.AnalyzeSyntaxResponse
220                                   .getDefaultInstance()))
221                       .setSchemaDescriptor(
222                           new LanguageServiceMethodDescriptorSupplier("AnalyzeSyntax"))
223                       .build();
224         }
225       }
226     }
227     return getAnalyzeSyntaxMethod;
228   }
229 
230   private static volatile io.grpc.MethodDescriptor<
231           com.google.cloud.language.v1.ClassifyTextRequest,
232           com.google.cloud.language.v1.ClassifyTextResponse>
233       getClassifyTextMethod;
234 
235   @io.grpc.stub.annotations.RpcMethod(
236       fullMethodName = SERVICE_NAME + '/' + "ClassifyText",
237       requestType = com.google.cloud.language.v1.ClassifyTextRequest.class,
238       responseType = com.google.cloud.language.v1.ClassifyTextResponse.class,
239       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
240   public static io.grpc.MethodDescriptor<
241           com.google.cloud.language.v1.ClassifyTextRequest,
242           com.google.cloud.language.v1.ClassifyTextResponse>
getClassifyTextMethod()243       getClassifyTextMethod() {
244     io.grpc.MethodDescriptor<
245             com.google.cloud.language.v1.ClassifyTextRequest,
246             com.google.cloud.language.v1.ClassifyTextResponse>
247         getClassifyTextMethod;
248     if ((getClassifyTextMethod = LanguageServiceGrpc.getClassifyTextMethod) == null) {
249       synchronized (LanguageServiceGrpc.class) {
250         if ((getClassifyTextMethod = LanguageServiceGrpc.getClassifyTextMethod) == null) {
251           LanguageServiceGrpc.getClassifyTextMethod =
252               getClassifyTextMethod =
253                   io.grpc.MethodDescriptor
254                       .<com.google.cloud.language.v1.ClassifyTextRequest,
255                           com.google.cloud.language.v1.ClassifyTextResponse>
256                           newBuilder()
257                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
258                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ClassifyText"))
259                       .setSampledToLocalTracing(true)
260                       .setRequestMarshaller(
261                           io.grpc.protobuf.ProtoUtils.marshaller(
262                               com.google.cloud.language.v1.ClassifyTextRequest
263                                   .getDefaultInstance()))
264                       .setResponseMarshaller(
265                           io.grpc.protobuf.ProtoUtils.marshaller(
266                               com.google.cloud.language.v1.ClassifyTextResponse
267                                   .getDefaultInstance()))
268                       .setSchemaDescriptor(
269                           new LanguageServiceMethodDescriptorSupplier("ClassifyText"))
270                       .build();
271         }
272       }
273     }
274     return getClassifyTextMethod;
275   }
276 
277   private static volatile io.grpc.MethodDescriptor<
278           com.google.cloud.language.v1.AnnotateTextRequest,
279           com.google.cloud.language.v1.AnnotateTextResponse>
280       getAnnotateTextMethod;
281 
282   @io.grpc.stub.annotations.RpcMethod(
283       fullMethodName = SERVICE_NAME + '/' + "AnnotateText",
284       requestType = com.google.cloud.language.v1.AnnotateTextRequest.class,
285       responseType = com.google.cloud.language.v1.AnnotateTextResponse.class,
286       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
287   public static io.grpc.MethodDescriptor<
288           com.google.cloud.language.v1.AnnotateTextRequest,
289           com.google.cloud.language.v1.AnnotateTextResponse>
getAnnotateTextMethod()290       getAnnotateTextMethod() {
291     io.grpc.MethodDescriptor<
292             com.google.cloud.language.v1.AnnotateTextRequest,
293             com.google.cloud.language.v1.AnnotateTextResponse>
294         getAnnotateTextMethod;
295     if ((getAnnotateTextMethod = LanguageServiceGrpc.getAnnotateTextMethod) == null) {
296       synchronized (LanguageServiceGrpc.class) {
297         if ((getAnnotateTextMethod = LanguageServiceGrpc.getAnnotateTextMethod) == null) {
298           LanguageServiceGrpc.getAnnotateTextMethod =
299               getAnnotateTextMethod =
300                   io.grpc.MethodDescriptor
301                       .<com.google.cloud.language.v1.AnnotateTextRequest,
302                           com.google.cloud.language.v1.AnnotateTextResponse>
303                           newBuilder()
304                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
305                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "AnnotateText"))
306                       .setSampledToLocalTracing(true)
307                       .setRequestMarshaller(
308                           io.grpc.protobuf.ProtoUtils.marshaller(
309                               com.google.cloud.language.v1.AnnotateTextRequest
310                                   .getDefaultInstance()))
311                       .setResponseMarshaller(
312                           io.grpc.protobuf.ProtoUtils.marshaller(
313                               com.google.cloud.language.v1.AnnotateTextResponse
314                                   .getDefaultInstance()))
315                       .setSchemaDescriptor(
316                           new LanguageServiceMethodDescriptorSupplier("AnnotateText"))
317                       .build();
318         }
319       }
320     }
321     return getAnnotateTextMethod;
322   }
323 
324   /** Creates a new async stub that supports all call types for the service */
newStub(io.grpc.Channel channel)325   public static LanguageServiceStub newStub(io.grpc.Channel channel) {
326     io.grpc.stub.AbstractStub.StubFactory<LanguageServiceStub> factory =
327         new io.grpc.stub.AbstractStub.StubFactory<LanguageServiceStub>() {
328           @java.lang.Override
329           public LanguageServiceStub newStub(
330               io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
331             return new LanguageServiceStub(channel, callOptions);
332           }
333         };
334     return LanguageServiceStub.newStub(factory, channel);
335   }
336 
337   /**
338    * Creates a new blocking-style stub that supports unary and streaming output calls on the service
339    */
newBlockingStub(io.grpc.Channel channel)340   public static LanguageServiceBlockingStub newBlockingStub(io.grpc.Channel channel) {
341     io.grpc.stub.AbstractStub.StubFactory<LanguageServiceBlockingStub> factory =
342         new io.grpc.stub.AbstractStub.StubFactory<LanguageServiceBlockingStub>() {
343           @java.lang.Override
344           public LanguageServiceBlockingStub newStub(
345               io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
346             return new LanguageServiceBlockingStub(channel, callOptions);
347           }
348         };
349     return LanguageServiceBlockingStub.newStub(factory, channel);
350   }
351 
352   /** Creates a new ListenableFuture-style stub that supports unary calls on the service */
newFutureStub(io.grpc.Channel channel)353   public static LanguageServiceFutureStub newFutureStub(io.grpc.Channel channel) {
354     io.grpc.stub.AbstractStub.StubFactory<LanguageServiceFutureStub> factory =
355         new io.grpc.stub.AbstractStub.StubFactory<LanguageServiceFutureStub>() {
356           @java.lang.Override
357           public LanguageServiceFutureStub newStub(
358               io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
359             return new LanguageServiceFutureStub(channel, callOptions);
360           }
361         };
362     return LanguageServiceFutureStub.newStub(factory, channel);
363   }
364 
365   /**
366    *
367    *
368    * <pre>
369    * Provides text analysis operations such as sentiment analysis and entity
370    * recognition.
371    * </pre>
372    */
373   public interface AsyncService {
374 
375     /**
376      *
377      *
378      * <pre>
379      * Analyzes the sentiment of the provided text.
380      * </pre>
381      */
analyzeSentiment( com.google.cloud.language.v1.AnalyzeSentimentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeSentimentResponse> responseObserver)382     default void analyzeSentiment(
383         com.google.cloud.language.v1.AnalyzeSentimentRequest request,
384         io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeSentimentResponse>
385             responseObserver) {
386       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
387           getAnalyzeSentimentMethod(), responseObserver);
388     }
389 
390     /**
391      *
392      *
393      * <pre>
394      * Finds named entities (currently proper names and common nouns) in the text
395      * along with entity types, salience, mentions for each entity, and
396      * other properties.
397      * </pre>
398      */
analyzeEntities( com.google.cloud.language.v1.AnalyzeEntitiesRequest request, io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeEntitiesResponse> responseObserver)399     default void analyzeEntities(
400         com.google.cloud.language.v1.AnalyzeEntitiesRequest request,
401         io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeEntitiesResponse>
402             responseObserver) {
403       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
404           getAnalyzeEntitiesMethod(), responseObserver);
405     }
406 
407     /**
408      *
409      *
410      * <pre>
411      * Finds entities, similar to
412      * [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities]
413      * in the text and analyzes sentiment associated with each entity and its
414      * mentions.
415      * </pre>
416      */
analyzeEntitySentiment( com.google.cloud.language.v1.AnalyzeEntitySentimentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeEntitySentimentResponse> responseObserver)417     default void analyzeEntitySentiment(
418         com.google.cloud.language.v1.AnalyzeEntitySentimentRequest request,
419         io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeEntitySentimentResponse>
420             responseObserver) {
421       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
422           getAnalyzeEntitySentimentMethod(), responseObserver);
423     }
424 
425     /**
426      *
427      *
428      * <pre>
429      * Analyzes the syntax of the text and provides sentence boundaries and
430      * tokenization along with part of speech tags, dependency trees, and other
431      * properties.
432      * </pre>
433      */
analyzeSyntax( com.google.cloud.language.v1.AnalyzeSyntaxRequest request, io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeSyntaxResponse> responseObserver)434     default void analyzeSyntax(
435         com.google.cloud.language.v1.AnalyzeSyntaxRequest request,
436         io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeSyntaxResponse>
437             responseObserver) {
438       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
439           getAnalyzeSyntaxMethod(), responseObserver);
440     }
441 
442     /**
443      *
444      *
445      * <pre>
446      * Classifies a document into categories.
447      * </pre>
448      */
classifyText( com.google.cloud.language.v1.ClassifyTextRequest request, io.grpc.stub.StreamObserver<com.google.cloud.language.v1.ClassifyTextResponse> responseObserver)449     default void classifyText(
450         com.google.cloud.language.v1.ClassifyTextRequest request,
451         io.grpc.stub.StreamObserver<com.google.cloud.language.v1.ClassifyTextResponse>
452             responseObserver) {
453       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
454           getClassifyTextMethod(), responseObserver);
455     }
456 
457     /**
458      *
459      *
460      * <pre>
461      * A convenience method that provides all the features that analyzeSentiment,
462      * analyzeEntities, and analyzeSyntax provide in one call.
463      * </pre>
464      */
annotateText( com.google.cloud.language.v1.AnnotateTextRequest request, io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnnotateTextResponse> responseObserver)465     default void annotateText(
466         com.google.cloud.language.v1.AnnotateTextRequest request,
467         io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnnotateTextResponse>
468             responseObserver) {
469       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
470           getAnnotateTextMethod(), responseObserver);
471     }
472   }
473 
474   /**
475    * Base class for the server implementation of the service LanguageService.
476    *
477    * <pre>
478    * Provides text analysis operations such as sentiment analysis and entity
479    * recognition.
480    * </pre>
481    */
482   public abstract static class LanguageServiceImplBase
483       implements io.grpc.BindableService, AsyncService {
484 
485     @java.lang.Override
bindService()486     public final io.grpc.ServerServiceDefinition bindService() {
487       return LanguageServiceGrpc.bindService(this);
488     }
489   }
490 
491   /**
492    * A stub to allow clients to do asynchronous rpc calls to service LanguageService.
493    *
494    * <pre>
495    * Provides text analysis operations such as sentiment analysis and entity
496    * recognition.
497    * </pre>
498    */
499   public static final class LanguageServiceStub
500       extends io.grpc.stub.AbstractAsyncStub<LanguageServiceStub> {
LanguageServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)501     private LanguageServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
502       super(channel, callOptions);
503     }
504 
505     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)506     protected LanguageServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
507       return new LanguageServiceStub(channel, callOptions);
508     }
509 
510     /**
511      *
512      *
513      * <pre>
514      * Analyzes the sentiment of the provided text.
515      * </pre>
516      */
analyzeSentiment( com.google.cloud.language.v1.AnalyzeSentimentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeSentimentResponse> responseObserver)517     public void analyzeSentiment(
518         com.google.cloud.language.v1.AnalyzeSentimentRequest request,
519         io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeSentimentResponse>
520             responseObserver) {
521       io.grpc.stub.ClientCalls.asyncUnaryCall(
522           getChannel().newCall(getAnalyzeSentimentMethod(), getCallOptions()),
523           request,
524           responseObserver);
525     }
526 
527     /**
528      *
529      *
530      * <pre>
531      * Finds named entities (currently proper names and common nouns) in the text
532      * along with entity types, salience, mentions for each entity, and
533      * other properties.
534      * </pre>
535      */
analyzeEntities( com.google.cloud.language.v1.AnalyzeEntitiesRequest request, io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeEntitiesResponse> responseObserver)536     public void analyzeEntities(
537         com.google.cloud.language.v1.AnalyzeEntitiesRequest request,
538         io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeEntitiesResponse>
539             responseObserver) {
540       io.grpc.stub.ClientCalls.asyncUnaryCall(
541           getChannel().newCall(getAnalyzeEntitiesMethod(), getCallOptions()),
542           request,
543           responseObserver);
544     }
545 
546     /**
547      *
548      *
549      * <pre>
550      * Finds entities, similar to
551      * [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities]
552      * in the text and analyzes sentiment associated with each entity and its
553      * mentions.
554      * </pre>
555      */
analyzeEntitySentiment( com.google.cloud.language.v1.AnalyzeEntitySentimentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeEntitySentimentResponse> responseObserver)556     public void analyzeEntitySentiment(
557         com.google.cloud.language.v1.AnalyzeEntitySentimentRequest request,
558         io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeEntitySentimentResponse>
559             responseObserver) {
560       io.grpc.stub.ClientCalls.asyncUnaryCall(
561           getChannel().newCall(getAnalyzeEntitySentimentMethod(), getCallOptions()),
562           request,
563           responseObserver);
564     }
565 
566     /**
567      *
568      *
569      * <pre>
570      * Analyzes the syntax of the text and provides sentence boundaries and
571      * tokenization along with part of speech tags, dependency trees, and other
572      * properties.
573      * </pre>
574      */
analyzeSyntax( com.google.cloud.language.v1.AnalyzeSyntaxRequest request, io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeSyntaxResponse> responseObserver)575     public void analyzeSyntax(
576         com.google.cloud.language.v1.AnalyzeSyntaxRequest request,
577         io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeSyntaxResponse>
578             responseObserver) {
579       io.grpc.stub.ClientCalls.asyncUnaryCall(
580           getChannel().newCall(getAnalyzeSyntaxMethod(), getCallOptions()),
581           request,
582           responseObserver);
583     }
584 
585     /**
586      *
587      *
588      * <pre>
589      * Classifies a document into categories.
590      * </pre>
591      */
classifyText( com.google.cloud.language.v1.ClassifyTextRequest request, io.grpc.stub.StreamObserver<com.google.cloud.language.v1.ClassifyTextResponse> responseObserver)592     public void classifyText(
593         com.google.cloud.language.v1.ClassifyTextRequest request,
594         io.grpc.stub.StreamObserver<com.google.cloud.language.v1.ClassifyTextResponse>
595             responseObserver) {
596       io.grpc.stub.ClientCalls.asyncUnaryCall(
597           getChannel().newCall(getClassifyTextMethod(), getCallOptions()),
598           request,
599           responseObserver);
600     }
601 
602     /**
603      *
604      *
605      * <pre>
606      * A convenience method that provides all the features that analyzeSentiment,
607      * analyzeEntities, and analyzeSyntax provide in one call.
608      * </pre>
609      */
annotateText( com.google.cloud.language.v1.AnnotateTextRequest request, io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnnotateTextResponse> responseObserver)610     public void annotateText(
611         com.google.cloud.language.v1.AnnotateTextRequest request,
612         io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnnotateTextResponse>
613             responseObserver) {
614       io.grpc.stub.ClientCalls.asyncUnaryCall(
615           getChannel().newCall(getAnnotateTextMethod(), getCallOptions()),
616           request,
617           responseObserver);
618     }
619   }
620 
621   /**
622    * A stub to allow clients to do synchronous rpc calls to service LanguageService.
623    *
624    * <pre>
625    * Provides text analysis operations such as sentiment analysis and entity
626    * recognition.
627    * </pre>
628    */
629   public static final class LanguageServiceBlockingStub
630       extends io.grpc.stub.AbstractBlockingStub<LanguageServiceBlockingStub> {
LanguageServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)631     private LanguageServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
632       super(channel, callOptions);
633     }
634 
635     @java.lang.Override
build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)636     protected LanguageServiceBlockingStub build(
637         io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
638       return new LanguageServiceBlockingStub(channel, callOptions);
639     }
640 
641     /**
642      *
643      *
644      * <pre>
645      * Analyzes the sentiment of the provided text.
646      * </pre>
647      */
analyzeSentiment( com.google.cloud.language.v1.AnalyzeSentimentRequest request)648     public com.google.cloud.language.v1.AnalyzeSentimentResponse analyzeSentiment(
649         com.google.cloud.language.v1.AnalyzeSentimentRequest request) {
650       return io.grpc.stub.ClientCalls.blockingUnaryCall(
651           getChannel(), getAnalyzeSentimentMethod(), getCallOptions(), request);
652     }
653 
654     /**
655      *
656      *
657      * <pre>
658      * Finds named entities (currently proper names and common nouns) in the text
659      * along with entity types, salience, mentions for each entity, and
660      * other properties.
661      * </pre>
662      */
analyzeEntities( com.google.cloud.language.v1.AnalyzeEntitiesRequest request)663     public com.google.cloud.language.v1.AnalyzeEntitiesResponse analyzeEntities(
664         com.google.cloud.language.v1.AnalyzeEntitiesRequest request) {
665       return io.grpc.stub.ClientCalls.blockingUnaryCall(
666           getChannel(), getAnalyzeEntitiesMethod(), getCallOptions(), request);
667     }
668 
669     /**
670      *
671      *
672      * <pre>
673      * Finds entities, similar to
674      * [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities]
675      * in the text and analyzes sentiment associated with each entity and its
676      * mentions.
677      * </pre>
678      */
analyzeEntitySentiment( com.google.cloud.language.v1.AnalyzeEntitySentimentRequest request)679     public com.google.cloud.language.v1.AnalyzeEntitySentimentResponse analyzeEntitySentiment(
680         com.google.cloud.language.v1.AnalyzeEntitySentimentRequest request) {
681       return io.grpc.stub.ClientCalls.blockingUnaryCall(
682           getChannel(), getAnalyzeEntitySentimentMethod(), getCallOptions(), request);
683     }
684 
685     /**
686      *
687      *
688      * <pre>
689      * Analyzes the syntax of the text and provides sentence boundaries and
690      * tokenization along with part of speech tags, dependency trees, and other
691      * properties.
692      * </pre>
693      */
analyzeSyntax( com.google.cloud.language.v1.AnalyzeSyntaxRequest request)694     public com.google.cloud.language.v1.AnalyzeSyntaxResponse analyzeSyntax(
695         com.google.cloud.language.v1.AnalyzeSyntaxRequest request) {
696       return io.grpc.stub.ClientCalls.blockingUnaryCall(
697           getChannel(), getAnalyzeSyntaxMethod(), getCallOptions(), request);
698     }
699 
700     /**
701      *
702      *
703      * <pre>
704      * Classifies a document into categories.
705      * </pre>
706      */
classifyText( com.google.cloud.language.v1.ClassifyTextRequest request)707     public com.google.cloud.language.v1.ClassifyTextResponse classifyText(
708         com.google.cloud.language.v1.ClassifyTextRequest request) {
709       return io.grpc.stub.ClientCalls.blockingUnaryCall(
710           getChannel(), getClassifyTextMethod(), getCallOptions(), request);
711     }
712 
713     /**
714      *
715      *
716      * <pre>
717      * A convenience method that provides all the features that analyzeSentiment,
718      * analyzeEntities, and analyzeSyntax provide in one call.
719      * </pre>
720      */
annotateText( com.google.cloud.language.v1.AnnotateTextRequest request)721     public com.google.cloud.language.v1.AnnotateTextResponse annotateText(
722         com.google.cloud.language.v1.AnnotateTextRequest request) {
723       return io.grpc.stub.ClientCalls.blockingUnaryCall(
724           getChannel(), getAnnotateTextMethod(), getCallOptions(), request);
725     }
726   }
727 
728   /**
729    * A stub to allow clients to do ListenableFuture-style rpc calls to service LanguageService.
730    *
731    * <pre>
732    * Provides text analysis operations such as sentiment analysis and entity
733    * recognition.
734    * </pre>
735    */
736   public static final class LanguageServiceFutureStub
737       extends io.grpc.stub.AbstractFutureStub<LanguageServiceFutureStub> {
LanguageServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)738     private LanguageServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
739       super(channel, callOptions);
740     }
741 
742     @java.lang.Override
build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)743     protected LanguageServiceFutureStub build(
744         io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
745       return new LanguageServiceFutureStub(channel, callOptions);
746     }
747 
748     /**
749      *
750      *
751      * <pre>
752      * Analyzes the sentiment of the provided text.
753      * </pre>
754      */
755     public com.google.common.util.concurrent.ListenableFuture<
756             com.google.cloud.language.v1.AnalyzeSentimentResponse>
analyzeSentiment(com.google.cloud.language.v1.AnalyzeSentimentRequest request)757         analyzeSentiment(com.google.cloud.language.v1.AnalyzeSentimentRequest request) {
758       return io.grpc.stub.ClientCalls.futureUnaryCall(
759           getChannel().newCall(getAnalyzeSentimentMethod(), getCallOptions()), request);
760     }
761 
762     /**
763      *
764      *
765      * <pre>
766      * Finds named entities (currently proper names and common nouns) in the text
767      * along with entity types, salience, mentions for each entity, and
768      * other properties.
769      * </pre>
770      */
771     public com.google.common.util.concurrent.ListenableFuture<
772             com.google.cloud.language.v1.AnalyzeEntitiesResponse>
analyzeEntities(com.google.cloud.language.v1.AnalyzeEntitiesRequest request)773         analyzeEntities(com.google.cloud.language.v1.AnalyzeEntitiesRequest request) {
774       return io.grpc.stub.ClientCalls.futureUnaryCall(
775           getChannel().newCall(getAnalyzeEntitiesMethod(), getCallOptions()), request);
776     }
777 
778     /**
779      *
780      *
781      * <pre>
782      * Finds entities, similar to
783      * [AnalyzeEntities][google.cloud.language.v1.LanguageService.AnalyzeEntities]
784      * in the text and analyzes sentiment associated with each entity and its
785      * mentions.
786      * </pre>
787      */
788     public com.google.common.util.concurrent.ListenableFuture<
789             com.google.cloud.language.v1.AnalyzeEntitySentimentResponse>
analyzeEntitySentiment(com.google.cloud.language.v1.AnalyzeEntitySentimentRequest request)790         analyzeEntitySentiment(com.google.cloud.language.v1.AnalyzeEntitySentimentRequest request) {
791       return io.grpc.stub.ClientCalls.futureUnaryCall(
792           getChannel().newCall(getAnalyzeEntitySentimentMethod(), getCallOptions()), request);
793     }
794 
795     /**
796      *
797      *
798      * <pre>
799      * Analyzes the syntax of the text and provides sentence boundaries and
800      * tokenization along with part of speech tags, dependency trees, and other
801      * properties.
802      * </pre>
803      */
804     public com.google.common.util.concurrent.ListenableFuture<
805             com.google.cloud.language.v1.AnalyzeSyntaxResponse>
analyzeSyntax(com.google.cloud.language.v1.AnalyzeSyntaxRequest request)806         analyzeSyntax(com.google.cloud.language.v1.AnalyzeSyntaxRequest request) {
807       return io.grpc.stub.ClientCalls.futureUnaryCall(
808           getChannel().newCall(getAnalyzeSyntaxMethod(), getCallOptions()), request);
809     }
810 
811     /**
812      *
813      *
814      * <pre>
815      * Classifies a document into categories.
816      * </pre>
817      */
818     public com.google.common.util.concurrent.ListenableFuture<
819             com.google.cloud.language.v1.ClassifyTextResponse>
classifyText(com.google.cloud.language.v1.ClassifyTextRequest request)820         classifyText(com.google.cloud.language.v1.ClassifyTextRequest request) {
821       return io.grpc.stub.ClientCalls.futureUnaryCall(
822           getChannel().newCall(getClassifyTextMethod(), getCallOptions()), request);
823     }
824 
825     /**
826      *
827      *
828      * <pre>
829      * A convenience method that provides all the features that analyzeSentiment,
830      * analyzeEntities, and analyzeSyntax provide in one call.
831      * </pre>
832      */
833     public com.google.common.util.concurrent.ListenableFuture<
834             com.google.cloud.language.v1.AnnotateTextResponse>
annotateText(com.google.cloud.language.v1.AnnotateTextRequest request)835         annotateText(com.google.cloud.language.v1.AnnotateTextRequest request) {
836       return io.grpc.stub.ClientCalls.futureUnaryCall(
837           getChannel().newCall(getAnnotateTextMethod(), getCallOptions()), request);
838     }
839   }
840 
841   private static final int METHODID_ANALYZE_SENTIMENT = 0;
842   private static final int METHODID_ANALYZE_ENTITIES = 1;
843   private static final int METHODID_ANALYZE_ENTITY_SENTIMENT = 2;
844   private static final int METHODID_ANALYZE_SYNTAX = 3;
845   private static final int METHODID_CLASSIFY_TEXT = 4;
846   private static final int METHODID_ANNOTATE_TEXT = 5;
847 
848   private static final class MethodHandlers<Req, Resp>
849       implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
850           io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
851           io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
852           io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
853     private final AsyncService serviceImpl;
854     private final int methodId;
855 
MethodHandlers(AsyncService serviceImpl, int methodId)856     MethodHandlers(AsyncService serviceImpl, int methodId) {
857       this.serviceImpl = serviceImpl;
858       this.methodId = methodId;
859     }
860 
861     @java.lang.Override
862     @java.lang.SuppressWarnings("unchecked")
invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver)863     public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
864       switch (methodId) {
865         case METHODID_ANALYZE_SENTIMENT:
866           serviceImpl.analyzeSentiment(
867               (com.google.cloud.language.v1.AnalyzeSentimentRequest) request,
868               (io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeSentimentResponse>)
869                   responseObserver);
870           break;
871         case METHODID_ANALYZE_ENTITIES:
872           serviceImpl.analyzeEntities(
873               (com.google.cloud.language.v1.AnalyzeEntitiesRequest) request,
874               (io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeEntitiesResponse>)
875                   responseObserver);
876           break;
877         case METHODID_ANALYZE_ENTITY_SENTIMENT:
878           serviceImpl.analyzeEntitySentiment(
879               (com.google.cloud.language.v1.AnalyzeEntitySentimentRequest) request,
880               (io.grpc.stub.StreamObserver<
881                       com.google.cloud.language.v1.AnalyzeEntitySentimentResponse>)
882                   responseObserver);
883           break;
884         case METHODID_ANALYZE_SYNTAX:
885           serviceImpl.analyzeSyntax(
886               (com.google.cloud.language.v1.AnalyzeSyntaxRequest) request,
887               (io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnalyzeSyntaxResponse>)
888                   responseObserver);
889           break;
890         case METHODID_CLASSIFY_TEXT:
891           serviceImpl.classifyText(
892               (com.google.cloud.language.v1.ClassifyTextRequest) request,
893               (io.grpc.stub.StreamObserver<com.google.cloud.language.v1.ClassifyTextResponse>)
894                   responseObserver);
895           break;
896         case METHODID_ANNOTATE_TEXT:
897           serviceImpl.annotateText(
898               (com.google.cloud.language.v1.AnnotateTextRequest) request,
899               (io.grpc.stub.StreamObserver<com.google.cloud.language.v1.AnnotateTextResponse>)
900                   responseObserver);
901           break;
902         default:
903           throw new AssertionError();
904       }
905     }
906 
907     @java.lang.Override
908     @java.lang.SuppressWarnings("unchecked")
invoke( io.grpc.stub.StreamObserver<Resp> responseObserver)909     public io.grpc.stub.StreamObserver<Req> invoke(
910         io.grpc.stub.StreamObserver<Resp> responseObserver) {
911       switch (methodId) {
912         default:
913           throw new AssertionError();
914       }
915     }
916   }
917 
bindService(AsyncService service)918   public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
919     return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
920         .addMethod(
921             getAnalyzeSentimentMethod(),
922             io.grpc.stub.ServerCalls.asyncUnaryCall(
923                 new MethodHandlers<
924                     com.google.cloud.language.v1.AnalyzeSentimentRequest,
925                     com.google.cloud.language.v1.AnalyzeSentimentResponse>(
926                     service, METHODID_ANALYZE_SENTIMENT)))
927         .addMethod(
928             getAnalyzeEntitiesMethod(),
929             io.grpc.stub.ServerCalls.asyncUnaryCall(
930                 new MethodHandlers<
931                     com.google.cloud.language.v1.AnalyzeEntitiesRequest,
932                     com.google.cloud.language.v1.AnalyzeEntitiesResponse>(
933                     service, METHODID_ANALYZE_ENTITIES)))
934         .addMethod(
935             getAnalyzeEntitySentimentMethod(),
936             io.grpc.stub.ServerCalls.asyncUnaryCall(
937                 new MethodHandlers<
938                     com.google.cloud.language.v1.AnalyzeEntitySentimentRequest,
939                     com.google.cloud.language.v1.AnalyzeEntitySentimentResponse>(
940                     service, METHODID_ANALYZE_ENTITY_SENTIMENT)))
941         .addMethod(
942             getAnalyzeSyntaxMethod(),
943             io.grpc.stub.ServerCalls.asyncUnaryCall(
944                 new MethodHandlers<
945                     com.google.cloud.language.v1.AnalyzeSyntaxRequest,
946                     com.google.cloud.language.v1.AnalyzeSyntaxResponse>(
947                     service, METHODID_ANALYZE_SYNTAX)))
948         .addMethod(
949             getClassifyTextMethod(),
950             io.grpc.stub.ServerCalls.asyncUnaryCall(
951                 new MethodHandlers<
952                     com.google.cloud.language.v1.ClassifyTextRequest,
953                     com.google.cloud.language.v1.ClassifyTextResponse>(
954                     service, METHODID_CLASSIFY_TEXT)))
955         .addMethod(
956             getAnnotateTextMethod(),
957             io.grpc.stub.ServerCalls.asyncUnaryCall(
958                 new MethodHandlers<
959                     com.google.cloud.language.v1.AnnotateTextRequest,
960                     com.google.cloud.language.v1.AnnotateTextResponse>(
961                     service, METHODID_ANNOTATE_TEXT)))
962         .build();
963   }
964 
965   private abstract static class LanguageServiceBaseDescriptorSupplier
966       implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
967           io.grpc.protobuf.ProtoServiceDescriptorSupplier {
LanguageServiceBaseDescriptorSupplier()968     LanguageServiceBaseDescriptorSupplier() {}
969 
970     @java.lang.Override
getFileDescriptor()971     public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
972       return com.google.cloud.language.v1.LanguageServiceProto.getDescriptor();
973     }
974 
975     @java.lang.Override
getServiceDescriptor()976     public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
977       return getFileDescriptor().findServiceByName("LanguageService");
978     }
979   }
980 
981   private static final class LanguageServiceFileDescriptorSupplier
982       extends LanguageServiceBaseDescriptorSupplier {
LanguageServiceFileDescriptorSupplier()983     LanguageServiceFileDescriptorSupplier() {}
984   }
985 
986   private static final class LanguageServiceMethodDescriptorSupplier
987       extends LanguageServiceBaseDescriptorSupplier
988       implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
989     private final String methodName;
990 
LanguageServiceMethodDescriptorSupplier(String methodName)991     LanguageServiceMethodDescriptorSupplier(String methodName) {
992       this.methodName = methodName;
993     }
994 
995     @java.lang.Override
getMethodDescriptor()996     public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
997       return getServiceDescriptor().findMethodByName(methodName);
998     }
999   }
1000 
1001   private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
1002 
getServiceDescriptor()1003   public static io.grpc.ServiceDescriptor getServiceDescriptor() {
1004     io.grpc.ServiceDescriptor result = serviceDescriptor;
1005     if (result == null) {
1006       synchronized (LanguageServiceGrpc.class) {
1007         result = serviceDescriptor;
1008         if (result == null) {
1009           serviceDescriptor =
1010               result =
1011                   io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
1012                       .setSchemaDescriptor(new LanguageServiceFileDescriptorSupplier())
1013                       .addMethod(getAnalyzeSentimentMethod())
1014                       .addMethod(getAnalyzeEntitiesMethod())
1015                       .addMethod(getAnalyzeEntitySentimentMethod())
1016                       .addMethod(getAnalyzeSyntaxMethod())
1017                       .addMethod(getClassifyTextMethod())
1018                       .addMethod(getAnnotateTextMethod())
1019                       .build();
1020         }
1021       }
1022     }
1023     return result;
1024   }
1025 }
1026