• 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 [Agents][google.cloud.dialogflow.v2.Agent].
25  * </pre>
26  */
27 @javax.annotation.Generated(
28     value = "by gRPC proto compiler",
29     comments = "Source: google/cloud/dialogflow/v2/agent.proto")
30 @io.grpc.stub.annotations.GrpcGenerated
31 public final class AgentsGrpc {
32 
AgentsGrpc()33   private AgentsGrpc() {}
34 
35   public static final String SERVICE_NAME = "google.cloud.dialogflow.v2.Agents";
36 
37   // Static method descriptors that strictly reflect the proto.
38   private static volatile io.grpc.MethodDescriptor<
39           com.google.cloud.dialogflow.v2.GetAgentRequest, com.google.cloud.dialogflow.v2.Agent>
40       getGetAgentMethod;
41 
42   @io.grpc.stub.annotations.RpcMethod(
43       fullMethodName = SERVICE_NAME + '/' + "GetAgent",
44       requestType = com.google.cloud.dialogflow.v2.GetAgentRequest.class,
45       responseType = com.google.cloud.dialogflow.v2.Agent.class,
46       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
47   public static io.grpc.MethodDescriptor<
48           com.google.cloud.dialogflow.v2.GetAgentRequest, com.google.cloud.dialogflow.v2.Agent>
getGetAgentMethod()49       getGetAgentMethod() {
50     io.grpc.MethodDescriptor<
51             com.google.cloud.dialogflow.v2.GetAgentRequest, com.google.cloud.dialogflow.v2.Agent>
52         getGetAgentMethod;
53     if ((getGetAgentMethod = AgentsGrpc.getGetAgentMethod) == null) {
54       synchronized (AgentsGrpc.class) {
55         if ((getGetAgentMethod = AgentsGrpc.getGetAgentMethod) == null) {
56           AgentsGrpc.getGetAgentMethod =
57               getGetAgentMethod =
58                   io.grpc.MethodDescriptor
59                       .<com.google.cloud.dialogflow.v2.GetAgentRequest,
60                           com.google.cloud.dialogflow.v2.Agent>
61                           newBuilder()
62                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
63                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAgent"))
64                       .setSampledToLocalTracing(true)
65                       .setRequestMarshaller(
66                           io.grpc.protobuf.ProtoUtils.marshaller(
67                               com.google.cloud.dialogflow.v2.GetAgentRequest.getDefaultInstance()))
68                       .setResponseMarshaller(
69                           io.grpc.protobuf.ProtoUtils.marshaller(
70                               com.google.cloud.dialogflow.v2.Agent.getDefaultInstance()))
71                       .setSchemaDescriptor(new AgentsMethodDescriptorSupplier("GetAgent"))
72                       .build();
73         }
74       }
75     }
76     return getGetAgentMethod;
77   }
78 
79   private static volatile io.grpc.MethodDescriptor<
80           com.google.cloud.dialogflow.v2.SetAgentRequest, com.google.cloud.dialogflow.v2.Agent>
81       getSetAgentMethod;
82 
83   @io.grpc.stub.annotations.RpcMethod(
84       fullMethodName = SERVICE_NAME + '/' + "SetAgent",
85       requestType = com.google.cloud.dialogflow.v2.SetAgentRequest.class,
86       responseType = com.google.cloud.dialogflow.v2.Agent.class,
87       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
88   public static io.grpc.MethodDescriptor<
89           com.google.cloud.dialogflow.v2.SetAgentRequest, com.google.cloud.dialogflow.v2.Agent>
getSetAgentMethod()90       getSetAgentMethod() {
91     io.grpc.MethodDescriptor<
92             com.google.cloud.dialogflow.v2.SetAgentRequest, com.google.cloud.dialogflow.v2.Agent>
93         getSetAgentMethod;
94     if ((getSetAgentMethod = AgentsGrpc.getSetAgentMethod) == null) {
95       synchronized (AgentsGrpc.class) {
96         if ((getSetAgentMethod = AgentsGrpc.getSetAgentMethod) == null) {
97           AgentsGrpc.getSetAgentMethod =
98               getSetAgentMethod =
99                   io.grpc.MethodDescriptor
100                       .<com.google.cloud.dialogflow.v2.SetAgentRequest,
101                           com.google.cloud.dialogflow.v2.Agent>
102                           newBuilder()
103                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
104                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SetAgent"))
105                       .setSampledToLocalTracing(true)
106                       .setRequestMarshaller(
107                           io.grpc.protobuf.ProtoUtils.marshaller(
108                               com.google.cloud.dialogflow.v2.SetAgentRequest.getDefaultInstance()))
109                       .setResponseMarshaller(
110                           io.grpc.protobuf.ProtoUtils.marshaller(
111                               com.google.cloud.dialogflow.v2.Agent.getDefaultInstance()))
112                       .setSchemaDescriptor(new AgentsMethodDescriptorSupplier("SetAgent"))
113                       .build();
114         }
115       }
116     }
117     return getSetAgentMethod;
118   }
119 
120   private static volatile io.grpc.MethodDescriptor<
121           com.google.cloud.dialogflow.v2.DeleteAgentRequest, com.google.protobuf.Empty>
122       getDeleteAgentMethod;
123 
124   @io.grpc.stub.annotations.RpcMethod(
125       fullMethodName = SERVICE_NAME + '/' + "DeleteAgent",
126       requestType = com.google.cloud.dialogflow.v2.DeleteAgentRequest.class,
127       responseType = com.google.protobuf.Empty.class,
128       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
129   public static io.grpc.MethodDescriptor<
130           com.google.cloud.dialogflow.v2.DeleteAgentRequest, com.google.protobuf.Empty>
getDeleteAgentMethod()131       getDeleteAgentMethod() {
132     io.grpc.MethodDescriptor<
133             com.google.cloud.dialogflow.v2.DeleteAgentRequest, com.google.protobuf.Empty>
134         getDeleteAgentMethod;
135     if ((getDeleteAgentMethod = AgentsGrpc.getDeleteAgentMethod) == null) {
136       synchronized (AgentsGrpc.class) {
137         if ((getDeleteAgentMethod = AgentsGrpc.getDeleteAgentMethod) == null) {
138           AgentsGrpc.getDeleteAgentMethod =
139               getDeleteAgentMethod =
140                   io.grpc.MethodDescriptor
141                       .<com.google.cloud.dialogflow.v2.DeleteAgentRequest,
142                           com.google.protobuf.Empty>
143                           newBuilder()
144                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
145                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAgent"))
146                       .setSampledToLocalTracing(true)
147                       .setRequestMarshaller(
148                           io.grpc.protobuf.ProtoUtils.marshaller(
149                               com.google.cloud.dialogflow.v2.DeleteAgentRequest
150                                   .getDefaultInstance()))
151                       .setResponseMarshaller(
152                           io.grpc.protobuf.ProtoUtils.marshaller(
153                               com.google.protobuf.Empty.getDefaultInstance()))
154                       .setSchemaDescriptor(new AgentsMethodDescriptorSupplier("DeleteAgent"))
155                       .build();
156         }
157       }
158     }
159     return getDeleteAgentMethod;
160   }
161 
162   private static volatile io.grpc.MethodDescriptor<
163           com.google.cloud.dialogflow.v2.SearchAgentsRequest,
164           com.google.cloud.dialogflow.v2.SearchAgentsResponse>
165       getSearchAgentsMethod;
166 
167   @io.grpc.stub.annotations.RpcMethod(
168       fullMethodName = SERVICE_NAME + '/' + "SearchAgents",
169       requestType = com.google.cloud.dialogflow.v2.SearchAgentsRequest.class,
170       responseType = com.google.cloud.dialogflow.v2.SearchAgentsResponse.class,
171       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
172   public static io.grpc.MethodDescriptor<
173           com.google.cloud.dialogflow.v2.SearchAgentsRequest,
174           com.google.cloud.dialogflow.v2.SearchAgentsResponse>
getSearchAgentsMethod()175       getSearchAgentsMethod() {
176     io.grpc.MethodDescriptor<
177             com.google.cloud.dialogflow.v2.SearchAgentsRequest,
178             com.google.cloud.dialogflow.v2.SearchAgentsResponse>
179         getSearchAgentsMethod;
180     if ((getSearchAgentsMethod = AgentsGrpc.getSearchAgentsMethod) == null) {
181       synchronized (AgentsGrpc.class) {
182         if ((getSearchAgentsMethod = AgentsGrpc.getSearchAgentsMethod) == null) {
183           AgentsGrpc.getSearchAgentsMethod =
184               getSearchAgentsMethod =
185                   io.grpc.MethodDescriptor
186                       .<com.google.cloud.dialogflow.v2.SearchAgentsRequest,
187                           com.google.cloud.dialogflow.v2.SearchAgentsResponse>
188                           newBuilder()
189                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
190                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SearchAgents"))
191                       .setSampledToLocalTracing(true)
192                       .setRequestMarshaller(
193                           io.grpc.protobuf.ProtoUtils.marshaller(
194                               com.google.cloud.dialogflow.v2.SearchAgentsRequest
195                                   .getDefaultInstance()))
196                       .setResponseMarshaller(
197                           io.grpc.protobuf.ProtoUtils.marshaller(
198                               com.google.cloud.dialogflow.v2.SearchAgentsResponse
199                                   .getDefaultInstance()))
200                       .setSchemaDescriptor(new AgentsMethodDescriptorSupplier("SearchAgents"))
201                       .build();
202         }
203       }
204     }
205     return getSearchAgentsMethod;
206   }
207 
208   private static volatile io.grpc.MethodDescriptor<
209           com.google.cloud.dialogflow.v2.TrainAgentRequest, com.google.longrunning.Operation>
210       getTrainAgentMethod;
211 
212   @io.grpc.stub.annotations.RpcMethod(
213       fullMethodName = SERVICE_NAME + '/' + "TrainAgent",
214       requestType = com.google.cloud.dialogflow.v2.TrainAgentRequest.class,
215       responseType = com.google.longrunning.Operation.class,
216       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
217   public static io.grpc.MethodDescriptor<
218           com.google.cloud.dialogflow.v2.TrainAgentRequest, com.google.longrunning.Operation>
getTrainAgentMethod()219       getTrainAgentMethod() {
220     io.grpc.MethodDescriptor<
221             com.google.cloud.dialogflow.v2.TrainAgentRequest, com.google.longrunning.Operation>
222         getTrainAgentMethod;
223     if ((getTrainAgentMethod = AgentsGrpc.getTrainAgentMethod) == null) {
224       synchronized (AgentsGrpc.class) {
225         if ((getTrainAgentMethod = AgentsGrpc.getTrainAgentMethod) == null) {
226           AgentsGrpc.getTrainAgentMethod =
227               getTrainAgentMethod =
228                   io.grpc.MethodDescriptor
229                       .<com.google.cloud.dialogflow.v2.TrainAgentRequest,
230                           com.google.longrunning.Operation>
231                           newBuilder()
232                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
233                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TrainAgent"))
234                       .setSampledToLocalTracing(true)
235                       .setRequestMarshaller(
236                           io.grpc.protobuf.ProtoUtils.marshaller(
237                               com.google.cloud.dialogflow.v2.TrainAgentRequest
238                                   .getDefaultInstance()))
239                       .setResponseMarshaller(
240                           io.grpc.protobuf.ProtoUtils.marshaller(
241                               com.google.longrunning.Operation.getDefaultInstance()))
242                       .setSchemaDescriptor(new AgentsMethodDescriptorSupplier("TrainAgent"))
243                       .build();
244         }
245       }
246     }
247     return getTrainAgentMethod;
248   }
249 
250   private static volatile io.grpc.MethodDescriptor<
251           com.google.cloud.dialogflow.v2.ExportAgentRequest, com.google.longrunning.Operation>
252       getExportAgentMethod;
253 
254   @io.grpc.stub.annotations.RpcMethod(
255       fullMethodName = SERVICE_NAME + '/' + "ExportAgent",
256       requestType = com.google.cloud.dialogflow.v2.ExportAgentRequest.class,
257       responseType = com.google.longrunning.Operation.class,
258       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
259   public static io.grpc.MethodDescriptor<
260           com.google.cloud.dialogflow.v2.ExportAgentRequest, com.google.longrunning.Operation>
getExportAgentMethod()261       getExportAgentMethod() {
262     io.grpc.MethodDescriptor<
263             com.google.cloud.dialogflow.v2.ExportAgentRequest, com.google.longrunning.Operation>
264         getExportAgentMethod;
265     if ((getExportAgentMethod = AgentsGrpc.getExportAgentMethod) == null) {
266       synchronized (AgentsGrpc.class) {
267         if ((getExportAgentMethod = AgentsGrpc.getExportAgentMethod) == null) {
268           AgentsGrpc.getExportAgentMethod =
269               getExportAgentMethod =
270                   io.grpc.MethodDescriptor
271                       .<com.google.cloud.dialogflow.v2.ExportAgentRequest,
272                           com.google.longrunning.Operation>
273                           newBuilder()
274                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
275                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportAgent"))
276                       .setSampledToLocalTracing(true)
277                       .setRequestMarshaller(
278                           io.grpc.protobuf.ProtoUtils.marshaller(
279                               com.google.cloud.dialogflow.v2.ExportAgentRequest
280                                   .getDefaultInstance()))
281                       .setResponseMarshaller(
282                           io.grpc.protobuf.ProtoUtils.marshaller(
283                               com.google.longrunning.Operation.getDefaultInstance()))
284                       .setSchemaDescriptor(new AgentsMethodDescriptorSupplier("ExportAgent"))
285                       .build();
286         }
287       }
288     }
289     return getExportAgentMethod;
290   }
291 
292   private static volatile io.grpc.MethodDescriptor<
293           com.google.cloud.dialogflow.v2.ImportAgentRequest, com.google.longrunning.Operation>
294       getImportAgentMethod;
295 
296   @io.grpc.stub.annotations.RpcMethod(
297       fullMethodName = SERVICE_NAME + '/' + "ImportAgent",
298       requestType = com.google.cloud.dialogflow.v2.ImportAgentRequest.class,
299       responseType = com.google.longrunning.Operation.class,
300       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
301   public static io.grpc.MethodDescriptor<
302           com.google.cloud.dialogflow.v2.ImportAgentRequest, com.google.longrunning.Operation>
getImportAgentMethod()303       getImportAgentMethod() {
304     io.grpc.MethodDescriptor<
305             com.google.cloud.dialogflow.v2.ImportAgentRequest, com.google.longrunning.Operation>
306         getImportAgentMethod;
307     if ((getImportAgentMethod = AgentsGrpc.getImportAgentMethod) == null) {
308       synchronized (AgentsGrpc.class) {
309         if ((getImportAgentMethod = AgentsGrpc.getImportAgentMethod) == null) {
310           AgentsGrpc.getImportAgentMethod =
311               getImportAgentMethod =
312                   io.grpc.MethodDescriptor
313                       .<com.google.cloud.dialogflow.v2.ImportAgentRequest,
314                           com.google.longrunning.Operation>
315                           newBuilder()
316                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
317                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportAgent"))
318                       .setSampledToLocalTracing(true)
319                       .setRequestMarshaller(
320                           io.grpc.protobuf.ProtoUtils.marshaller(
321                               com.google.cloud.dialogflow.v2.ImportAgentRequest
322                                   .getDefaultInstance()))
323                       .setResponseMarshaller(
324                           io.grpc.protobuf.ProtoUtils.marshaller(
325                               com.google.longrunning.Operation.getDefaultInstance()))
326                       .setSchemaDescriptor(new AgentsMethodDescriptorSupplier("ImportAgent"))
327                       .build();
328         }
329       }
330     }
331     return getImportAgentMethod;
332   }
333 
334   private static volatile io.grpc.MethodDescriptor<
335           com.google.cloud.dialogflow.v2.RestoreAgentRequest, com.google.longrunning.Operation>
336       getRestoreAgentMethod;
337 
338   @io.grpc.stub.annotations.RpcMethod(
339       fullMethodName = SERVICE_NAME + '/' + "RestoreAgent",
340       requestType = com.google.cloud.dialogflow.v2.RestoreAgentRequest.class,
341       responseType = com.google.longrunning.Operation.class,
342       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
343   public static io.grpc.MethodDescriptor<
344           com.google.cloud.dialogflow.v2.RestoreAgentRequest, com.google.longrunning.Operation>
getRestoreAgentMethod()345       getRestoreAgentMethod() {
346     io.grpc.MethodDescriptor<
347             com.google.cloud.dialogflow.v2.RestoreAgentRequest, com.google.longrunning.Operation>
348         getRestoreAgentMethod;
349     if ((getRestoreAgentMethod = AgentsGrpc.getRestoreAgentMethod) == null) {
350       synchronized (AgentsGrpc.class) {
351         if ((getRestoreAgentMethod = AgentsGrpc.getRestoreAgentMethod) == null) {
352           AgentsGrpc.getRestoreAgentMethod =
353               getRestoreAgentMethod =
354                   io.grpc.MethodDescriptor
355                       .<com.google.cloud.dialogflow.v2.RestoreAgentRequest,
356                           com.google.longrunning.Operation>
357                           newBuilder()
358                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
359                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "RestoreAgent"))
360                       .setSampledToLocalTracing(true)
361                       .setRequestMarshaller(
362                           io.grpc.protobuf.ProtoUtils.marshaller(
363                               com.google.cloud.dialogflow.v2.RestoreAgentRequest
364                                   .getDefaultInstance()))
365                       .setResponseMarshaller(
366                           io.grpc.protobuf.ProtoUtils.marshaller(
367                               com.google.longrunning.Operation.getDefaultInstance()))
368                       .setSchemaDescriptor(new AgentsMethodDescriptorSupplier("RestoreAgent"))
369                       .build();
370         }
371       }
372     }
373     return getRestoreAgentMethod;
374   }
375 
376   private static volatile io.grpc.MethodDescriptor<
377           com.google.cloud.dialogflow.v2.GetValidationResultRequest,
378           com.google.cloud.dialogflow.v2.ValidationResult>
379       getGetValidationResultMethod;
380 
381   @io.grpc.stub.annotations.RpcMethod(
382       fullMethodName = SERVICE_NAME + '/' + "GetValidationResult",
383       requestType = com.google.cloud.dialogflow.v2.GetValidationResultRequest.class,
384       responseType = com.google.cloud.dialogflow.v2.ValidationResult.class,
385       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
386   public static io.grpc.MethodDescriptor<
387           com.google.cloud.dialogflow.v2.GetValidationResultRequest,
388           com.google.cloud.dialogflow.v2.ValidationResult>
getGetValidationResultMethod()389       getGetValidationResultMethod() {
390     io.grpc.MethodDescriptor<
391             com.google.cloud.dialogflow.v2.GetValidationResultRequest,
392             com.google.cloud.dialogflow.v2.ValidationResult>
393         getGetValidationResultMethod;
394     if ((getGetValidationResultMethod = AgentsGrpc.getGetValidationResultMethod) == null) {
395       synchronized (AgentsGrpc.class) {
396         if ((getGetValidationResultMethod = AgentsGrpc.getGetValidationResultMethod) == null) {
397           AgentsGrpc.getGetValidationResultMethod =
398               getGetValidationResultMethod =
399                   io.grpc.MethodDescriptor
400                       .<com.google.cloud.dialogflow.v2.GetValidationResultRequest,
401                           com.google.cloud.dialogflow.v2.ValidationResult>
402                           newBuilder()
403                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
404                       .setFullMethodName(
405                           generateFullMethodName(SERVICE_NAME, "GetValidationResult"))
406                       .setSampledToLocalTracing(true)
407                       .setRequestMarshaller(
408                           io.grpc.protobuf.ProtoUtils.marshaller(
409                               com.google.cloud.dialogflow.v2.GetValidationResultRequest
410                                   .getDefaultInstance()))
411                       .setResponseMarshaller(
412                           io.grpc.protobuf.ProtoUtils.marshaller(
413                               com.google.cloud.dialogflow.v2.ValidationResult.getDefaultInstance()))
414                       .setSchemaDescriptor(
415                           new AgentsMethodDescriptorSupplier("GetValidationResult"))
416                       .build();
417         }
418       }
419     }
420     return getGetValidationResultMethod;
421   }
422 
423   /** Creates a new async stub that supports all call types for the service */
newStub(io.grpc.Channel channel)424   public static AgentsStub newStub(io.grpc.Channel channel) {
425     io.grpc.stub.AbstractStub.StubFactory<AgentsStub> factory =
426         new io.grpc.stub.AbstractStub.StubFactory<AgentsStub>() {
427           @java.lang.Override
428           public AgentsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
429             return new AgentsStub(channel, callOptions);
430           }
431         };
432     return AgentsStub.newStub(factory, channel);
433   }
434 
435   /**
436    * Creates a new blocking-style stub that supports unary and streaming output calls on the service
437    */
newBlockingStub(io.grpc.Channel channel)438   public static AgentsBlockingStub newBlockingStub(io.grpc.Channel channel) {
439     io.grpc.stub.AbstractStub.StubFactory<AgentsBlockingStub> factory =
440         new io.grpc.stub.AbstractStub.StubFactory<AgentsBlockingStub>() {
441           @java.lang.Override
442           public AgentsBlockingStub newStub(
443               io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
444             return new AgentsBlockingStub(channel, callOptions);
445           }
446         };
447     return AgentsBlockingStub.newStub(factory, channel);
448   }
449 
450   /** Creates a new ListenableFuture-style stub that supports unary calls on the service */
newFutureStub(io.grpc.Channel channel)451   public static AgentsFutureStub newFutureStub(io.grpc.Channel channel) {
452     io.grpc.stub.AbstractStub.StubFactory<AgentsFutureStub> factory =
453         new io.grpc.stub.AbstractStub.StubFactory<AgentsFutureStub>() {
454           @java.lang.Override
455           public AgentsFutureStub newStub(
456               io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
457             return new AgentsFutureStub(channel, callOptions);
458           }
459         };
460     return AgentsFutureStub.newStub(factory, channel);
461   }
462 
463   /**
464    *
465    *
466    * <pre>
467    * Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
468    * </pre>
469    */
470   public interface AsyncService {
471 
472     /**
473      *
474      *
475      * <pre>
476      * Retrieves the specified agent.
477      * </pre>
478      */
getAgent( com.google.cloud.dialogflow.v2.GetAgentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Agent> responseObserver)479     default void getAgent(
480         com.google.cloud.dialogflow.v2.GetAgentRequest request,
481         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Agent> responseObserver) {
482       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAgentMethod(), responseObserver);
483     }
484 
485     /**
486      *
487      *
488      * <pre>
489      * Creates/updates the specified agent.
490      * Note: You should always train an agent prior to sending it queries. See the
491      * [training
492      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
493      * </pre>
494      */
setAgent( com.google.cloud.dialogflow.v2.SetAgentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Agent> responseObserver)495     default void setAgent(
496         com.google.cloud.dialogflow.v2.SetAgentRequest request,
497         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Agent> responseObserver) {
498       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetAgentMethod(), responseObserver);
499     }
500 
501     /**
502      *
503      *
504      * <pre>
505      * Deletes the specified agent.
506      * </pre>
507      */
deleteAgent( com.google.cloud.dialogflow.v2.DeleteAgentRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)508     default void deleteAgent(
509         com.google.cloud.dialogflow.v2.DeleteAgentRequest request,
510         io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
511       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
512           getDeleteAgentMethod(), responseObserver);
513     }
514 
515     /**
516      *
517      *
518      * <pre>
519      * Returns the list of agents.
520      * Since there is at most one conversational agent per project, this method is
521      * useful primarily for listing all agents across projects the caller has
522      * access to. One can achieve that with a wildcard project collection id "-".
523      * Refer to [List
524      * Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
525      * </pre>
526      */
searchAgents( com.google.cloud.dialogflow.v2.SearchAgentsRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.SearchAgentsResponse> responseObserver)527     default void searchAgents(
528         com.google.cloud.dialogflow.v2.SearchAgentsRequest request,
529         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.SearchAgentsResponse>
530             responseObserver) {
531       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
532           getSearchAgentsMethod(), responseObserver);
533     }
534 
535     /**
536      *
537      *
538      * <pre>
539      * Trains the specified agent.
540      * This method is a [long-running
541      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
542      * The returned `Operation` type has the following method-specific fields:
543      * - `metadata`: An empty [Struct
544      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
545      * - `response`: An [Empty
546      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
547      * Note: You should always train an agent prior to sending it queries. See the
548      * [training
549      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
550      * </pre>
551      */
trainAgent( com.google.cloud.dialogflow.v2.TrainAgentRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)552     default void trainAgent(
553         com.google.cloud.dialogflow.v2.TrainAgentRequest request,
554         io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
555       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTrainAgentMethod(), responseObserver);
556     }
557 
558     /**
559      *
560      *
561      * <pre>
562      * Exports the specified agent to a ZIP file.
563      * This method is a [long-running
564      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
565      * The returned `Operation` type has the following method-specific fields:
566      * - `metadata`: An empty [Struct
567      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
568      * - `response`:
569      * [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]
570      * </pre>
571      */
exportAgent( com.google.cloud.dialogflow.v2.ExportAgentRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)572     default void exportAgent(
573         com.google.cloud.dialogflow.v2.ExportAgentRequest request,
574         io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
575       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
576           getExportAgentMethod(), responseObserver);
577     }
578 
579     /**
580      *
581      *
582      * <pre>
583      * Imports the specified agent from a ZIP file.
584      * Uploads new intents and entity types without deleting the existing ones.
585      * Intents and entity types with the same name are replaced with the new
586      * versions from
587      * [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After
588      * the import, the imported draft agent will be trained automatically (unless
589      * disabled in agent settings). However, once the import is done, training may
590      * not be completed yet. Please call
591      * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the
592      * operation it returns in order to train explicitly.
593      * This method is a [long-running
594      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
595      * The returned `Operation` type has the following method-specific fields:
596      * - `metadata`: An empty [Struct
597      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
598      * - `response`: An [Empty
599      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
600      * The operation only tracks when importing is complete, not when it is done
601      * training.
602      * Note: You should always train an agent prior to sending it queries. See the
603      * [training
604      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
605      * </pre>
606      */
importAgent( com.google.cloud.dialogflow.v2.ImportAgentRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)607     default void importAgent(
608         com.google.cloud.dialogflow.v2.ImportAgentRequest request,
609         io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
610       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
611           getImportAgentMethod(), responseObserver);
612     }
613 
614     /**
615      *
616      *
617      * <pre>
618      * Restores the specified agent from a ZIP file.
619      * Replaces the current agent version with a new one. All the intents and
620      * entity types in the older version are deleted. After the restore, the
621      * restored draft agent will be trained automatically (unless disabled in
622      * agent settings). However, once the restore is done, training may not be
623      * completed yet. Please call
624      * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the
625      * operation it returns in order to train explicitly.
626      * This method is a [long-running
627      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
628      * The returned `Operation` type has the following method-specific fields:
629      * - `metadata`: An empty [Struct
630      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
631      * - `response`: An [Empty
632      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
633      * The operation only tracks when restoring is complete, not when it is done
634      * training.
635      * Note: You should always train an agent prior to sending it queries. See the
636      * [training
637      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
638      * </pre>
639      */
restoreAgent( com.google.cloud.dialogflow.v2.RestoreAgentRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)640     default void restoreAgent(
641         com.google.cloud.dialogflow.v2.RestoreAgentRequest request,
642         io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
643       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
644           getRestoreAgentMethod(), responseObserver);
645     }
646 
647     /**
648      *
649      *
650      * <pre>
651      * Gets agent validation result. Agent validation is performed during
652      * training time and is updated automatically when training is completed.
653      * </pre>
654      */
getValidationResult( com.google.cloud.dialogflow.v2.GetValidationResultRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.ValidationResult> responseObserver)655     default void getValidationResult(
656         com.google.cloud.dialogflow.v2.GetValidationResultRequest request,
657         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.ValidationResult>
658             responseObserver) {
659       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
660           getGetValidationResultMethod(), responseObserver);
661     }
662   }
663 
664   /**
665    * Base class for the server implementation of the service Agents.
666    *
667    * <pre>
668    * Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
669    * </pre>
670    */
671   public abstract static class AgentsImplBase implements io.grpc.BindableService, AsyncService {
672 
673     @java.lang.Override
bindService()674     public final io.grpc.ServerServiceDefinition bindService() {
675       return AgentsGrpc.bindService(this);
676     }
677   }
678 
679   /**
680    * A stub to allow clients to do asynchronous rpc calls to service Agents.
681    *
682    * <pre>
683    * Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
684    * </pre>
685    */
686   public static final class AgentsStub extends io.grpc.stub.AbstractAsyncStub<AgentsStub> {
AgentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)687     private AgentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
688       super(channel, callOptions);
689     }
690 
691     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)692     protected AgentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
693       return new AgentsStub(channel, callOptions);
694     }
695 
696     /**
697      *
698      *
699      * <pre>
700      * Retrieves the specified agent.
701      * </pre>
702      */
getAgent( com.google.cloud.dialogflow.v2.GetAgentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Agent> responseObserver)703     public void getAgent(
704         com.google.cloud.dialogflow.v2.GetAgentRequest request,
705         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Agent> responseObserver) {
706       io.grpc.stub.ClientCalls.asyncUnaryCall(
707           getChannel().newCall(getGetAgentMethod(), getCallOptions()), request, responseObserver);
708     }
709 
710     /**
711      *
712      *
713      * <pre>
714      * Creates/updates the specified agent.
715      * Note: You should always train an agent prior to sending it queries. See the
716      * [training
717      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
718      * </pre>
719      */
setAgent( com.google.cloud.dialogflow.v2.SetAgentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Agent> responseObserver)720     public void setAgent(
721         com.google.cloud.dialogflow.v2.SetAgentRequest request,
722         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Agent> responseObserver) {
723       io.grpc.stub.ClientCalls.asyncUnaryCall(
724           getChannel().newCall(getSetAgentMethod(), getCallOptions()), request, responseObserver);
725     }
726 
727     /**
728      *
729      *
730      * <pre>
731      * Deletes the specified agent.
732      * </pre>
733      */
deleteAgent( com.google.cloud.dialogflow.v2.DeleteAgentRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)734     public void deleteAgent(
735         com.google.cloud.dialogflow.v2.DeleteAgentRequest request,
736         io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {
737       io.grpc.stub.ClientCalls.asyncUnaryCall(
738           getChannel().newCall(getDeleteAgentMethod(), getCallOptions()),
739           request,
740           responseObserver);
741     }
742 
743     /**
744      *
745      *
746      * <pre>
747      * Returns the list of agents.
748      * Since there is at most one conversational agent per project, this method is
749      * useful primarily for listing all agents across projects the caller has
750      * access to. One can achieve that with a wildcard project collection id "-".
751      * Refer to [List
752      * Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
753      * </pre>
754      */
searchAgents( com.google.cloud.dialogflow.v2.SearchAgentsRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.SearchAgentsResponse> responseObserver)755     public void searchAgents(
756         com.google.cloud.dialogflow.v2.SearchAgentsRequest request,
757         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.SearchAgentsResponse>
758             responseObserver) {
759       io.grpc.stub.ClientCalls.asyncUnaryCall(
760           getChannel().newCall(getSearchAgentsMethod(), getCallOptions()),
761           request,
762           responseObserver);
763     }
764 
765     /**
766      *
767      *
768      * <pre>
769      * Trains the specified agent.
770      * This method is a [long-running
771      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
772      * The returned `Operation` type has the following method-specific fields:
773      * - `metadata`: An empty [Struct
774      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
775      * - `response`: An [Empty
776      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
777      * Note: You should always train an agent prior to sending it queries. See the
778      * [training
779      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
780      * </pre>
781      */
trainAgent( com.google.cloud.dialogflow.v2.TrainAgentRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)782     public void trainAgent(
783         com.google.cloud.dialogflow.v2.TrainAgentRequest request,
784         io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
785       io.grpc.stub.ClientCalls.asyncUnaryCall(
786           getChannel().newCall(getTrainAgentMethod(), getCallOptions()), request, responseObserver);
787     }
788 
789     /**
790      *
791      *
792      * <pre>
793      * Exports the specified agent to a ZIP file.
794      * This method is a [long-running
795      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
796      * The returned `Operation` type has the following method-specific fields:
797      * - `metadata`: An empty [Struct
798      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
799      * - `response`:
800      * [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]
801      * </pre>
802      */
exportAgent( com.google.cloud.dialogflow.v2.ExportAgentRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)803     public void exportAgent(
804         com.google.cloud.dialogflow.v2.ExportAgentRequest request,
805         io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
806       io.grpc.stub.ClientCalls.asyncUnaryCall(
807           getChannel().newCall(getExportAgentMethod(), getCallOptions()),
808           request,
809           responseObserver);
810     }
811 
812     /**
813      *
814      *
815      * <pre>
816      * Imports the specified agent from a ZIP file.
817      * Uploads new intents and entity types without deleting the existing ones.
818      * Intents and entity types with the same name are replaced with the new
819      * versions from
820      * [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After
821      * the import, the imported draft agent will be trained automatically (unless
822      * disabled in agent settings). However, once the import is done, training may
823      * not be completed yet. Please call
824      * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the
825      * operation it returns in order to train explicitly.
826      * This method is a [long-running
827      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
828      * The returned `Operation` type has the following method-specific fields:
829      * - `metadata`: An empty [Struct
830      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
831      * - `response`: An [Empty
832      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
833      * The operation only tracks when importing is complete, not when it is done
834      * training.
835      * Note: You should always train an agent prior to sending it queries. See the
836      * [training
837      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
838      * </pre>
839      */
importAgent( com.google.cloud.dialogflow.v2.ImportAgentRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)840     public void importAgent(
841         com.google.cloud.dialogflow.v2.ImportAgentRequest request,
842         io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
843       io.grpc.stub.ClientCalls.asyncUnaryCall(
844           getChannel().newCall(getImportAgentMethod(), getCallOptions()),
845           request,
846           responseObserver);
847     }
848 
849     /**
850      *
851      *
852      * <pre>
853      * Restores the specified agent from a ZIP file.
854      * Replaces the current agent version with a new one. All the intents and
855      * entity types in the older version are deleted. After the restore, the
856      * restored draft agent will be trained automatically (unless disabled in
857      * agent settings). However, once the restore is done, training may not be
858      * completed yet. Please call
859      * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the
860      * operation it returns in order to train explicitly.
861      * This method is a [long-running
862      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
863      * The returned `Operation` type has the following method-specific fields:
864      * - `metadata`: An empty [Struct
865      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
866      * - `response`: An [Empty
867      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
868      * The operation only tracks when restoring is complete, not when it is done
869      * training.
870      * Note: You should always train an agent prior to sending it queries. See the
871      * [training
872      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
873      * </pre>
874      */
restoreAgent( com.google.cloud.dialogflow.v2.RestoreAgentRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)875     public void restoreAgent(
876         com.google.cloud.dialogflow.v2.RestoreAgentRequest request,
877         io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {
878       io.grpc.stub.ClientCalls.asyncUnaryCall(
879           getChannel().newCall(getRestoreAgentMethod(), getCallOptions()),
880           request,
881           responseObserver);
882     }
883 
884     /**
885      *
886      *
887      * <pre>
888      * Gets agent validation result. Agent validation is performed during
889      * training time and is updated automatically when training is completed.
890      * </pre>
891      */
getValidationResult( com.google.cloud.dialogflow.v2.GetValidationResultRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.ValidationResult> responseObserver)892     public void getValidationResult(
893         com.google.cloud.dialogflow.v2.GetValidationResultRequest request,
894         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.ValidationResult>
895             responseObserver) {
896       io.grpc.stub.ClientCalls.asyncUnaryCall(
897           getChannel().newCall(getGetValidationResultMethod(), getCallOptions()),
898           request,
899           responseObserver);
900     }
901   }
902 
903   /**
904    * A stub to allow clients to do synchronous rpc calls to service Agents.
905    *
906    * <pre>
907    * Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
908    * </pre>
909    */
910   public static final class AgentsBlockingStub
911       extends io.grpc.stub.AbstractBlockingStub<AgentsBlockingStub> {
AgentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)912     private AgentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
913       super(channel, callOptions);
914     }
915 
916     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)917     protected AgentsBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
918       return new AgentsBlockingStub(channel, callOptions);
919     }
920 
921     /**
922      *
923      *
924      * <pre>
925      * Retrieves the specified agent.
926      * </pre>
927      */
getAgent( com.google.cloud.dialogflow.v2.GetAgentRequest request)928     public com.google.cloud.dialogflow.v2.Agent getAgent(
929         com.google.cloud.dialogflow.v2.GetAgentRequest request) {
930       return io.grpc.stub.ClientCalls.blockingUnaryCall(
931           getChannel(), getGetAgentMethod(), getCallOptions(), request);
932     }
933 
934     /**
935      *
936      *
937      * <pre>
938      * Creates/updates the specified agent.
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      */
setAgent( com.google.cloud.dialogflow.v2.SetAgentRequest request)944     public com.google.cloud.dialogflow.v2.Agent setAgent(
945         com.google.cloud.dialogflow.v2.SetAgentRequest request) {
946       return io.grpc.stub.ClientCalls.blockingUnaryCall(
947           getChannel(), getSetAgentMethod(), getCallOptions(), request);
948     }
949 
950     /**
951      *
952      *
953      * <pre>
954      * Deletes the specified agent.
955      * </pre>
956      */
deleteAgent( com.google.cloud.dialogflow.v2.DeleteAgentRequest request)957     public com.google.protobuf.Empty deleteAgent(
958         com.google.cloud.dialogflow.v2.DeleteAgentRequest request) {
959       return io.grpc.stub.ClientCalls.blockingUnaryCall(
960           getChannel(), getDeleteAgentMethod(), getCallOptions(), request);
961     }
962 
963     /**
964      *
965      *
966      * <pre>
967      * Returns the list of agents.
968      * Since there is at most one conversational agent per project, this method is
969      * useful primarily for listing all agents across projects the caller has
970      * access to. One can achieve that with a wildcard project collection id "-".
971      * Refer to [List
972      * Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
973      * </pre>
974      */
searchAgents( com.google.cloud.dialogflow.v2.SearchAgentsRequest request)975     public com.google.cloud.dialogflow.v2.SearchAgentsResponse searchAgents(
976         com.google.cloud.dialogflow.v2.SearchAgentsRequest request) {
977       return io.grpc.stub.ClientCalls.blockingUnaryCall(
978           getChannel(), getSearchAgentsMethod(), getCallOptions(), request);
979     }
980 
981     /**
982      *
983      *
984      * <pre>
985      * Trains the specified agent.
986      * This method is a [long-running
987      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
988      * The returned `Operation` type has the following method-specific fields:
989      * - `metadata`: An empty [Struct
990      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
991      * - `response`: An [Empty
992      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
993      * Note: You should always train an agent prior to sending it queries. See the
994      * [training
995      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
996      * </pre>
997      */
trainAgent( com.google.cloud.dialogflow.v2.TrainAgentRequest request)998     public com.google.longrunning.Operation trainAgent(
999         com.google.cloud.dialogflow.v2.TrainAgentRequest request) {
1000       return io.grpc.stub.ClientCalls.blockingUnaryCall(
1001           getChannel(), getTrainAgentMethod(), getCallOptions(), request);
1002     }
1003 
1004     /**
1005      *
1006      *
1007      * <pre>
1008      * Exports the specified agent to a ZIP file.
1009      * This method is a [long-running
1010      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
1011      * The returned `Operation` type has the following method-specific fields:
1012      * - `metadata`: An empty [Struct
1013      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
1014      * - `response`:
1015      * [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]
1016      * </pre>
1017      */
exportAgent( com.google.cloud.dialogflow.v2.ExportAgentRequest request)1018     public com.google.longrunning.Operation exportAgent(
1019         com.google.cloud.dialogflow.v2.ExportAgentRequest request) {
1020       return io.grpc.stub.ClientCalls.blockingUnaryCall(
1021           getChannel(), getExportAgentMethod(), getCallOptions(), request);
1022     }
1023 
1024     /**
1025      *
1026      *
1027      * <pre>
1028      * Imports the specified agent from a ZIP file.
1029      * Uploads new intents and entity types without deleting the existing ones.
1030      * Intents and entity types with the same name are replaced with the new
1031      * versions from
1032      * [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After
1033      * the import, the imported draft agent will be trained automatically (unless
1034      * disabled in agent settings). However, once the import is done, training may
1035      * not be completed yet. Please call
1036      * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the
1037      * operation it returns in order to train explicitly.
1038      * This method is a [long-running
1039      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
1040      * The returned `Operation` type has the following method-specific fields:
1041      * - `metadata`: An empty [Struct
1042      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
1043      * - `response`: An [Empty
1044      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
1045      * The operation only tracks when importing is complete, not when it is done
1046      * training.
1047      * Note: You should always train an agent prior to sending it queries. See the
1048      * [training
1049      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
1050      * </pre>
1051      */
importAgent( com.google.cloud.dialogflow.v2.ImportAgentRequest request)1052     public com.google.longrunning.Operation importAgent(
1053         com.google.cloud.dialogflow.v2.ImportAgentRequest request) {
1054       return io.grpc.stub.ClientCalls.blockingUnaryCall(
1055           getChannel(), getImportAgentMethod(), getCallOptions(), request);
1056     }
1057 
1058     /**
1059      *
1060      *
1061      * <pre>
1062      * Restores the specified agent from a ZIP file.
1063      * Replaces the current agent version with a new one. All the intents and
1064      * entity types in the older version are deleted. After the restore, the
1065      * restored draft agent will be trained automatically (unless disabled in
1066      * agent settings). However, once the restore is done, training may not be
1067      * completed yet. Please call
1068      * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the
1069      * operation it returns in order to train explicitly.
1070      * This method is a [long-running
1071      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
1072      * The returned `Operation` type has the following method-specific fields:
1073      * - `metadata`: An empty [Struct
1074      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
1075      * - `response`: An [Empty
1076      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
1077      * The operation only tracks when restoring is complete, not when it is done
1078      * training.
1079      * Note: You should always train an agent prior to sending it queries. See the
1080      * [training
1081      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
1082      * </pre>
1083      */
restoreAgent( com.google.cloud.dialogflow.v2.RestoreAgentRequest request)1084     public com.google.longrunning.Operation restoreAgent(
1085         com.google.cloud.dialogflow.v2.RestoreAgentRequest request) {
1086       return io.grpc.stub.ClientCalls.blockingUnaryCall(
1087           getChannel(), getRestoreAgentMethod(), getCallOptions(), request);
1088     }
1089 
1090     /**
1091      *
1092      *
1093      * <pre>
1094      * Gets agent validation result. Agent validation is performed during
1095      * training time and is updated automatically when training is completed.
1096      * </pre>
1097      */
getValidationResult( com.google.cloud.dialogflow.v2.GetValidationResultRequest request)1098     public com.google.cloud.dialogflow.v2.ValidationResult getValidationResult(
1099         com.google.cloud.dialogflow.v2.GetValidationResultRequest request) {
1100       return io.grpc.stub.ClientCalls.blockingUnaryCall(
1101           getChannel(), getGetValidationResultMethod(), getCallOptions(), request);
1102     }
1103   }
1104 
1105   /**
1106    * A stub to allow clients to do ListenableFuture-style rpc calls to service Agents.
1107    *
1108    * <pre>
1109    * Service for managing [Agents][google.cloud.dialogflow.v2.Agent].
1110    * </pre>
1111    */
1112   public static final class AgentsFutureStub
1113       extends io.grpc.stub.AbstractFutureStub<AgentsFutureStub> {
AgentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)1114     private AgentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
1115       super(channel, callOptions);
1116     }
1117 
1118     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)1119     protected AgentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
1120       return new AgentsFutureStub(channel, callOptions);
1121     }
1122 
1123     /**
1124      *
1125      *
1126      * <pre>
1127      * Retrieves the specified agent.
1128      * </pre>
1129      */
1130     public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.dialogflow.v2.Agent>
getAgent(com.google.cloud.dialogflow.v2.GetAgentRequest request)1131         getAgent(com.google.cloud.dialogflow.v2.GetAgentRequest request) {
1132       return io.grpc.stub.ClientCalls.futureUnaryCall(
1133           getChannel().newCall(getGetAgentMethod(), getCallOptions()), request);
1134     }
1135 
1136     /**
1137      *
1138      *
1139      * <pre>
1140      * Creates/updates the specified agent.
1141      * Note: You should always train an agent prior to sending it queries. See the
1142      * [training
1143      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
1144      * </pre>
1145      */
1146     public com.google.common.util.concurrent.ListenableFuture<com.google.cloud.dialogflow.v2.Agent>
setAgent(com.google.cloud.dialogflow.v2.SetAgentRequest request)1147         setAgent(com.google.cloud.dialogflow.v2.SetAgentRequest request) {
1148       return io.grpc.stub.ClientCalls.futureUnaryCall(
1149           getChannel().newCall(getSetAgentMethod(), getCallOptions()), request);
1150     }
1151 
1152     /**
1153      *
1154      *
1155      * <pre>
1156      * Deletes the specified agent.
1157      * </pre>
1158      */
1159     public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty>
deleteAgent(com.google.cloud.dialogflow.v2.DeleteAgentRequest request)1160         deleteAgent(com.google.cloud.dialogflow.v2.DeleteAgentRequest request) {
1161       return io.grpc.stub.ClientCalls.futureUnaryCall(
1162           getChannel().newCall(getDeleteAgentMethod(), getCallOptions()), request);
1163     }
1164 
1165     /**
1166      *
1167      *
1168      * <pre>
1169      * Returns the list of agents.
1170      * Since there is at most one conversational agent per project, this method is
1171      * useful primarily for listing all agents across projects the caller has
1172      * access to. One can achieve that with a wildcard project collection id "-".
1173      * Refer to [List
1174      * Sub-Collections](https://cloud.google.com/apis/design/design_patterns#list_sub-collections).
1175      * </pre>
1176      */
1177     public com.google.common.util.concurrent.ListenableFuture<
1178             com.google.cloud.dialogflow.v2.SearchAgentsResponse>
searchAgents(com.google.cloud.dialogflow.v2.SearchAgentsRequest request)1179         searchAgents(com.google.cloud.dialogflow.v2.SearchAgentsRequest request) {
1180       return io.grpc.stub.ClientCalls.futureUnaryCall(
1181           getChannel().newCall(getSearchAgentsMethod(), getCallOptions()), request);
1182     }
1183 
1184     /**
1185      *
1186      *
1187      * <pre>
1188      * Trains the specified agent.
1189      * This method is a [long-running
1190      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
1191      * The returned `Operation` type has the following method-specific fields:
1192      * - `metadata`: An empty [Struct
1193      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
1194      * - `response`: An [Empty
1195      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
1196      * Note: You should always train an agent prior to sending it queries. See the
1197      * [training
1198      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
1199      * </pre>
1200      */
1201     public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>
trainAgent(com.google.cloud.dialogflow.v2.TrainAgentRequest request)1202         trainAgent(com.google.cloud.dialogflow.v2.TrainAgentRequest request) {
1203       return io.grpc.stub.ClientCalls.futureUnaryCall(
1204           getChannel().newCall(getTrainAgentMethod(), getCallOptions()), request);
1205     }
1206 
1207     /**
1208      *
1209      *
1210      * <pre>
1211      * Exports the specified agent to a ZIP file.
1212      * This method is a [long-running
1213      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
1214      * The returned `Operation` type has the following method-specific fields:
1215      * - `metadata`: An empty [Struct
1216      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
1217      * - `response`:
1218      * [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]
1219      * </pre>
1220      */
1221     public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>
exportAgent(com.google.cloud.dialogflow.v2.ExportAgentRequest request)1222         exportAgent(com.google.cloud.dialogflow.v2.ExportAgentRequest request) {
1223       return io.grpc.stub.ClientCalls.futureUnaryCall(
1224           getChannel().newCall(getExportAgentMethod(), getCallOptions()), request);
1225     }
1226 
1227     /**
1228      *
1229      *
1230      * <pre>
1231      * Imports the specified agent from a ZIP file.
1232      * Uploads new intents and entity types without deleting the existing ones.
1233      * Intents and entity types with the same name are replaced with the new
1234      * versions from
1235      * [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After
1236      * the import, the imported draft agent will be trained automatically (unless
1237      * disabled in agent settings). However, once the import is done, training may
1238      * not be completed yet. Please call
1239      * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the
1240      * operation it returns in order to train explicitly.
1241      * This method is a [long-running
1242      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
1243      * The returned `Operation` type has the following method-specific fields:
1244      * - `metadata`: An empty [Struct
1245      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
1246      * - `response`: An [Empty
1247      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
1248      * The operation only tracks when importing is complete, not when it is done
1249      * training.
1250      * Note: You should always train an agent prior to sending it queries. See the
1251      * [training
1252      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
1253      * </pre>
1254      */
1255     public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>
importAgent(com.google.cloud.dialogflow.v2.ImportAgentRequest request)1256         importAgent(com.google.cloud.dialogflow.v2.ImportAgentRequest request) {
1257       return io.grpc.stub.ClientCalls.futureUnaryCall(
1258           getChannel().newCall(getImportAgentMethod(), getCallOptions()), request);
1259     }
1260 
1261     /**
1262      *
1263      *
1264      * <pre>
1265      * Restores the specified agent from a ZIP file.
1266      * Replaces the current agent version with a new one. All the intents and
1267      * entity types in the older version are deleted. After the restore, the
1268      * restored draft agent will be trained automatically (unless disabled in
1269      * agent settings). However, once the restore is done, training may not be
1270      * completed yet. Please call
1271      * [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the
1272      * operation it returns in order to train explicitly.
1273      * This method is a [long-running
1274      * operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
1275      * The returned `Operation` type has the following method-specific fields:
1276      * - `metadata`: An empty [Struct
1277      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
1278      * - `response`: An [Empty
1279      *   message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#empty)
1280      * The operation only tracks when restoring is complete, not when it is done
1281      * training.
1282      * Note: You should always train an agent prior to sending it queries. See the
1283      * [training
1284      * documentation](https://cloud.google.com/dialogflow/es/docs/training).
1285      * </pre>
1286      */
1287     public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>
restoreAgent(com.google.cloud.dialogflow.v2.RestoreAgentRequest request)1288         restoreAgent(com.google.cloud.dialogflow.v2.RestoreAgentRequest request) {
1289       return io.grpc.stub.ClientCalls.futureUnaryCall(
1290           getChannel().newCall(getRestoreAgentMethod(), getCallOptions()), request);
1291     }
1292 
1293     /**
1294      *
1295      *
1296      * <pre>
1297      * Gets agent validation result. Agent validation is performed during
1298      * training time and is updated automatically when training is completed.
1299      * </pre>
1300      */
1301     public com.google.common.util.concurrent.ListenableFuture<
1302             com.google.cloud.dialogflow.v2.ValidationResult>
getValidationResult(com.google.cloud.dialogflow.v2.GetValidationResultRequest request)1303         getValidationResult(com.google.cloud.dialogflow.v2.GetValidationResultRequest request) {
1304       return io.grpc.stub.ClientCalls.futureUnaryCall(
1305           getChannel().newCall(getGetValidationResultMethod(), getCallOptions()), request);
1306     }
1307   }
1308 
1309   private static final int METHODID_GET_AGENT = 0;
1310   private static final int METHODID_SET_AGENT = 1;
1311   private static final int METHODID_DELETE_AGENT = 2;
1312   private static final int METHODID_SEARCH_AGENTS = 3;
1313   private static final int METHODID_TRAIN_AGENT = 4;
1314   private static final int METHODID_EXPORT_AGENT = 5;
1315   private static final int METHODID_IMPORT_AGENT = 6;
1316   private static final int METHODID_RESTORE_AGENT = 7;
1317   private static final int METHODID_GET_VALIDATION_RESULT = 8;
1318 
1319   private static final class MethodHandlers<Req, Resp>
1320       implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
1321           io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
1322           io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
1323           io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
1324     private final AsyncService serviceImpl;
1325     private final int methodId;
1326 
MethodHandlers(AsyncService serviceImpl, int methodId)1327     MethodHandlers(AsyncService serviceImpl, int methodId) {
1328       this.serviceImpl = serviceImpl;
1329       this.methodId = methodId;
1330     }
1331 
1332     @java.lang.Override
1333     @java.lang.SuppressWarnings("unchecked")
invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver)1334     public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
1335       switch (methodId) {
1336         case METHODID_GET_AGENT:
1337           serviceImpl.getAgent(
1338               (com.google.cloud.dialogflow.v2.GetAgentRequest) request,
1339               (io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Agent>) responseObserver);
1340           break;
1341         case METHODID_SET_AGENT:
1342           serviceImpl.setAgent(
1343               (com.google.cloud.dialogflow.v2.SetAgentRequest) request,
1344               (io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.Agent>) responseObserver);
1345           break;
1346         case METHODID_DELETE_AGENT:
1347           serviceImpl.deleteAgent(
1348               (com.google.cloud.dialogflow.v2.DeleteAgentRequest) request,
1349               (io.grpc.stub.StreamObserver<com.google.protobuf.Empty>) responseObserver);
1350           break;
1351         case METHODID_SEARCH_AGENTS:
1352           serviceImpl.searchAgents(
1353               (com.google.cloud.dialogflow.v2.SearchAgentsRequest) request,
1354               (io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.SearchAgentsResponse>)
1355                   responseObserver);
1356           break;
1357         case METHODID_TRAIN_AGENT:
1358           serviceImpl.trainAgent(
1359               (com.google.cloud.dialogflow.v2.TrainAgentRequest) request,
1360               (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver);
1361           break;
1362         case METHODID_EXPORT_AGENT:
1363           serviceImpl.exportAgent(
1364               (com.google.cloud.dialogflow.v2.ExportAgentRequest) request,
1365               (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver);
1366           break;
1367         case METHODID_IMPORT_AGENT:
1368           serviceImpl.importAgent(
1369               (com.google.cloud.dialogflow.v2.ImportAgentRequest) request,
1370               (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver);
1371           break;
1372         case METHODID_RESTORE_AGENT:
1373           serviceImpl.restoreAgent(
1374               (com.google.cloud.dialogflow.v2.RestoreAgentRequest) request,
1375               (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver);
1376           break;
1377         case METHODID_GET_VALIDATION_RESULT:
1378           serviceImpl.getValidationResult(
1379               (com.google.cloud.dialogflow.v2.GetValidationResultRequest) request,
1380               (io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.ValidationResult>)
1381                   responseObserver);
1382           break;
1383         default:
1384           throw new AssertionError();
1385       }
1386     }
1387 
1388     @java.lang.Override
1389     @java.lang.SuppressWarnings("unchecked")
invoke( io.grpc.stub.StreamObserver<Resp> responseObserver)1390     public io.grpc.stub.StreamObserver<Req> invoke(
1391         io.grpc.stub.StreamObserver<Resp> responseObserver) {
1392       switch (methodId) {
1393         default:
1394           throw new AssertionError();
1395       }
1396     }
1397   }
1398 
bindService(AsyncService service)1399   public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
1400     return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
1401         .addMethod(
1402             getGetAgentMethod(),
1403             io.grpc.stub.ServerCalls.asyncUnaryCall(
1404                 new MethodHandlers<
1405                     com.google.cloud.dialogflow.v2.GetAgentRequest,
1406                     com.google.cloud.dialogflow.v2.Agent>(service, METHODID_GET_AGENT)))
1407         .addMethod(
1408             getSetAgentMethod(),
1409             io.grpc.stub.ServerCalls.asyncUnaryCall(
1410                 new MethodHandlers<
1411                     com.google.cloud.dialogflow.v2.SetAgentRequest,
1412                     com.google.cloud.dialogflow.v2.Agent>(service, METHODID_SET_AGENT)))
1413         .addMethod(
1414             getDeleteAgentMethod(),
1415             io.grpc.stub.ServerCalls.asyncUnaryCall(
1416                 new MethodHandlers<
1417                     com.google.cloud.dialogflow.v2.DeleteAgentRequest, com.google.protobuf.Empty>(
1418                     service, METHODID_DELETE_AGENT)))
1419         .addMethod(
1420             getSearchAgentsMethod(),
1421             io.grpc.stub.ServerCalls.asyncUnaryCall(
1422                 new MethodHandlers<
1423                     com.google.cloud.dialogflow.v2.SearchAgentsRequest,
1424                     com.google.cloud.dialogflow.v2.SearchAgentsResponse>(
1425                     service, METHODID_SEARCH_AGENTS)))
1426         .addMethod(
1427             getTrainAgentMethod(),
1428             io.grpc.stub.ServerCalls.asyncUnaryCall(
1429                 new MethodHandlers<
1430                     com.google.cloud.dialogflow.v2.TrainAgentRequest,
1431                     com.google.longrunning.Operation>(service, METHODID_TRAIN_AGENT)))
1432         .addMethod(
1433             getExportAgentMethod(),
1434             io.grpc.stub.ServerCalls.asyncUnaryCall(
1435                 new MethodHandlers<
1436                     com.google.cloud.dialogflow.v2.ExportAgentRequest,
1437                     com.google.longrunning.Operation>(service, METHODID_EXPORT_AGENT)))
1438         .addMethod(
1439             getImportAgentMethod(),
1440             io.grpc.stub.ServerCalls.asyncUnaryCall(
1441                 new MethodHandlers<
1442                     com.google.cloud.dialogflow.v2.ImportAgentRequest,
1443                     com.google.longrunning.Operation>(service, METHODID_IMPORT_AGENT)))
1444         .addMethod(
1445             getRestoreAgentMethod(),
1446             io.grpc.stub.ServerCalls.asyncUnaryCall(
1447                 new MethodHandlers<
1448                     com.google.cloud.dialogflow.v2.RestoreAgentRequest,
1449                     com.google.longrunning.Operation>(service, METHODID_RESTORE_AGENT)))
1450         .addMethod(
1451             getGetValidationResultMethod(),
1452             io.grpc.stub.ServerCalls.asyncUnaryCall(
1453                 new MethodHandlers<
1454                     com.google.cloud.dialogflow.v2.GetValidationResultRequest,
1455                     com.google.cloud.dialogflow.v2.ValidationResult>(
1456                     service, METHODID_GET_VALIDATION_RESULT)))
1457         .build();
1458   }
1459 
1460   private abstract static class AgentsBaseDescriptorSupplier
1461       implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
1462           io.grpc.protobuf.ProtoServiceDescriptorSupplier {
AgentsBaseDescriptorSupplier()1463     AgentsBaseDescriptorSupplier() {}
1464 
1465     @java.lang.Override
getFileDescriptor()1466     public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
1467       return com.google.cloud.dialogflow.v2.AgentProto.getDescriptor();
1468     }
1469 
1470     @java.lang.Override
getServiceDescriptor()1471     public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
1472       return getFileDescriptor().findServiceByName("Agents");
1473     }
1474   }
1475 
1476   private static final class AgentsFileDescriptorSupplier extends AgentsBaseDescriptorSupplier {
AgentsFileDescriptorSupplier()1477     AgentsFileDescriptorSupplier() {}
1478   }
1479 
1480   private static final class AgentsMethodDescriptorSupplier extends AgentsBaseDescriptorSupplier
1481       implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
1482     private final String methodName;
1483 
AgentsMethodDescriptorSupplier(String methodName)1484     AgentsMethodDescriptorSupplier(String methodName) {
1485       this.methodName = methodName;
1486     }
1487 
1488     @java.lang.Override
getMethodDescriptor()1489     public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
1490       return getServiceDescriptor().findMethodByName(methodName);
1491     }
1492   }
1493 
1494   private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
1495 
getServiceDescriptor()1496   public static io.grpc.ServiceDescriptor getServiceDescriptor() {
1497     io.grpc.ServiceDescriptor result = serviceDescriptor;
1498     if (result == null) {
1499       synchronized (AgentsGrpc.class) {
1500         result = serviceDescriptor;
1501         if (result == null) {
1502           serviceDescriptor =
1503               result =
1504                   io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
1505                       .setSchemaDescriptor(new AgentsFileDescriptorSupplier())
1506                       .addMethod(getGetAgentMethod())
1507                       .addMethod(getSetAgentMethod())
1508                       .addMethod(getDeleteAgentMethod())
1509                       .addMethod(getSearchAgentsMethod())
1510                       .addMethod(getTrainAgentMethod())
1511                       .addMethod(getExportAgentMethod())
1512                       .addMethod(getImportAgentMethod())
1513                       .addMethod(getRestoreAgentMethod())
1514                       .addMethod(getGetValidationResultMethod())
1515                       .build();
1516         }
1517       }
1518     }
1519     return result;
1520   }
1521 }
1522