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.redis.v1beta1; 17 18 import static io.grpc.MethodDescriptor.generateFullMethodName; 19 20 /** 21 * 22 * 23 * <pre> 24 * Configures and manages Cloud Memorystore for Redis instances 25 * Google Cloud Memorystore for Redis v1beta1 26 * The `redis.googleapis.com` service implements the Google Cloud Memorystore 27 * for Redis API and defines the following resource model for managing Redis 28 * instances: 29 * * The service works with a collection of cloud projects, named: `/projects/*` 30 * * Each project has a collection of available locations, named: `/locations/*` 31 * * Each location has a collection of Redis instances, named: `/instances/*` 32 * * As such, Redis instances are resources of the form: 33 * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 34 * Note that location_id must be referring to a GCP `region`; for example: 35 * * `projects/redpepper-1290/locations/us-central1/instances/my-redis` 36 * </pre> 37 */ 38 @javax.annotation.Generated( 39 value = "by gRPC proto compiler", 40 comments = "Source: google/cloud/redis/v1beta1/cloud_redis.proto") 41 @io.grpc.stub.annotations.GrpcGenerated 42 public final class CloudRedisGrpc { 43 CloudRedisGrpc()44 private CloudRedisGrpc() {} 45 46 public static final String SERVICE_NAME = "google.cloud.redis.v1beta1.CloudRedis"; 47 48 // Static method descriptors that strictly reflect the proto. 49 private static volatile io.grpc.MethodDescriptor< 50 com.google.cloud.redis.v1beta1.ListInstancesRequest, 51 com.google.cloud.redis.v1beta1.ListInstancesResponse> 52 getListInstancesMethod; 53 54 @io.grpc.stub.annotations.RpcMethod( 55 fullMethodName = SERVICE_NAME + '/' + "ListInstances", 56 requestType = com.google.cloud.redis.v1beta1.ListInstancesRequest.class, 57 responseType = com.google.cloud.redis.v1beta1.ListInstancesResponse.class, 58 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 59 public static io.grpc.MethodDescriptor< 60 com.google.cloud.redis.v1beta1.ListInstancesRequest, 61 com.google.cloud.redis.v1beta1.ListInstancesResponse> getListInstancesMethod()62 getListInstancesMethod() { 63 io.grpc.MethodDescriptor< 64 com.google.cloud.redis.v1beta1.ListInstancesRequest, 65 com.google.cloud.redis.v1beta1.ListInstancesResponse> 66 getListInstancesMethod; 67 if ((getListInstancesMethod = CloudRedisGrpc.getListInstancesMethod) == null) { 68 synchronized (CloudRedisGrpc.class) { 69 if ((getListInstancesMethod = CloudRedisGrpc.getListInstancesMethod) == null) { 70 CloudRedisGrpc.getListInstancesMethod = 71 getListInstancesMethod = 72 io.grpc.MethodDescriptor 73 .<com.google.cloud.redis.v1beta1.ListInstancesRequest, 74 com.google.cloud.redis.v1beta1.ListInstancesResponse> 75 newBuilder() 76 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 77 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListInstances")) 78 .setSampledToLocalTracing(true) 79 .setRequestMarshaller( 80 io.grpc.protobuf.ProtoUtils.marshaller( 81 com.google.cloud.redis.v1beta1.ListInstancesRequest 82 .getDefaultInstance())) 83 .setResponseMarshaller( 84 io.grpc.protobuf.ProtoUtils.marshaller( 85 com.google.cloud.redis.v1beta1.ListInstancesResponse 86 .getDefaultInstance())) 87 .setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("ListInstances")) 88 .build(); 89 } 90 } 91 } 92 return getListInstancesMethod; 93 } 94 95 private static volatile io.grpc.MethodDescriptor< 96 com.google.cloud.redis.v1beta1.GetInstanceRequest, 97 com.google.cloud.redis.v1beta1.Instance> 98 getGetInstanceMethod; 99 100 @io.grpc.stub.annotations.RpcMethod( 101 fullMethodName = SERVICE_NAME + '/' + "GetInstance", 102 requestType = com.google.cloud.redis.v1beta1.GetInstanceRequest.class, 103 responseType = com.google.cloud.redis.v1beta1.Instance.class, 104 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 105 public static io.grpc.MethodDescriptor< 106 com.google.cloud.redis.v1beta1.GetInstanceRequest, 107 com.google.cloud.redis.v1beta1.Instance> getGetInstanceMethod()108 getGetInstanceMethod() { 109 io.grpc.MethodDescriptor< 110 com.google.cloud.redis.v1beta1.GetInstanceRequest, 111 com.google.cloud.redis.v1beta1.Instance> 112 getGetInstanceMethod; 113 if ((getGetInstanceMethod = CloudRedisGrpc.getGetInstanceMethod) == null) { 114 synchronized (CloudRedisGrpc.class) { 115 if ((getGetInstanceMethod = CloudRedisGrpc.getGetInstanceMethod) == null) { 116 CloudRedisGrpc.getGetInstanceMethod = 117 getGetInstanceMethod = 118 io.grpc.MethodDescriptor 119 .<com.google.cloud.redis.v1beta1.GetInstanceRequest, 120 com.google.cloud.redis.v1beta1.Instance> 121 newBuilder() 122 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 123 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetInstance")) 124 .setSampledToLocalTracing(true) 125 .setRequestMarshaller( 126 io.grpc.protobuf.ProtoUtils.marshaller( 127 com.google.cloud.redis.v1beta1.GetInstanceRequest 128 .getDefaultInstance())) 129 .setResponseMarshaller( 130 io.grpc.protobuf.ProtoUtils.marshaller( 131 com.google.cloud.redis.v1beta1.Instance.getDefaultInstance())) 132 .setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("GetInstance")) 133 .build(); 134 } 135 } 136 } 137 return getGetInstanceMethod; 138 } 139 140 private static volatile io.grpc.MethodDescriptor< 141 com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest, 142 com.google.cloud.redis.v1beta1.InstanceAuthString> 143 getGetInstanceAuthStringMethod; 144 145 @io.grpc.stub.annotations.RpcMethod( 146 fullMethodName = SERVICE_NAME + '/' + "GetInstanceAuthString", 147 requestType = com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest.class, 148 responseType = com.google.cloud.redis.v1beta1.InstanceAuthString.class, 149 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 150 public static io.grpc.MethodDescriptor< 151 com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest, 152 com.google.cloud.redis.v1beta1.InstanceAuthString> getGetInstanceAuthStringMethod()153 getGetInstanceAuthStringMethod() { 154 io.grpc.MethodDescriptor< 155 com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest, 156 com.google.cloud.redis.v1beta1.InstanceAuthString> 157 getGetInstanceAuthStringMethod; 158 if ((getGetInstanceAuthStringMethod = CloudRedisGrpc.getGetInstanceAuthStringMethod) == null) { 159 synchronized (CloudRedisGrpc.class) { 160 if ((getGetInstanceAuthStringMethod = CloudRedisGrpc.getGetInstanceAuthStringMethod) 161 == null) { 162 CloudRedisGrpc.getGetInstanceAuthStringMethod = 163 getGetInstanceAuthStringMethod = 164 io.grpc.MethodDescriptor 165 .<com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest, 166 com.google.cloud.redis.v1beta1.InstanceAuthString> 167 newBuilder() 168 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 169 .setFullMethodName( 170 generateFullMethodName(SERVICE_NAME, "GetInstanceAuthString")) 171 .setSampledToLocalTracing(true) 172 .setRequestMarshaller( 173 io.grpc.protobuf.ProtoUtils.marshaller( 174 com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest 175 .getDefaultInstance())) 176 .setResponseMarshaller( 177 io.grpc.protobuf.ProtoUtils.marshaller( 178 com.google.cloud.redis.v1beta1.InstanceAuthString 179 .getDefaultInstance())) 180 .setSchemaDescriptor( 181 new CloudRedisMethodDescriptorSupplier("GetInstanceAuthString")) 182 .build(); 183 } 184 } 185 } 186 return getGetInstanceAuthStringMethod; 187 } 188 189 private static volatile io.grpc.MethodDescriptor< 190 com.google.cloud.redis.v1beta1.CreateInstanceRequest, com.google.longrunning.Operation> 191 getCreateInstanceMethod; 192 193 @io.grpc.stub.annotations.RpcMethod( 194 fullMethodName = SERVICE_NAME + '/' + "CreateInstance", 195 requestType = com.google.cloud.redis.v1beta1.CreateInstanceRequest.class, 196 responseType = com.google.longrunning.Operation.class, 197 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 198 public static io.grpc.MethodDescriptor< 199 com.google.cloud.redis.v1beta1.CreateInstanceRequest, com.google.longrunning.Operation> getCreateInstanceMethod()200 getCreateInstanceMethod() { 201 io.grpc.MethodDescriptor< 202 com.google.cloud.redis.v1beta1.CreateInstanceRequest, com.google.longrunning.Operation> 203 getCreateInstanceMethod; 204 if ((getCreateInstanceMethod = CloudRedisGrpc.getCreateInstanceMethod) == null) { 205 synchronized (CloudRedisGrpc.class) { 206 if ((getCreateInstanceMethod = CloudRedisGrpc.getCreateInstanceMethod) == null) { 207 CloudRedisGrpc.getCreateInstanceMethod = 208 getCreateInstanceMethod = 209 io.grpc.MethodDescriptor 210 .<com.google.cloud.redis.v1beta1.CreateInstanceRequest, 211 com.google.longrunning.Operation> 212 newBuilder() 213 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 214 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateInstance")) 215 .setSampledToLocalTracing(true) 216 .setRequestMarshaller( 217 io.grpc.protobuf.ProtoUtils.marshaller( 218 com.google.cloud.redis.v1beta1.CreateInstanceRequest 219 .getDefaultInstance())) 220 .setResponseMarshaller( 221 io.grpc.protobuf.ProtoUtils.marshaller( 222 com.google.longrunning.Operation.getDefaultInstance())) 223 .setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("CreateInstance")) 224 .build(); 225 } 226 } 227 } 228 return getCreateInstanceMethod; 229 } 230 231 private static volatile io.grpc.MethodDescriptor< 232 com.google.cloud.redis.v1beta1.UpdateInstanceRequest, com.google.longrunning.Operation> 233 getUpdateInstanceMethod; 234 235 @io.grpc.stub.annotations.RpcMethod( 236 fullMethodName = SERVICE_NAME + '/' + "UpdateInstance", 237 requestType = com.google.cloud.redis.v1beta1.UpdateInstanceRequest.class, 238 responseType = com.google.longrunning.Operation.class, 239 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 240 public static io.grpc.MethodDescriptor< 241 com.google.cloud.redis.v1beta1.UpdateInstanceRequest, com.google.longrunning.Operation> getUpdateInstanceMethod()242 getUpdateInstanceMethod() { 243 io.grpc.MethodDescriptor< 244 com.google.cloud.redis.v1beta1.UpdateInstanceRequest, com.google.longrunning.Operation> 245 getUpdateInstanceMethod; 246 if ((getUpdateInstanceMethod = CloudRedisGrpc.getUpdateInstanceMethod) == null) { 247 synchronized (CloudRedisGrpc.class) { 248 if ((getUpdateInstanceMethod = CloudRedisGrpc.getUpdateInstanceMethod) == null) { 249 CloudRedisGrpc.getUpdateInstanceMethod = 250 getUpdateInstanceMethod = 251 io.grpc.MethodDescriptor 252 .<com.google.cloud.redis.v1beta1.UpdateInstanceRequest, 253 com.google.longrunning.Operation> 254 newBuilder() 255 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 256 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateInstance")) 257 .setSampledToLocalTracing(true) 258 .setRequestMarshaller( 259 io.grpc.protobuf.ProtoUtils.marshaller( 260 com.google.cloud.redis.v1beta1.UpdateInstanceRequest 261 .getDefaultInstance())) 262 .setResponseMarshaller( 263 io.grpc.protobuf.ProtoUtils.marshaller( 264 com.google.longrunning.Operation.getDefaultInstance())) 265 .setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("UpdateInstance")) 266 .build(); 267 } 268 } 269 } 270 return getUpdateInstanceMethod; 271 } 272 273 private static volatile io.grpc.MethodDescriptor< 274 com.google.cloud.redis.v1beta1.UpgradeInstanceRequest, com.google.longrunning.Operation> 275 getUpgradeInstanceMethod; 276 277 @io.grpc.stub.annotations.RpcMethod( 278 fullMethodName = SERVICE_NAME + '/' + "UpgradeInstance", 279 requestType = com.google.cloud.redis.v1beta1.UpgradeInstanceRequest.class, 280 responseType = com.google.longrunning.Operation.class, 281 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 282 public static io.grpc.MethodDescriptor< 283 com.google.cloud.redis.v1beta1.UpgradeInstanceRequest, com.google.longrunning.Operation> getUpgradeInstanceMethod()284 getUpgradeInstanceMethod() { 285 io.grpc.MethodDescriptor< 286 com.google.cloud.redis.v1beta1.UpgradeInstanceRequest, com.google.longrunning.Operation> 287 getUpgradeInstanceMethod; 288 if ((getUpgradeInstanceMethod = CloudRedisGrpc.getUpgradeInstanceMethod) == null) { 289 synchronized (CloudRedisGrpc.class) { 290 if ((getUpgradeInstanceMethod = CloudRedisGrpc.getUpgradeInstanceMethod) == null) { 291 CloudRedisGrpc.getUpgradeInstanceMethod = 292 getUpgradeInstanceMethod = 293 io.grpc.MethodDescriptor 294 .<com.google.cloud.redis.v1beta1.UpgradeInstanceRequest, 295 com.google.longrunning.Operation> 296 newBuilder() 297 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 298 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpgradeInstance")) 299 .setSampledToLocalTracing(true) 300 .setRequestMarshaller( 301 io.grpc.protobuf.ProtoUtils.marshaller( 302 com.google.cloud.redis.v1beta1.UpgradeInstanceRequest 303 .getDefaultInstance())) 304 .setResponseMarshaller( 305 io.grpc.protobuf.ProtoUtils.marshaller( 306 com.google.longrunning.Operation.getDefaultInstance())) 307 .setSchemaDescriptor( 308 new CloudRedisMethodDescriptorSupplier("UpgradeInstance")) 309 .build(); 310 } 311 } 312 } 313 return getUpgradeInstanceMethod; 314 } 315 316 private static volatile io.grpc.MethodDescriptor< 317 com.google.cloud.redis.v1beta1.ImportInstanceRequest, com.google.longrunning.Operation> 318 getImportInstanceMethod; 319 320 @io.grpc.stub.annotations.RpcMethod( 321 fullMethodName = SERVICE_NAME + '/' + "ImportInstance", 322 requestType = com.google.cloud.redis.v1beta1.ImportInstanceRequest.class, 323 responseType = com.google.longrunning.Operation.class, 324 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 325 public static io.grpc.MethodDescriptor< 326 com.google.cloud.redis.v1beta1.ImportInstanceRequest, com.google.longrunning.Operation> getImportInstanceMethod()327 getImportInstanceMethod() { 328 io.grpc.MethodDescriptor< 329 com.google.cloud.redis.v1beta1.ImportInstanceRequest, com.google.longrunning.Operation> 330 getImportInstanceMethod; 331 if ((getImportInstanceMethod = CloudRedisGrpc.getImportInstanceMethod) == null) { 332 synchronized (CloudRedisGrpc.class) { 333 if ((getImportInstanceMethod = CloudRedisGrpc.getImportInstanceMethod) == null) { 334 CloudRedisGrpc.getImportInstanceMethod = 335 getImportInstanceMethod = 336 io.grpc.MethodDescriptor 337 .<com.google.cloud.redis.v1beta1.ImportInstanceRequest, 338 com.google.longrunning.Operation> 339 newBuilder() 340 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 341 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ImportInstance")) 342 .setSampledToLocalTracing(true) 343 .setRequestMarshaller( 344 io.grpc.protobuf.ProtoUtils.marshaller( 345 com.google.cloud.redis.v1beta1.ImportInstanceRequest 346 .getDefaultInstance())) 347 .setResponseMarshaller( 348 io.grpc.protobuf.ProtoUtils.marshaller( 349 com.google.longrunning.Operation.getDefaultInstance())) 350 .setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("ImportInstance")) 351 .build(); 352 } 353 } 354 } 355 return getImportInstanceMethod; 356 } 357 358 private static volatile io.grpc.MethodDescriptor< 359 com.google.cloud.redis.v1beta1.ExportInstanceRequest, com.google.longrunning.Operation> 360 getExportInstanceMethod; 361 362 @io.grpc.stub.annotations.RpcMethod( 363 fullMethodName = SERVICE_NAME + '/' + "ExportInstance", 364 requestType = com.google.cloud.redis.v1beta1.ExportInstanceRequest.class, 365 responseType = com.google.longrunning.Operation.class, 366 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 367 public static io.grpc.MethodDescriptor< 368 com.google.cloud.redis.v1beta1.ExportInstanceRequest, com.google.longrunning.Operation> getExportInstanceMethod()369 getExportInstanceMethod() { 370 io.grpc.MethodDescriptor< 371 com.google.cloud.redis.v1beta1.ExportInstanceRequest, com.google.longrunning.Operation> 372 getExportInstanceMethod; 373 if ((getExportInstanceMethod = CloudRedisGrpc.getExportInstanceMethod) == null) { 374 synchronized (CloudRedisGrpc.class) { 375 if ((getExportInstanceMethod = CloudRedisGrpc.getExportInstanceMethod) == null) { 376 CloudRedisGrpc.getExportInstanceMethod = 377 getExportInstanceMethod = 378 io.grpc.MethodDescriptor 379 .<com.google.cloud.redis.v1beta1.ExportInstanceRequest, 380 com.google.longrunning.Operation> 381 newBuilder() 382 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 383 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ExportInstance")) 384 .setSampledToLocalTracing(true) 385 .setRequestMarshaller( 386 io.grpc.protobuf.ProtoUtils.marshaller( 387 com.google.cloud.redis.v1beta1.ExportInstanceRequest 388 .getDefaultInstance())) 389 .setResponseMarshaller( 390 io.grpc.protobuf.ProtoUtils.marshaller( 391 com.google.longrunning.Operation.getDefaultInstance())) 392 .setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("ExportInstance")) 393 .build(); 394 } 395 } 396 } 397 return getExportInstanceMethod; 398 } 399 400 private static volatile io.grpc.MethodDescriptor< 401 com.google.cloud.redis.v1beta1.FailoverInstanceRequest, com.google.longrunning.Operation> 402 getFailoverInstanceMethod; 403 404 @io.grpc.stub.annotations.RpcMethod( 405 fullMethodName = SERVICE_NAME + '/' + "FailoverInstance", 406 requestType = com.google.cloud.redis.v1beta1.FailoverInstanceRequest.class, 407 responseType = com.google.longrunning.Operation.class, 408 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 409 public static io.grpc.MethodDescriptor< 410 com.google.cloud.redis.v1beta1.FailoverInstanceRequest, com.google.longrunning.Operation> getFailoverInstanceMethod()411 getFailoverInstanceMethod() { 412 io.grpc.MethodDescriptor< 413 com.google.cloud.redis.v1beta1.FailoverInstanceRequest, 414 com.google.longrunning.Operation> 415 getFailoverInstanceMethod; 416 if ((getFailoverInstanceMethod = CloudRedisGrpc.getFailoverInstanceMethod) == null) { 417 synchronized (CloudRedisGrpc.class) { 418 if ((getFailoverInstanceMethod = CloudRedisGrpc.getFailoverInstanceMethod) == null) { 419 CloudRedisGrpc.getFailoverInstanceMethod = 420 getFailoverInstanceMethod = 421 io.grpc.MethodDescriptor 422 .<com.google.cloud.redis.v1beta1.FailoverInstanceRequest, 423 com.google.longrunning.Operation> 424 newBuilder() 425 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 426 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "FailoverInstance")) 427 .setSampledToLocalTracing(true) 428 .setRequestMarshaller( 429 io.grpc.protobuf.ProtoUtils.marshaller( 430 com.google.cloud.redis.v1beta1.FailoverInstanceRequest 431 .getDefaultInstance())) 432 .setResponseMarshaller( 433 io.grpc.protobuf.ProtoUtils.marshaller( 434 com.google.longrunning.Operation.getDefaultInstance())) 435 .setSchemaDescriptor( 436 new CloudRedisMethodDescriptorSupplier("FailoverInstance")) 437 .build(); 438 } 439 } 440 } 441 return getFailoverInstanceMethod; 442 } 443 444 private static volatile io.grpc.MethodDescriptor< 445 com.google.cloud.redis.v1beta1.DeleteInstanceRequest, com.google.longrunning.Operation> 446 getDeleteInstanceMethod; 447 448 @io.grpc.stub.annotations.RpcMethod( 449 fullMethodName = SERVICE_NAME + '/' + "DeleteInstance", 450 requestType = com.google.cloud.redis.v1beta1.DeleteInstanceRequest.class, 451 responseType = com.google.longrunning.Operation.class, 452 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 453 public static io.grpc.MethodDescriptor< 454 com.google.cloud.redis.v1beta1.DeleteInstanceRequest, com.google.longrunning.Operation> getDeleteInstanceMethod()455 getDeleteInstanceMethod() { 456 io.grpc.MethodDescriptor< 457 com.google.cloud.redis.v1beta1.DeleteInstanceRequest, com.google.longrunning.Operation> 458 getDeleteInstanceMethod; 459 if ((getDeleteInstanceMethod = CloudRedisGrpc.getDeleteInstanceMethod) == null) { 460 synchronized (CloudRedisGrpc.class) { 461 if ((getDeleteInstanceMethod = CloudRedisGrpc.getDeleteInstanceMethod) == null) { 462 CloudRedisGrpc.getDeleteInstanceMethod = 463 getDeleteInstanceMethod = 464 io.grpc.MethodDescriptor 465 .<com.google.cloud.redis.v1beta1.DeleteInstanceRequest, 466 com.google.longrunning.Operation> 467 newBuilder() 468 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 469 .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteInstance")) 470 .setSampledToLocalTracing(true) 471 .setRequestMarshaller( 472 io.grpc.protobuf.ProtoUtils.marshaller( 473 com.google.cloud.redis.v1beta1.DeleteInstanceRequest 474 .getDefaultInstance())) 475 .setResponseMarshaller( 476 io.grpc.protobuf.ProtoUtils.marshaller( 477 com.google.longrunning.Operation.getDefaultInstance())) 478 .setSchemaDescriptor(new CloudRedisMethodDescriptorSupplier("DeleteInstance")) 479 .build(); 480 } 481 } 482 } 483 return getDeleteInstanceMethod; 484 } 485 486 private static volatile io.grpc.MethodDescriptor< 487 com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest, 488 com.google.longrunning.Operation> 489 getRescheduleMaintenanceMethod; 490 491 @io.grpc.stub.annotations.RpcMethod( 492 fullMethodName = SERVICE_NAME + '/' + "RescheduleMaintenance", 493 requestType = com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest.class, 494 responseType = com.google.longrunning.Operation.class, 495 methodType = io.grpc.MethodDescriptor.MethodType.UNARY) 496 public static io.grpc.MethodDescriptor< 497 com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest, 498 com.google.longrunning.Operation> getRescheduleMaintenanceMethod()499 getRescheduleMaintenanceMethod() { 500 io.grpc.MethodDescriptor< 501 com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest, 502 com.google.longrunning.Operation> 503 getRescheduleMaintenanceMethod; 504 if ((getRescheduleMaintenanceMethod = CloudRedisGrpc.getRescheduleMaintenanceMethod) == null) { 505 synchronized (CloudRedisGrpc.class) { 506 if ((getRescheduleMaintenanceMethod = CloudRedisGrpc.getRescheduleMaintenanceMethod) 507 == null) { 508 CloudRedisGrpc.getRescheduleMaintenanceMethod = 509 getRescheduleMaintenanceMethod = 510 io.grpc.MethodDescriptor 511 .<com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest, 512 com.google.longrunning.Operation> 513 newBuilder() 514 .setType(io.grpc.MethodDescriptor.MethodType.UNARY) 515 .setFullMethodName( 516 generateFullMethodName(SERVICE_NAME, "RescheduleMaintenance")) 517 .setSampledToLocalTracing(true) 518 .setRequestMarshaller( 519 io.grpc.protobuf.ProtoUtils.marshaller( 520 com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest 521 .getDefaultInstance())) 522 .setResponseMarshaller( 523 io.grpc.protobuf.ProtoUtils.marshaller( 524 com.google.longrunning.Operation.getDefaultInstance())) 525 .setSchemaDescriptor( 526 new CloudRedisMethodDescriptorSupplier("RescheduleMaintenance")) 527 .build(); 528 } 529 } 530 } 531 return getRescheduleMaintenanceMethod; 532 } 533 534 /** Creates a new async stub that supports all call types for the service */ newStub(io.grpc.Channel channel)535 public static CloudRedisStub newStub(io.grpc.Channel channel) { 536 io.grpc.stub.AbstractStub.StubFactory<CloudRedisStub> factory = 537 new io.grpc.stub.AbstractStub.StubFactory<CloudRedisStub>() { 538 @java.lang.Override 539 public CloudRedisStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 540 return new CloudRedisStub(channel, callOptions); 541 } 542 }; 543 return CloudRedisStub.newStub(factory, channel); 544 } 545 546 /** 547 * Creates a new blocking-style stub that supports unary and streaming output calls on the service 548 */ newBlockingStub(io.grpc.Channel channel)549 public static CloudRedisBlockingStub newBlockingStub(io.grpc.Channel channel) { 550 io.grpc.stub.AbstractStub.StubFactory<CloudRedisBlockingStub> factory = 551 new io.grpc.stub.AbstractStub.StubFactory<CloudRedisBlockingStub>() { 552 @java.lang.Override 553 public CloudRedisBlockingStub newStub( 554 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 555 return new CloudRedisBlockingStub(channel, callOptions); 556 } 557 }; 558 return CloudRedisBlockingStub.newStub(factory, channel); 559 } 560 561 /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ newFutureStub(io.grpc.Channel channel)562 public static CloudRedisFutureStub newFutureStub(io.grpc.Channel channel) { 563 io.grpc.stub.AbstractStub.StubFactory<CloudRedisFutureStub> factory = 564 new io.grpc.stub.AbstractStub.StubFactory<CloudRedisFutureStub>() { 565 @java.lang.Override 566 public CloudRedisFutureStub newStub( 567 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 568 return new CloudRedisFutureStub(channel, callOptions); 569 } 570 }; 571 return CloudRedisFutureStub.newStub(factory, channel); 572 } 573 574 /** 575 * 576 * 577 * <pre> 578 * Configures and manages Cloud Memorystore for Redis instances 579 * Google Cloud Memorystore for Redis v1beta1 580 * The `redis.googleapis.com` service implements the Google Cloud Memorystore 581 * for Redis API and defines the following resource model for managing Redis 582 * instances: 583 * * The service works with a collection of cloud projects, named: `/projects/*` 584 * * Each project has a collection of available locations, named: `/locations/*` 585 * * Each location has a collection of Redis instances, named: `/instances/*` 586 * * As such, Redis instances are resources of the form: 587 * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 588 * Note that location_id must be referring to a GCP `region`; for example: 589 * * `projects/redpepper-1290/locations/us-central1/instances/my-redis` 590 * </pre> 591 */ 592 public interface AsyncService { 593 594 /** 595 * 596 * 597 * <pre> 598 * Lists all Redis instances owned by a project in either the specified 599 * location (region) or all locations. 600 * The location should have the following format: 601 * * `projects/{project_id}/locations/{location_id}` 602 * If `location_id` is specified as `-` (wildcard), then all regions 603 * available to the project are queried, and the results are aggregated. 604 * </pre> 605 */ listInstances( com.google.cloud.redis.v1beta1.ListInstancesRequest request, io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.ListInstancesResponse> responseObserver)606 default void listInstances( 607 com.google.cloud.redis.v1beta1.ListInstancesRequest request, 608 io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.ListInstancesResponse> 609 responseObserver) { 610 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 611 getListInstancesMethod(), responseObserver); 612 } 613 614 /** 615 * 616 * 617 * <pre> 618 * Gets the details of a specific Redis instance. 619 * </pre> 620 */ getInstance( com.google.cloud.redis.v1beta1.GetInstanceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.Instance> responseObserver)621 default void getInstance( 622 com.google.cloud.redis.v1beta1.GetInstanceRequest request, 623 io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.Instance> responseObserver) { 624 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 625 getGetInstanceMethod(), responseObserver); 626 } 627 628 /** 629 * 630 * 631 * <pre> 632 * Gets the AUTH string for a Redis instance. If AUTH is not enabled for the 633 * instance the response will be empty. This information is not included in 634 * the details returned to GetInstance. 635 * </pre> 636 */ getInstanceAuthString( com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest request, io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.InstanceAuthString> responseObserver)637 default void getInstanceAuthString( 638 com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest request, 639 io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.InstanceAuthString> 640 responseObserver) { 641 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 642 getGetInstanceAuthStringMethod(), responseObserver); 643 } 644 645 /** 646 * 647 * 648 * <pre> 649 * Creates a Redis instance based on the specified tier and memory size. 650 * By default, the instance is accessible from the project's 651 * [default network](https://cloud.google.com/vpc/docs/vpc). 652 * The creation is executed asynchronously and callers may check the returned 653 * operation to track its progress. Once the operation is completed the Redis 654 * instance will be fully functional. The completed longrunning.Operation will 655 * contain the new instance object in the response field. 656 * The returned operation is automatically deleted after a few hours, so there 657 * is no need to call DeleteOperation. 658 * </pre> 659 */ createInstance( com.google.cloud.redis.v1beta1.CreateInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)660 default void createInstance( 661 com.google.cloud.redis.v1beta1.CreateInstanceRequest request, 662 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 663 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 664 getCreateInstanceMethod(), responseObserver); 665 } 666 667 /** 668 * 669 * 670 * <pre> 671 * Updates the metadata and configuration of a specific Redis instance. 672 * Completed longrunning.Operation will contain the new instance object 673 * in the response field. The returned operation is automatically deleted 674 * after a few hours, so there is no need to call DeleteOperation. 675 * </pre> 676 */ updateInstance( com.google.cloud.redis.v1beta1.UpdateInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)677 default void updateInstance( 678 com.google.cloud.redis.v1beta1.UpdateInstanceRequest request, 679 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 680 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 681 getUpdateInstanceMethod(), responseObserver); 682 } 683 684 /** 685 * 686 * 687 * <pre> 688 * Upgrades Redis instance to the newer Redis version specified in the 689 * request. 690 * </pre> 691 */ upgradeInstance( com.google.cloud.redis.v1beta1.UpgradeInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)692 default void upgradeInstance( 693 com.google.cloud.redis.v1beta1.UpgradeInstanceRequest request, 694 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 695 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 696 getUpgradeInstanceMethod(), responseObserver); 697 } 698 699 /** 700 * 701 * 702 * <pre> 703 * Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. 704 * Redis may stop serving during this operation. Instance state will be 705 * IMPORTING for entire operation. When complete, the instance will contain 706 * only data from the imported file. 707 * The returned operation is automatically deleted after a few hours, so 708 * there is no need to call DeleteOperation. 709 * </pre> 710 */ importInstance( com.google.cloud.redis.v1beta1.ImportInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)711 default void importInstance( 712 com.google.cloud.redis.v1beta1.ImportInstanceRequest request, 713 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 714 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 715 getImportInstanceMethod(), responseObserver); 716 } 717 718 /** 719 * 720 * 721 * <pre> 722 * Export Redis instance data into a Redis RDB format file in Cloud Storage. 723 * Redis will continue serving during this operation. 724 * The returned operation is automatically deleted after a few hours, so 725 * there is no need to call DeleteOperation. 726 * </pre> 727 */ exportInstance( com.google.cloud.redis.v1beta1.ExportInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)728 default void exportInstance( 729 com.google.cloud.redis.v1beta1.ExportInstanceRequest request, 730 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 731 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 732 getExportInstanceMethod(), responseObserver); 733 } 734 735 /** 736 * 737 * 738 * <pre> 739 * Initiates a failover of the primary node to current replica node for a 740 * specific STANDARD tier Cloud Memorystore for Redis instance. 741 * </pre> 742 */ failoverInstance( com.google.cloud.redis.v1beta1.FailoverInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)743 default void failoverInstance( 744 com.google.cloud.redis.v1beta1.FailoverInstanceRequest request, 745 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 746 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 747 getFailoverInstanceMethod(), responseObserver); 748 } 749 750 /** 751 * 752 * 753 * <pre> 754 * Deletes a specific Redis instance. Instance stops serving and data is 755 * deleted. 756 * </pre> 757 */ deleteInstance( com.google.cloud.redis.v1beta1.DeleteInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)758 default void deleteInstance( 759 com.google.cloud.redis.v1beta1.DeleteInstanceRequest request, 760 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 761 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 762 getDeleteInstanceMethod(), responseObserver); 763 } 764 765 /** 766 * 767 * 768 * <pre> 769 * Reschedule maintenance for a given instance in a given project and 770 * location. 771 * </pre> 772 */ rescheduleMaintenance( com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)773 default void rescheduleMaintenance( 774 com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest request, 775 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 776 io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( 777 getRescheduleMaintenanceMethod(), responseObserver); 778 } 779 } 780 781 /** 782 * Base class for the server implementation of the service CloudRedis. 783 * 784 * <pre> 785 * Configures and manages Cloud Memorystore for Redis instances 786 * Google Cloud Memorystore for Redis v1beta1 787 * The `redis.googleapis.com` service implements the Google Cloud Memorystore 788 * for Redis API and defines the following resource model for managing Redis 789 * instances: 790 * * The service works with a collection of cloud projects, named: `/projects/*` 791 * * Each project has a collection of available locations, named: `/locations/*` 792 * * Each location has a collection of Redis instances, named: `/instances/*` 793 * * As such, Redis instances are resources of the form: 794 * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 795 * Note that location_id must be referring to a GCP `region`; for example: 796 * * `projects/redpepper-1290/locations/us-central1/instances/my-redis` 797 * </pre> 798 */ 799 public abstract static class CloudRedisImplBase implements io.grpc.BindableService, AsyncService { 800 801 @java.lang.Override bindService()802 public final io.grpc.ServerServiceDefinition bindService() { 803 return CloudRedisGrpc.bindService(this); 804 } 805 } 806 807 /** 808 * A stub to allow clients to do asynchronous rpc calls to service CloudRedis. 809 * 810 * <pre> 811 * Configures and manages Cloud Memorystore for Redis instances 812 * Google Cloud Memorystore for Redis v1beta1 813 * The `redis.googleapis.com` service implements the Google Cloud Memorystore 814 * for Redis API and defines the following resource model for managing Redis 815 * instances: 816 * * The service works with a collection of cloud projects, named: `/projects/*` 817 * * Each project has a collection of available locations, named: `/locations/*` 818 * * Each location has a collection of Redis instances, named: `/instances/*` 819 * * As such, Redis instances are resources of the form: 820 * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 821 * Note that location_id must be referring to a GCP `region`; for example: 822 * * `projects/redpepper-1290/locations/us-central1/instances/my-redis` 823 * </pre> 824 */ 825 public static final class CloudRedisStub extends io.grpc.stub.AbstractAsyncStub<CloudRedisStub> { CloudRedisStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)826 private CloudRedisStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 827 super(channel, callOptions); 828 } 829 830 @java.lang.Override build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)831 protected CloudRedisStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 832 return new CloudRedisStub(channel, callOptions); 833 } 834 835 /** 836 * 837 * 838 * <pre> 839 * Lists all Redis instances owned by a project in either the specified 840 * location (region) or all locations. 841 * The location should have the following format: 842 * * `projects/{project_id}/locations/{location_id}` 843 * If `location_id` is specified as `-` (wildcard), then all regions 844 * available to the project are queried, and the results are aggregated. 845 * </pre> 846 */ listInstances( com.google.cloud.redis.v1beta1.ListInstancesRequest request, io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.ListInstancesResponse> responseObserver)847 public void listInstances( 848 com.google.cloud.redis.v1beta1.ListInstancesRequest request, 849 io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.ListInstancesResponse> 850 responseObserver) { 851 io.grpc.stub.ClientCalls.asyncUnaryCall( 852 getChannel().newCall(getListInstancesMethod(), getCallOptions()), 853 request, 854 responseObserver); 855 } 856 857 /** 858 * 859 * 860 * <pre> 861 * Gets the details of a specific Redis instance. 862 * </pre> 863 */ getInstance( com.google.cloud.redis.v1beta1.GetInstanceRequest request, io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.Instance> responseObserver)864 public void getInstance( 865 com.google.cloud.redis.v1beta1.GetInstanceRequest request, 866 io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.Instance> responseObserver) { 867 io.grpc.stub.ClientCalls.asyncUnaryCall( 868 getChannel().newCall(getGetInstanceMethod(), getCallOptions()), 869 request, 870 responseObserver); 871 } 872 873 /** 874 * 875 * 876 * <pre> 877 * Gets the AUTH string for a Redis instance. If AUTH is not enabled for the 878 * instance the response will be empty. This information is not included in 879 * the details returned to GetInstance. 880 * </pre> 881 */ getInstanceAuthString( com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest request, io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.InstanceAuthString> responseObserver)882 public void getInstanceAuthString( 883 com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest request, 884 io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.InstanceAuthString> 885 responseObserver) { 886 io.grpc.stub.ClientCalls.asyncUnaryCall( 887 getChannel().newCall(getGetInstanceAuthStringMethod(), getCallOptions()), 888 request, 889 responseObserver); 890 } 891 892 /** 893 * 894 * 895 * <pre> 896 * Creates a Redis instance based on the specified tier and memory size. 897 * By default, the instance is accessible from the project's 898 * [default network](https://cloud.google.com/vpc/docs/vpc). 899 * The creation is executed asynchronously and callers may check the returned 900 * operation to track its progress. Once the operation is completed the Redis 901 * instance will be fully functional. The completed longrunning.Operation will 902 * contain the new instance object in the response field. 903 * The returned operation is automatically deleted after a few hours, so there 904 * is no need to call DeleteOperation. 905 * </pre> 906 */ createInstance( com.google.cloud.redis.v1beta1.CreateInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)907 public void createInstance( 908 com.google.cloud.redis.v1beta1.CreateInstanceRequest request, 909 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 910 io.grpc.stub.ClientCalls.asyncUnaryCall( 911 getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), 912 request, 913 responseObserver); 914 } 915 916 /** 917 * 918 * 919 * <pre> 920 * Updates the metadata and configuration of a specific Redis instance. 921 * Completed longrunning.Operation will contain the new instance object 922 * in the response field. The returned operation is automatically deleted 923 * after a few hours, so there is no need to call DeleteOperation. 924 * </pre> 925 */ updateInstance( com.google.cloud.redis.v1beta1.UpdateInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)926 public void updateInstance( 927 com.google.cloud.redis.v1beta1.UpdateInstanceRequest request, 928 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 929 io.grpc.stub.ClientCalls.asyncUnaryCall( 930 getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), 931 request, 932 responseObserver); 933 } 934 935 /** 936 * 937 * 938 * <pre> 939 * Upgrades Redis instance to the newer Redis version specified in the 940 * request. 941 * </pre> 942 */ upgradeInstance( com.google.cloud.redis.v1beta1.UpgradeInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)943 public void upgradeInstance( 944 com.google.cloud.redis.v1beta1.UpgradeInstanceRequest request, 945 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 946 io.grpc.stub.ClientCalls.asyncUnaryCall( 947 getChannel().newCall(getUpgradeInstanceMethod(), getCallOptions()), 948 request, 949 responseObserver); 950 } 951 952 /** 953 * 954 * 955 * <pre> 956 * Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. 957 * Redis may stop serving during this operation. Instance state will be 958 * IMPORTING for entire operation. When complete, the instance will contain 959 * only data from the imported file. 960 * The returned operation is automatically deleted after a few hours, so 961 * there is no need to call DeleteOperation. 962 * </pre> 963 */ importInstance( com.google.cloud.redis.v1beta1.ImportInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)964 public void importInstance( 965 com.google.cloud.redis.v1beta1.ImportInstanceRequest request, 966 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 967 io.grpc.stub.ClientCalls.asyncUnaryCall( 968 getChannel().newCall(getImportInstanceMethod(), getCallOptions()), 969 request, 970 responseObserver); 971 } 972 973 /** 974 * 975 * 976 * <pre> 977 * Export Redis instance data into a Redis RDB format file in Cloud Storage. 978 * Redis will continue serving during this operation. 979 * The returned operation is automatically deleted after a few hours, so 980 * there is no need to call DeleteOperation. 981 * </pre> 982 */ exportInstance( com.google.cloud.redis.v1beta1.ExportInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)983 public void exportInstance( 984 com.google.cloud.redis.v1beta1.ExportInstanceRequest request, 985 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 986 io.grpc.stub.ClientCalls.asyncUnaryCall( 987 getChannel().newCall(getExportInstanceMethod(), getCallOptions()), 988 request, 989 responseObserver); 990 } 991 992 /** 993 * 994 * 995 * <pre> 996 * Initiates a failover of the primary node to current replica node for a 997 * specific STANDARD tier Cloud Memorystore for Redis instance. 998 * </pre> 999 */ failoverInstance( com.google.cloud.redis.v1beta1.FailoverInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)1000 public void failoverInstance( 1001 com.google.cloud.redis.v1beta1.FailoverInstanceRequest request, 1002 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 1003 io.grpc.stub.ClientCalls.asyncUnaryCall( 1004 getChannel().newCall(getFailoverInstanceMethod(), getCallOptions()), 1005 request, 1006 responseObserver); 1007 } 1008 1009 /** 1010 * 1011 * 1012 * <pre> 1013 * Deletes a specific Redis instance. Instance stops serving and data is 1014 * deleted. 1015 * </pre> 1016 */ deleteInstance( com.google.cloud.redis.v1beta1.DeleteInstanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)1017 public void deleteInstance( 1018 com.google.cloud.redis.v1beta1.DeleteInstanceRequest request, 1019 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 1020 io.grpc.stub.ClientCalls.asyncUnaryCall( 1021 getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), 1022 request, 1023 responseObserver); 1024 } 1025 1026 /** 1027 * 1028 * 1029 * <pre> 1030 * Reschedule maintenance for a given instance in a given project and 1031 * location. 1032 * </pre> 1033 */ rescheduleMaintenance( com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest request, io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver)1034 public void rescheduleMaintenance( 1035 com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest request, 1036 io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) { 1037 io.grpc.stub.ClientCalls.asyncUnaryCall( 1038 getChannel().newCall(getRescheduleMaintenanceMethod(), getCallOptions()), 1039 request, 1040 responseObserver); 1041 } 1042 } 1043 1044 /** 1045 * A stub to allow clients to do synchronous rpc calls to service CloudRedis. 1046 * 1047 * <pre> 1048 * Configures and manages Cloud Memorystore for Redis instances 1049 * Google Cloud Memorystore for Redis v1beta1 1050 * The `redis.googleapis.com` service implements the Google Cloud Memorystore 1051 * for Redis API and defines the following resource model for managing Redis 1052 * instances: 1053 * * The service works with a collection of cloud projects, named: `/projects/*` 1054 * * Each project has a collection of available locations, named: `/locations/*` 1055 * * Each location has a collection of Redis instances, named: `/instances/*` 1056 * * As such, Redis instances are resources of the form: 1057 * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 1058 * Note that location_id must be referring to a GCP `region`; for example: 1059 * * `projects/redpepper-1290/locations/us-central1/instances/my-redis` 1060 * </pre> 1061 */ 1062 public static final class CloudRedisBlockingStub 1063 extends io.grpc.stub.AbstractBlockingStub<CloudRedisBlockingStub> { CloudRedisBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)1064 private CloudRedisBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1065 super(channel, callOptions); 1066 } 1067 1068 @java.lang.Override build( io.grpc.Channel channel, io.grpc.CallOptions callOptions)1069 protected CloudRedisBlockingStub build( 1070 io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1071 return new CloudRedisBlockingStub(channel, callOptions); 1072 } 1073 1074 /** 1075 * 1076 * 1077 * <pre> 1078 * Lists all Redis instances owned by a project in either the specified 1079 * location (region) or all locations. 1080 * The location should have the following format: 1081 * * `projects/{project_id}/locations/{location_id}` 1082 * If `location_id` is specified as `-` (wildcard), then all regions 1083 * available to the project are queried, and the results are aggregated. 1084 * </pre> 1085 */ listInstances( com.google.cloud.redis.v1beta1.ListInstancesRequest request)1086 public com.google.cloud.redis.v1beta1.ListInstancesResponse listInstances( 1087 com.google.cloud.redis.v1beta1.ListInstancesRequest request) { 1088 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1089 getChannel(), getListInstancesMethod(), getCallOptions(), request); 1090 } 1091 1092 /** 1093 * 1094 * 1095 * <pre> 1096 * Gets the details of a specific Redis instance. 1097 * </pre> 1098 */ getInstance( com.google.cloud.redis.v1beta1.GetInstanceRequest request)1099 public com.google.cloud.redis.v1beta1.Instance getInstance( 1100 com.google.cloud.redis.v1beta1.GetInstanceRequest request) { 1101 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1102 getChannel(), getGetInstanceMethod(), getCallOptions(), request); 1103 } 1104 1105 /** 1106 * 1107 * 1108 * <pre> 1109 * Gets the AUTH string for a Redis instance. If AUTH is not enabled for the 1110 * instance the response will be empty. This information is not included in 1111 * the details returned to GetInstance. 1112 * </pre> 1113 */ getInstanceAuthString( com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest request)1114 public com.google.cloud.redis.v1beta1.InstanceAuthString getInstanceAuthString( 1115 com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest request) { 1116 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1117 getChannel(), getGetInstanceAuthStringMethod(), getCallOptions(), request); 1118 } 1119 1120 /** 1121 * 1122 * 1123 * <pre> 1124 * Creates a Redis instance based on the specified tier and memory size. 1125 * By default, the instance is accessible from the project's 1126 * [default network](https://cloud.google.com/vpc/docs/vpc). 1127 * The creation is executed asynchronously and callers may check the returned 1128 * operation to track its progress. Once the operation is completed the Redis 1129 * instance will be fully functional. The completed longrunning.Operation will 1130 * contain the new instance object in the response field. 1131 * The returned operation is automatically deleted after a few hours, so there 1132 * is no need to call DeleteOperation. 1133 * </pre> 1134 */ createInstance( com.google.cloud.redis.v1beta1.CreateInstanceRequest request)1135 public com.google.longrunning.Operation createInstance( 1136 com.google.cloud.redis.v1beta1.CreateInstanceRequest request) { 1137 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1138 getChannel(), getCreateInstanceMethod(), getCallOptions(), request); 1139 } 1140 1141 /** 1142 * 1143 * 1144 * <pre> 1145 * Updates the metadata and configuration of a specific Redis instance. 1146 * Completed longrunning.Operation will contain the new instance object 1147 * in the response field. The returned operation is automatically deleted 1148 * after a few hours, so there is no need to call DeleteOperation. 1149 * </pre> 1150 */ updateInstance( com.google.cloud.redis.v1beta1.UpdateInstanceRequest request)1151 public com.google.longrunning.Operation updateInstance( 1152 com.google.cloud.redis.v1beta1.UpdateInstanceRequest request) { 1153 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1154 getChannel(), getUpdateInstanceMethod(), getCallOptions(), request); 1155 } 1156 1157 /** 1158 * 1159 * 1160 * <pre> 1161 * Upgrades Redis instance to the newer Redis version specified in the 1162 * request. 1163 * </pre> 1164 */ upgradeInstance( com.google.cloud.redis.v1beta1.UpgradeInstanceRequest request)1165 public com.google.longrunning.Operation upgradeInstance( 1166 com.google.cloud.redis.v1beta1.UpgradeInstanceRequest request) { 1167 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1168 getChannel(), getUpgradeInstanceMethod(), getCallOptions(), request); 1169 } 1170 1171 /** 1172 * 1173 * 1174 * <pre> 1175 * Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. 1176 * Redis may stop serving during this operation. Instance state will be 1177 * IMPORTING for entire operation. When complete, the instance will contain 1178 * only data from the imported file. 1179 * The returned operation is automatically deleted after a few hours, so 1180 * there is no need to call DeleteOperation. 1181 * </pre> 1182 */ importInstance( com.google.cloud.redis.v1beta1.ImportInstanceRequest request)1183 public com.google.longrunning.Operation importInstance( 1184 com.google.cloud.redis.v1beta1.ImportInstanceRequest request) { 1185 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1186 getChannel(), getImportInstanceMethod(), getCallOptions(), request); 1187 } 1188 1189 /** 1190 * 1191 * 1192 * <pre> 1193 * Export Redis instance data into a Redis RDB format file in Cloud Storage. 1194 * Redis will continue serving during this operation. 1195 * The returned operation is automatically deleted after a few hours, so 1196 * there is no need to call DeleteOperation. 1197 * </pre> 1198 */ exportInstance( com.google.cloud.redis.v1beta1.ExportInstanceRequest request)1199 public com.google.longrunning.Operation exportInstance( 1200 com.google.cloud.redis.v1beta1.ExportInstanceRequest request) { 1201 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1202 getChannel(), getExportInstanceMethod(), getCallOptions(), request); 1203 } 1204 1205 /** 1206 * 1207 * 1208 * <pre> 1209 * Initiates a failover of the primary node to current replica node for a 1210 * specific STANDARD tier Cloud Memorystore for Redis instance. 1211 * </pre> 1212 */ failoverInstance( com.google.cloud.redis.v1beta1.FailoverInstanceRequest request)1213 public com.google.longrunning.Operation failoverInstance( 1214 com.google.cloud.redis.v1beta1.FailoverInstanceRequest request) { 1215 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1216 getChannel(), getFailoverInstanceMethod(), getCallOptions(), request); 1217 } 1218 1219 /** 1220 * 1221 * 1222 * <pre> 1223 * Deletes a specific Redis instance. Instance stops serving and data is 1224 * deleted. 1225 * </pre> 1226 */ deleteInstance( com.google.cloud.redis.v1beta1.DeleteInstanceRequest request)1227 public com.google.longrunning.Operation deleteInstance( 1228 com.google.cloud.redis.v1beta1.DeleteInstanceRequest request) { 1229 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1230 getChannel(), getDeleteInstanceMethod(), getCallOptions(), request); 1231 } 1232 1233 /** 1234 * 1235 * 1236 * <pre> 1237 * Reschedule maintenance for a given instance in a given project and 1238 * location. 1239 * </pre> 1240 */ rescheduleMaintenance( com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest request)1241 public com.google.longrunning.Operation rescheduleMaintenance( 1242 com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest request) { 1243 return io.grpc.stub.ClientCalls.blockingUnaryCall( 1244 getChannel(), getRescheduleMaintenanceMethod(), getCallOptions(), request); 1245 } 1246 } 1247 1248 /** 1249 * A stub to allow clients to do ListenableFuture-style rpc calls to service CloudRedis. 1250 * 1251 * <pre> 1252 * Configures and manages Cloud Memorystore for Redis instances 1253 * Google Cloud Memorystore for Redis v1beta1 1254 * The `redis.googleapis.com` service implements the Google Cloud Memorystore 1255 * for Redis API and defines the following resource model for managing Redis 1256 * instances: 1257 * * The service works with a collection of cloud projects, named: `/projects/*` 1258 * * Each project has a collection of available locations, named: `/locations/*` 1259 * * Each location has a collection of Redis instances, named: `/instances/*` 1260 * * As such, Redis instances are resources of the form: 1261 * `/projects/{project_id}/locations/{location_id}/instances/{instance_id}` 1262 * Note that location_id must be referring to a GCP `region`; for example: 1263 * * `projects/redpepper-1290/locations/us-central1/instances/my-redis` 1264 * </pre> 1265 */ 1266 public static final class CloudRedisFutureStub 1267 extends io.grpc.stub.AbstractFutureStub<CloudRedisFutureStub> { CloudRedisFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions)1268 private CloudRedisFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1269 super(channel, callOptions); 1270 } 1271 1272 @java.lang.Override build(io.grpc.Channel channel, io.grpc.CallOptions callOptions)1273 protected CloudRedisFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { 1274 return new CloudRedisFutureStub(channel, callOptions); 1275 } 1276 1277 /** 1278 * 1279 * 1280 * <pre> 1281 * Lists all Redis instances owned by a project in either the specified 1282 * location (region) or all locations. 1283 * The location should have the following format: 1284 * * `projects/{project_id}/locations/{location_id}` 1285 * If `location_id` is specified as `-` (wildcard), then all regions 1286 * available to the project are queried, and the results are aggregated. 1287 * </pre> 1288 */ 1289 public com.google.common.util.concurrent.ListenableFuture< 1290 com.google.cloud.redis.v1beta1.ListInstancesResponse> listInstances(com.google.cloud.redis.v1beta1.ListInstancesRequest request)1291 listInstances(com.google.cloud.redis.v1beta1.ListInstancesRequest request) { 1292 return io.grpc.stub.ClientCalls.futureUnaryCall( 1293 getChannel().newCall(getListInstancesMethod(), getCallOptions()), request); 1294 } 1295 1296 /** 1297 * 1298 * 1299 * <pre> 1300 * Gets the details of a specific Redis instance. 1301 * </pre> 1302 */ 1303 public com.google.common.util.concurrent.ListenableFuture< 1304 com.google.cloud.redis.v1beta1.Instance> getInstance(com.google.cloud.redis.v1beta1.GetInstanceRequest request)1305 getInstance(com.google.cloud.redis.v1beta1.GetInstanceRequest request) { 1306 return io.grpc.stub.ClientCalls.futureUnaryCall( 1307 getChannel().newCall(getGetInstanceMethod(), getCallOptions()), request); 1308 } 1309 1310 /** 1311 * 1312 * 1313 * <pre> 1314 * Gets the AUTH string for a Redis instance. If AUTH is not enabled for the 1315 * instance the response will be empty. This information is not included in 1316 * the details returned to GetInstance. 1317 * </pre> 1318 */ 1319 public com.google.common.util.concurrent.ListenableFuture< 1320 com.google.cloud.redis.v1beta1.InstanceAuthString> getInstanceAuthString(com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest request)1321 getInstanceAuthString(com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest request) { 1322 return io.grpc.stub.ClientCalls.futureUnaryCall( 1323 getChannel().newCall(getGetInstanceAuthStringMethod(), getCallOptions()), request); 1324 } 1325 1326 /** 1327 * 1328 * 1329 * <pre> 1330 * Creates a Redis instance based on the specified tier and memory size. 1331 * By default, the instance is accessible from the project's 1332 * [default network](https://cloud.google.com/vpc/docs/vpc). 1333 * The creation is executed asynchronously and callers may check the returned 1334 * operation to track its progress. Once the operation is completed the Redis 1335 * instance will be fully functional. The completed longrunning.Operation will 1336 * contain the new instance object in the response field. 1337 * The returned operation is automatically deleted after a few hours, so there 1338 * is no need to call DeleteOperation. 1339 * </pre> 1340 */ 1341 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> createInstance(com.google.cloud.redis.v1beta1.CreateInstanceRequest request)1342 createInstance(com.google.cloud.redis.v1beta1.CreateInstanceRequest request) { 1343 return io.grpc.stub.ClientCalls.futureUnaryCall( 1344 getChannel().newCall(getCreateInstanceMethod(), getCallOptions()), request); 1345 } 1346 1347 /** 1348 * 1349 * 1350 * <pre> 1351 * Updates the metadata and configuration of a specific Redis instance. 1352 * Completed longrunning.Operation will contain the new instance object 1353 * in the response field. The returned operation is automatically deleted 1354 * after a few hours, so there is no need to call DeleteOperation. 1355 * </pre> 1356 */ 1357 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> updateInstance(com.google.cloud.redis.v1beta1.UpdateInstanceRequest request)1358 updateInstance(com.google.cloud.redis.v1beta1.UpdateInstanceRequest request) { 1359 return io.grpc.stub.ClientCalls.futureUnaryCall( 1360 getChannel().newCall(getUpdateInstanceMethod(), getCallOptions()), request); 1361 } 1362 1363 /** 1364 * 1365 * 1366 * <pre> 1367 * Upgrades Redis instance to the newer Redis version specified in the 1368 * request. 1369 * </pre> 1370 */ 1371 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> upgradeInstance(com.google.cloud.redis.v1beta1.UpgradeInstanceRequest request)1372 upgradeInstance(com.google.cloud.redis.v1beta1.UpgradeInstanceRequest request) { 1373 return io.grpc.stub.ClientCalls.futureUnaryCall( 1374 getChannel().newCall(getUpgradeInstanceMethod(), getCallOptions()), request); 1375 } 1376 1377 /** 1378 * 1379 * 1380 * <pre> 1381 * Import a Redis RDB snapshot file from Cloud Storage into a Redis instance. 1382 * Redis may stop serving during this operation. Instance state will be 1383 * IMPORTING for entire operation. When complete, the instance will contain 1384 * only data from the imported file. 1385 * The returned operation is automatically deleted after a few hours, so 1386 * there is no need to call DeleteOperation. 1387 * </pre> 1388 */ 1389 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> importInstance(com.google.cloud.redis.v1beta1.ImportInstanceRequest request)1390 importInstance(com.google.cloud.redis.v1beta1.ImportInstanceRequest request) { 1391 return io.grpc.stub.ClientCalls.futureUnaryCall( 1392 getChannel().newCall(getImportInstanceMethod(), getCallOptions()), request); 1393 } 1394 1395 /** 1396 * 1397 * 1398 * <pre> 1399 * Export Redis instance data into a Redis RDB format file in Cloud Storage. 1400 * Redis will continue serving during this operation. 1401 * The returned operation is automatically deleted after a few hours, so 1402 * there is no need to call DeleteOperation. 1403 * </pre> 1404 */ 1405 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> exportInstance(com.google.cloud.redis.v1beta1.ExportInstanceRequest request)1406 exportInstance(com.google.cloud.redis.v1beta1.ExportInstanceRequest request) { 1407 return io.grpc.stub.ClientCalls.futureUnaryCall( 1408 getChannel().newCall(getExportInstanceMethod(), getCallOptions()), request); 1409 } 1410 1411 /** 1412 * 1413 * 1414 * <pre> 1415 * Initiates a failover of the primary node to current replica node for a 1416 * specific STANDARD tier Cloud Memorystore for Redis instance. 1417 * </pre> 1418 */ 1419 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> failoverInstance(com.google.cloud.redis.v1beta1.FailoverInstanceRequest request)1420 failoverInstance(com.google.cloud.redis.v1beta1.FailoverInstanceRequest request) { 1421 return io.grpc.stub.ClientCalls.futureUnaryCall( 1422 getChannel().newCall(getFailoverInstanceMethod(), getCallOptions()), request); 1423 } 1424 1425 /** 1426 * 1427 * 1428 * <pre> 1429 * Deletes a specific Redis instance. Instance stops serving and data is 1430 * deleted. 1431 * </pre> 1432 */ 1433 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> deleteInstance(com.google.cloud.redis.v1beta1.DeleteInstanceRequest request)1434 deleteInstance(com.google.cloud.redis.v1beta1.DeleteInstanceRequest request) { 1435 return io.grpc.stub.ClientCalls.futureUnaryCall( 1436 getChannel().newCall(getDeleteInstanceMethod(), getCallOptions()), request); 1437 } 1438 1439 /** 1440 * 1441 * 1442 * <pre> 1443 * Reschedule maintenance for a given instance in a given project and 1444 * location. 1445 * </pre> 1446 */ 1447 public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation> rescheduleMaintenance(com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest request)1448 rescheduleMaintenance(com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest request) { 1449 return io.grpc.stub.ClientCalls.futureUnaryCall( 1450 getChannel().newCall(getRescheduleMaintenanceMethod(), getCallOptions()), request); 1451 } 1452 } 1453 1454 private static final int METHODID_LIST_INSTANCES = 0; 1455 private static final int METHODID_GET_INSTANCE = 1; 1456 private static final int METHODID_GET_INSTANCE_AUTH_STRING = 2; 1457 private static final int METHODID_CREATE_INSTANCE = 3; 1458 private static final int METHODID_UPDATE_INSTANCE = 4; 1459 private static final int METHODID_UPGRADE_INSTANCE = 5; 1460 private static final int METHODID_IMPORT_INSTANCE = 6; 1461 private static final int METHODID_EXPORT_INSTANCE = 7; 1462 private static final int METHODID_FAILOVER_INSTANCE = 8; 1463 private static final int METHODID_DELETE_INSTANCE = 9; 1464 private static final int METHODID_RESCHEDULE_MAINTENANCE = 10; 1465 1466 private static final class MethodHandlers<Req, Resp> 1467 implements io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>, 1468 io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>, 1469 io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>, 1470 io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> { 1471 private final AsyncService serviceImpl; 1472 private final int methodId; 1473 MethodHandlers(AsyncService serviceImpl, int methodId)1474 MethodHandlers(AsyncService serviceImpl, int methodId) { 1475 this.serviceImpl = serviceImpl; 1476 this.methodId = methodId; 1477 } 1478 1479 @java.lang.Override 1480 @java.lang.SuppressWarnings("unchecked") invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver)1481 public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) { 1482 switch (methodId) { 1483 case METHODID_LIST_INSTANCES: 1484 serviceImpl.listInstances( 1485 (com.google.cloud.redis.v1beta1.ListInstancesRequest) request, 1486 (io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.ListInstancesResponse>) 1487 responseObserver); 1488 break; 1489 case METHODID_GET_INSTANCE: 1490 serviceImpl.getInstance( 1491 (com.google.cloud.redis.v1beta1.GetInstanceRequest) request, 1492 (io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.Instance>) 1493 responseObserver); 1494 break; 1495 case METHODID_GET_INSTANCE_AUTH_STRING: 1496 serviceImpl.getInstanceAuthString( 1497 (com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest) request, 1498 (io.grpc.stub.StreamObserver<com.google.cloud.redis.v1beta1.InstanceAuthString>) 1499 responseObserver); 1500 break; 1501 case METHODID_CREATE_INSTANCE: 1502 serviceImpl.createInstance( 1503 (com.google.cloud.redis.v1beta1.CreateInstanceRequest) request, 1504 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1505 break; 1506 case METHODID_UPDATE_INSTANCE: 1507 serviceImpl.updateInstance( 1508 (com.google.cloud.redis.v1beta1.UpdateInstanceRequest) request, 1509 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1510 break; 1511 case METHODID_UPGRADE_INSTANCE: 1512 serviceImpl.upgradeInstance( 1513 (com.google.cloud.redis.v1beta1.UpgradeInstanceRequest) request, 1514 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1515 break; 1516 case METHODID_IMPORT_INSTANCE: 1517 serviceImpl.importInstance( 1518 (com.google.cloud.redis.v1beta1.ImportInstanceRequest) request, 1519 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1520 break; 1521 case METHODID_EXPORT_INSTANCE: 1522 serviceImpl.exportInstance( 1523 (com.google.cloud.redis.v1beta1.ExportInstanceRequest) request, 1524 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1525 break; 1526 case METHODID_FAILOVER_INSTANCE: 1527 serviceImpl.failoverInstance( 1528 (com.google.cloud.redis.v1beta1.FailoverInstanceRequest) request, 1529 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1530 break; 1531 case METHODID_DELETE_INSTANCE: 1532 serviceImpl.deleteInstance( 1533 (com.google.cloud.redis.v1beta1.DeleteInstanceRequest) request, 1534 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1535 break; 1536 case METHODID_RESCHEDULE_MAINTENANCE: 1537 serviceImpl.rescheduleMaintenance( 1538 (com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest) request, 1539 (io.grpc.stub.StreamObserver<com.google.longrunning.Operation>) responseObserver); 1540 break; 1541 default: 1542 throw new AssertionError(); 1543 } 1544 } 1545 1546 @java.lang.Override 1547 @java.lang.SuppressWarnings("unchecked") invoke( io.grpc.stub.StreamObserver<Resp> responseObserver)1548 public io.grpc.stub.StreamObserver<Req> invoke( 1549 io.grpc.stub.StreamObserver<Resp> responseObserver) { 1550 switch (methodId) { 1551 default: 1552 throw new AssertionError(); 1553 } 1554 } 1555 } 1556 bindService(AsyncService service)1557 public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { 1558 return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) 1559 .addMethod( 1560 getListInstancesMethod(), 1561 io.grpc.stub.ServerCalls.asyncUnaryCall( 1562 new MethodHandlers< 1563 com.google.cloud.redis.v1beta1.ListInstancesRequest, 1564 com.google.cloud.redis.v1beta1.ListInstancesResponse>( 1565 service, METHODID_LIST_INSTANCES))) 1566 .addMethod( 1567 getGetInstanceMethod(), 1568 io.grpc.stub.ServerCalls.asyncUnaryCall( 1569 new MethodHandlers< 1570 com.google.cloud.redis.v1beta1.GetInstanceRequest, 1571 com.google.cloud.redis.v1beta1.Instance>(service, METHODID_GET_INSTANCE))) 1572 .addMethod( 1573 getGetInstanceAuthStringMethod(), 1574 io.grpc.stub.ServerCalls.asyncUnaryCall( 1575 new MethodHandlers< 1576 com.google.cloud.redis.v1beta1.GetInstanceAuthStringRequest, 1577 com.google.cloud.redis.v1beta1.InstanceAuthString>( 1578 service, METHODID_GET_INSTANCE_AUTH_STRING))) 1579 .addMethod( 1580 getCreateInstanceMethod(), 1581 io.grpc.stub.ServerCalls.asyncUnaryCall( 1582 new MethodHandlers< 1583 com.google.cloud.redis.v1beta1.CreateInstanceRequest, 1584 com.google.longrunning.Operation>(service, METHODID_CREATE_INSTANCE))) 1585 .addMethod( 1586 getUpdateInstanceMethod(), 1587 io.grpc.stub.ServerCalls.asyncUnaryCall( 1588 new MethodHandlers< 1589 com.google.cloud.redis.v1beta1.UpdateInstanceRequest, 1590 com.google.longrunning.Operation>(service, METHODID_UPDATE_INSTANCE))) 1591 .addMethod( 1592 getUpgradeInstanceMethod(), 1593 io.grpc.stub.ServerCalls.asyncUnaryCall( 1594 new MethodHandlers< 1595 com.google.cloud.redis.v1beta1.UpgradeInstanceRequest, 1596 com.google.longrunning.Operation>(service, METHODID_UPGRADE_INSTANCE))) 1597 .addMethod( 1598 getImportInstanceMethod(), 1599 io.grpc.stub.ServerCalls.asyncUnaryCall( 1600 new MethodHandlers< 1601 com.google.cloud.redis.v1beta1.ImportInstanceRequest, 1602 com.google.longrunning.Operation>(service, METHODID_IMPORT_INSTANCE))) 1603 .addMethod( 1604 getExportInstanceMethod(), 1605 io.grpc.stub.ServerCalls.asyncUnaryCall( 1606 new MethodHandlers< 1607 com.google.cloud.redis.v1beta1.ExportInstanceRequest, 1608 com.google.longrunning.Operation>(service, METHODID_EXPORT_INSTANCE))) 1609 .addMethod( 1610 getFailoverInstanceMethod(), 1611 io.grpc.stub.ServerCalls.asyncUnaryCall( 1612 new MethodHandlers< 1613 com.google.cloud.redis.v1beta1.FailoverInstanceRequest, 1614 com.google.longrunning.Operation>(service, METHODID_FAILOVER_INSTANCE))) 1615 .addMethod( 1616 getDeleteInstanceMethod(), 1617 io.grpc.stub.ServerCalls.asyncUnaryCall( 1618 new MethodHandlers< 1619 com.google.cloud.redis.v1beta1.DeleteInstanceRequest, 1620 com.google.longrunning.Operation>(service, METHODID_DELETE_INSTANCE))) 1621 .addMethod( 1622 getRescheduleMaintenanceMethod(), 1623 io.grpc.stub.ServerCalls.asyncUnaryCall( 1624 new MethodHandlers< 1625 com.google.cloud.redis.v1beta1.RescheduleMaintenanceRequest, 1626 com.google.longrunning.Operation>(service, METHODID_RESCHEDULE_MAINTENANCE))) 1627 .build(); 1628 } 1629 1630 private abstract static class CloudRedisBaseDescriptorSupplier 1631 implements io.grpc.protobuf.ProtoFileDescriptorSupplier, 1632 io.grpc.protobuf.ProtoServiceDescriptorSupplier { CloudRedisBaseDescriptorSupplier()1633 CloudRedisBaseDescriptorSupplier() {} 1634 1635 @java.lang.Override getFileDescriptor()1636 public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { 1637 return com.google.cloud.redis.v1beta1.CloudRedisServiceBetaProto.getDescriptor(); 1638 } 1639 1640 @java.lang.Override getServiceDescriptor()1641 public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { 1642 return getFileDescriptor().findServiceByName("CloudRedis"); 1643 } 1644 } 1645 1646 private static final class CloudRedisFileDescriptorSupplier 1647 extends CloudRedisBaseDescriptorSupplier { CloudRedisFileDescriptorSupplier()1648 CloudRedisFileDescriptorSupplier() {} 1649 } 1650 1651 private static final class CloudRedisMethodDescriptorSupplier 1652 extends CloudRedisBaseDescriptorSupplier 1653 implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { 1654 private final String methodName; 1655 CloudRedisMethodDescriptorSupplier(String methodName)1656 CloudRedisMethodDescriptorSupplier(String methodName) { 1657 this.methodName = methodName; 1658 } 1659 1660 @java.lang.Override getMethodDescriptor()1661 public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() { 1662 return getServiceDescriptor().findMethodByName(methodName); 1663 } 1664 } 1665 1666 private static volatile io.grpc.ServiceDescriptor serviceDescriptor; 1667 getServiceDescriptor()1668 public static io.grpc.ServiceDescriptor getServiceDescriptor() { 1669 io.grpc.ServiceDescriptor result = serviceDescriptor; 1670 if (result == null) { 1671 synchronized (CloudRedisGrpc.class) { 1672 result = serviceDescriptor; 1673 if (result == null) { 1674 serviceDescriptor = 1675 result = 1676 io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) 1677 .setSchemaDescriptor(new CloudRedisFileDescriptorSupplier()) 1678 .addMethod(getListInstancesMethod()) 1679 .addMethod(getGetInstanceMethod()) 1680 .addMethod(getGetInstanceAuthStringMethod()) 1681 .addMethod(getCreateInstanceMethod()) 1682 .addMethod(getUpdateInstanceMethod()) 1683 .addMethod(getUpgradeInstanceMethod()) 1684 .addMethod(getImportInstanceMethod()) 1685 .addMethod(getExportInstanceMethod()) 1686 .addMethod(getFailoverInstanceMethod()) 1687 .addMethod(getDeleteInstanceMethod()) 1688 .addMethod(getRescheduleMaintenanceMethod()) 1689 .build(); 1690 } 1691 } 1692 } 1693 return result; 1694 } 1695 } 1696