• 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.dialogflow.v2;
17 
18 import static io.grpc.MethodDescriptor.generateFullMethodName;
19 
20 /**
21  *
22  *
23  * <pre>
24  * Service for managing [Intents][google.cloud.dialogflow.v2.Intent].
25  * </pre>
26  */
27 @javax.annotation.Generated(
28     value = "by gRPC proto compiler",
29     comments = "Source: google/cloud/dialogflow/v2/intent.proto")
30 @io.grpc.stub.annotations.GrpcGenerated
31 public final class IntentsGrpc {
32 
IntentsGrpc()33   private IntentsGrpc() {}
34 
35   public static final String SERVICE_NAME = "google.cloud.dialogflow.v2.Intents";
36 
37   // Static method descriptors that strictly reflect the proto.
38   private static volatile io.grpc.MethodDescriptor<
39           com.google.cloud.dialogflow.v2.ListIntentsRequest,
40           com.google.cloud.dialogflow.v2.ListIntentsResponse>
41       getListIntentsMethod;
42 
43   @io.grpc.stub.annotations.RpcMethod(
44       fullMethodName = SERVICE_NAME + '/' + "ListIntents",
45       requestType = com.google.cloud.dialogflow.v2.ListIntentsRequest.class,
46       responseType = com.google.cloud.dialogflow.v2.ListIntentsResponse.class,
47       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
48   public static io.grpc.MethodDescriptor<
49           com.google.cloud.dialogflow.v2.ListIntentsRequest,
50           com.google.cloud.dialogflow.v2.ListIntentsResponse>
getListIntentsMethod()51       getListIntentsMethod() {
52     io.grpc.MethodDescriptor<
53             com.google.cloud.dialogflow.v2.ListIntentsRequest,
54             com.google.cloud.dialogflow.v2.ListIntentsResponse>
55         getListIntentsMethod;
56     if ((getListIntentsMethod = IntentsGrpc.getListIntentsMethod) == null) {
57       synchronized (IntentsGrpc.class) {
58         if ((getListIntentsMethod = IntentsGrpc.getListIntentsMethod) == null) {
59           IntentsGrpc.getListIntentsMethod =
60               getListIntentsMethod =
61                   io.grpc.MethodDescriptor
62                       .<com.google.cloud.dialogflow.v2.ListIntentsRequest,
63                           com.google.cloud.dialogflow.v2.ListIntentsResponse>
64                           newBuilder()
65                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
66                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListIntents"))
67                       .setSampledToLocalTracing(true)
68                       .setRequestMarshaller(
69                           io.grpc.protobuf.ProtoUtils.marshaller(
70                               com.google.cloud.dialogflow.v2.ListIntentsRequest
71                                   .getDefaultInstance()))
72                       .setResponseMarshaller(
73                           io.grpc.protobuf.ProtoUtils.marshaller(
74                               com.google.cloud.dialogflow.v2.ListIntentsResponse
75                                   .getDefaultInstance()))
76                       .setSchemaDescriptor(new IntentsMethodDescriptorSupplier("ListIntents"))
77                       .build();
78         }
79       }
80     }
81     return getListIntentsMethod;
82   }
83 
84   private static volatile io.grpc.MethodDescriptor<
85           com.google.cloud.dialogflow.v2.GetIntentRequest, com.google.cloud.dialogflow.v2.Intent>
86       getGetIntentMethod;
87 
88   @io.grpc.stub.annotations.RpcMethod(
89       fullMethodName = SERVICE_NAME + '/' + "GetIntent",
90       requestType = com.google.cloud.dialogflow.v2.GetIntentRequest.class,
91       responseType = com.google.cloud.dialogflow.v2.Intent.class,
92       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
93   public static io.grpc.MethodDescriptor<
94           com.google.cloud.dialogflow.v2.GetIntentRequest, com.google.cloud.dialogflow.v2.Intent>
getGetIntentMethod()95       getGetIntentMethod() {
96     io.grpc.MethodDescriptor<
97             com.google.cloud.dialogflow.v2.GetIntentRequest, com.google.cloud.dialogflow.v2.Intent>
98         getGetIntentMethod;
99     if ((getGetIntentMethod = IntentsGrpc.getGetIntentMethod) == null) {
100       synchronized (IntentsGrpc.class) {
101         if ((getGetIntentMethod = IntentsGrpc.getGetIntentMethod) == null) {
102           IntentsGrpc.getGetIntentMethod =
103               getGetIntentMethod =
104                   io.grpc.MethodDescriptor
105                       .<com.google.cloud.dialogflow.v2.GetIntentRequest,
106                           com.google.cloud.dialogflow.v2.Intent>
107                           newBuilder()
108                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
109                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIntent"))
110                       .setSampledToLocalTracing(true)
111                       .setRequestMarshaller(
112                           io.grpc.protobuf.ProtoUtils.marshaller(
113                               com.google.cloud.dialogflow.v2.GetIntentRequest.getDefaultInstance()))
114                       .setResponseMarshaller(
115                           io.grpc.protobuf.ProtoUtils.marshaller(
116                               com.google.cloud.dialogflow.v2.Intent.getDefaultInstance()))
117                       .setSchemaDescriptor(new IntentsMethodDescriptorSupplier("GetIntent"))
118                       .build();
119         }
120       }
121     }
122     return getGetIntentMethod;
123   }
124 
125   private static volatile io.grpc.MethodDescriptor<
126           com.google.cloud.dialogflow.v2.CreateIntentRequest, com.google.cloud.dialogflow.v2.Intent>
127       getCreateIntentMethod;
128 
129   @io.grpc.stub.annotations.RpcMethod(
130       fullMethodName = SERVICE_NAME + '/' + "CreateIntent",
131       requestType = com.google.cloud.dialogflow.v2.CreateIntentRequest.class,
132       responseType = com.google.cloud.dialogflow.v2.Intent.class,
133       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
134   public static io.grpc.MethodDescriptor<
135           com.google.cloud.dialogflow.v2.CreateIntentRequest, com.google.cloud.dialogflow.v2.Intent>
getCreateIntentMethod()136       getCreateIntentMethod() {
137     io.grpc.MethodDescriptor<
138             com.google.cloud.dialogflow.v2.CreateIntentRequest,
139             com.google.cloud.dialogflow.v2.Intent>
140         getCreateIntentMethod;
141     if ((getCreateIntentMethod = IntentsGrpc.getCreateIntentMethod) == null) {
142       synchronized (IntentsGrpc.class) {
143         if ((getCreateIntentMethod = IntentsGrpc.getCreateIntentMethod) == null) {
144           IntentsGrpc.getCreateIntentMethod =
145               getCreateIntentMethod =
146                   io.grpc.MethodDescriptor
147                       .<com.google.cloud.dialogflow.v2.CreateIntentRequest,
148                           com.google.cloud.dialogflow.v2.Intent>
149                           newBuilder()
150                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
151                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateIntent"))
152                       .setSampledToLocalTracing(true)
153                       .setRequestMarshaller(
154                           io.grpc.protobuf.ProtoUtils.marshaller(
155                               com.google.cloud.dialogflow.v2.CreateIntentRequest
156                                   .getDefaultInstance()))
157                       .setResponseMarshaller(
158                           io.grpc.protobuf.ProtoUtils.marshaller(
159                               com.google.cloud.dialogflow.v2.Intent.getDefaultInstance()))
160                       .setSchemaDescriptor(new IntentsMethodDescriptorSupplier("CreateIntent"))
161                       .build();
162         }
163       }
164     }
165     return getCreateIntentMethod;
166   }
167 
168   private static volatile io.grpc.MethodDescriptor<
169           com.google.cloud.dialogflow.v2.UpdateIntentRequest, com.google.cloud.dialogflow.v2.Intent>
170       getUpdateIntentMethod;
171 
172   @io.grpc.stub.annotations.RpcMethod(
173       fullMethodName = SERVICE_NAME + '/' + "UpdateIntent",
174       requestType = com.google.cloud.dialogflow.v2.UpdateIntentRequest.class,
175       responseType = com.google.cloud.dialogflow.v2.Intent.class,
176       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
177   public static io.grpc.MethodDescriptor<
178           com.google.cloud.dialogflow.v2.UpdateIntentRequest, com.google.cloud.dialogflow.v2.Intent>
getUpdateIntentMethod()179       getUpdateIntentMethod() {
180     io.grpc.MethodDescriptor<
181             com.google.cloud.dialogflow.v2.UpdateIntentRequest,
182             com.google.cloud.dialogflow.v2.Intent>
183         getUpdateIntentMethod;
184     if ((getUpdateIntentMethod = IntentsGrpc.getUpdateIntentMethod) == null) {
185       synchronized (IntentsGrpc.class) {
186         if ((getUpdateIntentMethod = IntentsGrpc.getUpdateIntentMethod) == null) {
187           IntentsGrpc.getUpdateIntentMethod =
188               getUpdateIntentMethod =
189                   io.grpc.MethodDescriptor
190                       .<com.google.cloud.dialogflow.v2.UpdateIntentRequest,
191                           com.google.cloud.dialogflow.v2.Intent>
192                           newBuilder()
193                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
194                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateIntent"))
195                       .setSampledToLocalTracing(true)
196                       .setRequestMarshaller(
197                           io.grpc.protobuf.ProtoUtils.marshaller(
198                               com.google.cloud.dialogflow.v2.UpdateIntentRequest
199                                   .getDefaultInstance()))
200                       .setResponseMarshaller(
201                           io.grpc.protobuf.ProtoUtils.marshaller(
202                               com.google.cloud.dialogflow.v2.Intent.getDefaultInstance()))
203                       .setSchemaDescriptor(new IntentsMethodDescriptorSupplier("UpdateIntent"))
204                       .build();
205         }
206       }
207     }
208     return getUpdateIntentMethod;
209   }
210 
211   private static volatile io.grpc.MethodDescriptor<
212           com.google.cloud.dialogflow.v2.DeleteIntentRequest, com.google.protobuf.Empty>
213       getDeleteIntentMethod;
214 
215   @io.grpc.stub.annotations.RpcMethod(
216       fullMethodName = SERVICE_NAME + '/' + "DeleteIntent",
217       requestType = com.google.cloud.dialogflow.v2.DeleteIntentRequest.class,
218       responseType = com.google.protobuf.Empty.class,
219       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
220   public static io.grpc.MethodDescriptor<
221           com.google.cloud.dialogflow.v2.DeleteIntentRequest, com.google.protobuf.Empty>
getDeleteIntentMethod()222       getDeleteIntentMethod() {
223     io.grpc.MethodDescriptor<
224             com.google.cloud.dialogflow.v2.DeleteIntentRequest, com.google.protobuf.Empty>
225         getDeleteIntentMethod;
226     if ((getDeleteIntentMethod = IntentsGrpc.getDeleteIntentMethod) == null) {
227       synchronized (IntentsGrpc.class) {
228         if ((getDeleteIntentMethod = IntentsGrpc.getDeleteIntentMethod) == null) {
229           IntentsGrpc.getDeleteIntentMethod =
230               getDeleteIntentMethod =
231                   io.grpc.MethodDescriptor
232                       .<com.google.cloud.dialogflow.v2.DeleteIntentRequest,
233                           com.google.protobuf.Empty>
234                           newBuilder()
235                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
236                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteIntent"))
237                       .setSampledToLocalTracing(true)
238                       .setRequestMarshaller(
239                           io.grpc.protobuf.ProtoUtils.marshaller(
240                               com.google.cloud.dialogflow.v2.DeleteIntentRequest
241                                   .getDefaultInstance()))
242                       .setResponseMarshaller(
243                           io.grpc.protobuf.ProtoUtils.marshaller(
244                               com.google.protobuf.Empty.getDefaultInstance()))
245                       .setSchemaDescriptor(new IntentsMethodDescriptorSupplier("DeleteIntent"))
246                       .build();
247         }
248       }
249     }
250     return getDeleteIntentMethod;
251   }
252 
253   private static volatile io.grpc.MethodDescriptor<
254           com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest,
255           com.google.longrunning.Operation>
256       getBatchUpdateIntentsMethod;
257 
258   @io.grpc.stub.annotations.RpcMethod(
259       fullMethodName = SERVICE_NAME + '/' + "BatchUpdateIntents",
260       requestType = com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest.class,
261       responseType = com.google.longrunning.Operation.class,
262       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
263   public static io.grpc.MethodDescriptor<
264           com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest,
265           com.google.longrunning.Operation>
getBatchUpdateIntentsMethod()266       getBatchUpdateIntentsMethod() {
267     io.grpc.MethodDescriptor<
268             com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest,
269             com.google.longrunning.Operation>
270         getBatchUpdateIntentsMethod;
271     if ((getBatchUpdateIntentsMethod = IntentsGrpc.getBatchUpdateIntentsMethod) == null) {
272       synchronized (IntentsGrpc.class) {
273         if ((getBatchUpdateIntentsMethod = IntentsGrpc.getBatchUpdateIntentsMethod) == null) {
274           IntentsGrpc.getBatchUpdateIntentsMethod =
275               getBatchUpdateIntentsMethod =
276                   io.grpc.MethodDescriptor
277                       .<com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest,
278                           com.google.longrunning.Operation>
279                           newBuilder()
280                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
281                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchUpdateIntents"))
282                       .setSampledToLocalTracing(true)
283                       .setRequestMarshaller(
284                           io.grpc.protobuf.ProtoUtils.marshaller(
285                               com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest
286                                   .getDefaultInstance()))
287                       .setResponseMarshaller(
288                           io.grpc.protobuf.ProtoUtils.marshaller(
289                               com.google.longrunning.Operation.getDefaultInstance()))
290                       .setSchemaDescriptor(
291                           new IntentsMethodDescriptorSupplier("BatchUpdateIntents"))
292                       .build();
293         }
294       }
295     }
296     return getBatchUpdateIntentsMethod;
297   }
298 
299   private static volatile io.grpc.MethodDescriptor<
300           com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest,
301           com.google.longrunning.Operation>
302       getBatchDeleteIntentsMethod;
303 
304   @io.grpc.stub.annotations.RpcMethod(
305       fullMethodName = SERVICE_NAME + '/' + "BatchDeleteIntents",
306       requestType = com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest.class,
307       responseType = com.google.longrunning.Operation.class,
308       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
309   public static io.grpc.MethodDescriptor<
310           com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest,
311           com.google.longrunning.Operation>
getBatchDeleteIntentsMethod()312       getBatchDeleteIntentsMethod() {
313     io.grpc.MethodDescriptor<
314             com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest,
315             com.google.longrunning.Operation>
316         getBatchDeleteIntentsMethod;
317     if ((getBatchDeleteIntentsMethod = IntentsGrpc.getBatchDeleteIntentsMethod) == null) {
318       synchronized (IntentsGrpc.class) {
319         if ((getBatchDeleteIntentsMethod = IntentsGrpc.getBatchDeleteIntentsMethod) == null) {
320           IntentsGrpc.getBatchDeleteIntentsMethod =
321               getBatchDeleteIntentsMethod =
322                   io.grpc.MethodDescriptor
323                       .<com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest,
324                           com.google.longrunning.Operation>
325                           newBuilder()
326                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
327                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "BatchDeleteIntents"))
328                       .setSampledToLocalTracing(true)
329                       .setRequestMarshaller(
330                           io.grpc.protobuf.ProtoUtils.marshaller(
331                               com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest
332                                   .getDefaultInstance()))
333                       .setResponseMarshaller(
334                           io.grpc.protobuf.ProtoUtils.marshaller(
335                               com.google.longrunning.Operation.getDefaultInstance()))
336                       .setSchemaDescriptor(
337                           new IntentsMethodDescriptorSupplier("BatchDeleteIntents"))
338                       .build();
339         }
340       }
341     }
342     return getBatchDeleteIntentsMethod;
343   }
344 
345   /** Creates a new async stub that supports all call types for the service */
newStub(io.grpc.Channel channel)346   public static IntentsStub newStub(io.grpc.Channel channel) {
347     io.grpc.stub.AbstractStub.StubFactory<IntentsStub> factory =
348         new io.grpc.stub.AbstractStub.StubFactory<IntentsStub>() {
349           @java.lang.Override
350           public IntentsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
351             return new IntentsStub(channel, callOptions);
352           }
353         };
354     return IntentsStub.newStub(factory, channel);
355   }
356 
357   /**
358    * Creates a new blocking-style stub that supports unary and streaming output calls on the service
359    */
newBlockingStub(io.grpc.Channel channel)360   public static IntentsBlockingStub newBlockingStub(io.grpc.Channel channel) {
361     io.grpc.stub.AbstractStub.StubFactory<IntentsBlockingStub> factory =
362         new io.grpc.stub.AbstractStub.StubFactory<IntentsBlockingStub>() {
363           @java.lang.Override
364           public IntentsBlockingStub newStub(
365               io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
366             return new IntentsBlockingStub(channel, callOptions);
367           }
368         };
369     return IntentsBlockingStub.newStub(factory, channel);
370   }
371 
372   /** Creates a new ListenableFuture-style stub that supports unary calls on the service */
newFutureStub(io.grpc.Channel channel)373   public static IntentsFutureStub newFutureStub(io.grpc.Channel channel) {
374     io.grpc.stub.AbstractStub.StubFactory<IntentsFutureStub> factory =
375         new io.grpc.stub.AbstractStub.StubFactory<IntentsFutureStub>() {
376           @java.lang.Override
377           public IntentsFutureStub newStub(
378               io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
379             return new IntentsFutureStub(channel, callOptions);
380           }
381         };
382     return IntentsFutureStub.newStub(factory, channel);
383   }
384 
385   /**
386    *
387    *
388    * <pre>
389    * Service for managing [Intents][google.cloud.dialogflow.v2.Intent].
390    * </pre>
391    */
392   public interface AsyncService {
393 
394     /**
395      *
396      *
397      * <pre>
398      * Returns the list of all intents in the specified agent.
399      * </pre>
400      */
listIntents( com.google.cloud.dialogflow.v2.ListIntentsRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.ListIntentsResponse> responseObserver)401     default void listIntents(
402         com.google.cloud.dialogflow.v2.ListIntentsRequest request,
403         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.ListIntentsResponse>
404             responseObserver) {
405       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
406           getListIntentsMethod(), responseObserver);
407     }
408 
409     /**
410      *
411      *
412      * <pre>
413      * Retrieves the specified intent.
414      * </pre>
415      */
getIntent( com.google.cloud.dialogflow.v2.GetIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent> responseObserver)416     default void getIntent(
417         com.google.cloud.dialogflow.v2.GetIntentRequest request,
418         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent> responseObserver) {
419       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetIntentMethod(), responseObserver);
420     }
421 
422     /**
423      *
424      *
425      * <pre>
426      * Creates an intent in the specified agent.
427      * Note: You should always train an agent prior to sending it queries. See the
428      * [training
429      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
430      * </pre>
431      */
createIntent( com.google.cloud.dialogflow.v2.CreateIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent> responseObserver)432     default void createIntent(
433         com.google.cloud.dialogflow.v2.CreateIntentRequest request,
434         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent> responseObserver) {
435       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
436           getCreateIntentMethod(), responseObserver);
437     }
438 
439     /**
440      *
441      *
442      * <pre>
443      * Updates the specified intent.
444      * Note: You should always train an agent prior to sending it queries. See the
445      * [training
446      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
447      * </pre>
448      */
updateIntent( com.google.cloud.dialogflow.v2.UpdateIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent> responseObserver)449     default void updateIntent(
450         com.google.cloud.dialogflow.v2.UpdateIntentRequest request,
451         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent> responseObserver) {
452       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
453           getUpdateIntentMethod(), responseObserver);
454     }
455 
456     /**
457      *
458      *
459      * <pre>
460      * Deletes the specified intent and its direct or indirect followup intents.
461      * Note: You should always train an agent prior to sending it queries. See the
462      * [training
463      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
464      * </pre>
465      */
deleteIntent( com.google.cloud.dialogflow.v2.DeleteIntentRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)466     default void deleteIntent(
467         com.google.cloud.dialogflow.v2.DeleteIntentRequest request,
468         io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
469       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
470           getDeleteIntentMethod(), responseObserver);
471     }
472 
473     /**
474      *
475      *
476      * <pre>
477      * Updates/Creates multiple intents in the specified agent.
478      * This method is a [long-running
479      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
480      * The returned `Operation` type has the following method-specific fields:
481      * - `metadata`: An empty [Struct
482      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
483      * - `response`:
484      * [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
485      * Note: You should always train an agent prior to sending it queries. See the
486      * [training
487      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
488      * </pre>
489      */
batchUpdateIntents( com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)490     default void batchUpdateIntents(
491         com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest request,
492         io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
493       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
494           getBatchUpdateIntentsMethod(), responseObserver);
495     }
496 
497     /**
498      *
499      *
500      * <pre>
501      * Deletes intents in the specified agent.
502      * This method is a [long-running
503      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
504      * The returned `Operation` type has the following method-specific fields:
505      * - `metadata`: An empty [Struct
506      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
507      * - `response`: An [Empty
508      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
509      * Note: You should always train an agent prior to sending it queries. See the
510      * [training
511      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
512      * </pre>
513      */
batchDeleteIntents( com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)514     default void batchDeleteIntents(
515         com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest request,
516         io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
517       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
518           getBatchDeleteIntentsMethod(), responseObserver);
519     }
520   }
521 
522   /**
523    * Base class for the server implementation of the service Intents.
524    *
525    * <pre>
526    * Service for managing [Intents][google.cloud.dialogflow.v2.Intent].
527    * </pre>
528    */
529   public abstract static class IntentsImplBase implements io.grpc.BindableService, AsyncService {
530 
531     @java.lang.Override
bindService()532     public final io.grpc.ServerServiceDefinition bindService() {
533       return IntentsGrpc.bindService(this);
534     }
535   }
536 
537   /**
538    * A stub to allow clients to do asynchronous rpc calls to service Intents.
539    *
540    * <pre>
541    * Service for managing [Intents][google.cloud.dialogflow.v2.Intent].
542    * </pre>
543    */
544   public static final class IntentsStub extends io.grpc.stub.AbstractAsyncStub<IntentsStub> {
IntentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)545     private IntentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
546       super(channel, callOptions);
547     }
548 
549     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)550     protected IntentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
551       return new IntentsStub(channel, callOptions);
552     }
553 
554     /**
555      *
556      *
557      * <pre>
558      * Returns the list of all intents in the specified agent.
559      * </pre>
560      */
listIntents( com.google.cloud.dialogflow.v2.ListIntentsRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.ListIntentsResponse> responseObserver)561     public void listIntents(
562         com.google.cloud.dialogflow.v2.ListIntentsRequest request,
563         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.ListIntentsResponse>
564             responseObserver) {
565       io.grpc.stub.ClientCalls.asyncUnaryCall(
566           getChannel().newCall(getListIntentsMethod(), getCallOptions()),
567           request,
568           responseObserver);
569     }
570 
571     /**
572      *
573      *
574      * <pre>
575      * Retrieves the specified intent.
576      * </pre>
577      */
getIntent( com.google.cloud.dialogflow.v2.GetIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent> responseObserver)578     public void getIntent(
579         com.google.cloud.dialogflow.v2.GetIntentRequest request,
580         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent> responseObserver) {
581       io.grpc.stub.ClientCalls.asyncUnaryCall(
582           getChannel().newCall(getGetIntentMethod(), getCallOptions()), request, responseObserver);
583     }
584 
585     /**
586      *
587      *
588      * <pre>
589      * Creates an intent in the specified agent.
590      * Note: You should always train an agent prior to sending it queries. See the
591      * [training
592      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
593      * </pre>
594      */
createIntent( com.google.cloud.dialogflow.v2.CreateIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent> responseObserver)595     public void createIntent(
596         com.google.cloud.dialogflow.v2.CreateIntentRequest request,
597         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent> responseObserver) {
598       io.grpc.stub.ClientCalls.asyncUnaryCall(
599           getChannel().newCall(getCreateIntentMethod(), getCallOptions()),
600           request,
601           responseObserver);
602     }
603 
604     /**
605      *
606      *
607      * <pre>
608      * Updates the specified intent.
609      * Note: You should always train an agent prior to sending it queries. See the
610      * [training
611      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
612      * </pre>
613      */
updateIntent( com.google.cloud.dialogflow.v2.UpdateIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent> responseObserver)614     public void updateIntent(
615         com.google.cloud.dialogflow.v2.UpdateIntentRequest request,
616         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent> responseObserver) {
617       io.grpc.stub.ClientCalls.asyncUnaryCall(
618           getChannel().newCall(getUpdateIntentMethod(), getCallOptions()),
619           request,
620           responseObserver);
621     }
622 
623     /**
624      *
625      *
626      * <pre>
627      * Deletes the specified intent and its direct or indirect followup intents.
628      * Note: You should always train an agent prior to sending it queries. See the
629      * [training
630      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
631      * </pre>
632      */
deleteIntent( com.google.cloud.dialogflow.v2.DeleteIntentRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)633     public void deleteIntent(
634         com.google.cloud.dialogflow.v2.DeleteIntentRequest request,
635         io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
636       io.grpc.stub.ClientCalls.asyncUnaryCall(
637           getChannel().newCall(getDeleteIntentMethod(), getCallOptions()),
638           request,
639           responseObserver);
640     }
641 
642     /**
643      *
644      *
645      * <pre>
646      * Updates/Creates multiple intents in the specified agent.
647      * This method is a [long-running
648      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
649      * The returned `Operation` type has the following method-specific fields:
650      * - `metadata`: An empty [Struct
651      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
652      * - `response`:
653      * [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
654      * Note: You should always train an agent prior to sending it queries. See the
655      * [training
656      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
657      * </pre>
658      */
batchUpdateIntents( com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)659     public void batchUpdateIntents(
660         com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest request,
661         io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
662       io.grpc.stub.ClientCalls.asyncUnaryCall(
663           getChannel().newCall(getBatchUpdateIntentsMethod(), getCallOptions()),
664           request,
665           responseObserver);
666     }
667 
668     /**
669      *
670      *
671      * <pre>
672      * Deletes intents in the specified agent.
673      * This method is a [long-running
674      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
675      * The returned `Operation` type has the following method-specific fields:
676      * - `metadata`: An empty [Struct
677      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
678      * - `response`: An [Empty
679      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
680      * Note: You should always train an agent prior to sending it queries. See the
681      * [training
682      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
683      * </pre>
684      */
batchDeleteIntents( com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)685     public void batchDeleteIntents(
686         com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest request,
687         io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
688       io.grpc.stub.ClientCalls.asyncUnaryCall(
689           getChannel().newCall(getBatchDeleteIntentsMethod(), getCallOptions()),
690           request,
691           responseObserver);
692     }
693   }
694 
695   /**
696    * A stub to allow clients to do synchronous rpc calls to service Intents.
697    *
698    * <pre>
699    * Service for managing [Intents][google.cloud.dialogflow.v2.Intent].
700    * </pre>
701    */
702   public static final class IntentsBlockingStub
703       extends io.grpc.stub.AbstractBlockingStub<IntentsBlockingStub> {
IntentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)704     private IntentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
705       super(channel, callOptions);
706     }
707 
708     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)709     protected IntentsBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
710       return new IntentsBlockingStub(channel, callOptions);
711     }
712 
713     /**
714      *
715      *
716      * <pre>
717      * Returns the list of all intents in the specified agent.
718      * </pre>
719      */
listIntents( com.google.cloud.dialogflow.v2.ListIntentsRequest request)720     public com.google.cloud.dialogflow.v2.ListIntentsResponse listIntents(
721         com.google.cloud.dialogflow.v2.ListIntentsRequest request) {
722       return io.grpc.stub.ClientCalls.blockingUnaryCall(
723           getChannel(), getListIntentsMethod(), getCallOptions(), request);
724     }
725 
726     /**
727      *
728      *
729      * <pre>
730      * Retrieves the specified intent.
731      * </pre>
732      */
getIntent( com.google.cloud.dialogflow.v2.GetIntentRequest request)733     public com.google.cloud.dialogflow.v2.Intent getIntent(
734         com.google.cloud.dialogflow.v2.GetIntentRequest request) {
735       return io.grpc.stub.ClientCalls.blockingUnaryCall(
736           getChannel(), getGetIntentMethod(), getCallOptions(), request);
737     }
738 
739     /**
740      *
741      *
742      * <pre>
743      * Creates an intent in the specified agent.
744      * Note: You should always train an agent prior to sending it queries. See the
745      * [training
746      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
747      * </pre>
748      */
createIntent( com.google.cloud.dialogflow.v2.CreateIntentRequest request)749     public com.google.cloud.dialogflow.v2.Intent createIntent(
750         com.google.cloud.dialogflow.v2.CreateIntentRequest request) {
751       return io.grpc.stub.ClientCalls.blockingUnaryCall(
752           getChannel(), getCreateIntentMethod(), getCallOptions(), request);
753     }
754 
755     /**
756      *
757      *
758      * <pre>
759      * Updates the specified intent.
760      * Note: You should always train an agent prior to sending it queries. See the
761      * [training
762      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
763      * </pre>
764      */
updateIntent( com.google.cloud.dialogflow.v2.UpdateIntentRequest request)765     public com.google.cloud.dialogflow.v2.Intent updateIntent(
766         com.google.cloud.dialogflow.v2.UpdateIntentRequest request) {
767       return io.grpc.stub.ClientCalls.blockingUnaryCall(
768           getChannel(), getUpdateIntentMethod(), getCallOptions(), request);
769     }
770 
771     /**
772      *
773      *
774      * <pre>
775      * Deletes the specified intent and its direct or indirect followup intents.
776      * Note: You should always train an agent prior to sending it queries. See the
777      * [training
778      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
779      * </pre>
780      */
deleteIntent( com.google.cloud.dialogflow.v2.DeleteIntentRequest request)781     public com.google.protobuf.Empty deleteIntent(
782         com.google.cloud.dialogflow.v2.DeleteIntentRequest request) {
783       return io.grpc.stub.ClientCalls.blockingUnaryCall(
784           getChannel(), getDeleteIntentMethod(), getCallOptions(), request);
785     }
786 
787     /**
788      *
789      *
790      * <pre>
791      * Updates/Creates multiple intents in the specified agent.
792      * This method is a [long-running
793      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
794      * The returned `Operation` type has the following method-specific fields:
795      * - `metadata`: An empty [Struct
796      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
797      * - `response`:
798      * [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
799      * Note: You should always train an agent prior to sending it queries. See the
800      * [training
801      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
802      * </pre>
803      */
batchUpdateIntents( com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest request)804     public com.google.longrunning.Operation batchUpdateIntents(
805         com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest request) {
806       return io.grpc.stub.ClientCalls.blockingUnaryCall(
807           getChannel(), getBatchUpdateIntentsMethod(), getCallOptions(), request);
808     }
809 
810     /**
811      *
812      *
813      * <pre>
814      * Deletes intents in the specified agent.
815      * This method is a [long-running
816      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
817      * The returned `Operation` type has the following method-specific fields:
818      * - `metadata`: An empty [Struct
819      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
820      * - `response`: An [Empty
821      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
822      * Note: You should always train an agent prior to sending it queries. See the
823      * [training
824      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
825      * </pre>
826      */
batchDeleteIntents( com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest request)827     public com.google.longrunning.Operation batchDeleteIntents(
828         com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest request) {
829       return io.grpc.stub.ClientCalls.blockingUnaryCall(
830           getChannel(), getBatchDeleteIntentsMethod(), getCallOptions(), request);
831     }
832   }
833 
834   /**
835    * A stub to allow clients to do ListenableFuture-style rpc calls to service Intents.
836    *
837    * <pre>
838    * Service for managing [Intents][google.cloud.dialogflow.v2.Intent].
839    * </pre>
840    */
841   public static final class IntentsFutureStub
842       extends io.grpc.stub.AbstractFutureStub<IntentsFutureStub> {
IntentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)843     private IntentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
844       super(channel, callOptions);
845     }
846 
847     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)848     protected IntentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
849       return new IntentsFutureStub(channel, callOptions);
850     }
851 
852     /**
853      *
854      *
855      * <pre>
856      * Returns the list of all intents in the specified agent.
857      * </pre>
858      */
859     public com.google.common.util.concurrent.ListenableFuture<
860             com.google.cloud.dialogflow.v2.ListIntentsResponse>
listIntents(com.google.cloud.dialogflow.v2.ListIntentsRequest request)861         listIntents(com.google.cloud.dialogflow.v2.ListIntentsRequest request) {
862       return io.grpc.stub.ClientCalls.futureUnaryCall(
863           getChannel().newCall(getListIntentsMethod(), getCallOptions()), request);
864     }
865 
866     /**
867      *
868      *
869      * <pre>
870      * Retrieves the specified intent.
871      * </pre>
872      */
873     public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.dialogflow.v2.Intent>
getIntent(com.google.cloud.dialogflow.v2.GetIntentRequest request)874         getIntent(com.google.cloud.dialogflow.v2.GetIntentRequest request) {
875       return io.grpc.stub.ClientCalls.futureUnaryCall(
876           getChannel().newCall(getGetIntentMethod(), getCallOptions()), request);
877     }
878 
879     /**
880      *
881      *
882      * <pre>
883      * Creates an intent in the specified agent.
884      * Note: You should always train an agent prior to sending it queries. See the
885      * [training
886      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
887      * </pre>
888      */
889     public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.dialogflow.v2.Intent>
createIntent(com.google.cloud.dialogflow.v2.CreateIntentRequest request)890         createIntent(com.google.cloud.dialogflow.v2.CreateIntentRequest request) {
891       return io.grpc.stub.ClientCalls.futureUnaryCall(
892           getChannel().newCall(getCreateIntentMethod(), getCallOptions()), request);
893     }
894 
895     /**
896      *
897      *
898      * <pre>
899      * Updates the specified intent.
900      * Note: You should always train an agent prior to sending it queries. See the
901      * [training
902      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
903      * </pre>
904      */
905     public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.dialogflow.v2.Intent>
updateIntent(com.google.cloud.dialogflow.v2.UpdateIntentRequest request)906         updateIntent(com.google.cloud.dialogflow.v2.UpdateIntentRequest request) {
907       return io.grpc.stub.ClientCalls.futureUnaryCall(
908           getChannel().newCall(getUpdateIntentMethod(), getCallOptions()), request);
909     }
910 
911     /**
912      *
913      *
914      * <pre>
915      * Deletes the specified intent and its direct or indirect followup intents.
916      * Note: You should always train an agent prior to sending it queries. See the
917      * [training
918      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
919      * </pre>
920      */
921     public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>
deleteIntent(com.google.cloud.dialogflow.v2.DeleteIntentRequest request)922         deleteIntent(com.google.cloud.dialogflow.v2.DeleteIntentRequest request) {
923       return io.grpc.stub.ClientCalls.futureUnaryCall(
924           getChannel().newCall(getDeleteIntentMethod(), getCallOptions()), request);
925     }
926 
927     /**
928      *
929      *
930      * <pre>
931      * Updates/Creates multiple intents in the specified agent.
932      * This method is a [long-running
933      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
934      * The returned `Operation` type has the following method-specific fields:
935      * - `metadata`: An empty [Struct
936      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
937      * - `response`:
938      * [BatchUpdateIntentsResponse][google.cloud.dialogflow.v2.BatchUpdateIntentsResponse]
939      * Note: You should always train an agent prior to sending it queries. See the
940      * [training
941      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
942      * </pre>
943      */
944     public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>
batchUpdateIntents(com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest request)945         batchUpdateIntents(com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest request) {
946       return io.grpc.stub.ClientCalls.futureUnaryCall(
947           getChannel().newCall(getBatchUpdateIntentsMethod(), getCallOptions()), request);
948     }
949 
950     /**
951      *
952      *
953      * <pre>
954      * Deletes intents in the specified agent.
955      * This method is a [long-running
956      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
957      * The returned `Operation` type has the following method-specific fields:
958      * - `metadata`: An empty [Struct
959      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
960      * - `response`: An [Empty
961      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
962      * Note: You should always train an agent prior to sending it queries. See the
963      * [training
964      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
965      * </pre>
966      */
967     public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>
batchDeleteIntents(com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest request)968         batchDeleteIntents(com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest request) {
969       return io.grpc.stub.ClientCalls.futureUnaryCall(
970           getChannel().newCall(getBatchDeleteIntentsMethod(), getCallOptions()), request);
971     }
972   }
973 
974   private static final int METHODID_LIST_INTENTS = 0;
975   private static final int METHODID_GET_INTENT = 1;
976   private static final int METHODID_CREATE_INTENT = 2;
977   private static final int METHODID_UPDATE_INTENT = 3;
978   private static final int METHODID_DELETE_INTENT = 4;
979   private static final int METHODID_BATCH_UPDATE_INTENTS = 5;
980   private static final int METHODID_BATCH_DELETE_INTENTS = 6;
981 
982   private static final class MethodHandlers<Req, Resp>
983       implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
984           io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
985           io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
986           io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
987     private final AsyncService serviceImpl;
988     private final int methodId;
989 
MethodHandlers(AsyncService serviceImpl, int methodId)990     MethodHandlers(AsyncService serviceImpl, int methodId) {
991       this.serviceImpl = serviceImpl;
992       this.methodId = methodId;
993     }
994 
995     @java.lang.Override
996     @java.lang.SuppressWarnings("unchecked")
invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver)997     public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
998       switch (methodId) {
999         case METHODID_LIST_INTENTS:
1000           serviceImpl.listIntents(
1001               (com.google.cloud.dialogflow.v2.ListIntentsRequest) request,
1002               (io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.ListIntentsResponse>)
1003                   responseObserver);
1004           break;
1005         case METHODID_GET_INTENT:
1006           serviceImpl.getIntent(
1007               (com.google.cloud.dialogflow.v2.GetIntentRequest) request,
1008               (io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent>)
1009                   responseObserver);
1010           break;
1011         case METHODID_CREATE_INTENT:
1012           serviceImpl.createIntent(
1013               (com.google.cloud.dialogflow.v2.CreateIntentRequest) request,
1014               (io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent>)
1015                   responseObserver);
1016           break;
1017         case METHODID_UPDATE_INTENT:
1018           serviceImpl.updateIntent(
1019               (com.google.cloud.dialogflow.v2.UpdateIntentRequest) request,
1020               (io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Intent>)
1021                   responseObserver);
1022           break;
1023         case METHODID_DELETE_INTENT:
1024           serviceImpl.deleteIntent(
1025               (com.google.cloud.dialogflow.v2.DeleteIntentRequest) request,
1026               (io.grpc.stub.StreamObserver<com.google.protobuf.Empty>) responseObserver);
1027           break;
1028         case METHODID_BATCH_UPDATE_INTENTS:
1029           serviceImpl.batchUpdateIntents(
1030               (com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest) request,
1031               (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver);
1032           break;
1033         case METHODID_BATCH_DELETE_INTENTS:
1034           serviceImpl.batchDeleteIntents(
1035               (com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest) request,
1036               (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver);
1037           break;
1038         default:
1039           throw new AssertionError();
1040       }
1041     }
1042 
1043     @java.lang.Override
1044     @java.lang.SuppressWarnings("unchecked")
invoke( io.grpc.stub.StreamObserver<Resp> responseObserver)1045     public io.grpc.stub.StreamObserver<Req> invoke(
1046         io.grpc.stub.StreamObserver<Resp> responseObserver) {
1047       switch (methodId) {
1048         default:
1049           throw new AssertionError();
1050       }
1051     }
1052   }
1053 
bindService(AsyncService service)1054   public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
1055     return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
1056         .addMethod(
1057             getListIntentsMethod(),
1058             io.grpc.stub.ServerCalls.asyncUnaryCall(
1059                 new MethodHandlers<
1060                     com.google.cloud.dialogflow.v2.ListIntentsRequest,
1061                     com.google.cloud.dialogflow.v2.ListIntentsResponse>(
1062                     service, METHODID_LIST_INTENTS)))
1063         .addMethod(
1064             getGetIntentMethod(),
1065             io.grpc.stub.ServerCalls.asyncUnaryCall(
1066                 new MethodHandlers<
1067                     com.google.cloud.dialogflow.v2.GetIntentRequest,
1068                     com.google.cloud.dialogflow.v2.Intent>(service, METHODID_GET_INTENT)))
1069         .addMethod(
1070             getCreateIntentMethod(),
1071             io.grpc.stub.ServerCalls.asyncUnaryCall(
1072                 new MethodHandlers<
1073                     com.google.cloud.dialogflow.v2.CreateIntentRequest,
1074                     com.google.cloud.dialogflow.v2.Intent>(service, METHODID_CREATE_INTENT)))
1075         .addMethod(
1076             getUpdateIntentMethod(),
1077             io.grpc.stub.ServerCalls.asyncUnaryCall(
1078                 new MethodHandlers<
1079                     com.google.cloud.dialogflow.v2.UpdateIntentRequest,
1080                     com.google.cloud.dialogflow.v2.Intent>(service, METHODID_UPDATE_INTENT)))
1081         .addMethod(
1082             getDeleteIntentMethod(),
1083             io.grpc.stub.ServerCalls.asyncUnaryCall(
1084                 new MethodHandlers<
1085                     com.google.cloud.dialogflow.v2.DeleteIntentRequest, com.google.protobuf.Empty>(
1086                     service, METHODID_DELETE_INTENT)))
1087         .addMethod(
1088             getBatchUpdateIntentsMethod(),
1089             io.grpc.stub.ServerCalls.asyncUnaryCall(
1090                 new MethodHandlers<
1091                     com.google.cloud.dialogflow.v2.BatchUpdateIntentsRequest,
1092                     com.google.longrunning.Operation>(service, METHODID_BATCH_UPDATE_INTENTS)))
1093         .addMethod(
1094             getBatchDeleteIntentsMethod(),
1095             io.grpc.stub.ServerCalls.asyncUnaryCall(
1096                 new MethodHandlers<
1097                     com.google.cloud.dialogflow.v2.BatchDeleteIntentsRequest,
1098                     com.google.longrunning.Operation>(service, METHODID_BATCH_DELETE_INTENTS)))
1099         .build();
1100   }
1101 
1102   private abstract static class IntentsBaseDescriptorSupplier
1103       implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
1104           io.grpc.protobuf.ProtoServiceDescriptorSupplier {
IntentsBaseDescriptorSupplier()1105     IntentsBaseDescriptorSupplier() {}
1106 
1107     @java.lang.Override
getFileDescriptor()1108     public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
1109       return com.google.cloud.dialogflow.v2.IntentProto.getDescriptor();
1110     }
1111 
1112     @java.lang.Override
getServiceDescriptor()1113     public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
1114       return getFileDescriptor().findServiceByName("Intents");
1115     }
1116   }
1117 
1118   private static final class IntentsFileDescriptorSupplier extends IntentsBaseDescriptorSupplier {
IntentsFileDescriptorSupplier()1119     IntentsFileDescriptorSupplier() {}
1120   }
1121 
1122   private static final class IntentsMethodDescriptorSupplier extends IntentsBaseDescriptorSupplier
1123       implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
1124     private final String methodName;
1125 
IntentsMethodDescriptorSupplier(String methodName)1126     IntentsMethodDescriptorSupplier(String methodName) {
1127       this.methodName = methodName;
1128     }
1129 
1130     @java.lang.Override
getMethodDescriptor()1131     public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
1132       return getServiceDescriptor().findMethodByName(methodName);
1133     }
1134   }
1135 
1136   private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
1137 
getServiceDescriptor()1138   public static io.grpc.ServiceDescriptor getServiceDescriptor() {
1139     io.grpc.ServiceDescriptor result = serviceDescriptor;
1140     if (result == null) {
1141       synchronized (IntentsGrpc.class) {
1142         result = serviceDescriptor;
1143         if (result == null) {
1144           serviceDescriptor =
1145               result =
1146                   io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
1147                       .setSchemaDescriptor(new IntentsFileDescriptorSupplier())
1148                       .addMethod(getListIntentsMethod())
1149                       .addMethod(getGetIntentMethod())
1150                       .addMethod(getCreateIntentMethod())
1151                       .addMethod(getUpdateIntentMethod())
1152                       .addMethod(getDeleteIntentMethod())
1153                       .addMethod(getBatchUpdateIntentsMethod())
1154                       .addMethod(getBatchDeleteIntentsMethod())
1155                       .build();
1156         }
1157       }
1158     }
1159     return result;
1160   }
1161 }
1162