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