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