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