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