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.cx.v3; 17 18 import static io.grpc.MethodDescriptor.generateFullMethodName; 19 20 /** 21 * 22 * 23 * <pre> 24 * Service for managing [Intents][google.cloud.dialogflow.cx.v3.Intent]. 25 * </pre> 26 */ 27 @javax.annotation.Generated( 28 value = "by gRPC proto compiler", 29 comments = "Source: google/cloud/dialogflow/cx/v3/intent.proto") 30 @io.grpc.stub.annotations.GrpcGenerated 31 public final class IntentsGrpc { 32 IntentsGrpc()33 private IntentsGrpc() {} 34 35 public static final String SERVICE_NAME = "google.cloud.dialogflow.cx.v3.Intents"; 36 37 // Static method descriptors that strictly reflect the proto. 38 private static volatile io.grpc.MethodDescriptor< 39 com.google.cloud.dialogflow.cx.v3.ListIntentsRequest, 40 com.google.cloud.dialogflow.cx.v3.ListIntentsResponse> 41 getListIntentsMethod; 42 43 @io.grpc.stub.annotations.RpcMethod( 44 fullMethodName = SERVICE_NAME + '/' + "ListIntents", 45 requestType = com.google.cloud.dialogflow.cx.v3.ListIntentsRequest.class, 46 responseType = com.google.cloud.dialogflow.cx.v3.ListIntentsResponse.class, 47 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 48 public static io.grpc.MethodDescriptor< 49 com.google.cloud.dialogflow.cx.v3.ListIntentsRequest, 50 com.google.cloud.dialogflow.cx.v3.ListIntentsResponse> getListIntentsMethod()51 getListIntentsMethod() { 52 io.grpc.MethodDescriptor< 53 com.google.cloud.dialogflow.cx.v3.ListIntentsRequest, 54 com.google.cloud.dialogflow.cx.v3.ListIntentsResponse> 55 getListIntentsMethod; 56 if ((getListIntentsMethod = IntentsGrpc.getListIntentsMethod) == null) { 57 synchronized (IntentsGrpc.class) { 58 if ((getListIntentsMethod = IntentsGrpc.getListIntentsMethod) == null) { 59 IntentsGrpc.getListIntentsMethod = 60 getListIntentsMethod = 61 io.grpc.MethodDescriptor 62 .<com.google.cloud.dialogflow.cx.v3.ListIntentsRequest, 63 com.google.cloud.dialogflow.cx.v3.ListIntentsResponse> 64 newBuilder() 65 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 66 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListIntents")) 67 .setSampledToLocalTracing(true) 68 .setRequestMarshaller( 69 io.grpc.protobuf.ProtoUtils.marshaller( 70 com.google.cloud.dialogflow.cx.v3.ListIntentsRequest 71 .getDefaultInstance())) 72 .setResponseMarshaller( 73 io.grpc.protobuf.ProtoUtils.marshaller( 74 com.google.cloud.dialogflow.cx.v3.ListIntentsResponse 75 .getDefaultInstance())) 76 .setSchemaDescriptor(new IntentsMethodDescriptorSupplier("ListIntents")) 77 .build(); 78 } 79 } 80 } 81 return getListIntentsMethod; 82 } 83 84 private static volatile io.grpc.MethodDescriptor< 85 com.google.cloud.dialogflow.cx.v3.GetIntentRequest, 86 com.google.cloud.dialogflow.cx.v3.Intent> 87 getGetIntentMethod; 88 89 @io.grpc.stub.annotations.RpcMethod( 90 fullMethodName = SERVICE_NAME + '/' + "GetIntent", 91 requestType = com.google.cloud.dialogflow.cx.v3.GetIntentRequest.class, 92 responseType = com.google.cloud.dialogflow.cx.v3.Intent.class, 93 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 94 public static io.grpc.MethodDescriptor< 95 com.google.cloud.dialogflow.cx.v3.GetIntentRequest, 96 com.google.cloud.dialogflow.cx.v3.Intent> getGetIntentMethod()97 getGetIntentMethod() { 98 io.grpc.MethodDescriptor< 99 com.google.cloud.dialogflow.cx.v3.GetIntentRequest, 100 com.google.cloud.dialogflow.cx.v3.Intent> 101 getGetIntentMethod; 102 if ((getGetIntentMethod = IntentsGrpc.getGetIntentMethod) == null) { 103 synchronized (IntentsGrpc.class) { 104 if ((getGetIntentMethod = IntentsGrpc.getGetIntentMethod) == null) { 105 IntentsGrpc.getGetIntentMethod = 106 getGetIntentMethod = 107 io.grpc.MethodDescriptor 108 .<com.google.cloud.dialogflow.cx.v3.GetIntentRequest, 109 com.google.cloud.dialogflow.cx.v3.Intent> 110 newBuilder() 111 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 112 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetIntent")) 113 .setSampledToLocalTracing(true) 114 .setRequestMarshaller( 115 io.grpc.protobuf.ProtoUtils.marshaller( 116 com.google.cloud.dialogflow.cx.v3.GetIntentRequest 117 .getDefaultInstance())) 118 .setResponseMarshaller( 119 io.grpc.protobuf.ProtoUtils.marshaller( 120 com.google.cloud.dialogflow.cx.v3.Intent.getDefaultInstance())) 121 .setSchemaDescriptor(new IntentsMethodDescriptorSupplier("GetIntent")) 122 .build(); 123 } 124 } 125 } 126 return getGetIntentMethod; 127 } 128 129 private static volatile io.grpc.MethodDescriptor< 130 com.google.cloud.dialogflow.cx.v3.CreateIntentRequest, 131 com.google.cloud.dialogflow.cx.v3.Intent> 132 getCreateIntentMethod; 133 134 @io.grpc.stub.annotations.RpcMethod( 135 fullMethodName = SERVICE_NAME + '/' + "CreateIntent", 136 requestType = com.google.cloud.dialogflow.cx.v3.CreateIntentRequest.class, 137 responseType = com.google.cloud.dialogflow.cx.v3.Intent.class, 138 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 139 public static io.grpc.MethodDescriptor< 140 com.google.cloud.dialogflow.cx.v3.CreateIntentRequest, 141 com.google.cloud.dialogflow.cx.v3.Intent> getCreateIntentMethod()142 getCreateIntentMethod() { 143 io.grpc.MethodDescriptor< 144 com.google.cloud.dialogflow.cx.v3.CreateIntentRequest, 145 com.google.cloud.dialogflow.cx.v3.Intent> 146 getCreateIntentMethod; 147 if ((getCreateIntentMethod = IntentsGrpc.getCreateIntentMethod) == null) { 148 synchronized (IntentsGrpc.class) { 149 if ((getCreateIntentMethod = IntentsGrpc.getCreateIntentMethod) == null) { 150 IntentsGrpc.getCreateIntentMethod = 151 getCreateIntentMethod = 152 io.grpc.MethodDescriptor 153 .<com.google.cloud.dialogflow.cx.v3.CreateIntentRequest, 154 com.google.cloud.dialogflow.cx.v3.Intent> 155 newBuilder() 156 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 157 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateIntent")) 158 .setSampledToLocalTracing(true) 159 .setRequestMarshaller( 160 io.grpc.protobuf.ProtoUtils.marshaller( 161 com.google.cloud.dialogflow.cx.v3.CreateIntentRequest 162 .getDefaultInstance())) 163 .setResponseMarshaller( 164 io.grpc.protobuf.ProtoUtils.marshaller( 165 com.google.cloud.dialogflow.cx.v3.Intent.getDefaultInstance())) 166 .setSchemaDescriptor(new IntentsMethodDescriptorSupplier("CreateIntent")) 167 .build(); 168 } 169 } 170 } 171 return getCreateIntentMethod; 172 } 173 174 private static volatile io.grpc.MethodDescriptor< 175 com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest, 176 com.google.cloud.dialogflow.cx.v3.Intent> 177 getUpdateIntentMethod; 178 179 @io.grpc.stub.annotations.RpcMethod( 180 fullMethodName = SERVICE_NAME + '/' + "UpdateIntent", 181 requestType = com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest.class, 182 responseType = com.google.cloud.dialogflow.cx.v3.Intent.class, 183 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 184 public static io.grpc.MethodDescriptor< 185 com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest, 186 com.google.cloud.dialogflow.cx.v3.Intent> getUpdateIntentMethod()187 getUpdateIntentMethod() { 188 io.grpc.MethodDescriptor< 189 com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest, 190 com.google.cloud.dialogflow.cx.v3.Intent> 191 getUpdateIntentMethod; 192 if ((getUpdateIntentMethod = IntentsGrpc.getUpdateIntentMethod) == null) { 193 synchronized (IntentsGrpc.class) { 194 if ((getUpdateIntentMethod = IntentsGrpc.getUpdateIntentMethod) == null) { 195 IntentsGrpc.getUpdateIntentMethod = 196 getUpdateIntentMethod = 197 io.grpc.MethodDescriptor 198 .<com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest, 199 com.google.cloud.dialogflow.cx.v3.Intent> 200 newBuilder() 201 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 202 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateIntent")) 203 .setSampledToLocalTracing(true) 204 .setRequestMarshaller( 205 io.grpc.protobuf.ProtoUtils.marshaller( 206 com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest 207 .getDefaultInstance())) 208 .setResponseMarshaller( 209 io.grpc.protobuf.ProtoUtils.marshaller( 210 com.google.cloud.dialogflow.cx.v3.Intent.getDefaultInstance())) 211 .setSchemaDescriptor(new IntentsMethodDescriptorSupplier("UpdateIntent")) 212 .build(); 213 } 214 } 215 } 216 return getUpdateIntentMethod; 217 } 218 219 private static volatile io.grpc.MethodDescriptor< 220 com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest, com.google.protobuf.Empty> 221 getDeleteIntentMethod; 222 223 @io.grpc.stub.annotations.RpcMethod( 224 fullMethodName = SERVICE_NAME + '/' + "DeleteIntent", 225 requestType = com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest.class, 226 responseType = com.google.protobuf.Empty.class, 227 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 228 public static io.grpc.MethodDescriptor< 229 com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest, com.google.protobuf.Empty> getDeleteIntentMethod()230 getDeleteIntentMethod() { 231 io.grpc.MethodDescriptor< 232 com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest, com.google.protobuf.Empty> 233 getDeleteIntentMethod; 234 if ((getDeleteIntentMethod = IntentsGrpc.getDeleteIntentMethod) == null) { 235 synchronized (IntentsGrpc.class) { 236 if ((getDeleteIntentMethod = IntentsGrpc.getDeleteIntentMethod) == null) { 237 IntentsGrpc.getDeleteIntentMethod = 238 getDeleteIntentMethod = 239 io.grpc.MethodDescriptor 240 .<com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest, 241 com.google.protobuf.Empty> 242 newBuilder() 243 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 244 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteIntent")) 245 .setSampledToLocalTracing(true) 246 .setRequestMarshaller( 247 io.grpc.protobuf.ProtoUtils.marshaller( 248 com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest 249 .getDefaultInstance())) 250 .setResponseMarshaller( 251 io.grpc.protobuf.ProtoUtils.marshaller( 252 com.google.protobuf.Empty.getDefaultInstance())) 253 .setSchemaDescriptor(new IntentsMethodDescriptorSupplier("DeleteIntent")) 254 .build(); 255 } 256 } 257 } 258 return getDeleteIntentMethod; 259 } 260 261 /** Creates a new async stub that supports all call types for the service */ newStub(io.grpc.Channel channel)262 public static IntentsStub newStub(io.grpc.Channel channel) { 263 io.grpc.stub.AbstractStub.StubFactory<IntentsStub> factory = 264 new io.grpc.stub.AbstractStub.StubFactory<IntentsStub>() { 265 @java.lang.Override 266 public IntentsStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 267 return new IntentsStub(channel, callOptions); 268 } 269 }; 270 return IntentsStub.newStub(factory, channel); 271 } 272 273 /** 274 * Creates a new blocking-style stub that supports unary and streaming output calls on the service 275 */ newBlockingStub(io.grpc.Channel channel)276 public static IntentsBlockingStub newBlockingStub(io.grpc.Channel channel) { 277 io.grpc.stub.AbstractStub.StubFactory<IntentsBlockingStub> factory = 278 new io.grpc.stub.AbstractStub.StubFactory<IntentsBlockingStub>() { 279 @java.lang.Override 280 public IntentsBlockingStub newStub( 281 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 282 return new IntentsBlockingStub(channel, callOptions); 283 } 284 }; 285 return IntentsBlockingStub.newStub(factory, channel); 286 } 287 288 /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ newFutureStub(io.grpc.Channel channel)289 public static IntentsFutureStub newFutureStub(io.grpc.Channel channel) { 290 io.grpc.stub.AbstractStub.StubFactory<IntentsFutureStub> factory = 291 new io.grpc.stub.AbstractStub.StubFactory<IntentsFutureStub>() { 292 @java.lang.Override 293 public IntentsFutureStub newStub( 294 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 295 return new IntentsFutureStub(channel, callOptions); 296 } 297 }; 298 return IntentsFutureStub.newStub(factory, channel); 299 } 300 301 /** 302 * 303 * 304 * <pre> 305 * Service for managing [Intents][google.cloud.dialogflow.cx.v3.Intent]. 306 * </pre> 307 */ 308 public interface AsyncService { 309 310 /** 311 * 312 * 313 * <pre> 314 * Returns the list of all intents in the specified agent. 315 * </pre> 316 */ listIntents( com.google.cloud.dialogflow.cx.v3.ListIntentsRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.ListIntentsResponse> responseObserver)317 default void listIntents( 318 com.google.cloud.dialogflow.cx.v3.ListIntentsRequest request, 319 io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.ListIntentsResponse> 320 responseObserver) { 321 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 322 getListIntentsMethod(), responseObserver); 323 } 324 325 /** 326 * 327 * 328 * <pre> 329 * Retrieves the specified intent. 330 * </pre> 331 */ getIntent( com.google.cloud.dialogflow.cx.v3.GetIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent> responseObserver)332 default void getIntent( 333 com.google.cloud.dialogflow.cx.v3.GetIntentRequest request, 334 io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent> responseObserver) { 335 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetIntentMethod(), responseObserver); 336 } 337 338 /** 339 * 340 * 341 * <pre> 342 * Creates an intent in the specified agent. 343 * Note: You should always train a flow prior to sending it queries. See the 344 * [training 345 * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 346 * </pre> 347 */ createIntent( com.google.cloud.dialogflow.cx.v3.CreateIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent> responseObserver)348 default void createIntent( 349 com.google.cloud.dialogflow.cx.v3.CreateIntentRequest request, 350 io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent> responseObserver) { 351 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 352 getCreateIntentMethod(), responseObserver); 353 } 354 355 /** 356 * 357 * 358 * <pre> 359 * Updates the specified intent. 360 * Note: You should always train a flow prior to sending it queries. See the 361 * [training 362 * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 363 * </pre> 364 */ updateIntent( com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent> responseObserver)365 default void updateIntent( 366 com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest request, 367 io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent> responseObserver) { 368 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 369 getUpdateIntentMethod(), responseObserver); 370 } 371 372 /** 373 * 374 * 375 * <pre> 376 * Deletes the specified intent. 377 * Note: You should always train a flow prior to sending it queries. See the 378 * [training 379 * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 380 * </pre> 381 */ deleteIntent( com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)382 default void deleteIntent( 383 com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest request, 384 io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { 385 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 386 getDeleteIntentMethod(), responseObserver); 387 } 388 } 389 390 /** 391 * Base class for the server implementation of the service Intents. 392 * 393 * <pre> 394 * Service for managing [Intents][google.cloud.dialogflow.cx.v3.Intent]. 395 * </pre> 396 */ 397 public abstract static class IntentsImplBase implements io.grpc.BindableService, AsyncService { 398 399 @java.lang.Override bindService()400 public final io.grpc.ServerServiceDefinition bindService() { 401 return IntentsGrpc.bindService(this); 402 } 403 } 404 405 /** 406 * A stub to allow clients to do asynchronous rpc calls to service Intents. 407 * 408 * <pre> 409 * Service for managing [Intents][google.cloud.dialogflow.cx.v3.Intent]. 410 * </pre> 411 */ 412 public static final class IntentsStub extends io.grpc.stub.AbstractAsyncStub<IntentsStub> { IntentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)413 private IntentsStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 414 super(channel, callOptions); 415 } 416 417 @java.lang.Override build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)418 protected IntentsStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 419 return new IntentsStub(channel, callOptions); 420 } 421 422 /** 423 * 424 * 425 * <pre> 426 * Returns the list of all intents in the specified agent. 427 * </pre> 428 */ listIntents( com.google.cloud.dialogflow.cx.v3.ListIntentsRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.ListIntentsResponse> responseObserver)429 public void listIntents( 430 com.google.cloud.dialogflow.cx.v3.ListIntentsRequest request, 431 io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.ListIntentsResponse> 432 responseObserver) { 433 io.grpc.stub.ClientCalls.asyncUnaryCall( 434 getChannel().newCall(getListIntentsMethod(), getCallOptions()), 435 request, 436 responseObserver); 437 } 438 439 /** 440 * 441 * 442 * <pre> 443 * Retrieves the specified intent. 444 * </pre> 445 */ getIntent( com.google.cloud.dialogflow.cx.v3.GetIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent> responseObserver)446 public void getIntent( 447 com.google.cloud.dialogflow.cx.v3.GetIntentRequest request, 448 io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent> responseObserver) { 449 io.grpc.stub.ClientCalls.asyncUnaryCall( 450 getChannel().newCall(getGetIntentMethod(), getCallOptions()), request, responseObserver); 451 } 452 453 /** 454 * 455 * 456 * <pre> 457 * Creates an intent in the specified agent. 458 * Note: You should always train a flow prior to sending it queries. See the 459 * [training 460 * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 461 * </pre> 462 */ createIntent( com.google.cloud.dialogflow.cx.v3.CreateIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent> responseObserver)463 public void createIntent( 464 com.google.cloud.dialogflow.cx.v3.CreateIntentRequest request, 465 io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent> responseObserver) { 466 io.grpc.stub.ClientCalls.asyncUnaryCall( 467 getChannel().newCall(getCreateIntentMethod(), getCallOptions()), 468 request, 469 responseObserver); 470 } 471 472 /** 473 * 474 * 475 * <pre> 476 * Updates the specified intent. 477 * Note: You should always train a flow prior to sending it queries. See the 478 * [training 479 * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 480 * </pre> 481 */ updateIntent( com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest request, io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent> responseObserver)482 public void updateIntent( 483 com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest request, 484 io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent> responseObserver) { 485 io.grpc.stub.ClientCalls.asyncUnaryCall( 486 getChannel().newCall(getUpdateIntentMethod(), getCallOptions()), 487 request, 488 responseObserver); 489 } 490 491 /** 492 * 493 * 494 * <pre> 495 * Deletes the specified intent. 496 * Note: You should always train a flow prior to sending it queries. See the 497 * [training 498 * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 499 * </pre> 500 */ deleteIntent( com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest request, io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver)501 public void deleteIntent( 502 com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest request, 503 io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) { 504 io.grpc.stub.ClientCalls.asyncUnaryCall( 505 getChannel().newCall(getDeleteIntentMethod(), getCallOptions()), 506 request, 507 responseObserver); 508 } 509 } 510 511 /** 512 * A stub to allow clients to do synchronous rpc calls to service Intents. 513 * 514 * <pre> 515 * Service for managing [Intents][google.cloud.dialogflow.cx.v3.Intent]. 516 * </pre> 517 */ 518 public static final class IntentsBlockingStub 519 extends io.grpc.stub.AbstractBlockingStub<IntentsBlockingStub> { IntentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)520 private IntentsBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 521 super(channel, callOptions); 522 } 523 524 @java.lang.Override build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)525 protected IntentsBlockingStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 526 return new IntentsBlockingStub(channel, callOptions); 527 } 528 529 /** 530 * 531 * 532 * <pre> 533 * Returns the list of all intents in the specified agent. 534 * </pre> 535 */ listIntents( com.google.cloud.dialogflow.cx.v3.ListIntentsRequest request)536 public com.google.cloud.dialogflow.cx.v3.ListIntentsResponse listIntents( 537 com.google.cloud.dialogflow.cx.v3.ListIntentsRequest request) { 538 return io.grpc.stub.ClientCalls.blockingUnaryCall( 539 getChannel(), getListIntentsMethod(), getCallOptions(), request); 540 } 541 542 /** 543 * 544 * 545 * <pre> 546 * Retrieves the specified intent. 547 * </pre> 548 */ getIntent( com.google.cloud.dialogflow.cx.v3.GetIntentRequest request)549 public com.google.cloud.dialogflow.cx.v3.Intent getIntent( 550 com.google.cloud.dialogflow.cx.v3.GetIntentRequest request) { 551 return io.grpc.stub.ClientCalls.blockingUnaryCall( 552 getChannel(), getGetIntentMethod(), getCallOptions(), request); 553 } 554 555 /** 556 * 557 * 558 * <pre> 559 * Creates an intent in the specified agent. 560 * Note: You should always train a flow prior to sending it queries. See the 561 * [training 562 * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 563 * </pre> 564 */ createIntent( com.google.cloud.dialogflow.cx.v3.CreateIntentRequest request)565 public com.google.cloud.dialogflow.cx.v3.Intent createIntent( 566 com.google.cloud.dialogflow.cx.v3.CreateIntentRequest request) { 567 return io.grpc.stub.ClientCalls.blockingUnaryCall( 568 getChannel(), getCreateIntentMethod(), getCallOptions(), request); 569 } 570 571 /** 572 * 573 * 574 * <pre> 575 * Updates the specified intent. 576 * Note: You should always train a flow prior to sending it queries. See the 577 * [training 578 * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 579 * </pre> 580 */ updateIntent( com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest request)581 public com.google.cloud.dialogflow.cx.v3.Intent updateIntent( 582 com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest request) { 583 return io.grpc.stub.ClientCalls.blockingUnaryCall( 584 getChannel(), getUpdateIntentMethod(), getCallOptions(), request); 585 } 586 587 /** 588 * 589 * 590 * <pre> 591 * Deletes the specified intent. 592 * Note: You should always train a flow prior to sending it queries. See the 593 * [training 594 * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 595 * </pre> 596 */ deleteIntent( com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest request)597 public com.google.protobuf.Empty deleteIntent( 598 com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest request) { 599 return io.grpc.stub.ClientCalls.blockingUnaryCall( 600 getChannel(), getDeleteIntentMethod(), getCallOptions(), request); 601 } 602 } 603 604 /** 605 * A stub to allow clients to do ListenableFuture-style rpc calls to service Intents. 606 * 607 * <pre> 608 * Service for managing [Intents][google.cloud.dialogflow.cx.v3.Intent]. 609 * </pre> 610 */ 611 public static final class IntentsFutureStub 612 extends io.grpc.stub.AbstractFutureStub<IntentsFutureStub> { IntentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)613 private IntentsFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 614 super(channel, callOptions); 615 } 616 617 @java.lang.Override build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)618 protected IntentsFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 619 return new IntentsFutureStub(channel, callOptions); 620 } 621 622 /** 623 * 624 * 625 * <pre> 626 * Returns the list of all intents in the specified agent. 627 * </pre> 628 */ 629 public com.google.common.util.concurrent.ListenableFuture< 630 com.google.cloud.dialogflow.cx.v3.ListIntentsResponse> listIntents(com.google.cloud.dialogflow.cx.v3.ListIntentsRequest request)631 listIntents(com.google.cloud.dialogflow.cx.v3.ListIntentsRequest request) { 632 return io.grpc.stub.ClientCalls.futureUnaryCall( 633 getChannel().newCall(getListIntentsMethod(), getCallOptions()), request); 634 } 635 636 /** 637 * 638 * 639 * <pre> 640 * Retrieves the specified intent. 641 * </pre> 642 */ 643 public com.google.common.util.concurrent.ListenableFuture< 644 com.google.cloud.dialogflow.cx.v3.Intent> getIntent(com.google.cloud.dialogflow.cx.v3.GetIntentRequest request)645 getIntent(com.google.cloud.dialogflow.cx.v3.GetIntentRequest request) { 646 return io.grpc.stub.ClientCalls.futureUnaryCall( 647 getChannel().newCall(getGetIntentMethod(), getCallOptions()), request); 648 } 649 650 /** 651 * 652 * 653 * <pre> 654 * Creates an intent in the specified agent. 655 * Note: You should always train a flow prior to sending it queries. See the 656 * [training 657 * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 658 * </pre> 659 */ 660 public com.google.common.util.concurrent.ListenableFuture< 661 com.google.cloud.dialogflow.cx.v3.Intent> createIntent(com.google.cloud.dialogflow.cx.v3.CreateIntentRequest request)662 createIntent(com.google.cloud.dialogflow.cx.v3.CreateIntentRequest request) { 663 return io.grpc.stub.ClientCalls.futureUnaryCall( 664 getChannel().newCall(getCreateIntentMethod(), getCallOptions()), request); 665 } 666 667 /** 668 * 669 * 670 * <pre> 671 * Updates the specified intent. 672 * Note: You should always train a flow prior to sending it queries. See the 673 * [training 674 * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 675 * </pre> 676 */ 677 public com.google.common.util.concurrent.ListenableFuture< 678 com.google.cloud.dialogflow.cx.v3.Intent> updateIntent(com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest request)679 updateIntent(com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest request) { 680 return io.grpc.stub.ClientCalls.futureUnaryCall( 681 getChannel().newCall(getUpdateIntentMethod(), getCallOptions()), request); 682 } 683 684 /** 685 * 686 * 687 * <pre> 688 * Deletes the specified intent. 689 * Note: You should always train a flow prior to sending it queries. See the 690 * [training 691 * documentation](https://cloud.google.com/dialogflow/cx/docs/concept/training). 692 * </pre> 693 */ 694 public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteIntent(com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest request)695 deleteIntent(com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest request) { 696 return io.grpc.stub.ClientCalls.futureUnaryCall( 697 getChannel().newCall(getDeleteIntentMethod(), getCallOptions()), request); 698 } 699 } 700 701 private static final int METHODID_LIST_INTENTS = 0; 702 private static final int METHODID_GET_INTENT = 1; 703 private static final int METHODID_CREATE_INTENT = 2; 704 private static final int METHODID_UPDATE_INTENT = 3; 705 private static final int METHODID_DELETE_INTENT = 4; 706 707 private static final class MethodHandlers<Req, Resp> 708 implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, 709 io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, 710 io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, 711 io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { 712 private final AsyncService serviceImpl; 713 private final int methodId; 714 MethodHandlers(AsyncService serviceImpl, int methodId)715 MethodHandlers(AsyncService serviceImpl, int methodId) { 716 this.serviceImpl = serviceImpl; 717 this.methodId = methodId; 718 } 719 720 @java.lang.Override 721 @java.lang.SuppressWarnings("unchecked") invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver)722 public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) { 723 switch (methodId) { 724 case METHODID_LIST_INTENTS: 725 serviceImpl.listIntents( 726 (com.google.cloud.dialogflow.cx.v3.ListIntentsRequest) request, 727 (io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.ListIntentsResponse>) 728 responseObserver); 729 break; 730 case METHODID_GET_INTENT: 731 serviceImpl.getIntent( 732 (com.google.cloud.dialogflow.cx.v3.GetIntentRequest) request, 733 (io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent>) 734 responseObserver); 735 break; 736 case METHODID_CREATE_INTENT: 737 serviceImpl.createIntent( 738 (com.google.cloud.dialogflow.cx.v3.CreateIntentRequest) request, 739 (io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent>) 740 responseObserver); 741 break; 742 case METHODID_UPDATE_INTENT: 743 serviceImpl.updateIntent( 744 (com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest) request, 745 (io.grpc.stub.StreamObserver<com.google.cloud.dialogflow.cx.v3.Intent>) 746 responseObserver); 747 break; 748 case METHODID_DELETE_INTENT: 749 serviceImpl.deleteIntent( 750 (com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest) request, 751 (io.grpc.stub.StreamObserver<com.google.protobuf.Empty>) responseObserver); 752 break; 753 default: 754 throw new AssertionError(); 755 } 756 } 757 758 @java.lang.Override 759 @java.lang.SuppressWarnings("unchecked") invoke( io.grpc.stub.StreamObserver<Resp> responseObserver)760 public io.grpc.stub.StreamObserver<Req> invoke( 761 io.grpc.stub.StreamObserver<Resp> responseObserver) { 762 switch (methodId) { 763 default: 764 throw new AssertionError(); 765 } 766 } 767 } 768 bindService(AsyncService service)769 public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { 770 return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) 771 .addMethod( 772 getListIntentsMethod(), 773 io.grpc.stub.ServerCalls.asyncUnaryCall( 774 new MethodHandlers< 775 com.google.cloud.dialogflow.cx.v3.ListIntentsRequest, 776 com.google.cloud.dialogflow.cx.v3.ListIntentsResponse>( 777 service, METHODID_LIST_INTENTS))) 778 .addMethod( 779 getGetIntentMethod(), 780 io.grpc.stub.ServerCalls.asyncUnaryCall( 781 new MethodHandlers< 782 com.google.cloud.dialogflow.cx.v3.GetIntentRequest, 783 com.google.cloud.dialogflow.cx.v3.Intent>(service, METHODID_GET_INTENT))) 784 .addMethod( 785 getCreateIntentMethod(), 786 io.grpc.stub.ServerCalls.asyncUnaryCall( 787 new MethodHandlers< 788 com.google.cloud.dialogflow.cx.v3.CreateIntentRequest, 789 com.google.cloud.dialogflow.cx.v3.Intent>(service, METHODID_CREATE_INTENT))) 790 .addMethod( 791 getUpdateIntentMethod(), 792 io.grpc.stub.ServerCalls.asyncUnaryCall( 793 new MethodHandlers< 794 com.google.cloud.dialogflow.cx.v3.UpdateIntentRequest, 795 com.google.cloud.dialogflow.cx.v3.Intent>(service, METHODID_UPDATE_INTENT))) 796 .addMethod( 797 getDeleteIntentMethod(), 798 io.grpc.stub.ServerCalls.asyncUnaryCall( 799 new MethodHandlers< 800 com.google.cloud.dialogflow.cx.v3.DeleteIntentRequest, 801 com.google.protobuf.Empty>(service, METHODID_DELETE_INTENT))) 802 .build(); 803 } 804 805 private abstract static class IntentsBaseDescriptorSupplier 806 implements io.grpc.protobuf.ProtoFileDescriptorSupplier, 807 io.grpc.protobuf.ProtoServiceDescriptorSupplier { IntentsBaseDescriptorSupplier()808 IntentsBaseDescriptorSupplier() {} 809 810 @java.lang.Override getFileDescriptor()811 public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { 812 return com.google.cloud.dialogflow.cx.v3.IntentProto.getDescriptor(); 813 } 814 815 @java.lang.Override getServiceDescriptor()816 public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { 817 return getFileDescriptor().findServiceByName("Intents"); 818 } 819 } 820 821 private static final class IntentsFileDescriptorSupplier extends IntentsBaseDescriptorSupplier { IntentsFileDescriptorSupplier()822 IntentsFileDescriptorSupplier() {} 823 } 824 825 private static final class IntentsMethodDescriptorSupplier extends IntentsBaseDescriptorSupplier 826 implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { 827 private final String methodName; 828 IntentsMethodDescriptorSupplier(String methodName)829 IntentsMethodDescriptorSupplier(String methodName) { 830 this.methodName = methodName; 831 } 832 833 @java.lang.Override getMethodDescriptor()834 public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { 835 return getServiceDescriptor().findMethodByName(methodName); 836 } 837 } 838 839 private static volatile io.grpc.ServiceDescriptor serviceDescriptor; 840 getServiceDescriptor()841 public static io.grpc.ServiceDescriptor getServiceDescriptor() { 842 io.grpc.ServiceDescriptor result = serviceDescriptor; 843 if (result == null) { 844 synchronized (IntentsGrpc.class) { 845 result = serviceDescriptor; 846 if (result == null) { 847 serviceDescriptor = 848 result = 849 io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) 850 .setSchemaDescriptor(new IntentsFileDescriptorSupplier()) 851 .addMethod(getListIntentsMethod()) 852 .addMethod(getGetIntentMethod()) 853 .addMethod(getCreateIntentMethod()) 854 .addMethod(getUpdateIntentMethod()) 855 .addMethod(getDeleteIntentMethod()) 856 .build(); 857 } 858 } 859 } 860 return result; 861 } 862 } 863