• 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  * A service used for session interactions.
25  * For more information, see the [API interactions
26  * guide](https://cloud.google.com/dialogflow/docs/api-overview).
27  * </pre>
28  */
29 @javax.annotation.Generated(
30     value = "by gRPC proto compiler",
31     comments = "Source: google/cloud/dialogflow/v2/session.proto")
32 @io.grpc.stub.annotations.GrpcGenerated
33 public final class SessionsGrpc {
34 
SessionsGrpc()35   private SessionsGrpc() {}
36 
37   public static final String SERVICE_NAME = "google.cloud.dialogflow.v2.Sessions";
38 
39   // Static method descriptors that strictly reflect the proto.
40   private static volatile io.grpc.MethodDescriptor<
41           com.google.cloud.dialogflow.v2.DetectIntentRequest,
42           com.google.cloud.dialogflow.v2.DetectIntentResponse>
43       getDetectIntentMethod;
44 
45   @io.grpc.stub.annotations.RpcMethod(
46       fullMethodName = SERVICE_NAME + '/' + "DetectIntent",
47       requestType = com.google.cloud.dialogflow.v2.DetectIntentRequest.class,
48       responseType = com.google.cloud.dialogflow.v2.DetectIntentResponse.class,
49       methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
50   public static io.grpc.MethodDescriptor<
51           com.google.cloud.dialogflow.v2.DetectIntentRequest,
52           com.google.cloud.dialogflow.v2.DetectIntentResponse>
getDetectIntentMethod()53       getDetectIntentMethod() {
54     io.grpc.MethodDescriptor<
55             com.google.cloud.dialogflow.v2.DetectIntentRequest,
56             com.google.cloud.dialogflow.v2.DetectIntentResponse>
57         getDetectIntentMethod;
58     if ((getDetectIntentMethod = SessionsGrpc.getDetectIntentMethod) == null) {
59       synchronized (SessionsGrpc.class) {
60         if ((getDetectIntentMethod = SessionsGrpc.getDetectIntentMethod) == null) {
61           SessionsGrpc.getDetectIntentMethod =
62               getDetectIntentMethod =
63                   io.grpc.MethodDescriptor
64                       .<com.google.cloud.dialogflow.v2.DetectIntentRequest,
65                           com.google.cloud.dialogflow.v2.DetectIntentResponse>
66                           newBuilder()
67                       .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
68                       .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DetectIntent"))
69                       .setSampledToLocalTracing(true)
70                       .setRequestMarshaller(
71                           io.grpc.protobuf.ProtoUtils.marshaller(
72                               com.google.cloud.dialogflow.v2.DetectIntentRequest
73                                   .getDefaultInstance()))
74                       .setResponseMarshaller(
75                           io.grpc.protobuf.ProtoUtils.marshaller(
76                               com.google.cloud.dialogflow.v2.DetectIntentResponse
77                                   .getDefaultInstance()))
78                       .setSchemaDescriptor(new SessionsMethodDescriptorSupplier("DetectIntent"))
79                       .build();
80         }
81       }
82     }
83     return getDetectIntentMethod;
84   }
85 
86   private static volatile io.grpc.MethodDescriptor<
87           com.google.cloud.dialogflow.v2.StreamingDetectIntentRequest,
88           com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse>
89       getStreamingDetectIntentMethod;
90 
91   @io.grpc.stub.annotations.RpcMethod(
92       fullMethodName = SERVICE_NAME + '/' + "StreamingDetectIntent",
93       requestType = com.google.cloud.dialogflow.v2.StreamingDetectIntentRequest.class,
94       responseType = com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse.class,
95       methodType = io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
96   public static io.grpc.MethodDescriptor<
97           com.google.cloud.dialogflow.v2.StreamingDetectIntentRequest,
98           com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse>
getStreamingDetectIntentMethod()99       getStreamingDetectIntentMethod() {
100     io.grpc.MethodDescriptor<
101             com.google.cloud.dialogflow.v2.StreamingDetectIntentRequest,
102             com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse>
103         getStreamingDetectIntentMethod;
104     if ((getStreamingDetectIntentMethod = SessionsGrpc.getStreamingDetectIntentMethod) == null) {
105       synchronized (SessionsGrpc.class) {
106         if ((getStreamingDetectIntentMethod = SessionsGrpc.getStreamingDetectIntentMethod)
107             == null) {
108           SessionsGrpc.getStreamingDetectIntentMethod =
109               getStreamingDetectIntentMethod =
110                   io.grpc.MethodDescriptor
111                       .<com.google.cloud.dialogflow.v2.StreamingDetectIntentRequest,
112                           com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse>
113                           newBuilder()
114                       .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
115                       .setFullMethodName(
116                           generateFullMethodName(SERVICE_NAME, "StreamingDetectIntent"))
117                       .setSampledToLocalTracing(true)
118                       .setRequestMarshaller(
119                           io.grpc.protobuf.ProtoUtils.marshaller(
120                               com.google.cloud.dialogflow.v2.StreamingDetectIntentRequest
121                                   .getDefaultInstance()))
122                       .setResponseMarshaller(
123                           io.grpc.protobuf.ProtoUtils.marshaller(
124                               com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse
125                                   .getDefaultInstance()))
126                       .setSchemaDescriptor(
127                           new SessionsMethodDescriptorSupplier("StreamingDetectIntent"))
128                       .build();
129         }
130       }
131     }
132     return getStreamingDetectIntentMethod;
133   }
134 
135   /** Creates a new async stub that supports all call types for the service */
newStub(io.grpc.Channel channel)136   public static SessionsStub newStub(io.grpc.Channel channel) {
137     io.grpc.stub.AbstractStub.StubFactory<SessionsStub> factory =
138         new io.grpc.stub.AbstractStub.StubFactory<SessionsStub>() {
139           @java.lang.Override
140           public SessionsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
141             return new SessionsStub(channel, callOptions);
142           }
143         };
144     return SessionsStub.newStub(factory, channel);
145   }
146 
147   /**
148    * Creates a new blocking-style stub that supports unary and streaming output calls on the service
149    */
newBlockingStub(io.grpc.Channel channel)150   public static SessionsBlockingStub newBlockingStub(io.grpc.Channel channel) {
151     io.grpc.stub.AbstractStub.StubFactory<SessionsBlockingStub> factory =
152         new io.grpc.stub.AbstractStub.StubFactory<SessionsBlockingStub>() {
153           @java.lang.Override
154           public SessionsBlockingStub newStub(
155               io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
156             return new SessionsBlockingStub(channel, callOptions);
157           }
158         };
159     return SessionsBlockingStub.newStub(factory, channel);
160   }
161 
162   /** Creates a new ListenableFuture-style stub that supports unary calls on the service */
newFutureStub(io.grpc.Channel channel)163   public static SessionsFutureStub newFutureStub(io.grpc.Channel channel) {
164     io.grpc.stub.AbstractStub.StubFactory<SessionsFutureStub> factory =
165         new io.grpc.stub.AbstractStub.StubFactory<SessionsFutureStub>() {
166           @java.lang.Override
167           public SessionsFutureStub newStub(
168               io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
169             return new SessionsFutureStub(channel, callOptions);
170           }
171         };
172     return SessionsFutureStub.newStub(factory, channel);
173   }
174 
175   /**
176    *
177    *
178    * <pre>
179    * A service used for session interactions.
180    * For more information, see the [API interactions
181    * guide](https://cloud.google.com/dialogflow/docs/api-overview).
182    * </pre>
183    */
184   public interface AsyncService {
185 
186     /**
187      *
188      *
189      * <pre>
190      * Processes a natural language query and returns structured, actionable data
191      * as a result. This method is not idempotent, because it may cause contexts
192      * and session entity types to be updated, which in turn might affect
193      * results of future queries.
194      * If you might use
195      * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
196      * or other CCAI products now or in the future, consider using
197      * [AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]
198      * instead of `DetectIntent`. `AnalyzeContent` has additional
199      * functionality for Agent Assist and other CCAI products.
200      * Note: Always use agent versions for production traffic.
201      * See [Versions and
202      * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
203      * </pre>
204      */
detectIntent( com.google.cloud.dialogflow.v2.DetectIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.DetectIntentResponse> responseObserver)205     default void detectIntent(
206         com.google.cloud.dialogflow.v2.DetectIntentRequest request,
207         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.DetectIntentResponse>
208             responseObserver) {
209       io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(
210           getDetectIntentMethod(), responseObserver);
211     }
212 
213     /**
214      *
215      *
216      * <pre>
217      * Processes a natural language query in audio format in a streaming fashion
218      * and returns structured, actionable data as a result. This method is only
219      * available via the gRPC API (not REST).
220      * If you might use
221      * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
222      * or other CCAI products now or in the future, consider using
223      * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]
224      * instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has
225      * additional functionality for Agent Assist and other CCAI products.
226      * Note: Always use agent versions for production traffic.
227      * See [Versions and
228      * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
229      * </pre>
230      */
231     default io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.StreamingDetectIntentRequest>
streamingDetectIntent( io.grpc.stub.StreamObserver< com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse> responseObserver)232         streamingDetectIntent(
233             io.grpc.stub.StreamObserver<
234                     com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse>
235                 responseObserver) {
236       return io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall(
237           getStreamingDetectIntentMethod(), responseObserver);
238     }
239   }
240 
241   /**
242    * Base class for the server implementation of the service Sessions.
243    *
244    * <pre>
245    * A service used for session interactions.
246    * For more information, see the [API interactions
247    * guide](https://cloud.google.com/dialogflow/docs/api-overview).
248    * </pre>
249    */
250   public abstract static class SessionsImplBase implements io.grpc.BindableService, AsyncService {
251 
252     @java.lang.Override
bindService()253     public final io.grpc.ServerServiceDefinition bindService() {
254       return SessionsGrpc.bindService(this);
255     }
256   }
257 
258   /**
259    * A stub to allow clients to do asynchronous rpc calls to service Sessions.
260    *
261    * <pre>
262    * A service used for session interactions.
263    * For more information, see the [API interactions
264    * guide](https://cloud.google.com/dialogflow/docs/api-overview).
265    * </pre>
266    */
267   public static final class SessionsStub extends io.grpc.stub.AbstractAsyncStub<SessionsStub> {
SessionsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)268     private SessionsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
269       super(channel, callOptions);
270     }
271 
272     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)273     protected SessionsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
274       return new SessionsStub(channel, callOptions);
275     }
276 
277     /**
278      *
279      *
280      * <pre>
281      * Processes a natural language query and returns structured, actionable data
282      * as a result. This method is not idempotent, because it may cause contexts
283      * and session entity types to be updated, which in turn might affect
284      * results of future queries.
285      * If you might use
286      * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
287      * or other CCAI products now or in the future, consider using
288      * [AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]
289      * instead of `DetectIntent`. `AnalyzeContent` has additional
290      * functionality for Agent Assist and other CCAI products.
291      * Note: Always use agent versions for production traffic.
292      * See [Versions and
293      * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
294      * </pre>
295      */
detectIntent( com.google.cloud.dialogflow.v2.DetectIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.DetectIntentResponse> responseObserver)296     public void detectIntent(
297         com.google.cloud.dialogflow.v2.DetectIntentRequest request,
298         io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.DetectIntentResponse>
299             responseObserver) {
300       io.grpc.stub.ClientCalls.asyncUnaryCall(
301           getChannel().newCall(getDetectIntentMethod(), getCallOptions()),
302           request,
303           responseObserver);
304     }
305 
306     /**
307      *
308      *
309      * <pre>
310      * Processes a natural language query in audio format in a streaming fashion
311      * and returns structured, actionable data as a result. This method is only
312      * available via the gRPC API (not REST).
313      * If you might use
314      * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
315      * or other CCAI products now or in the future, consider using
316      * [StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]
317      * instead of `StreamingDetectIntent`. `StreamingAnalyzeContent` has
318      * additional functionality for Agent Assist and other CCAI products.
319      * Note: Always use agent versions for production traffic.
320      * See [Versions and
321      * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
322      * </pre>
323      */
324     public io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.StreamingDetectIntentRequest>
streamingDetectIntent( io.grpc.stub.StreamObserver< com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse> responseObserver)325         streamingDetectIntent(
326             io.grpc.stub.StreamObserver<
327                     com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse>
328                 responseObserver) {
329       return io.grpc.stub.ClientCalls.asyncBidiStreamingCall(
330           getChannel().newCall(getStreamingDetectIntentMethod(), getCallOptions()),
331           responseObserver);
332     }
333   }
334 
335   /**
336    * A stub to allow clients to do synchronous rpc calls to service Sessions.
337    *
338    * <pre>
339    * A service used for session interactions.
340    * For more information, see the [API interactions
341    * guide](https://cloud.google.com/dialogflow/docs/api-overview).
342    * </pre>
343    */
344   public static final class SessionsBlockingStub
345       extends io.grpc.stub.AbstractBlockingStub<SessionsBlockingStub> {
SessionsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)346     private SessionsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
347       super(channel, callOptions);
348     }
349 
350     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)351     protected SessionsBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
352       return new SessionsBlockingStub(channel, callOptions);
353     }
354 
355     /**
356      *
357      *
358      * <pre>
359      * Processes a natural language query and returns structured, actionable data
360      * as a result. This method is not idempotent, because it may cause contexts
361      * and session entity types to be updated, which in turn might affect
362      * results of future queries.
363      * If you might use
364      * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
365      * or other CCAI products now or in the future, consider using
366      * [AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]
367      * instead of `DetectIntent`. `AnalyzeContent` has additional
368      * functionality for Agent Assist and other CCAI products.
369      * Note: Always use agent versions for production traffic.
370      * See [Versions and
371      * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
372      * </pre>
373      */
detectIntent( com.google.cloud.dialogflow.v2.DetectIntentRequest request)374     public com.google.cloud.dialogflow.v2.DetectIntentResponse detectIntent(
375         com.google.cloud.dialogflow.v2.DetectIntentRequest request) {
376       return io.grpc.stub.ClientCalls.blockingUnaryCall(
377           getChannel(), getDetectIntentMethod(), getCallOptions(), request);
378     }
379   }
380 
381   /**
382    * A stub to allow clients to do ListenableFuture-style rpc calls to service Sessions.
383    *
384    * <pre>
385    * A service used for session interactions.
386    * For more information, see the [API interactions
387    * guide](https://cloud.google.com/dialogflow/docs/api-overview).
388    * </pre>
389    */
390   public static final class SessionsFutureStub
391       extends io.grpc.stub.AbstractFutureStub<SessionsFutureStub> {
SessionsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)392     private SessionsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
393       super(channel, callOptions);
394     }
395 
396     @java.lang.Override
build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)397     protected SessionsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
398       return new SessionsFutureStub(channel, callOptions);
399     }
400 
401     /**
402      *
403      *
404      * <pre>
405      * Processes a natural language query and returns structured, actionable data
406      * as a result. This method is not idempotent, because it may cause contexts
407      * and session entity types to be updated, which in turn might affect
408      * results of future queries.
409      * If you might use
410      * [Agent Assist](https://cloud.google.com/dialogflow/docs/#aa)
411      * or other CCAI products now or in the future, consider using
412      * [AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent]
413      * instead of `DetectIntent`. `AnalyzeContent` has additional
414      * functionality for Agent Assist and other CCAI products.
415      * Note: Always use agent versions for production traffic.
416      * See [Versions and
417      * environments](https://cloud.google.com/dialogflow/es/docs/agents-versions).
418      * </pre>
419      */
420     public com.google.common.util.concurrent.ListenableFuture<
421             com.google.cloud.dialogflow.v2.DetectIntentResponse>
detectIntent(com.google.cloud.dialogflow.v2.DetectIntentRequest request)422         detectIntent(com.google.cloud.dialogflow.v2.DetectIntentRequest request) {
423       return io.grpc.stub.ClientCalls.futureUnaryCall(
424           getChannel().newCall(getDetectIntentMethod(), getCallOptions()), request);
425     }
426   }
427 
428   private static final int METHODID_DETECT_INTENT = 0;
429   private static final int METHODID_STREAMING_DETECT_INTENT = 1;
430 
431   private static final class MethodHandlers<Req, Resp>
432       implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
433           io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
434           io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
435           io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
436     private final AsyncService serviceImpl;
437     private final int methodId;
438 
MethodHandlers(AsyncService serviceImpl, int methodId)439     MethodHandlers(AsyncService serviceImpl, int methodId) {
440       this.serviceImpl = serviceImpl;
441       this.methodId = methodId;
442     }
443 
444     @java.lang.Override
445     @java.lang.SuppressWarnings("unchecked")
invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver)446     public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
447       switch (methodId) {
448         case METHODID_DETECT_INTENT:
449           serviceImpl.detectIntent(
450               (com.google.cloud.dialogflow.v2.DetectIntentRequest) request,
451               (io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.v2.DetectIntentResponse>)
452                   responseObserver);
453           break;
454         default:
455           throw new AssertionError();
456       }
457     }
458 
459     @java.lang.Override
460     @java.lang.SuppressWarnings("unchecked")
invoke( io.grpc.stub.StreamObserver<Resp> responseObserver)461     public io.grpc.stub.StreamObserver<Req> invoke(
462         io.grpc.stub.StreamObserver<Resp> responseObserver) {
463       switch (methodId) {
464         case METHODID_STREAMING_DETECT_INTENT:
465           return (io.grpc.stub.StreamObserver<Req>)
466               serviceImpl.streamingDetectIntent(
467                   (io.grpc.stub.StreamObserver<
468                           com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse>)
469                       responseObserver);
470         default:
471           throw new AssertionError();
472       }
473     }
474   }
475 
bindService(AsyncService service)476   public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) {
477     return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
478         .addMethod(
479             getDetectIntentMethod(),
480             io.grpc.stub.ServerCalls.asyncUnaryCall(
481                 new MethodHandlers<
482                     com.google.cloud.dialogflow.v2.DetectIntentRequest,
483                     com.google.cloud.dialogflow.v2.DetectIntentResponse>(
484                     service, METHODID_DETECT_INTENT)))
485         .addMethod(
486             getStreamingDetectIntentMethod(),
487             io.grpc.stub.ServerCalls.asyncBidiStreamingCall(
488                 new MethodHandlers<
489                     com.google.cloud.dialogflow.v2.StreamingDetectIntentRequest,
490                     com.google.cloud.dialogflow.v2.StreamingDetectIntentResponse>(
491                     service, METHODID_STREAMING_DETECT_INTENT)))
492         .build();
493   }
494 
495   private abstract static class SessionsBaseDescriptorSupplier
496       implements io.grpc.protobuf.ProtoFileDescriptorSupplier,
497           io.grpc.protobuf.ProtoServiceDescriptorSupplier {
SessionsBaseDescriptorSupplier()498     SessionsBaseDescriptorSupplier() {}
499 
500     @java.lang.Override
getFileDescriptor()501     public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
502       return com.google.cloud.dialogflow.v2.SessionProto.getDescriptor();
503     }
504 
505     @java.lang.Override
getServiceDescriptor()506     public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
507       return getFileDescriptor().findServiceByName("Sessions");
508     }
509   }
510 
511   private static final class SessionsFileDescriptorSupplier extends SessionsBaseDescriptorSupplier {
SessionsFileDescriptorSupplier()512     SessionsFileDescriptorSupplier() {}
513   }
514 
515   private static final class SessionsMethodDescriptorSupplier extends SessionsBaseDescriptorSupplier
516       implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
517     private final String methodName;
518 
SessionsMethodDescriptorSupplier(String methodName)519     SessionsMethodDescriptorSupplier(String methodName) {
520       this.methodName = methodName;
521     }
522 
523     @java.lang.Override
getMethodDescriptor()524     public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
525       return getServiceDescriptor().findMethodByName(methodName);
526     }
527   }
528 
529   private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
530 
getServiceDescriptor()531   public static io.grpc.ServiceDescriptor getServiceDescriptor() {
532     io.grpc.ServiceDescriptor result = serviceDescriptor;
533     if (result == null) {
534       synchronized (SessionsGrpc.class) {
535         result = serviceDescriptor;
536         if (result == null) {
537           serviceDescriptor =
538               result =
539                   io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
540                       .setSchemaDescriptor(new SessionsFileDescriptorSupplier())
541                       .addMethod(getDetectIntentMethod())
542                       .addMethod(getStreamingDetectIntentMethod())
543                       .build();
544         }
545       }
546     }
547     return result;
548   }
549 }
550