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